Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Need Help Summarizing a list of AD accounts

$
0
0

Basically i need to summarize a list of accounts in the below format to this TestAccount01-04:

TestAccount01

TestAccount02

TestAccount03

TestAccount04

 

I tried messing around some but was not successful. The accounts are stored in avariable ran by this command:

$accounts = Get-ADUser -Filter {samaccountname -like "TestAccount*"} -searchbase "OU=xxx,OU=xxx,OU=xxx,dc=xxx,dc=xxx,dc=com" | select name

 Any ideas on how to do this?


Viewing all articles
Browse latest Browse all 6937

Trending Articles