Category Archives: PowerShell

Set the Firstname attribute to equal the Name (cn) attribute.

get-qaduser -searchroot “ou=people,ou=hope,dc=fun,dc=local” |foreach { set-qaduser $_  -firstname ($} Advertisements

Posted in PowerShell | Tagged | Leave a comment

Setting the SMTP address when an email policy won’t do the trick

I’m migrating a bunch of users from one domain to another. The client promised the end users that the first part of their email shall remain the same, only the domain changes. So, for example, if Bob Jones email address … Continue reading

Posted in PowerShell | Leave a comment

Check for existing user in active directory

This powershell script below allows me to take an input file that looks like this (input-users.csv) SamAccountName ksk34 xyz444 jsmith bjones and make an output file that will look like this (out.csv) ksk34,yes xyz444,no jsmith,no bjones,yes The client I was … Continue reading

Posted in Active Directory, PowerShell | Leave a comment

Import Export IP list on Allowed Relay Receive Connector

If you are migrating from Exchange 2003 to 2010, when you export the list of allowed relay devices, following this article the output will typically be in this format: Name the file IPList.txt So, … Continue reading

Posted in Exchange, Migration, Office 365, PowerShell | 4 Comments

Set homeDirectory attribute to users from input csv file

The non-standard home directory path will be set on the user account in active directory using the input file called home-dir-path.csv which contains two fields. The Microsoft Logon name, the samAccount attribute, followed by the Home Directory Path in UNC … Continue reading

Posted in PowerShell | Leave a comment

Find missing AD users

[PS] C:\DeptTools>type test.ps1 Import-Csv userTest.csv | ForEach-Object { if (Get-QADUser $_.SamAccountName) {} else {$_.SamAccountName |out-file missing.txt -append} } I have a list of ids and ACLs i am about to set using subinacl.  I want to find out which users … Continue reading

Posted in PowerShell | Leave a comment

Mailbox Stats Mailed Exchange 2010

The goal of this article is to create a mailbox.txt file that contains mailbox statistics about your exchange users AND to have it mailed to you everyday at say, 5:00pm. This article is specific for Exchange 2010, but it can … Continue reading

Posted in Exchange 2010, PowerShell | Leave a comment