Category: Powershell
If you have many users synced to Office 365. It will be more efficient to user powershell to license them. This is how: connect-msolservice and enter crendentials. Get-MsolAccountSku will display the license types. And then: $AccountSkuId = “tenantname:STANDARDWOFFPACK_STUDENT” $UsageLocation =…
Get all users Deleted Items size: Get-MailBox | Get-MailboxStatistics | select DisplayName,TotalDeletedItemSize Get a specific users Deleted Items Size: Get-MailboxStatistics <alias> | select DisplayName,TotalDeletedItemSize Purge All Users Deleted Items: get-mailbox | Search-mailbox -SearchDumpsterOnly -DeleteContent Purge a specific users Deleted Items:…
This situation may come true if you have Onpremises Exchange and Online tenant Lync. Then you need to add a SIP address with the same name as the user is in the Online tenant. And here’s the script: $mailboxes =…
I found this one very helpful in debugging DFS replication with Autodesk generated files. Autodesk products stamp a temporary mark to files it generates. And this causes DFS to stop replicating them. Run this powershell oneliner to clear out the…
Connet session: $cred = Get-Credential domainusername $session = New-PSSession -ConnectionURI “https://LYNCFE.FQDN/OcsPowershell” -Credential $cred Import-PsSession $session Disconnect session: Get-PSSession | Remove-PSSession