Winrm python

From UVOO Tech Wiki
Revision as of 20:44, 10 December 2025 by Busk (talk | contribs) (Created page with "# Allow Python winrm ## Steps ### Create user ``` # Create the password object $Password = ConvertTo-SecureString "myPassword" -AsPlainText -Force # Create the user accoun...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Allow Python winrm

Steps

Create user

# Create the password object
$Password = ConvertTo-SecureString "myPassword" -AsPlainText -Force

# Create the user account
New-LocalUser -Name "test" `
    -Password $Password `
    -FullName "Test Automation User" `
    -Description "User for WinRM access" `
    -PasswordNeverExpires

Add-LocalGroupMember -Group "Remote Management Users" -Member "test"

Firewall rule

New-NetFirewallRule -DisplayName "Allow WinRM from Specific IP" `
    -Direction Inbound `
    -LocalPort 5986 `
    -Protocol TCP `
    -Action Allow `
    -RemoteAddress 10.x.x.x

#

icm '10.x.x.x' -Cr $c -Port 5986 -UseSSL -SessionOption $o { "5986 OK" }

User must belong to this with Read & Execute for python winrm

winrm configSDDL default

Restart if needed

Restart-Service WinRM