Quantcast
Channel: TechNet Blogs
Viewing all articles
Browse latest Browse all 34890

PowerTip: Use PowerShell to Return Random Computer Names

$
0
0

Summary: Learn how to use Windows PowerShell to return random computer names from Active Directory.

Hey, Scripting Guy! Question How can I easily obtain random computer names in Active Directory for audit purposes?

Hey, Scripting Guy! Answer Use the Get-ADComputer cmdlet and pipe the results to the Get-Random cmdlet. The following script selects two random computer names from Active Directory.

Get-ADComputer -Filter * | Get-Random -Count 2


Viewing all articles
Browse latest Browse all 34890

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>