sAMAccountName attribute, 154
Schedule Service object, in Windows Vista, 74
scheduled tasks, scripts for, 74
schtasks.exe utility, 74
script execution policy
levels, 75, 75t
retrieving, 75–76
setting, 75, 76
script support
configuring, 75–76, 75t
enabling, 75
scripts, 73–96.
See also specific scripts
constants, 84–85, 94–96
default status, 7, 75, 75
do . . . until statement, 90–92
do . . . while statement, 89–90
exercises, 94–96
ForEach-Object cmdlet, 86–88
if . . . else . . . elseif statement, 92–93
looping through code, 85–92
pausing, 89
poorly-written, impact of, 119
running inside PowerShell, 77, 78–79
running outside PowerShell, 77, 79
for statement, 88–89
switch statement, 92, 93
uses of, 73–74
variables, 80–84
WMI and, 97.
See also WMI (Windows Management Instrumentation)
SearchScope property, 184t
security.
See also passwords
credentials, alternative, for ADO, 180–183, 180t
overview, 7
unused shares and, 126
select case statement, 93
SelectNameSQL.ps1script, 192
semicolon (;), separation character, 90–91
SendTo folder, shortcut to PowerShell, adding, 79
Server 2003
Active Directory query return limits, 184, 197–198
ADSI provider, 147t
default namespace, 103
sAMAccountName attribute in, 154
scheduling tasks on, 74
WMI providers, 102
server side sorting, 184t, 192t
service accounts
identification of, 133–134
logging, 134–135
service, in WMI model, 98
services
listing, 78, 113–116
status listing, color-coded, 87–88
Set-EventLogLevel cmdlet, 208
Set-ExecutionPolicy cmdlet, 75
SetInfo() method, 150, 154, 159, 169
Set-Location cmdlet, 46, 47, 48, 64, 68, 81
Set-MailboxServer cmdlet, 214–215
Set-Variable cmdlet, 84
ShareNoQuery.ps1 script, 132
shares
properties, 126t
querying, 126–128, 131–133
shortcut to local computer, 104
shortcuts to PowerShell
from desktop, 11–12
from SendTo folder, 79
single quotation marks (‘), filter argument notation, 129
SizeLimit property, 184t
SizeLimitQueryUsers.ps1 script, 184
SmallBios.ps1 script, 120
snap-ins
definition of, 45
un-installing, 45
Sort on property, 184t
Sort-Object cmdlet, 78
SQL query syntax, 176, 192–193, 192t
SQL Server, WMI support, 97
SQLDialectQuery.ps1 script, 192–193
Start-Sleep cmdlet, 89, 100
StepByStep.ps1 script, 170
Stop-Process cmdlet, 8, 9, 10
storage settings, Exchange 2007, 206–207
strings, 82–84
subtree search scope, 177
switch statement, 92, 93
-syntax argument, 30