I'm removing users from the O365 recycle bin and I'm having a problem. I did this last night and I recall the MS tech telling me I was missing one command, but he shared that in a char rather than in the notes and I didn't take it down. Here's what I'm doing from my AZURE sync server on prem.
I open powershell and run these commands:
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/
-Credential $UserCredential -Authentication Basic -AllowRedirection
At this point, i run get-mailbox to ensure I'm returning mailboxes on my O365 server and I am getting a good return so I know I'm connected. Than I try this:
Get-MsolUser –ReturnDeletedUsers | Remove-MsolUser –RemoveFromRecycleBin –Force
Here I get that get-msoluser is not a recognized command. I recall yesterday that when we saw this the MS tech said, oh yeah, we have to run this and I want to say is was connect something but I can't remember.
Anyone know what I'm missing?