poke
poke copied to clipboard
`Get-PokeMember 'a'` throw exception
Get-PokeMember seems like a useful function.
# shortcut for $o | peek | gm
function Get-PokeMember { $input | peek | Get-Member }
I thought it can be used like this: Get-PokeMember 'a'
> Get-PokeMember 'a'
New-InstanceProxy : Cannot validate argument on parameter 'Instance'. The argument is null. Provide a valid value for
the argument, and then try running the command again.
At D:\dev\poke\Poke.psm1:866 char:41
+ New-InstanceProxy -Instance $InputObject
+ ~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [New-InstanceProxy], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,New-InstanceProxy
Get-Member : You must specify an object for the Get-Member cmdlet.
At D:\dev\poke\Poke.psm1:930 char:43
+ function Get-PokeMember { $input | peek | Get-Member }
+ ~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Get-Member], InvalidOperationException
+ FullyQualifiedErrorId : NoObjectInGetMember,Microsoft.PowerShell.Commands.GetMemberCommand