Closed fsackur closed 7 years ago
I concur, I can see how I ended up there. Thank you :)
On 14 April 2017 at 13:31, Freddie Sackur notifications@github.com wrote:
My use case is writing proxy commands, but I think this applies to other use cases.
Consider the invocation "Get-WmiObject -Class Win32_ComputerSystem"
Microsoft.PowerShell.Management\Get-WmiObject returns with this call. The generated stub command for Get-WmiObject throws "Parameter set cannot be resolved using the specified named parameters."
I think this is because of DefaultParameterSetName not being implemented.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/indented-automation/Indented.StubCommand/issues/7, or mute the thread https://github.com/notifications/unsubscribe-auth/AMO6DsBLQ3u6Yddk6xdc0osJ95x5cRqaks5rv2cggaJpZM4M9tZi .
I don't think so, the generated proxy should have a CmdletBinding attribute. It doesn't because CmdletInfo doesn't appear to fill the CmdletBinding property inherited from CommandInfo (as a boolean).
On 14 April 2017 at 13:35, Freddie Sackur notifications@github.com wrote:
Hold on, mistake at my end! I think I mucked up a copy-n-paste
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/indented-automation/Indented.StubCommand/issues/7#issuecomment-294146540, or mute the thread https://github.com/notifications/unsubscribe-auth/AMO6Dld6pMYzPMmeQ7K-DDmJVLnuG58Pks5rv2gqgaJpZM4M9tZi .
$COmmandInfo = Get-command Get-WmiObject
This doesn't appear to to be set: $CommandInfo.CmdletBinding
Thank you. Fixed in 1.1. Pushed to releases, pushed to PSGallery.
On 14 April 2017 at 13:37, Freddie Sackur notifications@github.com wrote:
$COmmandInfo = Get-command Get-WmiObject
This doesn't appear to to be set: $CommandInfo.CmdletBinding
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/indented-automation/Indented.StubCommand/issues/7#issuecomment-294146742, or mute the thread https://github.com/notifications/unsubscribe-auth/AMO6DnBz02gaI007rpkrgUzawQLG0zuWks5rv2iZgaJpZM4M9tZi .
My use case is writing proxy commands, but I think this applies to other use cases.
Consider the invocation "Get-WmiObject -Class Win32_ComputerSystem"
Microsoft.PowerShell.Management\Get-WmiObject returns with this call. The generated stub command for Get-WmiObject throws "Parameter set cannot be resolved using the specified named parameters."
I think this is because of DefaultParameterSetName not being implemented.