However, when I run the PowerShell commands (Set-TenantSettings -RequestBody @{ "disablePortalsCreationByNonAdminUsers" = $true }) they always connect to my default production tenant, where I am not an admin.
I would like to know how to:
- Force PowerShell to log in to a specific tenant (UAT) so I can disable Power Pages only in that tenant, and
- Re-login back to my default production tenant afterwards when needed.
What is the correct way to switch tenants in Power Platform PowerShell to avoid affecting the wrong tenant?


Report
All responses (
Answers (