How to start with PowerSlim

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

PowerSlim Suite


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

function Get-SPSite{
$farm = [Microsoft.SharePoint.Administration.SPFarm]::Local
$ | % {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} | ? {$_.Name -match “^.*Owners” } | % {$Group = $_;$_.Users} | Get-SPUser | select Site, Title, Group, Name, Email, Id

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