Link to home
Start Free TrialLog in
Avatar of MilesLogan
MilesLoganFlag for United States of America

asked on

add error checking to powershell script

Hi EE

Can someone help me add error checking to this so it shows on the screen on successful changes and failures ?

Import-module ActiveDirectory
Import-CSV "C:\X\UpdateMail.csv" | % {
Set-ADUser $_.User -Mail $_.Mail
}

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MilesLogan

ASKER

thank you ! that was exactly what I needed ..