breppe Posted June 1, 2018 #1 Share Posted June 1, 2018 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 More sharing options...
Most Valued User Martin Posted June 1, 2018 Most Valued User #2 Share Posted June 1, 2018 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 More sharing options...
breppe Posted June 25, 2018 Author #3 Share Posted June 25, 2018 Thank´s a lot for your replay @Martin. Is there an other way catching AD-Member-Informations if we don´t use the SwyxWare AD Integration? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.