NYC
skills/smithery/ai/admin-windows

admin-windows

SKILL.md

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

# 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

$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)

$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)

$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)

$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

[Environment]::SetEnvironmentVariable("MY_VAR", "value", "User")

Key Paths from Profile

$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:

# Edit .wslconfig
notepad "$env:USERPROFILE\.wslconfig"

Example content:

[wsl2]
memory=24GB
processors=8
swap=4GB

After changes:

wsl --shutdown

Check Tool Status

Before installing, check profile:

$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

$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

# 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
Weekly Installs
2
Repository
smithery/ai
First Seen
13 days ago
Installed on
claude-code2
mcpjam1
kilo1
junie1
windsurf1
zencoder1