Get Installed Printer Remote Computer
I wrote a nice script that get 41 (right now) different configuration points on domain controllers.
Since Windows Server 2012, we got a totally new Server Manager, I think you noticed that.
But do you know it’s customizable ?
If you red some of my previous article on WMI, you probably said yourself “That’s nice, I can make a great report with it, but I need to output all of those informations on a single line for each computer.”, that’s totally possible. You need to create a custom PowerShell object, and store all of the needed properties in it. Continue reading
Today we-ll retrieve a lot of useful informations about an operating system on a remote computer, such as the uptime, the last boot time, the languages, the install date, the OS version, the build, the service pack, and the OS architecture. Continue reading
Today, we want to retrieve the number of logical processors, the amount of ram and the number of ram physical slot used. To achieve our goal, we’ll use WMI :
First, we use the “Win32_ComputerSystem” :
Get-WmiObject Win32_ComputerSystem -ComputerName SQL
If you pipe that in a “Get-Member“, you’ll find more properties, such as those :
If you want the total amount of ram in a readable form, you’ll use a dictionary :
Then, the “Win32_PhysicalMemory” :
Get-WmiObject Win32_physicalmemory -ComputerName SQL
If you pay attention, you’ll notice that this query returned several objects. Indeed, you have one object by used slot, so, you just need to count them to know how many slot are used:
You can have some informations about each used slots such as :
To get CPU informations, you need to use the “Win32_processor” WMI class like that :
If you want more informations, you can use :
Get-WmiObject -Class Win32_processor -ComputerName SQL | select *
This will force the WMI query to retrieve a lot more informations about the remote machine’s CPU.
You also select a few useful properties, with multiple computers :
Get-WmiObject -Class Win32_processor -ComputerName SQL,WSUS,SOFSR2Node1,SOFSR2Node2 | select SystemName,Name,CurrentClockSpeed | Format-Table -AutoSize
You can get some BIOS informations with that WMI call:
Get-WmiObject -Class Win32_Bios -ComputerName SOFSR2Node2
Hereunder an example with some useful properties :
Get-WmiObject -Class Win32_Bios -ComputerName SOFSR2Node2,2k12r2 | Select-Object Manufacturer,Version,SerialNumber,PSComputerName,Description