PS C:Powershell> Get-service | Select-Object -First 1 | Format-List *
Name : AdobeARMservice
RequiredServices : {}
CanPauseAndContinue : False
CanShutdown : False
CanStop : True
DisplayName : Adobe Acrobat Update Service
DependentServices : {}
MachineName : .
ServiceName : AdobeARMservice
ServicesDependedOn : {}
ServiceHandle :
Status : Running
ServiceType : Win32OwnProcess
Site :
Container :
PS C:Powershell> Get-service | Select-Object -First 1 | Get-Member -MemberType
Property
TypeName: System.ServiceProcess.ServiceController
Name MemberType Definition
---- ---------- ----------
CanPauseAndContinue Property System.Boolean CanPauseAndContinue {get;}
CanShutdown Property System.Boolean CanShutdown {get;}
CanStop Property System.Boolean CanStop {get;}
Container Property System.ComponentModel.IContainer Container {g...
DependentServices Property System.ServiceProcess.ServiceController[] Dep...
DisplayName Property System.String DisplayName {get;set;}
MachineName Property System.String MachineName {get;set;}
ServiceHandle Property System.Runtime.InteropServices.SafeHandle Ser...
ServiceName Property System.String ServiceName {get;set;}
ServicesDependedOn Property System.ServiceProcess.ServiceController[] Ser...
ServiceType Property System.ServiceProcess.ServiceType ServiceType...
Site Property System.ComponentModel.ISite Site {get;set;}
Status Property System.ServiceProcess.ServiceControllerStatus...
PS C:Powershell> get-service | Where-Object {$_.Status -eq "Running"}
Status Name DisplayName
------ ---- -----------
Running AdobeARMservice Adobe Acrobat Update Service
Running AppHostSvc Application Host Helper Service
Running AppIDSvc Application Identity
Running Appinfo Application Information
Running AudioEndpointBu... Windows Audio Endpoint Builder
Running Audiosrv Windows Audio
Running BDESVC BitLocker Drive Encryption Service
Running BFE Base Filtering Engine
Running BITS Background Intelligent Transfer Ser...
Running CcmExec SMS Agent Host
PS C:Usersv-bali.FAREAST> Get-WmiObject Win32_UserAccount -filter "LocalAccount=True AND Name='guest'" AccountType : 512 Caption : myhomeguest Domain : myhome SID : S-1-5-21-3064017030-3269374297-2491181182-501 FullName : Name : guest
PS C:Powershell> Get-WmiObject Win32_UserAccount -filter "LocalAccount=True AND Name='guest'" | Select-Object Name,Description,Disabled Name Description Disabled ---- ----------- -------- guest Built-in account for gu... True
PS C:Powershell> Dir | Select-Object -ExcludeProperty "*N*" -First 5 目录: C:Powershell Mode LastWriteTime Length Name ---- ------------- ------ ---- -a--- 2011/11/24 18:30 67580 a.html -a--- 2011/11/24 20:04 26384 a.txt -a--- 2011/11/24 20:26 12060 alias -a--- 2011/11/25 11:20 556 employee.xml -a--- 2011/11/29 19:23 21466 function.ps1
PS C:Powershell> get-process | sort -Descending cpu | select -First 5 Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName ------- ------ ----- ----- ----- ------ -- ----------- 1336 98 844304 809388 1081 164.69 3060 iexplore 224 10 74676 62468 188 81.10 4460 AcroRd32 130 9 28264 39092 167 70.57 3436 dwm 169 8 7576 29568 134 65.22 3364 notepad 989 34 72484 35996 393 62.67 4724 BingDict
PS C:Powershell> 1,2,1,2 | Get-Unique
1
2
1
2
PS C:Powershell> 1,2,1,2 | Sort-Object |Get-Unique
1
2
PS C:Powershell> ls | foreach{$_.extension} | Sort-Object |Get-Unique
.bat
.html
.ps1
.txt
.vbs
.xml
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有