Windows Admin
Windows Admin Blog Archives: Includes practical guides and troubleshooting strategies from the perspective of a Microsoft SQL Server DBA.
-
How to Delete Files in PowerShell
This is a post on how to delete files in PowerShell, which will be useful when you need to delete files as part of a script in Windows.
-
How to Check Your PowerShell Version ($PSVersionTable)
Run $PSVersionTable.PSVersion to check your PowerShell version. What the output looks like in Windows PowerShell 5.1 and PowerShell 7, why $host.Version can mislead, and how to check a script or a remote machine.
-
Restart a Service on Multiple Servers With PowerShell
📜Part of the PowerShell Complete Guide, every PowerShell post on this site, grouped by the job you are doing. To restart a service on several servers at once, run Restart-Service inside Invoke-Command with a list of computer names. Each server runs the command at the same time and the results come back to your console. […]
-
How to Rename a Computer that Hosts SQL Server
When changing the hostname of a computer that is running SQL Server, we have to update system metadata so that remote connections and applications do not lose…
-
How to Check Windows Firewall Status with PowerShell
Want to quickly check whether your Windows Firewall is enabled or disabled? This guide shows you how to use PowerShell to get the status of your local Windows…
-
How to Enable Windows Firewall with PowerShell (Set-NetFirewallProfile)
Run Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True in an admin PowerShell window, then check with Get-NetFirewallProfile. What to check first, and what stops working once it is on.
-
How to Disable Windows Firewall with PowerShell
This post provides a demo on how to disable Windows Firewall with PowerShell on a Windows computer.
-
Advanced File and Folder Creation with PowerShell
This post contains an advanced guide for creating and managing files and folders in PowerShell. It builds on the basics introduced in my previous post…
-
Fix “.ps1 cannot be loaded because running scripts is disabled on this system” in PowerShell
The PowerShell error "cannot be loaded because running scripts is disabled on this system", the one-line fix that needs no admin rights, and the npm.ps1, npx.ps1 and Activate.ps1 versions of it.