azauthorizationstore

Welcome Forums General PowerShell Q&A azauthorizationstore

This topic contains 6 replies, has 3 voices, and was last updated by

 
Participant
2 years, 9 months ago.

  • Author
    Posts
  • #34150

    Participant
    Points: -19
    Rank: Member
    $myobject=New-Object -ComObject AzRoles.azauthorizationstore  

    Ahh so it begins....

    I know there is an initialize method but how do I use it?
    (Initialize Method void Initialize (int, string, Variant) )

  • #34152

    Keymaster
    Points: 1,619
    Helping HandTeam Member
    Rank: Community Hero

    Well, broadly...

    $myobject.Initialize($x,$y,$z)

    What those parameters actually want from you, you'd need to look up the documentation for the object. PowerShell can't tell you the meaning, only the data types expected.

  • #34154

    Member
    Points: 0
    Rank: Member
  • #34157

    Participant
    Points: -19
    Rank: Member

    once its initialized i will be connected so should another variable be used to express the connection?

     $myobject=New-Object -ComObject AzRoles.azauthorizationstore  
               $initmyobject=$myobject.initalize(0,ldap://MyServer/CN=MyStore,OU=AzMan,DC=MyDomain,DC=Fabrikam,DC=Com,$null)         
  • #34158

    Keymaster
    Points: 1,619
    Helping HandTeam Member
    Rank: Community Hero

    The docs indicate that it only returns an OK or error flag. It doesn't return a reference to a connection.

    So in your example, $initmyobject would either contain an S_OK flag, or an error code.

  • #34159

    Keymaster
    Points: 1,619
    Helping HandTeam Member
    Rank: Community Hero

    I imagine $myobject would continue to refer to the now-initialized object.

  • #34161

    Participant
    Points: -19
    Rank: Member

    Thanks! If I manage to figure this out I will post the answer here

The topic ‘azauthorizationstore’ is closed to new replies.