Skip to content

Commit b9be9ea

Browse files
committed
Made Get-SgwCompliance Cmdlet available to Tenants
1 parent 8df8f16 commit b9be9ea

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

src/StorageGRID-Webscale.psm1

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2597,7 +2597,13 @@ function Global:Get-SgwCompliance {
25972597
}
25982598

25992599
Process {
2600-
$Uri = $Server.BaseURI + "/grid/compliance-global"
2600+
if ($Server.AccountId) {
2601+
$Uri = $Server.BaseURI + "/org/compliance-global"
2602+
}
2603+
else {
2604+
$Uri = $Server.BaseURI + "/grid/compliance-global"
2605+
}
2606+
26012607
$Method = "GET"
26022608

26032609
try {
@@ -2652,6 +2658,9 @@ function Global:Enable-SgwCompliance {
26522658
if (!$Server) {
26532659
Throw "No StorageGRID Webscale Management Server management server found. Please run Connect-SgwServer to continue."
26542660
}
2661+
if ($Server.AccountId) {
2662+
Throw "Operation not supported when connected as tenant. Use Connect-SgwServer without the AccountId parameter to connect as grid administrator and then rerun this command."
2663+
}
26552664
}
26562665

26572666
Process {

0 commit comments

Comments
 (0)