SpanningCloudApps / SB365-Powershell

Spanning Backup for Office 365 REST API PowerShell Module
https://spanning.com
Apache License 2.0
11 stars 5 forks source link

As mentioned before, even Enable-SpanningUserList does not give output in tabular format. #61

Closed ssuryakant20 closed 2 years ago

ssuryakant20 commented 2 years ago

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.

ssuryakant20 commented 2 years ago

What can be done to get output in tabular format, even disable-spanninguser command has been deprecated

SPMatthewMcD commented 2 years ago

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.

SPMatthewMcD commented 2 years ago

BTW, the "table" in the return is the UserPrincipalNames array in the API result.

$userResult = Enable-SpanningUserList -UserPrincipalNames $users $userResult.userPrincipalNames