Advertisement

07.06.2008 at 08:36AM PDT, ID: 23541739
[x]
Attachment Details

Getting user domain

Asked by elimesika in MSH/Monad PowerShell

HI

How can I get the current user domain from PowerShell ??

I have tried the following, but didn't got the domain....
Start Free Trial
1:
2:
$user = [System.Security.Principal.WindowsIdentity]::GetCurrent()
$pricipal = New-Object System.Security.Principal.WindowsPrincipal( $user )
[+][-]07.06.2008 at 09:47AM PDT, ID: 21940840

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: MSH/Monad PowerShell
Sign Up Now!
Solution Provided By: BSonPosh
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_EXPERT_20070906