Request PowerShell script to output AD group distinguished names (DN) when input txt file with Active Directory group names
request powershell script use txt file list of 1,000 active directory (ad) group names , output respective distinguished names (dn) in csv file. intent full ad path each of groups, showing in ad they're located.
txt file used input contains each group name on separate line. if possible, script should output csv each group name provided on separate line corresponding distinguished names in cells/column right of each one.
add -notypeinformation switch export-csv cmdlet, missed when retyping script.
the error getting on groups saying cannot find it, quick test , in powershell console type get-adgroup -identity <failed object name> see if returns anything, there may issue input file in spelt correctly or actual ad group names
if find post has answered question, please mark answer. if find post helpful in anyway, please click vote helpful. (99,108,97,121,109,97,110,50,64,110,121,99,97,112,46,114,114,46,99,111,109|%{[char]$_})-join''
Windows Server > Windows PowerShell
Comments
Post a Comment