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.
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.
Use Active Directory Cmdlets with PowerShell “WARNING: Error initializing default drive: ‘Unable to find a default server with Active Directory Web Services running.’”
Checking for null in PowerShell
$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…
measure-command{ dir C:\*.pdf } Using the Measure-Command Cmdlet: http://technet.microsoft.com/en-us/library/ee176899.aspx