web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

How to switch tenants in Power Platform PowerShell to disable Power Pages Creation with test tenant

(2) ShareShare
ReportReport
Posted on by 4
Hi I would like to disable Power Pages Creation in my UAT tenant, where I have the admin role.
 

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:


  1. Force PowerShell to log in to a specific tenant (UAT) so I can disable Power Pages only in that tenant, and

  2. 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?


 
I have the same question (0)
  • Vahid Ghafarpour Profile Picture
    12,220 Super User 2026 Season 1 on at
    I think this cmdlet will help but I didn't test
    Connect-AdminPowerAppEnvironment -TenantId $tenantId -Credential $Credential
     
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Pallavi Phade Profile Picture

Pallavi Phade 102 Super User 2026 Season 1

#2
Abhilash Warrier Profile Picture

Abhilash Warrier 55 Super User 2026 Season 1

#3
ManoVerse Profile Picture

ManoVerse 53 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans