Closed ssuryakant20 closed 2 years ago
What can be done to get output in tabular format, even disable-spanninguser command has been deprecated
Disable-SpanningUser
can still be used. The command is deprecated but not removed. It is just a wrapper for Disable-SpanningUserList
and passes only one user.
The way the API works today is to return a single status for the "batch" of users in the list, not separate status for each. If you would like to make a product enhancement request, you can do so by filing a support ticket and request the product API enhancement. I'll see that it gets to the PM for the product.
BTW, the "table" in the return is the UserPrincipalNames array in the API result.
$userResult = Enable-SpanningUserList -UserPrincipalNames $users $userResult.userPrincipalNames
As mentioned below, command Enable-SpanningUserList is also not giving output as stated below, instead it is giving output in the format mentioned in "Actual Output"
$users2activate = Get-Content -Path "C:\Test\Users.csv" Enable-SpanningUserList -UserPrincipalNames $users2activate -WhatIf The result should be displayed as follows:
Expected Output: userPrincipalName licensed
willa@doghousetoys.com True kobe@doghousetoys.com True jazzy@doghousetoys.com True cheyenne@doghousetoys.com True
Actual Output:
What if: Performing the operation "Enable-SpanningUsers" on target "userPrincipalName willa@doghousetoys.com kobe@doghousetoys.com jazzy@doghousetoys.com cheyenne@doghousetoys.com.