Windows PowerShell Copyright (C) 2009 Microsoft Corporation. All rights reserved. PS D:\> |
PS D:\> |
复制代码
- get-command
PS D:\> get-command CommandType Name Definition ----------- ---- ---------- Alias % ForEach-Object Alias ? Where-Object Function A: Set-Location A: Alias ac Add-Content Cmdlet Add-Computer Add-Computer [-DomainName] <String> [-Credential... Cmdlet Add-Content Add-Content [-Path] <String[]> [-Value] <Object[... ... |
复制代码
- get-command -Verb Get
PS D:\> get-command -Verb Get CommandType Name Definition ----------- ---- ---------- Cmdlet Get-Acl Get-Acl [[-Path] <String[]>] [-Audit] [-Filter <... Cmdlet Get-Alias Get-Alias [[-Name] <String[]>] [-Exclude <String... Cmdlet Get-AuthenticodeSignature Get-AuthenticodeSignature [-FilePath] <String[]>... Cmdlet Get-ChildItem Get-ChildItem [[-Path] <String[]>] [[-Filter] <S... ... |
复制代码
- get-help
复制代码
- get-help *
复制代码
- get-service
试试下列按键吧,看看会发生什么:复制代码
- get-help get-service
既然我们使用PowerShell,那么就可以无视services.msc了。复制代码
- services.msc
复制代码
- get-service -name Browser
- stop-service -name Browser
- get-service -name Browser
PS D:\> get-service -name Browser Status Name DisplayName ------ ---- ----------- Stopped Browser Computer Browser |
启动服务后也不会有任何反馈性迹象表明服务正常启动,除非服务启动失败。复制代码
- start-service -name Browser
PS C:\> 99 + 100 199 |
PS C:\> "Hello World!" Hello World! |
PS C:\> (7 - 2 * 3) / 5 0.2 |
PS C:\> (2+2)*3/7 > c:\fun.txt PS C:\> type c:\fun.txt 1.71428571428571 |
PS C:\> $n = (2+2)*3 PS C:\> $n 12 PS C:\> $n / 7 1.71428571428571 |
PS C:\> $files = dir PS C:\> $files[3] PS C:\> $files = dir PS C:\> $files[3] Directory: Microsoft.PowerShell.Core\FileSystem::C:\ Mode LastWriteTime Length Name ---- ------------- ------ ---- d-r-- 2010-3-26 21:25 Program Files |
欢迎光临 批处理之家 (http://bbs.bathome.net/) | Powered by Discuz! 7.2 |