Hello,
I'm trying to take a list of email accounts and modify their employeeType field based on their classification. I have 3 scripts, 1 for each classification and 3 lists of email accounts in CSV format. Here's my script now, but when it runs, it
doesnt do anything except sit there for 10 minutes, then says the transcripts done. Doesn't show any users being processed. How do I fix this so it works correctly? It does use the Quest tools, but I can't find a regular ad cmdlet that will do
the same thing.. if someone knows a better way to do this, please fire away..
$Now = (get-date)
$Day = $Now.Day
$Month = $Now.Month
$Year = $Now.Year
$Hour = $Now.Hour
$Minute = $Now.Minute
$TStamp = "$Year$Month$Day$Hour$Minute"
Start-Transcript -Path "C:\scripts\out\synergystafftype-$TStamp.txt"
Add-PSSnapin Quest.ActiveRoles.ADManagement
$users = Get-Content C:\emailaccounts\ClassEmps.txt
foreach ($a in $users)
{
get-qaduser -Email $a | set-qaduser -ObjectAttributes @{employeeType="C"}
}
Stop-Transcript