PowerTip: Use PowerShell to Return Random Computer Names
Summary: Learn how to use Windows PowerShell to return random computer names from Active Directory.
How can I easily obtain random computer names in Active Directory for audit purposes?
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