# admin-windows > Windows system administration with PowerShell 7.x. Profile-aware - reads your preferences for package managers (scoop vs winget vs chocolatey), paths, and installed tools. Use when: Windows-specific admin tasks, PowerShell automation, PATH configuration, environment variables, package installation, .wslconfig editing, bash-to-PowerShell translation. NOT for: WSL operations (use admin-wsl), macOS/Linux (use admin-unix). Keywords: powershell, pwsh, windows, winget, scoop, chocolatey, registry, PATH, environment variable, .wslconfig, windows terminal, Get-, Set-, New-, Remove- - Author: Wes Odom - Repository: evolv3-ai/vibeskills - Version: 20260131171740 - Stars: 0 - Forks: 0 - Last Updated: 2026-02-07 - Source: https://github.com/evolv3-ai/vibeskills - Web: https://mule.run/skillshub/@@evolv3-ai/vibeskills~admin-windows:20260131171740 --- --- name: admin-windows description: | Windows system administration with PowerShell 7.x. Profile-aware - reads your preferences for package managers (scoop vs winget vs chocolatey), paths, and installed tools. Use when: Windows-specific admin tasks, PowerShell automation, PATH configuration, environment variables, package installation, .wslconfig editing, bash-to-PowerShell translation. NOT for: WSL operations (use admin-wsl), macOS/Linux (use admin-unix). Keywords: powershell, pwsh, windows, winget, scoop, chocolatey, registry, PATH, environment variable, .wslconfig, windows terminal, Get-, Set-, New-, Remove- license: MIT --- # Windows Administration **Requires**: Windows platform, PowerShell 7.x --- ## Navigation - Troubleshooting & known issues: `references/OPERATIONS.md` - Environment verification: `scripts/Verify-ShellEnvironment.ps1` - PowerShell profile template: `templates/profile-template.ps1` --- ## Quick Start ```powershell # Verify environment first .\scripts\Verify-ShellEnvironment.ps1 # Load profile . $HOME\.admin\scripts\Load-Profile.ps1 Load-AdminProfile -Export Show-AdminSummary ``` --- ## Package Installation (Profile-Aware) ### Check Preference First ```powershell $pkgMgr = $AdminProfile.preferences.packages.manager switch ($pkgMgr) { "scoop" { scoop install $package } "winget" { winget install $package } "choco" { choco install $package -y } default { winget install $package } } ``` ### Quick Reference by Manager | Manager | Install | Update | List | |---------|---------|--------|------| | scoop | `scoop install x` | `scoop update x` | `scoop list` | | winget | `winget install x` | `winget upgrade x` | `winget list` | | choco | `choco install x -y` | `choco upgrade x` | `choco list` | --- ## Python Commands (Profile-Aware) ```powershell $pyMgr = $AdminProfile.preferences.python.manager ``` | Profile Says | Instead of `pip install x` | Use | |--------------|---------------------------|-----| | `uv` | ❌ | `uv pip install x` | | `pip` | ✅ | `pip install x` | | `conda` | ❌ | `conda install x` | | `poetry` | ❌ | `poetry add x` | --- ## Node Commands (Profile-Aware) ```powershell $nodeMgr = $AdminProfile.preferences.node.manager ``` | Profile Says | Instead of `npm install` | Use | |--------------|--------------------------|-----| | `npm` | ✅ | `npm install` | | `pnpm` | ❌ | `pnpm install` | | `yarn` | ❌ | `yarn` | | `bun` | ❌ | `bun install` | --- ## Bash to PowerShell Translation | Bash | PowerShell | Notes | |------|------------|-------| | `cat file` | `Get-Content file` | Or `gc` | | `cat file \| head -20` | `Get-Content file -Head 20` | | | `cat file \| tail -20` | `Get-Content file -Tail 20` | | | `ls -la` | `Get-ChildItem -Force` | Or `gci -Force` | | `grep "x" file` | `Select-String "x" file` | Or `sls` | | `echo "x"` | `Write-Output "x"` | | | `echo "x" > file` | `Set-Content file -Value "x"` | | | `echo "x" >> file` | `Add-Content file -Value "x"` | | | `export VAR=x` | `$env:VAR = "x"` | Session only | | `test -f file` | `Test-Path file -PathType Leaf` | | | `test -d dir` | `Test-Path dir -PathType Container` | | | `mkdir -p dir` | `New-Item -ItemType Directory -Path dir -Force` | | | `rm -rf dir` | `Remove-Item dir -Recurse -Force` | | | `which cmd` | `Get-Command cmd` | Or `gcm` | | `curl URL` | `Invoke-WebRequest URL` | Or `iwr` | | `jq` | `ConvertFrom-Json` / `ConvertTo-Json` | | --- ## PATH Operations ### Add to PATH (Permanent) ```powershell $newPath = "C:\new\path" $currentPath = [Environment]::GetEnvironmentVariable('PATH', 'User') if ($currentPath -notlike "*$newPath*") { [Environment]::SetEnvironmentVariable('PATH', "$newPath;$currentPath", 'User') } # Refresh current session $env:PATH = [Environment]::GetEnvironmentVariable('PATH', 'User') + ";" + [Environment]::GetEnvironmentVariable('PATH', 'Machine') ``` --- ## Environment Variables ### Set Permanent Variable ```powershell [Environment]::SetEnvironmentVariable("MY_VAR", "value", "User") ``` ### Key Paths from Profile ```powershell $AdminProfile.paths.sshKeys # C:/Users/Owner/.ssh $AdminProfile.paths.npmGlobal # C:/Users/Owner/AppData/Roaming/npm $AdminProfile.paths.projects # D:/ ``` --- ## WSL Configuration `.wslconfig` is a Windows file that controls WSL resources: ```powershell # Edit .wslconfig notepad "$env:USERPROFILE\.wslconfig" ``` Example content: ```ini [wsl2] memory=24GB processors=8 swap=4GB ``` After changes: ```powershell wsl --shutdown ``` --- ## Check Tool Status Before installing, check profile: ```powershell $tool = Get-AdminTool "docker" if ($tool.present -and $tool.installStatus -eq "working") { Write-Host "Docker already installed: $($tool.version)" } else { # Install using preferred manager } ``` --- ## After Installation - Update Profile ```powershell $AdminProfile.tools["newtool"] = @{ present = $true version = "1.0.0" installedVia = $AdminProfile.preferences.packages.manager path = (Get-Command newtool).Source installStatus = "working" lastChecked = (Get-Date).ToString("o") } # Save $AdminProfile | ConvertTo-Json -Depth 10 | Set-Content $AdminProfile.paths.deviceProfile ``` --- ## Execution Policy ```powershell # Check Get-ExecutionPolicy -List # Set for current user (recommended) Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser ``` --- ## Scope Boundaries | Task | Handle Here | Route To | |------|-------------|----------| | Windows packages | ✅ | - | | PATH/env vars | ✅ | - | | PowerShell profile | ✅ | - | | .wslconfig | ✅ | - | | Registry edits | ✅ | - | | WSL operations | ❌ | admin-wsl | | MCP servers | ❌ | admin-mcp | | Server provisioning | ❌ | admin-devops | --- ## References - `references/OPERATIONS.md` - Known issues, troubleshooting, setup checklist