Sunday, April 17, 2011

siDHistory Report - with Multi Value Support

I have updated one of my old PowerShell script to support multiple values in sIDHistory attributes.  This PowerShell Script can used to search a user object in Active Directory domain and generate a report with their SIDHistory value(s).

image

Output #1 - SamAccontName and its SIDHistory value

image

Output #2 – Output file - userinfo.txt -  contains the SamAccontName and its SIDHistory value:

image

Download:

www.sivarajan.com - http://www.sivarajan.com/scripts/sIDHistory%20Report_Multivalued.txt

TechNet Gallery - http://gallery.technet.microsoft.com/scriptcenter/082a257a-5516-4142-bf77-7beb874814da

1 comments:

Get this Following error?

Exception calling "FindAll" with "0" argument(s): "A referral was returned from the server.
"
At C:\script\SIDHistory.ps1:16 char:29
+ $AllObj = $objSearch.FindAll <<<< ()
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : DotNetMethodException


Exception calling "getex" with "1" argument(s): "The directory property cannot be found in the cache.
"
At C:\script\SIDHistory.ps1:24 char:42
+ $objectSIDs = $objpath1.getex <<<< ("sidhistory")
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : CatchFromBaseAdapterMethodInvokeTI

New-Object : Exception calling ".ctor" with "2" argument(s): "Value cannot be null.
Parameter name: binaryForm"
At C:\script\SIDHistory.ps1:27 char:46
+ $sidHist = new-object <<<< System.Security.Principal.SecurityIdentifier $objectSID,0
+ CategoryInfo : InvalidOperation: (:) [New-Object], MethodInvocationException
+ FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand

Post a Comment

Popular Posts

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More