-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Closed
Labels
Resolution-AnsweredThe question is answered.The question is answered.WG-RemotingPSRP issues with any transport layerPSRP issues with any transport layer
Description
I have been using Powershell SDK to run a script that gets Group Policy Permissions on a GPO. When I run the script below over Remote Powershell on a Windows 2016 Host, it returns GPPermission Objects and when I walk through it the Trustee property is correctly returned as GPTrustee object. When I run this script from Powershell SDK 7.1.3, the trustee property returns a string for type of the object instead of the value. Note that rest of the permission object is populated fine.
Steps to reproduce
$Dic=@{}
$List= New-Object Collections.Generic.List[string]
$GPOs=Get-GPO -All
foreach($G in $GPOs)
{
$Perms=Get-GPPermission -Name $G.DisplayName -all -TargetType Group -ErrorAction SilentlyContinue
$Dic[$G.DisplayName]=$Perms
}
$Dic
Expected behavior
$Dic[<Any GPO>][0].Trustee.getType() returns GPTrustee object.
Actual behavior
Visiual Studio c# code
Perm.Properties.Match("Trustee")[0].Value returns "Microsoft.GroupPolicy.GPTrustee"
Environment data
Remote Powershell output
Name Value
---- -----
PSVersion 5.1.17763.592
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17763.592
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
SDK Version.
PSVersion=7.1.3
PSEdition=Core
WSManStackVersion=3.0
PSRemotingProtocolVersion=2.3
Metadata
Metadata
Assignees
Labels
Resolution-AnsweredThe question is answered.The question is answered.WG-RemotingPSRP issues with any transport layerPSRP issues with any transport layer