Difference between revisions of "Winrm python"
Jump to navigation
Jump to search
(Created page with "# Allow Python winrm ## Steps ### Create user ``` # Create the password object $Password = ConvertTo-SecureString "myPassword" -AsPlainText -Force # Create the user accoun...") |
(No difference)
|
Revision as of 20:44, 10 December 2025
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