You could so something like.
Get-ADComputer -Filter 'Name -like "PC01*"'
--please don't forget to upvote
and Accept as answer
if the reply is helpful--
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
When I configure a PC, one of the first steps is to assign a name to the device. I can only choose a name who belongs in "Active Directory Users and Computers". Before assigning a name, however, I need to figure out if that name is already taken by another device. To do this:
Despite these checks, sometimes I assign a name already taken.
I cannot simply delete a computer name and recreate it, because our Active Directory is managed my an external provider.
I need to figure out if there is a more reliable method to check which computer names are free to be assigned. Maybe a script on PowerShell, something like this I mean.
You could so something like.
Get-ADComputer -Filter 'Name -like "PC01*"'
--please don't forget to upvote
and Accept as answer
if the reply is helpful--