当前位置: 移动技术网 > IT编程>脚本编程>Shell > Windows Powershell 命令集 cmdlets

Windows Powershell 命令集 cmdlets

2017年12月08日  | 移动技术网IT编程  | 我要评论

cmdlets是powershell的内部命令,cmdlet的类型名为system.management.automation.cmdletinfo,包含下列属性和方法:

name membertype definition
equals method bool equals(system.object obj)
gethashcode method int gethashcode()
gettype method type gettype()
tostring method string tostring()
commandtype property system.management.automation.commandtypes commandtype {get;}
defaultparameterset property system.string defaultparameterset {get;}
definition property system.string definition {get;}
helpfile property system.string helpfile {get;}
implementingtype property system.type implementingtype {get;}
module property system.management.automation.psmoduleinfo module {get;}
modulename property system.string modulename {get;}
name property system.string name {get;}
noun property system.string noun {get;}
outputtype property system.collections.objectmodel.readonlycollection`1[[system.management.automation.pstypename, system.management.automation, version=1.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35]] outputtype {get;}
parameters property system.collections.generic.dictionary`2[[system.string, mscorlib, version=2.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089],[system.management.automation.parametermetadata, system.management.automation, version=1.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35]] parameters {get;}
parametersets property system.collections.objectmodel.readonlycollection`1[[system.management.automation.commandparametersetinfo, system.management.automation, version=1.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35]] parametersets {get;}
pssnapin property system.management.automation.pssnapininfo pssnapin {get;}
verb property system.string verb {get;}
visibility property system.management.automation.sessionstateentryvisibility visibility {get;set;}
dll scriptproperty system.object dll {get=$this.implementingtype.assembly.location;}
helpuri scriptproperty system.object helpuri {get=try
{
# ok to cast commandtypes enum to helpcategory because string/indentifier for
# cmdlet,function,filter,alias,externalscript is identical.
# it is ok to fail for other enum values (i.e. for application)
$helpobject = get-help -name ($this.name) -category ([string]($this.commandtype)) -erroraction silentlycontinue# return first non-null uri (and try not to hit any strict mode things)
if ($helpobject -eq $null) { return $null }
if ($helpobject.psobject.properties['relatedlinks'] -eq $null) { return $null }
if ($helpobject.relatedlinks.psobject.properties['navigationlink'] -eq $null) { return $null }
$helpuri = [string]$( $helpobject.relatedlinks.navigationlink | %{ if ($_.psobject.properties['uri'] -ne $null) { $_.uri } } | ?{ $_ } | select -first 1 )
return $helpuri
}
catch {};}

下面是全部的cmdlets命令

每个命令有一个动词和名词组成,命令的作用一目了然。

name modulename help
add-computer microsoft.powershell.management
add-content microsoft.powershell.management
add-history microsoft.powershell.core
add-member microsoft.powershell.utility
add-pssnapin microsoft.powershell.core
add-type microsoft.powershell.utility
checkpoint-computer microsoft.powershell.management
clear-content microsoft.powershell.management
clear-eventlog microsoft.powershell.management
clear-history microsoft.powershell.core
clear-item microsoft.powershell.management
clear-itemproperty microsoft.powershell.management
clear-variable microsoft.powershell.utility
compare-object microsoft.powershell.utility
complete-transaction microsoft.powershell.management
connect-wsman microsoft.wsman.management
convertfrom-csv microsoft.powershell.utility
convertfrom-securestring microsoft.powershell.security
convertfrom-stringdata microsoft.powershell.utility
convert-path microsoft.powershell.management
convertto-csv microsoft.powershell.utility
convertto-html microsoft.powershell.utility
convertto-securestring microsoft.powershell.security
convertto-xml microsoft.powershell.utility
copy-item microsoft.powershell.management
copy-itemproperty microsoft.powershell.management
debug-process microsoft.powershell.management
disable-computerrestore microsoft.powershell.management
disable-psbreakpoint microsoft.powershell.utility
disable-pssessionconfiguration microsoft.powershell.core
disable-wsmancredssp microsoft.wsman.management
disconnect-wsman microsoft.wsman.management
enable-computerrestore microsoft.powershell.management
enable-psbreakpoint microsoft.powershell.utility
enable-psremoting microsoft.powershell.core
enable-pssessionconfiguration microsoft.powershell.core
enable-wsmancredssp microsoft.wsman.management
enter-pssession microsoft.powershell.core
exit-pssession microsoft.powershell.core
export-alias microsoft.powershell.utility
export-clixml microsoft.powershell.utility
export-console microsoft.powershell.core
export-counter microsoft.powershell.diagnostics
export-csv microsoft.powershell.utility
export-formatdata microsoft.powershell.utility
export-modulemember microsoft.powershell.core
export-pssession microsoft.powershell.utility
foreach-object microsoft.powershell.core
format-custom microsoft.powershell.utility
format-list microsoft.powershell.utility
format-table microsoft.powershell.utility
format-wide microsoft.powershell.utility
get-acl microsoft.powershell.security
get-alias microsoft.powershell.utility
get-authenticodesignature microsoft.powershell.security
get-childitem microsoft.powershell.management
get-command microsoft.powershell.core
get-computerrestorepoint microsoft.powershell.management
get-content microsoft.powershell.management
get-counter microsoft.powershell.diagnostics
get-credential microsoft.powershell.security
get-culture microsoft.powershell.utility
get-date microsoft.powershell.utility
get-event microsoft.powershell.utility
get-eventlog microsoft.powershell.management
get-eventsubscriber microsoft.powershell.utility
get-executionpolicy microsoft.powershell.security
get-formatdata microsoft.powershell.utility
get-help microsoft.powershell.core
get-history microsoft.powershell.core
get-host microsoft.powershell.utility
get-hotfix microsoft.powershell.management
get-item microsoft.powershell.management
get-itemproperty microsoft.powershell.management
get-job microsoft.powershell.core
get-location microsoft.powershell.management
get-member microsoft.powershell.utility
get-module microsoft.powershell.core
get-pfxcertificate microsoft.powershell.security
get-process microsoft.powershell.management
get-psbreakpoint microsoft.powershell.utility
get-pscallstack microsoft.powershell.utility
get-psdrive microsoft.powershell.management
get-psprovider microsoft.powershell.management
get-pssession microsoft.powershell.core
get-pssessionconfiguration microsoft.powershell.core
get-pssnapin microsoft.powershell.core
get-random microsoft.powershell.utility
get-service microsoft.powershell.management
get-tracesource microsoft.powershell.utility
get-transaction microsoft.powershell.management
get-uiculture microsoft.powershell.utility
get-unique microsoft.powershell.utility
get-variable microsoft.powershell.utility
get-winevent microsoft.powershell.diagnostics
get-wmiobject microsoft.powershell.management
get-wsmancredssp microsoft.wsman.management
get-wsmaninstance microsoft.wsman.management
group-object microsoft.powershell.utility
import-alias microsoft.powershell.utility
import-clixml microsoft.powershell.utility
import-counter microsoft.powershell.diagnostics
import-csv microsoft.powershell.utility
import-localizeddata microsoft.powershell.utility
import-module microsoft.powershell.core
import-pssession microsoft.powershell.utility
invoke-command microsoft.powershell.core
invoke-expression microsoft.powershell.utility
invoke-history microsoft.powershell.core
invoke-item microsoft.powershell.management
invoke-wmimethod microsoft.powershell.management
invoke-wsmanaction microsoft.wsman.management
join-path microsoft.powershell.management
limit-eventlog microsoft.powershell.management
measure-command microsoft.powershell.utility
measure-object microsoft.powershell.utility
move-item microsoft.powershell.management
move-itemproperty microsoft.powershell.management
new-alias microsoft.powershell.utility
new-event microsoft.powershell.utility
new-eventlog microsoft.powershell.management
new-item microsoft.powershell.management
new-itemproperty microsoft.powershell.management
new-module microsoft.powershell.core
new-modulemanifest microsoft.powershell.core
new-object microsoft.powershell.utility
new-psdrive microsoft.powershell.management
new-pssession microsoft.powershell.core
new-pssessionoption microsoft.powershell.core
new-service microsoft.powershell.management
new-timespan microsoft.powershell.utility
new-variable microsoft.powershell.utility
new-webserviceproxy microsoft.powershell.management
new-wsmaninstance microsoft.wsman.management
new-wsmansessionoption microsoft.wsman.management
out-default microsoft.powershell.utility
out-file microsoft.powershell.utility
out-gridview microsoft.powershell.utility
out-host microsoft.powershell.utility
out-null microsoft.powershell.utility
out-printer microsoft.powershell.utility
out-string microsoft.powershell.utility
pop-location microsoft.powershell.management
push-location microsoft.powershell.management
read-host microsoft.powershell.utility
receive-job microsoft.powershell.core
register-engineevent microsoft.powershell.utility
register-objectevent microsoft.powershell.utility
register-pssessionconfiguration microsoft.powershell.core
register-wmievent microsoft.powershell.management
remove-computer microsoft.powershell.management
remove-event microsoft.powershell.utility
remove-eventlog microsoft.powershell.management
remove-item microsoft.powershell.management
remove-itemproperty microsoft.powershell.management
remove-job microsoft.powershell.core
remove-module microsoft.powershell.core
remove-psbreakpoint microsoft.powershell.utility
remove-psdrive microsoft.powershell.management
remove-pssession microsoft.powershell.core
remove-pssnapin microsoft.powershell.core
remove-variable microsoft.powershell.utility
remove-wmiobject microsoft.powershell.management
remove-wsmaninstance microsoft.wsman.management
rename-item microsoft.powershell.management
rename-itemproperty microsoft.powershell.management
reset-computermachinepassword microsoft.powershell.management
resolve-path microsoft.powershell.management
restart-computer microsoft.powershell.management
restart-service microsoft.powershell.management
restore-computer microsoft.powershell.management
resume-service microsoft.powershell.management
select-object microsoft.powershell.utility
select-string microsoft.powershell.utility
select-xml microsoft.powershell.utility
send-mailmessage microsoft.powershell.utility
set-acl microsoft.powershell.security
set-alias microsoft.powershell.utility
set-authenticodesignature microsoft.powershell.security
set-content microsoft.powershell.management
set-date microsoft.powershell.utility
set-executionpolicy microsoft.powershell.security
set-item microsoft.powershell.management
set-itemproperty microsoft.powershell.management
set-location microsoft.powershell.management
set-psbreakpoint microsoft.powershell.utility
set-psdebug microsoft.powershell.core
set-pssessionconfiguration microsoft.powershell.core
set-service microsoft.powershell.management
set-strictmode microsoft.powershell.core
set-tracesource microsoft.powershell.utility
set-variable microsoft.powershell.utility
set-wmiinstance microsoft.powershell.management
set-wsmaninstance microsoft.wsman.management
set-wsmanquickconfig microsoft.wsman.management
show-eventlog microsoft.powershell.management
sort-object microsoft.powershell.utility
split-path microsoft.powershell.management
start-job microsoft.powershell.core
start-process microsoft.powershell.management
start-service microsoft.powershell.management
start-sleep microsoft.powershell.utility
start-transaction microsoft.powershell.management
start-transcript microsoft.powershell.host
stop-computer microsoft.powershell.management
stop-job microsoft.powershell.core
stop-process microsoft.powershell.management
stop-service microsoft.powershell.management
stop-transcript microsoft.powershell.host
suspend-service microsoft.powershell.management
tee-object microsoft.powershell.utility
test-computersecurechannel microsoft.powershell.management
test-connection microsoft.powershell.management
test-modulemanifest microsoft.powershell.core
test-path microsoft.powershell.management
test-wsman microsoft.wsman.management
trace-command microsoft.powershell.utility
undo-transaction microsoft.powershell.management
unregister-event microsoft.powershell.utility
unregister-pssessionconfiguration microsoft.powershell.core
update-formatdata microsoft.powershell.utility
update-list microsoft.powershell.utility
update-typedata microsoft.powershell.utility
use-transaction microsoft.powershell.management
wait-event microsoft.powershell.utility
wait-job microsoft.powershell.core
wait-process microsoft.powershell.management
where-object microsoft.powershell.core
write-debug microsoft.powershell.utility
write-error microsoft.powershell.utility
write-eventlog microsoft.powershell.management
write-host microsoft.powershell.utility
write-output microsoft.powershell.utility
write-progress microsoft.powershell.utility
write-verbose microsoft.powershell.utility
write-warning microsoft.powershell.utility

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网