Pastebin
Retrouvez, créez et partagez vos snippets en temps réel.
Rechercher un Pastebin
Aucun paste trouvé.
Créer un paste
Pastebin
Blog
anssssssssss
# 1. Enable WinRM (Windows Remote Management) Enable-PSRemoting -Force # 2. Configure WinRM for Ansible winrm quickconfig -force # 3. Set WinRM service to start automatically Set-Service WinRM -StartupType Automatic # 4. Allow Basic authentication (for testing - use better auth in production) Set-Item -Path WSMan:\localhost\Service\Auth\Basic -Value $true # 5. Allow unencrypted traffic (only for initial testing) Set-Item -Path WSMan:\localhost\Service\AllowUnencrypted -Value $true # 6. Configure firewall Enable-NetFirewallRule -Name "WINRM-HTTP-In-TCP" # 7. Increase memory limit for WinRM Set-Item WSMan:\localhost\Shell\MaxMemoryPerShellMB 1024 # 8. Set up trusted hosts (on central server, replace with your IPs) Set-Item WSMan:\localhost\Client\TrustedHosts -Value "*" -Force # OR specific IPs: Set-Item WSMan:\localhost\Client\TrustedHosts -Value "192.168.1.10,192.168.1.11" -Force # 9. Test WinRM listener winrm enumerate winrm/config/listener
Créé il y a 1 mois.