Jump to content

Recommended Posts

Posted

Is there any way of determining if the script runs on a server or a workstation?

@OSType

Returns "WIN32_NT" for NT/2000/XP/2003 and returns "WIN32_WINDOWS" for 95/98/Me

@OSVersion

Returns one of the following: "WIN_2003", "WIN_XP", "WIN_2000", "WIN_NT4", "WIN_ME", "WIN_98", "WIN_95" and "WIN_6.0", "WIN_6.1" that will change with the official release

Posted

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ProductOptions\ProductType

ServerNT for Member Server

LanmanNT for Domain Controller

WinNT for Workstation

Another easy way is parsing out NET ACCOUNTS

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...