Konstantin Vlasenko

An engineer is someone who can make for a dollar what any fool could make for two. – Alan Kay

Category Archives: PowerSlim

#PowerShell: Skipping the first from array

Some times you need to skip first element from the array of arguments $x. $x = 1,2,3,4  Variant #1 Variant #2

Convert #JSON to #PowerShell

[Reflection.Assembly]::LoadWithPartialName(“System.Web.Extensions”) $c = New-Object System.Web.Script.Serialization.JavaScriptSerializer $c.DeserializeObject( $json )

#PowerShell set-content cannot access the file

gc file.txt | % {$_ -replace ‘xxx’, ‘yyy’} | sc file.txt (gc file.txt) | % {$_ -replace ‘xxx’, ‘yyy’} | sc file.txt These two commands are completly different. The first one will not work with the error message “The process cannot access the file…“ When you try to set the content of the file after processing the [...]

Windows PowerShell Features from Microsoft

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

PowerSlim trick #1

Please be sure that you have read this, if you are using VMWare ESXi and PowerSlim remoting feature. You can use VMware vSphere PowerCLI to control your Guests reverting/startap process. The .Guest.State will be set to Running as soon as the VMware Tools Service is started on Guest. But it is not possible to use PowerSlim remoting [...]

PowerSlim: Run Fitnesse SLIM tests remotely

With PowerSlim you can run Fitnesse SLIM server remotely against your test environment (test VM). You can do it using PowerShell 2.0 remoting. In this case your PowerSlim server runs on the same machine as your Fitnesse server. All you need is to enable PowerShell remoting on the test VM by executing the Enable-PSRemoting command. [...]

PowerSlim Wave

http://goo.gl/V5Kp

PowerSlim 0.3 available!

http://powerslim.codeplex.com/

Get-Service locks your services

Get-Service will lock your service database till you close the session. If you just need the services information it is better to select the particular properties to prevent the service database from being locked. The right way to get the services information is Get-Service | select Name,  Status,  DisplayName

Fitnesse and SQL

PowerSlim enables FitNesse tests to be executed directly against a database. All you need is to install the PowerShell SQL Snapin from the SQL 2008 client tools (compatible with SQL 2000, 2005, 2008). Then you can use the Invoke-Sqlcmd cmdlet.

Follow

Get every new post delivered to your Inbox.