Thursday, January 25, 2018

Want to confirm SIDhistory in place for file system?



Run this over the file system (from a computer in the new domain). This can take hours depending on the volume size.

dir "I:\*." -recurse -directory | Get-Acl | select -exp Access | select -exp IdentityReference -Unique

then see the output, the computer you run this from being in the new domain, will resolve to the newdomainname\object because of SIDhistory, if you see anything resolving to the old, either it does not exist in the new domain or it does not have a SIDhistory.

Value
-----
BUILTIN\Administrators
CREATOR OWNER
NT AUTHORITY\SYSTEM
NewDomainName\TaneA
NewDomainName\AzafdpeyP
NewDomainName\daviydia
OldDomainName\chriestoc
NewDomainName\access_group
OldDomainName\priv_group
OldDomainName\johnwsonn
NewDomainName\devaered

Tuesday, January 23, 2018

Reverse the text order in excel with a new function

If you have data (for example a list of users in an Active Directory with full logon names) and you want to sort them via the OU they are in, this is a quick excel function to reverse the text and then you can sort away.


In Excel press ALT-F11

Paste in this code:

 Function reverse(S As String)
    Dim Temp As String, I As Integer, n As Integer
    n = Len(S)
    For I = n To 1 Step -1
        Temp = Temp & Mid(S, I, 1)
    Next I
    reverse = Temp & Right(S, Len(S) - n)
End Function






Then use the new Excel function:

=reverse(cell2)


For example:




This came from:

Blog Archive