Determine whether a computer is a domain or workgroup machine.
if ((gwmi win32_computersystem).partofdomain -eq $true) { write-host "Domain!" } else { write-host "WorkGroup!" }
Lab Core | The Lab of MrNetTek
A blog about IT, technical solutions, and code.