Get local computers Workgroup name

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi all.

Getting stright to the point Im trying to get and set my computers workgroup
name but im having litle luck, i've tryed:

Environment.UserDomainName
Environment.MachineName

but they only retreive the local machine name.

Can anyone point me in the right direction.
Thanks.

P.s reason being, im writing a small app for changing NIC settings on the fly.
.