How to show a pop up notification with a Powershell script.

Showing a pop-up notification from the system tray is very easy with Powershell on Windows 11. To begin, run this command as Administrator to install the BurntToast module. Install-Module -Name BurntToastInstall-Module -Name BurntToast Then you are ready to use this script to show a sample notification. Import-Module BurntToast New-BurntToastNotification -Text…

Read More

How to best get IP address information with Powershell on Windows 11.

This example will get the current IP address(s) of the user`s machine. PS C:\Users\Intel i5> Get-NetIPAddress | Sort-Object -Property InterfaceIndex | where-object -FilterScript {$_.SuffixOrigin -eq "Dhcp"}     IPAddress : 192.168.1.114 InterfaceIndex : 10 InterfaceAlias : Ethernet AddressFamily : IPv4 Type : Unicast PrefixLength : 24 PrefixOrigin : Dhcp SuffixOrigin…

Read More

How to get computer information with Powershell on Windows 11.

Getting good hardware information is very useful on a Windows system, I will show some very useful one-liners for getting hardware information on Windows. This example gives information about the CPU cores and the other pertinent CPU information. PS C:\Users\Intel i5> Get-WmiObject –class Win32_processor | ft systemname,Name,DeviceID,NumberOfCores,NumberOfLogicalProcessors   systemname Name…

Read More

Getting IP address information in Powershell 5.1.

Getting information about your IP address is easy in Powershell. Below is a simple example, this is printing information about the IP addresses on the system. PS C:\Users\Jim\Pictures\Saved Pictures> Get-NetIPAddress |Select-Object IPAddress   IPAddress ——— fec0::6155:1c09:8069:d506%1 fe80::6155:1c09:8069:d506%7 ::1 10.0.2.15 127.0.0.1PS C:\Users\Jim\Pictures\Saved Pictures> Get-NetIPAddress |Select-Object IPAddress IPAddress ——— fec0::6155:1c09:8069:d506%1 fe80::6155:1c09:8069:d506%7 ::1…

Read More

How to get the IP address of your computer with Powershell.

This is how to get the current IP address of the active network adapter in your Windows system. PS C:\Users\Doom> (Test-Connection -ComputerName (hostname) -Count 1).IPV4Address.IPAddressToString 192.168.1.2PS C:\Users\Doom> (Test-Connection -ComputerName (hostname) -Count 1).IPV4Address.IPAddressToString 192.168.1.2 This prints the IP address of your machine to the Powershell terminal. This is a great way…

Read More

Some very useful Powershell tricks.

Print the current date and time with Powershell. "{0:dddd – hh:mm:ss – d/M/yy}" -f (get-date)"{0:dddd – hh:mm:ss – d/M/yy}" -f (get-date) This is an example of what this will give you. PS C:\Users\jason> "{0:dddd – hh:mm:ss – d/M/yy}" -f (get-date) Tuesday – 08:42:05 – 30/1/18PS C:\Users\jason> "{0:dddd – hh:mm:ss -…

Read More

How to install Powershell for Linux in Ubuntu 16.04.

Installing Powershell for Linux in Ubuntu 16.04 is very easy. I had problems with the packages, but I sorted it out very quickly. Firstly, download the Powershell Debian package. https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.9/powershell_6.0.0-alpha.9-1ubuntu1.14.04.1_amd64.deb. Then the required libicu package. http://security.ubuntu.com/ubuntu/pool/main/i/icu/libicu52_52.1-3ubuntu0.4_amd64.deb. Then install the libicu package. jason$ sudo dpkg -i libicu52_52.1-3ubuntu0.4_amd64.deb Selecting previously unselected package…

Read More

How to install a Windows feature on server 2012 using Powershell.

This Powershell command will install a Windows feature on your Windows 8.1 or server 2012 machine. I am only using the telnet server as an example. PS C:\Users\Administrator> Install-WindowsFeature telnet-server Success Restart Needed Exit Code Feature Result ——- ————– ——— ————– True No Success {Telnet Server} This is how easy…

Read More