View and Delete Local Profile List
$pc = qwinsta /server:SERVERNAME | select-string "Disc" | select-string -notmatch "services"
if ($pc)
{
$pc| % {
logoff ($_.tostring() -split ' +')[2] /server:SERVERNAME
}
}
Not sure what this is anymore
gwmi win32_userprofile |
select @{LABEL=”last used”;EXPRESSION={$_.ConvertToDateTime($_.lastusetime)}},
LocalPath, SID
| ft -a | out-file "C:\Temp\log.txt"