Blog Archives

Delete List Items Powershell Script

$url = “http://portal.lab.local/”$listName = “Test” Write-Host “Starting…” $site = Get-SPSite $urlWrite-Host “Site Guid is:” $site.ID$web = $site.OpenWeb()$list = $web.Lists[$listName] Write-Host “List Guid is:” $list.ID “List Title is: ” $list.Title $listItems = $list.GetItems()$itemCount = $listItems.Count Write-Host “List Item Count is:” $itemCount

Rate this:

Tagged with: ,
Posted in 2010, PowerShell

PowerShell Peformance: measure-command

measure-command{ dir C:\*.pdf } Using the Measure-Command Cmdlet: http://technet.microsoft.com/en-us/library/ee176899.aspx

Rate this:

Tagged with:
Posted in PowerShell, Web Client Software Factory (WCSF), Windows

Grab powershell version

$PSVersionTable

Rate this:

Tagged with:
Posted in PowerShell
Antek Group Blog
Categories