Other Articles
PowerShell:- Running Python script fails with error.
If you want to use PowerShell to execute Python scripts, you need to have Python installed or you will receive the error below: Head over to the Microsoft store and download Python. I opted for Python 3.7 but there are newer versions out: After the install was done, I...
Exchange 2019: Change POP/IMAP Service Startup Type with PowerShell
When you configure your POP/IMAP Service on Exchange 2019, manually going to services and changing the startup from Manual to Automatic just takes time. With PowerShell, you could add this to a script so when you license your server and enable your SSL certificate,...
Windows PowerShell:- Remove files and folders from the Temp directory
Quick PowerShell Script!! If you have a temp directory that has many items in, selecting all from Explorer and then deleting them takes longer than using a simple PowerShell command: Here is the command you can run: Get-ChildItem -Path "C:\Windows\Temp" *.* -Recurse |...
PowerShell 7:- Running Active Directory cmdlets on Windows Server 2016.
In one of my previous posts we installed PowerShell 7 on Windows 10. In my lab I installed PowerShell 7 on my Exchange 2016 Server. While there is no support for Exchange yet, Active Directory cmdlets work. To install the preview you can run the command below from an...
PowerShell:- Update a Registry Key value.
Recently we had a request to update a whole stack of servers registry keys. With PowerShell this is easy to do. In the first step you need to set the location of where you want to work. In this case it was HKLM:\SOFTWARE\Location - Location being where you want to...
PowerShell: Show hidden devices in Device Manager on Server 2008 R2
In any operating system, you may want to uninstall or remove a device like a network card for example that may be causing issues. Launching Device Manager does not show the device and as an example you cannot rename you network card because it says the device already...
Windows Server:- Disable LMHOSTS with PowerShell
With PowerShell you can pretty much do anything. In this article we disabled Netbios using a registry key, however you can do the same using WMI and PowerShell as well as removing the tick box for Lmhosts on a Network Card. To do this, you can run the following set of...
Active Directory 2016: Move the FSMO Roles with PowerShell
Here is a quick tip on firstly how to check which domain controller the FSMO roles are situated on and secondly, moving the FSMO roles with one command. To determine which server/s are holding the the FSMO roles, you can run the command below: netdom query fsmo This...
Windows PowerShell:- Crashing on opening
On one of my client's server running Windows Server 2012 R2, when you launched PowerShell it would immediately crash with the error: and this would create windows events non-stop on the server as follows: At first you think you have the famous PowerShell Virus...
PowerShell:- Disable Netbios on your network adapters
Recently we had a customer that wanted to turn off Netbios on all servers for all interfaces. StackOverflow had a nice script that did this with ease, here is the script: https://stackoverflow.com/questions/34387413/command-line-disable-netbios $i =...