Skip to content

Instantly share code, notes, and snippets.

@ju2wheels
Last active August 29, 2015 14:05
Show Gist options
  • Save ju2wheels/6c231004f09ef232ea73 to your computer and use it in GitHub Desktop.
Save ju2wheels/6c231004f09ef232ea73 to your computer and use it in GitHub Desktop.
Enable-PSRemoting -Force;
Set-WSManQuickConfig -Force;
Set-Item "WSMAN:\LocalHost\MaxTimeoutms" -Value "1800000";
Set-Item "WSMAN:\LocalHost\Client\AllowUnencrypted" -Value $true;
Set-Item "WSMAN:\LocalHost\Client\Auth\Basic" -Value $true;
Set-Item "WSMAN:\LocalHost\Client\Auth\Digest" -Value $true;
Set-Item "WSMAN:\LocalHost\Client\Auth\Kerberos" -Value $true;
Set-Item "WSMAN:\LocalHost\Client\Auth\Negotiate" -Value $true;
Set-Item "WSMAN:\LocalHost\Client\Auth\Certificate" -Value $true;
Set-Item "WSMAN:\LocalHost\Client\Auth\CredSSP" -Value $true;
Set-Item "WSMAN:\LocalHost\Client\DefaultPorts\HTTP" -Value "5985";
Set-Item "WSMAN:\LocalHost\Client\DefaultPorts\HTTPS" -Value "5986";
Set-Item "WSMAN:\LocalHost\Service\AllowRemoteAccess" -Value $true;
Set-Item "WSMAN:\LocalHost\Service\AllowUnencrypted" -Value $true;
Set-Item "WSMAN:\LocalHost\Service\Auth\Basic" -Value $true;
Set-Item "WSMAN:\LocalHost\Service\Auth\Kerberos" -Value $true;
Set-Item "WSMAN:\LocalHost\Service\Auth\Negotiate" -Value $true;
Set-Item "WSMAN:\LocalHost\Service\Auth\Certificate" -Value $true;
Set-Item "WSMAN:\LocalHost\Service\Auth\CredSSP" -Value $true;
Set-Item "WSMAN:\LocalHost\Service\DefaultPorts\HTTP" -Value "5985";
Set-Item "WSMAN:\LocalHost\Service\DefaultPorts\HTTPS" -Value "5986";
Set-Item "WSMAN:\LocalHost\Shell\MaxMemoryPerShellMB" -Value "1024";
Set-Service -Name winrm -StartupType Automatic;
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" LocalAccountTokenFilterPolicy -Value 1 -Force;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment