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

Popular posts from this blog

Error: 0x80073701 when trying to add Print Services Role in Windows 2012 Standard

Disconnecting from a Windows Server 2012 R2 file sharing session on a Windows 7,8,10 machine

Event ID 64,77,1008 Certificates Events Windows Server 2008, 2008R2