Jump to content

PS - pick Windows-Authentication Info from ippbxuser


breppe

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

Link to comment
Share on other sites


  • Most Valued User

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

 

Link to comment
Share on other sites


  • 4 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.