10BC0 Fix for implicit remote regression in restricted session by PaulHigin · Pull Request #4222 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,10 @@ private static CommandMetadata GetRestrictedGetFormatData()
typeNameParameter.Attributes.Add(new ValidateLengthAttribute(0, 1000));
typeNameParameter.Attributes.Add(new ValidateCountAttribute(0, 1000));

return GetRestrictedCmdlet("Get-FormatData", null, "https://go.microsoft.com/fwlink/?LinkID=144303", typeNameParameter);
// This parameter is required for implicit remoting in PS V5.1.
ParameterMetadata powershellVersionParameter = new ParameterMetadata("PowerShellVersion", typeof(Version));

return GetRestrictedCmdlet("Get-FormatData", null, "https://go.microsoft.com/fwlink/?LinkID=144303", typeNameParameter, powershellVersionParameter);
}

private static CommandMetadata GetRestrictedGetHelp()
Expand Down
0