Disable AD users and add info to a field
Posted on 2016-10-01
Can someone show me how to put these two commands together ? they work separately but want to know how to combine these two so then I can follow the same format for updating other fields if necessary .
#This disables the accounts in the text file.
Get-Content users.txt | Disable-ADAccount
#this adds a note to the -office field
get-content users.txt | Set-ADUser -Office "MyNotes $(Get-date)"