View Single Post
Old 01-28-2008   #6 (permalink)
Shay Levi


 
 

Re: start-psjob - user credentials


Robin,

What exactly are you trying to do? Can you define "trusted authentication"?

A sample code would be the best to describe your problem.


I'm not sure what do you mean by "current user credentials", maybe this:

PS > [Security.Principal.WindowsIdentity]::GetCurrent() | gm


TypeName: System.Security.Principal.WindowsIdentity

Name MemberType Definition
---- ---------- ----------
Dispose Method System.Void Dispose()
Equals Method System.Boolean Equals(Object obj)
GetHashCode Method System.Int32 GetHashCode()
GetType Method System.Type GetType()
Impersonate Method System.Security.Principal.WindowsImpersonationContext
Impersonate()
ToString Method System.String ToString()
AuthenticationType Property System.String AuthenticationType {get;}
Groups Property System.Security.Principal.IdentityReferenceCollection
Groups {get;}
ImpersonationLevel Property System.Security.Principal.TokenImpersonationLevel
ImpersonationLevel {get;}
IsAnonymous Property System.Boolean IsAnonymous {get;}
IsAuthenticated Property System.Boolean IsAuthenticated {get;}
IsGuest Property System.Boolean IsGuest {get;}
IsSystem Property System.Boolean IsSystem {get;}
Name Property System.String Name {get;}
Owner Property System.Security.Principal.SecurityIdentifier
Owner {get;}
Token Property System.IntPtr Token {get;}
User Property System.Security.Principal.SecurityIdentifier
User {get;}



-----
Shay Levi
$cript Fanatic
http://scriptolog.blogspot.com
Quote:

> Does anyone have any comments on this, or suggestions where I could be
> asking the questions?
>
> - Is it not possible to run backgound jobs and use trusted
> authentication?
> - Is there any way I can see what the current credentials of the user
> are? Or pick them up from when a script is started as a background
> job?
> thanks.
>

My System SpecsSystem Spec