Microsoft Remote Powershell exploit in Microsoft Office a silent threat in 2022.

There is a new threat in Microsoft Office, this allows the remote execution of Powershell code on a target computer. This means that you can download an infected office document and then be open to an attack from a script that could do anything to your computer. There is a Proof of Concept file here: … Read more

How to use Powershell to print the current uptime of your computer on Windows.

This simple one-liner for Powershell will print the current uptime of your PC. This is printed with multiple columns but it also may be printed on one line. PS C:\Users\Windows 11> (get-date) – (gcim Win32_OperatingSystem).LastBootUpTime     Days : 0 Hours : 0 Minutes : 41 Seconds : 27 Milliseconds : 915 Ticks : 24879150105 … Read more

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 "Windows 11 Update", "You are … 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 : Dhcp AddressState : Preferred … 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 DeviceID NumberOfCores NumberOfLogicalProcessors ———- —- … 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 10.0.2.15 127.0.0.1 This is a … 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 to get just the IP … 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 – d/M/yy}" -f (get-date) Tuesday – … 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 libicu52:amd64. (Reading database … 490392 … 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 it is to install a … Read more