July 9, 2009

AzMan and Powershell

I figured I would start this as a work in progress. How can I connect to AzMan using Powershell?
$AppName = "MyAppName"

# Open the store
$AzStore = new-object -COMObject AzRoles.AzAuthorizationStore
$AzStore.Initialize(0, "msxml://E:\BigBadAzMan.xml", $null)

# Access the app
$MyApp = $AzStore.OpenApplication($AppName)
$MyApp.Submit()

# now do stuff
What can you do with the above so far? Well, you can extend it to do anything you like. Add roles, Add operations, Add users to roles, and anything else the AzMan API gives you. Maybe I'll build on this and start to build a powershell provider for AzMan (I believe some basic ones already exist).

--Work in Progress

No comments:

Post a Comment