Jump to content
Sign in to follow this  
Qual-IT London

server or workstation?

Recommended Posts

Qual-IT London

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

Share this post


Link to post
Share on other sites
Joon

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

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.