Monday, January 3, 2011

Generate sidHistory Report using DSQUERY command

Last week I blogged about generating sidHistory report using a PowerShell script - If you prefer to use dsquery command, you can use the following syntax to generate similar report.

dsquery * -Filter "(samaccountname=santhosh)" -Attr samAccountName ObjectSID sidHistory

You can also create a batch file with the following command generate a report from an input file (Users.txt):


For /f %%i in (C:\Users.txt) Do (

dsquery * -Filter "(samaccountname=%%i)" -Attr samAccountName ObjectSID sidHistory >> C:\User_Info.txt


As you can see in the following screenshot, the output file (User_Info.txt) contains the SamAccontName, ObjectSID and its sidHistory value:


Dsquery -


I bought a watch for my boyfriend at this online store. The watch runs on time, the quality is very good, the style of the watch is very like, it is worth buying.
buy uk fake watches

I know that advices from will be useful for teachers. You can use this information in order to keep children's attention.

Post a Comment

Popular Posts


Twitter Delicious Facebook Digg Stumbleupon Favorites More