希望给详细介绍 get-service |gm列出的那些属性和方法都是什么意思。


PowerShell交流中心希望给详细介绍 get-service |gm列出的那些属性和方法都是什么意思。
0
TAO_Powershell asked 8年 ago

烦请给解释下:definition这列都表示什么意思?属性中{get;set}都表示什么意思?新手刚接触powershell,非常感谢。

 

PS C:\Users\otaoit01> get-service spooler | gm


   TypeName: System.ServiceProcess.ServiceController

Name                      MemberType    Definition                                                 
----                      ----------    ----------                                                 
Name                      AliasProperty Name = ServiceName                                         
RequiredServices          AliasProperty RequiredServices = ServicesDependedOn                      
Disposed                  Event         System.EventHandler Disposed(System.Object, System.Event...
Close                     Method        void Close()                                               
Continue                  Method        void Continue()                                            
CreateObjRef              Method        System.Runtime.Remoting.ObjRef CreateObjRef(type request...
Dispose                   Method        void Dispose(), void IDisposable.Dispose()                 
Equals                    Method        bool Equals(System.Object obj)                             
ExecuteCommand            Method        void ExecuteCommand(int command)                           
GetHashCode               Method        int GetHashCode()                                          
GetLifetimeService        Method        System.Object GetLifetimeService()                         
GetType                   Method        type GetType()                                             
InitializeLifetimeService Method        System.Object InitializeLifetimeService()                  
Pause                     Method        void Pause()                                               
Refresh                   Method        void Refresh()                                             
Start                     Method        void Start(), void Start(string[] args)                    
Stop                      Method        void Stop()                                                
WaitForStatus             Method        void WaitForStatus(System.ServiceProcess.ServiceControll...
CanPauseAndContinue       Property      bool CanPauseAndContinue {get;}                            
CanShutdown               Property      bool CanShutdown {get;}                                    
CanStop                   Property      bool CanStop {get;}                                        
Container                 Property      System.ComponentModel.IContainer Container {get;}          
DependentServices         Property      System.ServiceProcess.ServiceController[] DependentServi...
DisplayName               Property      string DisplayName {get;set;}                              
MachineName               Property      string MachineName {get;set;}                              
ServiceHandle             Property      System.Runtime.InteropServices.SafeHandle ServiceHandle ...
ServiceName               Property      string ServiceName {get;set;}                              
ServicesDependedOn        Property      System.ServiceProcess.ServiceController[] ServicesDepend...
ServiceType               Property      System.ServiceProcess.ServiceType ServiceType {get;}       
Site                      Property      System.ComponentModel.ISite Site {get;set;}                
Status                    Property      System.ServiceProcess.ServiceControllerStatus Status {get;}
ToString                  ScriptMethod  System.Object ToString();