Hello,
Just to inform you, that as expected the command Remove-Mailbox –Identity “First Last” returns the error for the scope and the on-premises. Also according to this article, executing the command:
Disable-Mailbox -Identity "First Last" –PermanentlyDelete
returns the following error:
A parameter cannot be found that matches parameter name 'PermanentlyDelete'.
+ CategoryInfo : InvalidArgument: (:) [Disable-Mailbox], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,Disable-Mailbox
+ PSComputerName : outlook.office365.com
So, I have managed to check that in your article there is error. There is no switch –PermanentlyDelete. The correct one is –PermanentlyDisable. I think, that someone should correct it. By entering the following command:
Disable-Mailbox -Identity "First Last" -PermanentlyDisable
I get the confirmation prompt:
Confirm
Are you sure you want to perform this action?
Disabling mailbox "First Last" will remove the Exchange properties from the Active Directory user object and mark
the mailbox in the database for removal. If the mailbox has an archive or remote archive, the archive will also be
marked for removal. In the case of remote archives, this action is permanent. You can't reconnect this user to the
remote archive again.
Yes Yes to All No No to All [?] Help (default is "Y"): yes
And after confirming with y or yes, the mailbox is successfully removed.