SpanningCloudApps / SB365-Powershell

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

Disabling spanning license is reflecting only two users at a time. #56

Closed ssuryakant20 closed 2 years ago

ssuryakant20 commented 2 years ago

Using below commands to direct output but redirection is not working to the directed file.

Disable-SpanningUsersFromCSVAdvanced  -Path "D:\SpanningO365-v4.3.0.0-full\SpanningO365\4.3.0.0\del-users.csv" -UpnColumn 0`  > D:\SpanningO365-v4.3.0.0-full\SpanningO365\4.3.0.0\disable_logs
SPMatthewMcD commented 2 years ago

Are you saying the command works but the redirection of the output using > isn't working?

ssuryakant20 commented 2 years ago

Both. Redirection is not working and disabling license command is working only for two users at a time and not the complete list.

On Fri, Mar 18, 2022 at 9:38 AM Matthew McDermott @.***> wrote:

Are you saying the command works but the redirection of the output using > isn't working?

— Reply to this email directly, view it on GitHub

Best Regards Suryakant Suryavanshi

SPMatthewMcD commented 2 years ago

OK, how many users are in your CSV file and what is the structure? It should follow the instructions here: https://github.com/SpanningCloudApps/SB365-Powershell/blob/master/samples.md#enabling-users

Looking at your redirection, you have not supplied a file name. In PowerShell you need a filename parameter for the output redirection. https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_redirection

I use the Out-File cmdlet like this:

$usersResult = Disable-SpanningUsersFromCSVAdvanced -Path .\test.users.csv -UpnColumn 0
$users.userPrincipalNames | Out-File -FilePath .\disable-users.txt
SPMatthewMcD commented 2 years ago

@ssuryakant20 Were you able to get it working?

Matthew

SPMatthewMcD commented 2 years ago

@ssuryakant20 Closing for now. Reopen if you still need help.