Monthly Archives: January 2019

Reset User Passwords and Add Missing Users to Active Directory via PowerShell from Google Accounts

MySQL SQL Code SELECT SUBSTRING_INDEX(Google.primaryEmail , ‘@’ , 1) AS ‘SamAccountName’ , Google.name.givenName AS ‘GivenName’ , Google.name.familyName AS ‘Surname’ , Google.name.fullName AS ‘DisplayName’ , CASE CONVERT(SUBSTRING_INDEX(SUBSTRING_INDEX(Google.orgUnitPath , ‘/’ , – 1), ‘ ‘, -1),UNSIGNED INTEGER) WHEN 6 THEN “OU=7,OU=Middle,OU=Students,OU=Users,OU=Thornlie Accounts,DC=tcc,DC=wa,DC=edu,DC=au” WHEN 7 THEN “OU=8,OU=Middle,OU=Students,OU=Users,OU=Thornlie Accounts,DC=tcc,DC=wa,DC=edu,DC=au” WHEN 8 THEN “OU=9,OU=Middle,OU=Students,OU=Users,OU=Thornlie Accounts,DC=tcc,DC=wa,DC=edu,DC=au” WHEN 9 THEN “OU=10,OU=Senior,OU=Students,OU=Users,OU=Thornlie Accounts,DC=tcc,DC=wa,DC=edu,DC=au”… Read More »