How to Use PowerShell on Windows VPS
Short answerOn your Windows VPS, open Windows PowerShell as Administrator and use cmdlets to inspect the system, manage services, firewall rules, and updates. PowerShell is the fastest admin path once you are connected with RDP (or via console).
Overview
This is a starter guide for everyday PowerShell on a VPSGrid Windows VPS. First login: Getting Started with a Windows VPS. Firewall-focused cmdlets: Windows Firewall — PowerShell Rules.
1) Open PowerShell as Administrator
- Connect with RDP
- Click Start, type PowerShell
- Right-click Windows PowerShell → Run as administrator
Most system changes (firewall, features, services) need an elevated window.
2) Orientation commands
# Who am I / privileges
whoami
([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole(
[Security.Principal.WindowsBuiltInRole]::Administrator)
# Computer name and OS
hostname
Get-ComputerInfo | Select-Object WindowsProductName, WindowsVersion, OsHardwareAbstractionLayer
# Disk and memory quick view
Get-PSDrive -PSProvider FileSystem
Get-CimInstance Win32_OperatingSystem |
Select-Object @{n='FreeGB';e={[math]::Round($_.FreePhysicalMemory/1MB,1)}},
@{n='TotalGB';e={[math]::Round($_.TotalVisibleMemorySize/1MB,1)}}3) Services
# Find a service
Get-Service -Name '*Term*' | Format-Table -AutoSize
# Start / stop / restart examples
Start-Service TermService
Restart-Service W3SVC -ErrorAction SilentlyContinue
# Set a service to start automatically
Set-Service -Name TermService -StartupType Automatic4) Firewall (common VPS tasks)
# List enabled inbound allows (summary)
Get-NetFirewallRule -Direction Inbound -Enabled True -Action Allow |
Select-Object DisplayName, Profile |
Sort-Object DisplayName |
Format-Table -AutoSize
# Allow HTTP/HTTPS
New-NetFirewallRule -DisplayName 'Allow HTTP 80' -Direction Inbound -Protocol TCP -LocalPort 80 -Action Allow -Profile Any
New-NetFirewallRule -DisplayName 'Allow HTTPS 443' -Direction Inbound -Protocol TCP -LocalPort 443 -Action Allow -Profile Any5) Updates and features
# Install IIS web server role (example)
Install-WindowsFeature -Name Web-Server -IncludeManagementTools
# List installed Windows features (can be long)
Get-WindowsFeature | Where-Object Installed | Select-Object Name, DisplayNamePrefer Settings → Windows Update for cumulative updates, then reboot when required.
6) Helpful habits
- Use
Get-Help Command-Name -Exampleswhen unsure - Prefer
-WhatIfon destructive commands when available - Keep a noVNC/console path ready before firewall experiments
- Copy/paste carefully — RDP clipboard can mangle long scripts
Frequently Asked Questions
PowerShell or CMD?
Use PowerShell for modern Windows Server admin. CMD still works for simple commands, but firewall/features/services are easier in PowerShell.
Do I need PowerShell 7?
Windows PowerShell 5.x that ships with Windows Server is enough for the examples here. PowerShell 7 is optional.
Can VPSGrid run PowerShell on my VPS for me?
Not on standard unmanaged plans. You administer the guest OS after RDP/console access.
Related Articles
Need More Help?
Open a ticket at billing.vpsgrid.net with your service ID and the exact PowerShell error text.
¿Le ha resultado útil esta respuesta?