Jump to content
breppe

PS - pick Windows-Authentication Info from ippbxuser

Recommended Posts

Hello Community!

 

i´m trying to automate the profile-picture assignment by using power shell. To do this i need to pick the Windows-Authentication Username from IpPbxUser-Object of Connect-IpPbx Module in Power shell. As i see there is no way getting there information directily from the mentioned PowerShell-Object. Is there anybody who can make a suggestion how to pic this information?

 

kind reguards

breppe

Share this post


Link to post
Share on other sites

The user object has a property called UserNTAccountEntryCollection which contains all Windows Accounts associated with the SwyxWare user.

 

Note: There might be more than one item in the collection.

Note: If you use the SwyxWare AD Integration (via the Microsoft Active Users and Computers snapin), the SwyxWare <-> AD User link can be retrieved via 

 

$UserEnum = $LibManager.GetUserEnum()

$User = Get-IpPbxUser -Username "Otto" 
$Sid = $UserEnum.GetADOwner($User.UserID) # you can and should reuse the userEnum when calling this with different user ids

SwyxWare returns Windows Security Identifiers (SIDs). To get the username use something like this:

$sid = new-object "System.Security.Principal.SecurityIdentifier" -ArgumentList $SID
$sid.Translate([System.Security.Principal.NTAccount]).Value

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and have taken note of our Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.