Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get-PokeMember 'a' throw exception #5

Open
vors opened this issue Oct 23, 2015 · 0 comments
Open

Get-PokeMember 'a' throw exception #5

vors opened this issue Oct 23, 2015 · 0 comments

Comments

@vors
Copy link
Contributor

vors commented Oct 23, 2015

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
oising added a commit that referenced this issue Jan 25, 2016
Make Get-PokeMember work with $args #5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant