Re: [MSH]about cmdlet's hidden parameter's question
- From: "Jeff Jones [MSFT]" <jeffjon@xxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 29 Mar 2006 08:41:39 -0800
As /\/\o\/\/ pointed out get-command can show the actual parameters that are
taking affect. The provider cmdlets like get-childitem using the
IDynamicParameters interface to allow providers a way to extend the
parameters for the cmdlet. The help for each specific provider should
detail these parameters.
To expand on /\/\o\/\/'s example.
MSH C:\temp\monad\main> get-command get-childitem c: -usage
Get-ChildItem [[-Path] <String[]>] [[-Filter] <String>] [-Include
<String[]>] [
-Exclude <String[]>] [-Recurse] [-Force] [-Verbose] [-Debug] [-ErrorAction
<Act
ionPreference>] [-ErrorVariable <String>] [-OutVariable <String>]
[-OutBuffer <
Int32>]
Get-ChildItem [[-Path] <String[]>] [[-Filter] <String>] [-Include
<String[]>] [
-Exclude <String[]>] [-Recurse] [-Force] [-Name] [-Verbose] [-Debug]
[-ErrorAct
ion <ActionPreference>] [-ErrorVariable <String>] [-OutVariable <String>]
[-Out
Buffer <Int32>]
MSH C:\temp\monad\main> get-command get-childitem cert: -usage
Get-ChildItem [[-Path] <String[]>] [[-Filter] <String>] [-Include
<String[]>] [
-Exclude <String[]>] [-Recurse] [-Force] [-Verbose] [-Debug] [-ErrorAction
<Act
ionPreference>] [-ErrorVariable <String>] [-OutVariable <String>]
[-OutBuffer <
Int32>] [-CodeSigningCert]
Get-ChildItem [[-Path] <String[]>] [[-Filter] <String>] [-Include
<String[]>] [
-Exclude <String[]>] [-Recurse] [-Force] [-Name] [-Verbose] [-Debug]
[-ErrorAct
ion <ActionPreference>] [-ErrorVariable <String>] [-OutVariable <String>]
[-Out
Buffer <Int32>] [-CodeSigningCert]
Note, that the second call passes "cert:" as the path to the get-childitem
cmdlet and you now see -CodeSigningCert as a parameter where it wasn't
available in the FileSystem provider.
--
Jeff Jones [MSFT]
Monad Development
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.
"/\/\o\/\/ [MVP]" <oMVP@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:8E0E1218-914D-489D-AB18-73B0098944A1@xxxxxxxxxxxxxxxx
It depents on the provider the command does action :
the CodeSigningCert parameter is only shown in the second example (acting
agains the cert: store)
MSH>get-command get-childitem c: | select -expand parametersets | select
parameters | fl
Parameters : {Path, Filter, Include, Exclude, Recurse, Force, Verbose,
Debug, ErrorAction, ErrorVariable, OutVariable,
OutBuffer}
Parameters : {Path, Filter, Include, Exclude, Recurse, Force, Name,
Verbose,
Debug, ErrorAction, ErrorVariable, OutVari
able, OutBuffer}
MSH>get-command get-childitem cert: | select -expand parametersets |
select
parameters | fl
Parameters : {Path, Filter, Include, Exclude, Recurse, Force, Verbose,
Debug, ErrorAction, ErrorVariable, OutVariable,
OutBuffer, CodeSigningCert}
Parameters : {Path, Filter, Include, Exclude, Recurse, Force, Name,
Verbose,
Debug, ErrorAction, ErrorVariable, OutVari
able, OutBuffer, CodeSigningCert}
gr /\/\o\/\/
"applepwc" wrote:
Hello,everyone here:
I have one problem and one suggestion.
##########
"get-help about_signing:"
I found:
dir cert:\CurrentUser\My -codesign
$cert = @(get-childitem cert:\CurrentUser\My -codesigning)[0]
##########
get-childitem have some hidden parameters?
Or "-codesign" didn't work anymore because the example is out of date?
##########
Using "get-help get-content",I can't find the "encoding" parameter.
Otherwise using the following method :
(get-command get-content).parametersets"
get-command get-content | select -expand parametersets
(get-command get-content).definition
So will the hidden parameters' usages be included in the next dropping
of
help files?
(I think implement it will helping people utilize the monad's power.)
#########
Thanks for your comment.
.
- References:
- RE: [MSH]about cmdlet's hidden parameter's question
- From: /\/\o\/\/ [MVP]
- RE: [MSH]about cmdlet's hidden parameter's question
- Prev by Date: Re: syntax coloring for MSH
- Next by Date: Re: Drive maping help
- Previous by thread: RE: [MSH]about cmdlet's hidden parameter's question
- Next by thread: Re: [MSH]about cmdlet's hidden parameter's question
- Index(es):
Relevant Pages
|
Loading