From 32d5abaf6105ed9c03fd9bc12617e566f9f3ec7c Mon Sep 17 00:00:00 2001 From: Chris Griffiths Date: Thu, 19 Dec 2024 16:19:52 +1000 Subject: [PATCH 1/3] bugfix --- Safe Management/Safe-Management.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Safe Management/Safe-Management.ps1 b/Safe Management/Safe-Management.ps1 index 75275ee..fb95b3a 100644 --- a/Safe Management/Safe-Management.ps1 +++ b/Safe Management/Safe-Management.ps1 @@ -646,7 +646,7 @@ Get-Safe -safeName "x0-Win-S-Admins" $nextLink = $_safe.nextLink While (![string]::IsNullOrEmpty($nextLink)) { $_safeNext = @() - $_safeNext += $(Invoke-Rest-Uri "$PVWAURL/$nextLink" -Command 'Get' -Header $g_LogonHeader -ErrAction 'SilentlyContinue') + $_safeNext += $(Invoke-Rest -Uri "$PVWAURL/$nextLink" -Command 'Get' -Header $g_LogonHeader -ErrAction 'SilentlyContinue') $_safe += $_safeNext If (![string]::IsNullOrEmpty($_safeNext.nextLink)) { $nextLink = $_safeNext.nextLink @@ -669,9 +669,9 @@ Get-Safe -safeName "x0-Win-S-Admins" Write-LogMessage -type Error -MSG "Status Description: $($_.Exception.Response.StatusDescription)" } } - catch { - Throw $(New-Object System.Exception ("Get-Safe: Error retrieving safe '$safename' details.", $_.Exception)) - } + # catch { + # Throw $(New-Object System.Exception ("Get-Safe: Error retrieving safe '$safename' details.", $_.Exception)) + # } return $_safe } From f3312a1c34df3972407d852384b1dcb516d4d28d Mon Sep 17 00:00:00 2001 From: Chris Griffiths Date: Thu, 19 Dec 2024 17:17:41 +1000 Subject: [PATCH 2/3] Bugfix --- Safe Management/Safe-Management.ps1 | 1 - 1 file changed, 1 deletion(-) diff --git a/Safe Management/Safe-Management.ps1 b/Safe Management/Safe-Management.ps1 index fb95b3a..76c0b84 100644 --- a/Safe Management/Safe-Management.ps1 +++ b/Safe Management/Safe-Management.ps1 @@ -641,7 +641,6 @@ Get-Safe -safeName "x0-Win-S-Admins" try { $accSafeURL = $URL_SpecificSafe -f $(ConvertTo-URL $safeName) $_safe += $(Invoke-Rest -Uri $accSafeURL -Command 'Get' -Header $g_LogonHeader -ErrAction 'SilentlyContinue') - $_safe += $(Invoke-Rest -Uri $accSafeURL -Command 'Get' -Header $g_LogonHeader -ErrAction 'SilentlyContinue') If (![string]::IsNullOrEmpty($_safe.nextLink)) { $nextLink = $_safe.nextLink While (![string]::IsNullOrEmpty($nextLink)) { From d1d26630ef00512ec519737dad6b919a84f3c3bb Mon Sep 17 00:00:00 2001 From: Chris Griffiths Date: Thu, 19 Dec 2024 17:31:05 +1000 Subject: [PATCH 3/3] Bugfix --- Safe Management/Safe-Management.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Safe Management/Safe-Management.ps1 b/Safe Management/Safe-Management.ps1 index 76c0b84..29fef97 100644 --- a/Safe Management/Safe-Management.ps1 +++ b/Safe Management/Safe-Management.ps1 @@ -668,9 +668,9 @@ Get-Safe -safeName "x0-Win-S-Admins" Write-LogMessage -type Error -MSG "Status Description: $($_.Exception.Response.StatusDescription)" } } - # catch { - # Throw $(New-Object System.Exception ("Get-Safe: Error retrieving safe '$safename' details.", $_.Exception)) - # } + catch { + Throw $(New-Object System.Exception ("Get-Safe: Error retrieving safe '$safename' details.", $_.Exception)) + } return $_safe }