×
Create a new article
Write your page title here:
We currently have 3,189 articles on s23. Type your article name above or create one of the articles listed here!



    s23
    3,189Articles

    Windows Power Shell is the coming replacement for the (good?) old cmd.exe. It works object-oriented and supports pipes


    Examples[edit]

    get-alias (show (predefined) aliases)
    
    get-command (show all available "commandlets")
    
    get-help commandletname (get help about a commandlet)
    
    get-help get (list all commandlets that contain the verb "get")
    
    get-psdrive (show drives, environment variables, registry and aliases)
    

    commandline registry[edit]

    WPS makes no difference between regular files ,the registry or aliase as in:

    cd hklm:\software (change "directory" to the registry HKEY_LOCAL_MACHINE/Software)
    dir (list the subkeys)
    md fnord (create new subkey fnord)
    new-item .name "Foo" - value "Bar" - type string (put the value Bar into the key)
      
    
    

    3 ways to kill all IE processes using (object oriented) pipelines[edit]

    get-process | where object { $_.name -eq "iexplore" } | foreach-object { $_.kill() }
    

    shorter:

    ps | ? { $_.name -eq "iexplore" } | % { $_.kill() }
    

    even shorter:

    ps -p "iexplore"  | % {$_.kill() }
    


    Links[edit]

    Download Windows Power Shell RC 1

    Windows Power Shell Docs

    (Downloads need Microsoft-Passport ;P)

    Weiterführend: iX-Magazin August 2006 S. 139)

    Cookies help us deliver our services. By using our services, you agree to our use of cookies.
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.