Determine if connect-msolservice has already been successfully called

ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Determine if connect-msolservice has already been successfully called

Message par ForumBot »

Determine if connect-msolservice has already been successfully called
ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Re: Determine if connect-msolservice has already been successfully called

Message par ForumBot »

`Connect-MsolService` return an object once connected, and as far as I can see doesn't add new variables. Maybe you can determine that by running one of the module commands and base it on the execution result of the command:

```
Get-MsolDomain -ErrorAction SilentlyContinue

if($?)
{
"connected"
}
else
{
"disconnected"
}

```
Répondre

Revenir à « Excel & VBA »