Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > PowerShell

Authorizing operations in PowerShell

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 03-31-2007   #1 (permalink)
Joris van Lier
Guest


 

Authorizing operations in PowerShell

Hi all, i'm investigating the possibility of authorizing certain operations for certain users in a dynamic fashion
After reading the article "Developing Applications Using Windows Authorization Manager" @ http://msdn2.microsoft.com/en-us/library/aa480244.aspx i've determined that Authorization Manager will suit m needs for defining access permissions,
however i'm unsure where to plug the authorization validation into powershell. PowerShell SDK mentions System.Management.Automation.AuthorizationManager @ http://msdn2.microsoft.com/en-us/lib...onmanager.aspx which controls is Commands Should run and supply a Reason for not running command.
The PowerShell SDK topic "How to Create a Console Shell" http://msdn2.microsoft.com/en-us/library/aa965352.aspx shows how to use the -authorizationmanager parameter of make-shell to specify a cutom authorization manager.

Am i correct in assuming i have to create a custom shell and deny access to the standard powershell to plug my custom AuthorizationManager into powershell, and that this can/should only be done by creating a custom shell.

regards
Joris van Lier


My System SpecsSystem Spec
Old 03-31-2007   #2 (permalink)
Joris van Lier
Guest


 

Re: Authorizing operations in PowerShell

Joris van Lier wrote:
> Hi all, i'm investigating the possibility of authorizing certain
> operations for certain users in a dynamic fashion
> After reading the article "Developing Applications Using Windows
> Authorization Manager" @
> http://msdn2.microsoft.com/en-us/library/aa480244.aspx i've
> determined that Authorization Manager will suit m needs for defining
> access permissions,
> however i'm unsure where to plug the authorization validation into
> powershell. PowerShell SDK mentions
> System.Management.Automation.AuthorizationManager @
> http://msdn2.microsoft.com/en-us/lib...onmanager.aspx
> which controls is Commands Should run and supply a Reason for not
> running command.
> The PowerShell SDK topic "How to Create a Console Shell"
> http://msdn2.microsoft.com/en-us/library/aa965352.aspx shows how to
> use the -authorizationmanager parameter of make-shell to specify a
> cutom authorization manager.
>
> Am i correct in assuming i have to create a custom shell and deny
> access to the standard powershell to plug my custom
> AuthorizationManager into powershell, and that this can/should only
> be done by creating a custom shell.
>
> regards
> Joris van Lier


forgot to ask:
Can I define the AuthorizationManager to use when using RunspaceInvoke?
My System SpecsSystem Spec
Old 03-31-2007   #3 (permalink)
Joris van Lier
Guest


 

Re: Authorizing operations in PowerShell

Joris van Lier wrote:
> Joris van Lier wrote:
>> Hi all, i'm investigating the possibility of authorizing certain
>> operations for certain users in a dynamic fashion
>> After reading the article "Developing Applications Using Windows
>> Authorization Manager" @
>> http://msdn2.microsoft.com/en-us/library/aa480244.aspx i've
>> determined that Authorization Manager will suit m needs for defining
>> access permissions,
>> however i'm unsure where to plug the authorization validation into
>> powershell. PowerShell SDK mentions
>> System.Management.Automation.AuthorizationManager @
>> http://msdn2.microsoft.com/en-us/lib...onmanager.aspx
>> which controls is Commands Should run and supply a Reason for not
>> running command.
>> The PowerShell SDK topic "How to Create a Console Shell"
>> http://msdn2.microsoft.com/en-us/library/aa965352.aspx shows how to
>> use the -authorizationmanager parameter of make-shell to specify a
>> cutom authorization manager.
>>
>> Am i correct in assuming i have to create a custom shell and deny
>> access to the standard powershell to plug my custom
>> AuthorizationManager into powershell, and that this can/should only
>> be done by creating a custom shell.
>>
>> regards
>> Joris van Lier

>
> forgot to ask:
> Can I define the AuthorizationManager to use when using
> RunspaceInvoke?


Answering my own question: it seems you can specify the AuthorizationManager
by assigning it to the RunspaceConfiguration.AuthorizationManager property ,
then
passing this to RunspaceFactory.CreateRunspace(RunspaceConfiguration)

Adding three more questions:
How do i enforce this RunspaceConfiguration to be applied to every
shell/invokation?
How do i deny invoking shell/runspace without my custom configuration?
Is distribution of such settings via Active Directory possible?

Joris


My System SpecsSystem Spec
Closed Thread

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows Mail hanging on authorizing Wolfe13 Vista mail 1 02-02-2008 02:32 AM
Windows mail stuck on 'authorizing'!! Caroline65 Vista mail 1 01-23-2008 03:19 AM
Authorizing...no mail Barnum Vista mail 2 11-08-2007 01:06 PM
Authorizing Powershell Operations Joris van Lier PowerShell 4 05-23-2007 03:24 PM


Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51