Closed ssuryakant20 closed 2 years ago
Are you saying the command works but the redirection of the output using >
isn't working?
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
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
@ssuryakant20 Were you able to get it working?
Matthew
@ssuryakant20 Closing for now. Reopen if you still need help.
Using below commands to direct output but redirection is not working to the directed file.