Sunday, January 18, 2009

identify CPU, Computer/Domain/User Name

[] to identify the number of CPU it has

PS> [System.Environment]::ProcessorCount

1 <--- Solo or one processor

[] to identify the computer name

PS> [System.Environment]::MachineName

NPARKS

or,

PS> [System.Environment]::UserDomainName

NPARKS

[] to identify the current logon account name

PS> [System.Environment]::UserName

Administrator

No comments:

Post a Comment