Agent Procedure, Script, Audit
This procedure is getting the Type of the Machine(Domain Controller, Server, Workstation or Unknown) from Microsoft ProductType class.
The value can be used to build views, policies our other...
Why: You can easily build views for all Server/ Workstation without to filter static with OS Version.
Requirement: Custom Field 'Operating System Type'
13-08-2020: Fix Import Bug with characters Kaseya doesn't support (Set variable doesn't allow <<>> characters .)
Get Agent Type (ProductType) is it a Server or Workstation has no reviews.
I had to modify the script to give proper outputs
The default is (wmiobject win32_operatingsystem).ProductType Which is marked every server type including DC as Server.
I switch it to (wmiobject win32_computersystem).DomainRole and set the if statements to check for the following:
0 Standalone Workstation
1 Member Workstation
2 Standalone Server
3 Member Server
4 Backup Domain Controller
5 Primary Domain Controller
Nice to see you change you output for you purpose :)!