I need to set msExchHideFromAddressLists to true for all disabled accounts
I found the following website that I would like to use
http://msmvps.com/blogs/it-is-etc/archive/2010/12/16/how-to-change-attribute-in-ad-alternatives.aspx
Therefore my script will look something like this
Load-Module ActiveDirectory
$user = Get-ADuser
user.name
$user.msExchHideFromAddressLists = "TRUE"
Set-ADUser -instance $user
I have set up an AD Query for all disabled users and can easily export all
usernames to a text file
What I need to know is how to set up a loop that could check the csv file
and loop through each usernames in it and repeat this until all the users in
the file are set
Any help will be greatly appreciated
Regards
C