PowerShell connectivity to Azure, Exchange Online and Exchange on-premises all-in-one

I use the following function in my PowerShell profile so that I can use the Microsoft Online cmdlets, the Exchange cmdlets against Exchange online and the Exchange cmdlets against on-premises all in one session…   Firstly – If you are unsure how to create your PowerShell profile, you can do the following (from a PowerShell session)…

0

NT Account to SID translation …. and back again.

  I keep the following nifty functions in my Powershell profile, it helps when working with SIDs and Active Directory, it allows you to easily convert a SID back to the NTACCOUNT and vice versa…   function ConvertTo-Sid ($NtAccount) {(new-object system.security.principal.NtAccount($NTaccount)).translate([system.security.principal.securityidentifier])} function ConvertTo-NtAccount ($sid) {(new-object system.security.principal.securityidentifier($sid)).translate([system.security.principal.ntaccount])}

0