Windows OS
--
Questions
--
Followers
Top Experts
I'd like to get a list of the serial numbers of ALL computers currently running in our domain. I'm assuming this would be done from accessing information via Active Directory.
Can a powershell command be run from my Windows 7 computer or must I run the command from the Domain Controller itself?
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
https://blogs.technet.microsoft.com/mmodin/2009/10/28/get-computer-serial-number-and-other-info-with-powershell/
In either case I am not sure how you can run ANY command that would accomplish either.
You can go into AD Users and Computers > The domain you want to see > Computers and this is the list of all the computers that are in that domain who are in your AD.
So out of curiosity I clicked on one of the computers in my AD computers group clicked on the "Attribute Editor" tab and scrolled to "serialNumber" and I'll be a **** **** **** that there is an object just for that, however you would had to have already previously set that in order for it to be filled otherwise it will be "<not set>"






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
My AD OU named Computers populates with what you described. The attribute is <not set>.
It is that serial number that I need to retrieve - not for just 1 computer but for all computers in our domain.
I was hoping to find a PowerShell command that would work.
To 65td:
Your link provided me with some PowerShell commands, but it looks as though I need to know the HostName of the computer before I can retrieve the serial number, as in:
Get-WMIObject -Class Win32_BIOS -ComputerName DomCon1 | Format-List SerialNumber
The above command provided me only with the serial number of DomCon1
$computers = get-adcomputer -filter * | select-object -expandproperty Name
foreach ($computer in $computers) {
$serial = Get-WMIObject -Class Win32_BIOS -ComputerName $computer | select-object -expandproperty SerialNumber
write-output ("Computer {0} Serial Number: {1}" -f $computer,$serial)
}
This exact command can be copied/pasted at my powershell prompt - no changes necessary? If so:
1) Can it be run from my own pc . . .or,
2) Must it be run from the powershell on the Domain Controller itself?

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
The second part I was pretty sure some AD script guru would be able to cobble something together, but its pretty useless if that field wasn't already populated (as seems to be the case).
Apologies to you, but:
The only acronym I associate with ISE is Cisco's "Identity Services Engine". What exactly do you mean "paste it into your ISE"?






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
what if the remote laptops are using vpn to connect to the network?
Thanks
Ric
Windows OS
--
Questions
--
Followers
Top Experts
This topic area includes legacy versions of Windows prior to Windows 2000: Windows 3/3.1, Windows 95 and Windows 98, plus any other Windows-related versions including Windows Mobile.