How can I use PSTools to pull the Serial Number from the camera? For Hanwha Techwin cameras they have a MAC address and a separate device serial number and I am not seeing how to get the serial number using PowerShell PStools. I’m sure I am missing something. Thanks
Just like the MAC Address the Serial number is a field on the hardware object. I do not have a MIlestonePSTools at hand and haven’t tried it out, I am hoping that this hint might be enough for you to get it to work.
Thanks, however, I pulled the hardware object report using PSTools and it is not showing serial number. Please test it out and provide your results, maybe I am missing something.
Hi @Jeremy Dennis,
The value of the “SerialNumber” and “MacAddress” hardware properties depend on the device pack driver implementation and how the value is retrieved from the camera. For example, I’ve seen an incomplete SerialNumber value returned using a camera’s native device pack driver / API but the full expected value returned when using the ONVIF driver (or maybe it was the other way around?).
In any case, you can use the “Get-HardwareSetting” cmdlet to retrieve the collection of settings found in the “Settings” tab on the hardware in Management Client. Here’s a quick one-liner to pull a list of all hardware, and their MacAddress and SerialNumber properties.
Get-VmsHardware | Select-Object Name, Address, @{Name='MAC';Expression={($_ | Get-HardwareSetting).MacAddress}}, @{Name='Serial';Expression={($_ | Get-HardwareSetting).SerialNumber}}
To see a list of all the hardware setting names/values on a single hardware object:
Get-VmsHardware | Out-GridView -OutputMode Single | Get-HardwareSetting
<# Example Output
DetectedModelName : AXIS P1465-LE Bullet Camera
ProductID : Axis
MacAddress : B8A44F6BD123
FirmwareVersion : 11.9.60
SerialNumber : B8A44F6BD123
AbsoluteTime : no
Bandwidth : Unlimited
HTTPSEnabled : no
HTTPSPort : 443
HTTPSValidateCertificate : No
HTTPSValidateHostname : No
MulticastStartPort : 50000
MulticastEndPort : 50999
AuthenticationType : Automatic
ZipstreamSupportedType : yes
OSDMetadataType : off
AuxUse : PTZ
Rotation : 0
PasswordChangeSupported : Yes
PasswordChangeMinLength : 1
PasswordChangeMaxLength : 64
FirmwareUpgradeSupported : Yes
RecorderAddress :
RecorderCredentials :
#>
Thank you!
Hi @Josh Hendricks (Milestone Systems)
I have tried this and works very well, Thank you so much for this info.
But is there a way to export this data to an excel sheet, as the following code gives me an error,
$dat = Get-VmsHardware | Select-Object Name, Address, @{Name=‘MAC’;Expression={($_ | Get-HardwareSetting).MacAddress}}, @{Name=‘Serial’;Expression={($_ | Get-HardwareSetting).SerialNumber}}
$dat | Export-VmsHardware -Path dat.csv
Thanks in advance