Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Enabling winrm using powershell

DZone's Guide to

Enabling winrm using powershell

· Performance Zone
Free Resource

Download our Introduction to API Performance Testing and learn why testing your API is just as important as testing your website, and how to start today.

So, you’re doing stuff with these new “virtual” machines eh? Well if you’re using windows, there’s a damn good chance you’ll need to enable and configure winrm, otherwise you won’t be able to log in to your swanky new “virtual machine”! Even Chef needs this service running on the target in order to work with windows. Anyway, here’s what to do: open a powershell prompt and type the following:

    winrm quickconfig -q

    winrm set winrm/config/winrs ‘@{MaxMemoryPerShellMB=”512″}’

    winrm set winrm/config ‘@{MaxTimeoutms=”1800000″}’

    winrm set winrm/config/service ‘@{AllowUnencrypted=”true”}’

    winrm set winrm/config/service/auth ‘@{Basic=”true”}’

    Start-Service WinRM

    set-service WinRM -StartupType Automatic

Alternatively you could create a ps1 script containing the stuff above, open powershell, do the thingy that allows you to run unsigned scripts, namely:

Set-ExecutionPolicy Unrestricted

Then run the ps1 script.

There, I’ve blogged it, now I’ll never have to google this again!

Find scaling and performance issues before your customers do with our Introduction to High-Capacity Load Testing guide.

Topics:

Published at DZone with permission of James Betteley, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}