Posts

Download PowerShell 7.1

Image
Have you downloaded PowerShell version 7.1? If not I will tell you how you can do it. Windows 10 comes with PowerShell 5.1 and Windows 11 comes with a minor upgrade. If you want to get the power of PowerShell 11 you will have to download and install it your self. It is not a part of Windows Updates. Windows 10: Windows 11: Download PowerShell 7.1 To download PowerShell 7.1 go to the official page on docs.microsoft.com  The package is available in both x86 and x64 bit version and also in .msi package and as a .zip file. That this site you will find all the information you will about PowerShell 7.1 Installation of PowerShell 7.1 Installation is straightforward. Just click, next, next next and you are ready to go: Be aware that the built in PowerShell that comes with Windows still will be the default PowerShell version. To start PowerShell 7, just search after PowerShell 7 in the Windows Start menu.

How to Search EventLog Using PowerShell

Image
In this post I will show you some tips on how you can search your computers EventLog using PowerShell. This can be very powerful if you need to search for e.g. a specifik error in the EventLog.  Basic Get-EventLog command The basic command is like shown below. Get-EventLog -LogName System If you want to you can filter using the parameter -EntryType to see only e.g. Errors in the eventlog: Get-EventLog -LogName System -EntryType Error In order to only see the newest 10 error you can enter the command below: Get-EventLog -LogName System -EntryType Error -Newest 10 Run Get-EventLog on Remote computer In order to check the EventLog on a remote computer you will have to use the Invoke command as shown below: All you need to do is to replace localhost with the name of the remote computer, where you want to run the command. For more information about the PowerShell Get-EventLog cmd-let check out Microsoft docs

How to download a file using PowerShell?

Image
Today I came across a nice and simple command for downloading files from the web. It is very simple but also very powerful. Command:   Invoke-WebRequest -Uri http://ipv4.download.thinkbroadband.com/50MB.zip -OutFile .\50MB.zip What this command does is, downloading a 50 MB test file from thinkbroadband.com to your own computer and put it in your current path. In this example on my Desktop. You can of cause easily change both the url for the file you want to download and the target location changing the -Outfile parameter. Lets say you want to download a file every day and name the file with day of the day, you can use the following two commands: $filename = Get-Date -Format "dd-MM" Invoke-WebRequest -Uri http://212.183.159.230/200MB.zip -OutFile .\$filename.zip

How to check if your computer have a TPM chip

Image
How to detect a TPM chip using PowerShell Microsoft have stated that a TPM chip will be a hardware requirement for running Windows 11 . To help you detect if your computer is compliant with that I would like to share a script for just that. Be aware that not just your computer need a TPM chip. It also has to be a version 2.0 chip. Get-Tpm command can help you detect if you have a TPM chip in your computer. In order to detect of your computers TPM chip is version 2.0 you can run the following command: Get-WMIObject -computer localhost -class Win32_Tpm -Namespace root\cimv2\Security\MicrosoftTpm  | select PsComputerName,SpecVersion,manufacturerVersion,manufactureridtxt | fl If the first command state that TPMPresent is False, you might want to check if it is because the chip has just been disabled in BIOS/UEFI. That was the case on my computer. Check the manual of your motherboard. It might not be called TPM in your BIOS/UEFI settings. Here is an example:  

How to Install Windows Terminal on Windows Server 2022

Image
How to Install Windows Terminal on Windows Server 2022 Recently I wrote a post about Windows Terminal . At that point it was only possible to install the app on windows 10. That was until i visit the blog of Thomas Maurer. Thomas is a Senior Cloud Advocate at Microsoft and have a great blog you should check out. Here you can learn how to install it on Windows Server 2022.

Windows Terminal for Windows 10

Image
Wouldn't it be great if there was a way to use tabs in PowerShell and command prompt in stead of having 100 small console windows open? Do you also feel that it would be nice to customize your favorite console in more ways that it is today? Well it is actually possible with Windows Terminal for Windows 10. I have written an article about it over at TechThatWorks. Go ahead and check it out .

How to use PowerShell Speech Commands

Image
 As I mention earlier on , here on this blog, I recently came across an interesting blogpost about PowerShell being able to read text using Speech cmd-lets.

Popular posts from this blog

Use PowerShell to Discover Network Switch and port number

How to get Public IP Using PowerShell

Use ChatGPT to write PowerShell Scripts