Remove User From AzureAD Group Script

Just a quick post to share a simple PowerShell script that will allow administrators to remove a User from an AzureAD Group. Script will prompt for the UPN of the user that you want to manage and produce a menu list of all their group memberships Simply enter the number Continue Reading


Add Security Groups from Trusted Domain to Trusting Domain Local Groups

I needed a quick way to add domain global groups from a trusting domain to domain local groups in the trusting domain with the same name for a project I was undertaking. The trusting domain was Windows 2003 and we did not have access to any AD Powershell module in Continue Reading

Removing Foreign Security Principals from Groups

Today I had a requirement to migrate users and groups from a legacy domain to a new domain using ADMT. All legacy groups were domain local with members from other groups on other domains via existing trusts. Performing a migration of a Domain local groups using ADMT also migrates across Continue Reading

Copy users from on Active Directory to another (no trust/ADMT)

I had a scenario whereby a customer wanted to migrate from SBS2003 to Server 2012 and Exchange 2013 in one hop. There was not enough resources to install and exchange 2010 migration server to move mailboxes over EWS and due to SBS constraints we cannot use ADMT to migrate as Continue Reading

Random Password Function Powershell

To generate a random password for Active directory you can use this function Function Get-RandomPassword(){ Param ( [int]$length=5 ) $alphabet=$NULL;For ($a=65;$a –le 90;$a++) {$alphabet+=,[char][byte]$a } $ascii=$NULL;For ($a=33;$a –le 126;$a++) {$ascii+=,[char][byte]$a } For ($l=1; $l -le $length; $l++){ $tempPassword += ($alphabet | Get-Random) $tempPassword += ($ascii | Get-Random) } return $tempPassword Continue Reading