How to start with PowerSlim

Install PowerShell (Windows 7 and Windows 2008 R2 already integrated with PowerShell) Download latest fitnesse.jar file java -jar fitnesse.jar. It’ll install itself Unpack the latest PowerSlim into fitnesse folder. It will put the slim.ps1 file in it. open localhost:80/PowerSlim Click Suite button

#PowerShell HowTo get the property of the object from the previous pipe level

[System.Reflection.Assembly]::LoadWithPartialName(”Microsoft.SharePoint”) function Get-SPSite{ $farm = [Microsoft.SharePoint.Administration.SPFarm]::Local $farm.services | % {if($_.WebApplications.Count){$_.WebApplications}} | % {if($_.sites.Count){$_.sites}} } function Get-SPUser { process { $_ | Add-Member -memberType NoteProperty -name “Site” -value $Site.Url $_ | Add-Member -memberType NoteProperty -name “Title” -value $Site.RootWeb.Title $_ | Add-Member -memberType NoteProperty -name “Group” -value $Group.Name $_ } } Get-SPSite | % {$Site = $_;$_.RootWeb.Groups}Continue reading “#PowerShell HowTo get the property of the object from the previous pipe level”

PowerShell trick

Do you know how to change the script below to make it true? ((‘first’,’second’))[0][1] -eq ((‘first’,’second’),(‘first’,’second’))[0][1] I want to get ‘second‘ from the left operand ((‘first’,’second’))[0][1] (,(‘first’,’second’))[0][1] comma is not a solution as it will not work for (,(‘first’,’second’),(‘first’,’second’))[0][1] (,(‘first’,’second’))[0][1] -eq (,(‘first’,’second’),(‘first’,’second’))[0][1] will still return False