Monday, December 19, 2016

Windows PowerShell Equivalents: Networking Commands (PING)

Looking for PowerShell equivalents for older console network commands such as PING. The PING command is used for checking connectivity and to measure network latency between two devices.

PowerShell: Test-NetConnection

Examples:
Test-NetConnection www.example.com
Test-NetConnection -ComputerName www.example.com -InformationLevel Detailed
Test-NetConnection -ComputerName www.example.com | Select-Object -ExpandProperty PingReplyDetails | Format-Table Address, Status, RoundTripTime

Monday, December 12, 2016

Advanced Tip: Finding and Uninstalling a HotFix From PowerShell

Warning: Use this trick at your own risk, uninstalling the wrong hot fixes on your system can cause problems.

There are several ways to find the hotfixes from the GUI tools on your system, such as the Windows Update GUI.  I generally like to use PowerShell only tricks, but this one is a hybrid. It uses a utility called WUSA to uninstall the hotfix.

To uninstall a hotfix on your system, you need to know its KB number.  You can use this technique to test if it exists and then uninstall it. All you have to do is change the KB number in the $A variable.

$a="11111111";$b="KB"+$a;$c=Get-HotFix|Where-Object HotFixID -eq $b;if(![string]::IsNullOrEmpty($c)){wusa /uninstall /kb:$a}

Tuesday, December 06, 2016

Windows PowerShell Equivalents: Networking Commands (IPCONFIG)

Looking for PowerShell equivalents for older console network commands such as IPCONFIG. The IPCONFIG command is used for displaying IP address information (including the subnet mask, and gateway) for the local NIC adapter attached to the computer.

PowerShell: Get-NetIPConfiguration or Get-NetIPAddress

Examples:

  • Get-NetIPConfiguration
  • Get-NetIPAddress | Sort-Object InterfaceIndex | Format-Table InterfaceIndex,InterfaceAlias,AddressFamily,IPAddress,PrefixLength -Autosize
  • Get-NetIPAddress | Where-Object AddressFamily -eq IPv6 | Format-Table –AutoSize

Saturday, April 23, 2016

Windows 10's Anniversary Update

If you have not heard, Microsoft is releasing a free Windows 10's Anniversary Update. This upgrade is supposed to be available in July of this year. This is not a small update, it's going to contain a lot of new features and enhancements.

I will post more information as we get closer to the release.  If you want to play with the new enhancements now, join the Insider Preview program and joining fast ring. Open the Setting app, select Update and Security, select Windows Update, press the Advanced options link. Follow the instructions under Get Insider Builds section. 
Please note this is beta prerelease software, so don't run it on your production computer.
To learn more about this and other features check out my book on Windows 10 (Power User Guide: Windows 10 Secrets: The Ultimate Windows Tips and Tricks Guide for Everyone) [shameless plug].