Windows PowerShell

Become a Windows 10 expert with Windows PowerShell

Pc

Anyone who thinks you can only control Windows 10 with the mouse is wrong. Almost everything can also be controlled via Windows PowerShell in one way or another. PowerShell is the big brother of the command prompt. In this article, we discuss the basis of this expert tool.

Tip 1: Tip of the iceberg

To fall straight in the house: after reading this article you do not know everything about Windows PowerShell. PowerShell is very advanced and can easily be extended with new functions. This makes it impossible to give a complete overview of the possibilities and options. However, we will teach you everything about the PowerShell base and after reading this article you will know how to use it and where you will receive more information if you want to continue. We also discuss practical tricks that you can immediately carry out.

Windows PowerShell has been in Windows for a while and has arrived in version 10 at version 5.0. Although we assume a Windows 10 system, the basis is the same on previous Windows versions.

Tip 2: Windows PowerShell

If you have been working in computer land for a while, you will see the blinking cursor on the black screen. We are talking about the ‘command prompt’, this part is called the Command Prompt in Windows. Another name is ‘clip’ and that again stands for ‘command line interface’. Basically, PowerShell is a kind of command prompt on steroids. The commands that work through the standard command prompt of Windows usually also work in PowerShell, but much more is possible. For example, thanks to PowerShell, you can operate almost the entire operating system under the bonnet, without the need for a mouse. This can be done, for example, by making scripts.

Tip 3: Shortcut as administrator

There are many ways to open a PowerShell. For example, search for PowerShell (or a portion of this word) in your start menu. Many people find a shortcut pleasant. You can easily create these, but it requires a small adjustment afterward so that PowerShell is always executed as an administrator. Right-click on your desktop and choose New / Shortcut. Create a shortcut to PowerShell.exe and save it. Right-click the shortcut and request the properties. Go to the Shortcut tab, click on Advanced and place a check mark next to Run as administrator. In this way, you always open the shortcut as a computer administrator.

Tip 4: Windows key + X

If you use the key combination Windows key + X in Windows 10, you will see an advanced menu. Here you will find a direct reference to all major Windows components, such as your control panel, power management and more. You can also start a command prompt from this place in safe mode (default) or as administrator. This part is easily replaced by PowerShell. Right-click on your taskbar and request the properties. Open the Navigation tab and place a checkmark next to Replace Command Prompt with Windows PowerShell in the. Now PowerShell is now available via Windows key + X.

Tip 5: Administrator

The best way to start PowerShell is as a computer administrator. This gives you full rights over ‘all’ settings and adjustments that you want to make. If you start a normal PowerShell, the chance of errors is greater because, for example, there are too few rights to perform an operation. Because PowerShell has all rights in Administrator mode, you have to be extra careful. Unscrupulous experimenting with unknown Internet PowerShell scripts is asking for problems.

Tip 6: Commands

As with the command prompt, you can give all kinds of commands in PowerShell. Most commands that work at the command prompt can also be used in PowerShell. An example of this is the ipconfig command. This gives you extensive IP information of all your network adapters in both the Command Prompt and PowerShell. There are also many commands that only work in PowerShell. An example of this is the Get-NetAdapter command, which gives you a brief overview of your network adapters, the type of adapter (ethernet or wifi) and the speed. With this command, for example, we see that our Wi-Fi network operates at only 130 Mbit / s. This information can also be found somewhere in Windows, but if you know the command, it goes with PowerShell is a lot easier and faster.

Tip 7: Enter faster

Some commands are pretty long. Fortunately, you can enter it quickly. Tap a portion of the name, for example, get-net and then press the Tab key one or more times until Get-NetAdapter appears. Your assignment is automatically completed. You can type something back (parameters for many jobs that is necessary) and confirm with the press of the Enter key. Thanks to the Tab key you can even type in the most difficult assignments quickly.

Tip 8: Help? Help!

The help function of PowerShell is very extensive and even cluttered if you only give the help command followed by entering. The function becomes clearer when you specify the request for help. With the help Get-NetAdapter, you get comprehensive information about Get-NetAdapter. You read what this command is for, how you use it and where you can find more information if you want to learn everything about the command. With Related links, you see related assignments. This is how we get the Restart-NetAdapter command against. This proves extremely convenient to quickly disable and reactivate the Wi-Fi adapter via a PowerShell command, a trick that is usually very effective in solving temporary Wi-Fi failures.Tip 8 Get to know the help function to quickly find your way in PowerShell.

Tip 9: Linux, but different!

We mentioned the relationship between PowerShell and the command prompt a few times, but the link with Linux is even bigger. Many commands from PowerShell come directly from Linux. For example, to request the contents of a folder, you can give the command dir. Linux users know this command as ls and this command also works in PowerShell. Other examples are ram (remove, delete), kill (close) and mv (move, move). On this website, you will find a handy overview of common commands that can be used in both Linux and Windows PowerShell under Quick reference (scroll down almost all the way down).

Tip 10: Remove default apps

Uninstalling programs is a practical example of the capabilities of PowerShell. Windows 10 has all kinds of standard apps on board that many people are not waiting for. Thanks to smart PowerShell commands, you can quickly remove the pre-installed ‘junk’. With the Get-AppxPackage * Xbox app * | command Remove-AppxPackage followed by entering will disappear the Xbox app from your computer. With the Get-AppxPackage * bingfinance * | command Remove-AppxPackage you remove the Money affairs app. You can even remove the complete app store from Microsoft from your system. For this, you give Get-AppxPackage * windowsstore * | Remove-AppxPackage as the assignment. More assignments are possible.Tip 10 With special commands, you remove the standard Windows 10 apps from your computer.

Tip 11: Reinstall default apps

Have you been too enthusiastic and have you inadvertently removed all kinds of apps that you actually want to use? Then you can quickly restore a large part of the standard app bundle. Provide Get-AppxPackage -AllUsers | For each {Add-AppxPackage -DisableDevelopmentMode -Register “$ ($ _. InstallLocation) \ AppXManifest.xml”} as command. You do not have to type this completely, you can also copy the assignment from the website from the previous tip.Tip 11 Inadvertently removed too many standard apps? They are downloaded and reinstalled with the right command.

Tip 12: Create scripts

With this article, we hope to have sparked the enthusiasm for Windows PowerShell. To conclude, we would like to point you to ISE. This abbreviation stands for Integrated Scripting Environment, which is a handy environment for building Windows PowerShell scripts. Handy detail is that you add a lot of assignments with a single mouse click. The commands are on the right side of your screen and there is a good search function. By combining commands, you quickly reactivate your first script, for example, to deactivate your Wi-Fi adapter (see tip 6). By starting your script, this action is automatically executed and that saves a lot of mouse clicks that would otherwise have been needed if you wanted to perform the ‘wifi reset’ via the Device Manager, for example. Start ISE by typing in use as a search in your start menu.

Tip 13: Finally

It goes too far to find out everything about PowerShell in one article. The best way to learn how to work with Windows PowerShell is to think about it when you are faced with a problem or want to automate something with a script. Try to solve your challenge with PowerShell, then quickly get used to the way of thinking (and working). Do you want to make a flying start? Then you can go to Microsoft Virtual Academy for extensive videos. Many movies can also be found on YouTube. The Windows PowerShell tutorials Don Jones are highly recommended.

READ ALSO: 12 handy commands for the Command Prompt

Leave a Reply

Your email address will not be published. Required fields are marked *