PowerShell


  • Don't forget to run as administrator.
  • If you right click on the top of powershell window. Then click on properties, you will see that you can customize your powershell window.

See below for some powershell examples:
get-command                           => It gives all commands.
get-command -name *top*     => gives all commands which contain top.
get-service                               => gives all services on computer.
get-history                               => gives what you did on the current session of powershell.



get-alias       => It shows alias of commands.  alias means "diger adiyla" in turkish. if you type only "h", you will get historyof your powershell session. Because h is alias of get-history.  Test it, see it!

Another good example:



  • get-psdrive: It gives all drives on the computer. (I believe ps stands for PowerShell.)
  • The | sign is like comma in paragraph or you can think like AND.
  • The alias of where-object is ?  ,and foreach-object is
  • $_  is for items in the loop.
  • -gt is greater than
  • free, root is same as title. See the first picture of example.
  • Pay attention to -foregroundcolor and 1024/1024/1024 or 1gb
  • First { } comes, later ( ) comes

Comments

Popular posts from this blog

My CCNA Useful Links

General Printer Errors

Python