File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -390,19 +390,16 @@ function Global:Remove-SGWAccount {
390390 }
391391
392392 Process {
393- $id = @ ($id )
394- foreach ($id in $id ) {
395- $Uri = $Server.BaseURI + " /api/v1/grid/accounts/$id "
396- $Method = " DELETE"
393+ $Uri = $Server.BaseURI + " /api/v1/grid/accounts/$id "
394+ $Method = " DELETE"
397395
398- try {
399- $Result = Invoke-RestMethod - Method $Method - Uri $Uri - Headers $Server.Headers
400- Write-Host " Successfully deleted account with ID $id "
401- }
402- catch {
403- $ResponseBody = ParseExceptionBody $_.Exception.Response
404- Write-Error " $Method to $Uri failed with Exception $ ( $_.Exception.Message ) `n $responseBody "
405- }
396+ try {
397+ $Result = Invoke-RestMethod - Method $Method - Uri $Uri - Headers $Server.Headers
398+ Write-Host " Successfully deleted account with ID $id "
399+ }
400+ catch {
401+ $ResponseBody = ParseExceptionBody $_.Exception.Response
402+ Write-Error " $Method to $Uri failed with Exception $ ( $_.Exception.Message ) `n $responseBody "
406403 }
407404 }
408405}
@@ -869,7 +866,6 @@ function Global:New-SGWAccountS3AccessKey {
869866 }
870867
871868 try {
872- $Body
873869 $Result = Invoke-RestMethod - Method $Method - Uri $Uri - Headers $Server.Headers - Body $Body - ContentType " application/json"
874870 }
875871 catch {
@@ -887,7 +883,7 @@ function Global:New-SGWAccountS3AccessKey {
887883 . DESCRIPTION
888884 Delete a StorageGRID Webscale Account S3 Access Key
889885#>
890- function Global :Delete -SGWAccountS3AccessKey {
886+ function Global :Remove -SGWAccountS3AccessKey {
891887 [CmdletBinding ()]
892888
893889 PARAM (
You can’t perform that action at this time.
0 commit comments