Wiki

Clone wiki

powershell / Examples

  1. http://stackoverflow.com/questions/14044671/running-powershell-via-cygwin?rq=1 using my script:
    $ ./powershell -b -c 'Get-EventLog System | Where-Object { $_.EventID -match "6009" }'
    
       Index Time          EntryType   Source                 InstanceID Message   
       ----- ----          ---------   ------                 ---------- -------   
      454862 Oct 21 20:10  Information EventLog               2147489657 Microso...
      453331 Oct 13 21:41  Information EventLog               2147489657 Microso...
    ...
    
  2. http://stackoverflow.com/questions/10316758/monitor-windows-services-with-cygwin
    $ ./powershell -b -c gsv
    
    Status   Name               DisplayName                           
    ------   ----               -----------                           
    Running  AdobeARMservice    Adobe Acrobat Update Service          
    Stopped  AdobeFlashPlaye... Adobe Flash Player Update Service     
    Running  AeLookupSvc        Application Experience
    ...
    

Updated