八,Windows PowerShell常用命令举例
1. get-help/help/man
get-help get-command
get-help about_signing
get-help get-command -detailed
get-help get-command -full
get-help get-command -examples
get-help get-command -parameter totalcount
get-help get-command -parameter *
man get-command
help get-command
get-help get-*
get-help about_wildcard
get-help about_*
get-help -name get-alias
get-help get-alias
get-help about_commonparameters
2. get-command
get-command *.exe
3. get-process
4. get-service
get-service | get-member
get-service | get-member -membertype *property
(get-service alerter).canpauseandcontinue
get-service alerter | format-list -property name, canpauseandcontinue
get-service alerter | format-list -property *
get-service | format-table -property name, canpauseandcontinue
(get-service schedule).stop()
5. get-eventlog
6. get-date
7. get-alias
get-alias | where-object {$_.definition -eq "set-location"}
8. get-wmiobject:绝对有用,因为它让你察看和更改远程计算机的组件
get-wmiobject win32_bios -computername server01
9. get-member
get-service | get-member
10. format-table
11. format-list
12. format-wide
13. format-custom
14. set-location
set-location alias:
15. get-childitem
get-childitem alias:
16. set-alias
set-alias gh get-help
set-alias np c:/windows/notepad.exe
17. remove-item
remove-item alias:np
18. function
function bi {notepad c:/boot.ini}
19. get-psdrive
20. new-psdrive
21. test-path
1. get-help/help/man
get-help get-command
get-help about_signing
get-help get-command -detailed
get-help get-command -full
get-help get-command -examples
get-help get-command -parameter totalcount
get-help get-command -parameter *
man get-command
help get-command
get-help get-*
get-help about_wildcard
get-help about_*
get-help -name get-alias
get-help get-alias
get-help about_commonparameters
2. get-command
get-command *.exe
3. get-process
4. get-service
get-service | get-member
get-service | get-member -membertype *property
(get-service alerter).canpauseandcontinue
get-service alerter | format-list -property name, canpauseandcontinue
get-service alerter | format-list -property *
get-service | format-table -property name, canpauseandcontinue
(get-service schedule).stop()
5. get-eventlog
6. get-date
7. get-alias
get-alias | where-object {$_.definition -eq "set-location"}
8. get-wmiobject:绝对有用,因为它让你察看和更改远程计算机的组件
get-wmiobject win32_bios -computername server01
9. get-member
get-service | get-member
10. format-table
11. format-list
12. format-wide
13. format-custom
14. set-location
set-location alias:
15. get-childitem
get-childitem alias:
16. set-alias
set-alias gh get-help
set-alias np c:/windows/notepad.exe
17. remove-item
remove-item alias:np
18. function
function bi {notepad c:/boot.ini}
19. get-psdrive
20. new-psdrive
21. test-path