- January 21, 2016 at 2:03 pm #34150
$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) )January 21, 2016 at 2:11 pm #34152
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.January 21, 2016 at 2:20 pm #34154
Documentation on that class and method: https://msdn.microsoft.com/en-us/library/windows/desktop/aa376359%28v=vs.85%29.aspxJanuary 21, 2016 at 2:25 pm #34157
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)January 21, 2016 at 2:33 pm #34158
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.January 21, 2016 at 2:34 pm #34159
I imagine $myobject would continue to refer to the now-initialized object.January 21, 2016 at 3:28 pm #34161
Thanks! If I manage to figure this out I will post the answer here
You must be logged in to reply to this topic.