Posts

The PowerShell cmdlet Get-NetRoute returns more results than the standard "route print" command

We've been working to migrate our server documentation tool from a combination of WMI, and low level APIs to PowerShell and have come across an interesting issue. Microsoft recommend using the PowerShell cmdlet Get-NetRoute as a replacement for the old "route print" command, but it returns more results than the standard "route print" command and the WMI class Win32_IP4RouteTable. It turns out that the former returns routes for interfaces that are down whereas the later two methods do not. This is what leads to the inconsistency. To ignore the results from network adapters that aren't up you need to correlate them with the results from the Get-NetAdapter cmdlet and check the ifOperStatus. $routes = Get-NetRoute $adapters = Get-NetAdapter foreach ( $route in $routes ) {     $interfaceOnline = $true     foreach ( $adapter in $adapters )     {         if ( $adapter . I...

A file that is required cannot be installed because the cabinet file .cab has an invalid digital signature. This may indicate that the cabinet file is corrupt.

Image
When installing or upgrading the XIA Configuration Server you see the error "A file that is required cannot be installed because the cabinet file <path>.cab has an invalid digital signature. This may indicate that the cabinet file is corrupt." This is typically caused in a disconnected environment where the trusted certificate authorities are not updated automatically. The system can therefore not validate the certificate that was used to sign the XIA Configuration Server installer. To validate the signature, right click the installer and select properties, and then view the Digital Signatures tab. Select the signature and click Details, issues with the signature will be displayed here. Clicking View Certificate and then viewing the Certification Path tab will display the certificates that are required to complete the chain. More Information For more information about disconnected environments please see the following Microsoft article https://s...

Can't remove HP Printer on Windows 10, status: Removing Device

Image
You may find when you're trying to remove a HP printer on Windows 10 that you can't and the printer is stuck in printers in control panel. Clicking Remove Device does nothing and the status of the printer is displayed as Removing Device. Rebooting does not resolve the issue. Attempting to uninstall the HP software hangs during the uninstallation. The method I used to resolve this issue was as follows Reboot the computer and login as the built-in Administrator account. Check the Print Spooler service is running. Goto device manager and uninstall the WSD Print Provider for this printer. Then remove the Software devices related to the printer. If you go back to the printer you will see that the icon has changed. Reboot the computer again, and login as the built-in Administrator account and then you should now be able to remove the printer.

Installer created by AdvancedInstaller by Caphyon does not elevate UAC to administrator correctly on uninstall - "A program required for this install to complete could not be run"

Image
We've recently had issues with installers created by AdvancedInstaller by Caphyon that do not elevate UAC to administrator correctly on uninstall. This was causing one of our custom actions to fail on uninstall. Which lead to a "A program required for this install to complete could not be run" error. The confusion here seems to be that the install gives you an option to Run as Administrator , however this does not apply to the uninstallation. For this to work you must select the following option hidden in the Themes section.

Copying files is painfully slow on Windows 10

Image
Today I've been trying to copy files between two very fast SATA SSD drives. I know that copying a large number of small files is slow on Windows already but this was excruciating. The first thing I tried helped a lot, which is temporarily turning off Windows Defender. Obviously this isn't ideal but you can see the performance increase from the red line. Simply click Start and search for Defender Open Windows Defender Security Centre Goto Virus & Threat Protection Goto Virus & Threat Protection Settings Turn off Real-Time Protection and Cloud-based protection  Don't forget to turn them back on after copying your files!  

Why is FireFox using / listening on port 80

Image
After a short moment today I was wondering why FireFox was listening on TCP port 80 and stopping IIS from starting because of netstat -anb which gives the following.  [firefox.exe]   TCP    127.0.0.1:52243        127.0.0.1:52242        ESTABLISHED  [firefox.exe]   TCP    127.0.0.1:60137        127.0.0.1:443          TIME_WAIT   TCP    192.168.1.3: 80         0.0.0.0:0              LISTENING  [Skype.exe] Well it's not it's just the order Netstat reports in, and of course it was Skype blocking the port which can be configured with this checkbox on the connection tab! Sanity restored.

Windows Server 2016, 2019, 2022, Windows 10 and Windows 11: Date and time "Some settings are managed by your organization".

Image
When you're using the new "Modern" date and time settings in Windows Server 2016, 2019, 2022, Windows 10 and Windows 11 you may find that you can't set the correct date and time and the value "Some settings are managed by your organization". - While you're here - Why not check out our Windows Server Documentation and Audit Tool? The simplest way around this is to go back to the proper control panel using Start, Run, "Control.exe" and searching for "Set the date".  Within here you can set the date and time manually as required If you try and click the Change time zone button you may again get access denied... To resolve this open an elevated command prompt by right clicking the command prompt and selecting Run as Administrator  From there run the command rundll32.exe shell32.dll,Control_RunDLL timedate.cpl This will open the Data and Time control panel app elevated as an Administrator.