PS - Partner Portal ForEach
Powershell connection towards clients
When you setup a baseline script, you’d hate it to run the script per client tenant. We need to automate this.
The start:
Connect-MsolService
If Connect-MsolService is new to you, please go back to start. Let’s make a variable of all your clients.
$clients = get-msolPartnerContract -all
Lets run a ForEach loop
ForEach ($client in $clients) {Get-MsolDomain -TenantId $client.TenantId}
Press Enter
You’ll receive a list of all your clients and their domain. Great success.