Skip to content

detectostype.md

Tunisiano18 edited this page Oct 30, 2022 · 2 revisions

This helps to detect the OS type

$osInfo = Get-CimInstance -ClassName Win32_OperatingSystem
$osInfo.ProductType

if the result is :

  • 1 => Workstation
  • 2 => Domain controller
  • 3 => Simple Server
Clone this wiki locally