Quantcast
Viewing all articles
Browse latest Browse all 293210

Installing an application using the Powershell Plug-in, Winrm

I had some difficultly with this and didn't want anyone else to go through the pain.

 

First I had problems with permissions to get around that, I did this.

 

$secpasswd = ConvertTo-SecureString "password" -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential ("Administrator", $secpasswd)
$exec = "someappinstaller.exe"
$arg = "/dosomthing"
Start-Process $exec $arg -Wait -NoNewWindow -LoadUserProfile -Credential $cred

 

After the permissions issue was resolved I kept receiving OutOfMemory exceptions.  After hours of searching I found the cause, there is a default limit of 150 MB per shell.

 

To install something large like SQL you will need to configure WinRM to allow for additional memory than the default 150 MB per shell.  I set mine to 1024 MB.

 

http://technet.microsoft.com/en-us/library/gg550867.aspx

 

Set-Item -Force WSMan:\localhost\Shell\MaxMemoryPerShellMB 1024

 

Now I can install MSSQL via an Orchestrator WF.

 

Joe


Viewing all articles
Browse latest Browse all 293210

Trending Articles