Blog Archives

Determining a User’s Last Logon Time

Determining a User’s Last Logon Time This topic explains how to use the Active Directory module for Windows PowerShell to determine the last time that a user logged on to the system. Advertisements

Rate this:

Tagged with: ,
Posted in Uncategorized

Use Active Directory Cmdlets with PowerShell

Use Active Directory Cmdlets with PowerShell “WARNING: Error initializing default drive: ‘Unable to find a default server with Active Directory Web Services running.’”

Rate this:

Tagged with:
Posted in Uncategorized

Checking for null in PowerShell

Checking for null in PowerShell

Rate this:

Tagged with:
Posted in Uncategorized

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