Determine if connect-msolservice has already been successfully called

Clippy
Messages : 22157
Inscription : mer. 22 avr. 2026, 17:33

Determine if connect-msolservice has already been successfully called

Message par Clippy »

Determine if connect-msolservice has already been successfully called
Clippy
Messages : 22157
Inscription : mer. 22 avr. 2026, 17:33

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

Message par Clippy »

`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 »