Power Shell Tricks

5 Cool things you can do with Windows PowerShell




Windows PowerShell is a powerful tool for automating tasks and simplifying configuration and can be used to automate almost any task in the Windows ecosystem, including active directory and exchange.


1)Perform your favorite CMD task in PowershellYes, you can stop using the DOS prompt and start doing all of those same tasks within PowerShell. This can make learning a little easier and help you become more familiar with the interface. Unfortunately, from the run prompt, there is no three-letter launcher like cmd. But PowerShell will launch it. You can also assign a shortcut key to PowerShell so Ctrl + Shift + P launches it directly.


2)Insert timestamps into PowerShell outputs: For your PowerShell tasks, you can have a timestamp entered in series so you can determine how long a single step occurs or to use it as a logging mechanism for your scripts. I find this handy in Graphical PowerShell when I'm testing scripts. To insert a timestamp, enter one of the following commands as a single line within your .ps1 file:


3)Work from the keyboard in Graphical PowerShellIf you are familiar with the Microsoft SQL Query Analyzer environment, you will appreciate some of these keyboard shortcuts. In Graphical PowerShell, you can select a single line or multiple lines and execute them by pressing the F5 key. Also, if you have modified your script, the familiar Ctrl + S to save, Ctrl + Z to undo, Ctrl + C to copy, and Ctrl + V to paste are available to save you time in the editing and testing.


4)Ping devices locally or remotelyTest-NetConnection -ComputerName "Hostname or IP"  The Test-NetConnection cmdlet offers a number of ways to test network connectivity on the LAN and WAN. Enter the command as typed above and the computer will essentially perform a ping to determine if network connectivity between the local device and the target computer or domain exists.'


5)Obtain IP Configuration detailsGet-NetIPConfiguration  
Similar to the ipconfig command, the Get-NetIPConfiguration cmdlet provides a holistic view of the network configuration(s) set on the network adapters of a computer. IP, DNS, and Gateway addresses are displayed and sorted by adapter name.













Comments

Post a Comment

Popular posts from this blog

Xbox Game Bar Features

MS Word Shortcut Keys

Computer Terminologies