efrenmartinez
asked on
Disable Account and Hide from Exchange address book
Hello Alll
i am trying to get a vbscript to disable a user account and also hide from exchange address book i am currently using this to disable but cant figure out how to hide from exchange address book from the command line any suggestions??
dsquery user -name namehere -limit 0 | dsmod user -disabled yes -a batch file
i am trying to get a vbscript to disable a user account and also hide from exchange address book i am currently using this to disable but cant figure out how to hide from exchange address book from the command line any suggestions??
dsquery user -name namehere -limit 0 | dsmod user -disabled yes -a batch file
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
if you want to disable the account you need to change line 33 to
objUser.AccountDisabled = TRUE
Cheers
objUser.AccountDisabled = TRUE
Cheers
ASKER
Worked great had to modify some but it was simple enough, thanks for you help :) , now time to add to remove groups hehe
ASKER
hey andrew do you think it is possible to add to remove all groups accept primary which is domain userS?
ASKER
please ignore last comment, how can we filter it also like if in group Domain Admin exclude? i will open a new question if you like :)
MSExchHideFromAddressLists
property.