HiperLogic

Virtualization, High Performance Computing, Enterprise Computing

PowerShell

You are currently browsing articles tagged PowerShell.

PowerShell is a fantastic way to automate just about everything in a Windows and VMware environment, enabling your IT department to do with more with less, which is the must-have skill of today.

Unix aficionados switching to PowerShell may at first struggle with how to recreate their favorite functionality from Unix land, like grep and awk. PowerShell can do all the powerful string manipulations that awk/sed/perl can do, just in a different manner.

For example, a typical Linux scenario using awk and grep might be:

grep “somestring” foo.txt | awk ‘{print $2}’

The powershell equivalent is below:

select-string -pattern “somestring” foo.txt | foreach { $_.ToString().split(” “)[2] }

The very excellent PowerShell Community Extensions also provide some nice items you may desire from Unix/Linux toolbox.

Tags: ,

I found that WinRM limits the number of concurrent shells while developing some PowerShell tools that connect around to a bunch servers in parallel. You may get an error like:

“Connecting to remote server failed with the following error message : The WS-Management service cannot process the request. This user is allowed a maximum number of 4 concurrent shells, which has been exceeded. Close existing shells or raise the quota for this user.”

This is how to configure and override the default of 5:

PSH>winrm quickconfig
PSH>winrm get winrm/config
PSH>winrm set winrm/config/winrs `@`{MaxShellsPerUser=`”50`”`}

Tags:

© 2006-2010 HiperLogic, LLC.  |  Serving the Ann Arbor, Southeast Michigan, and Ohio region  |  (888)-268-3930  |