This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$startTime = (Get-Date -Hour 00 -Minute 00 -Second 00 -Day 01 -Month 07 -Year 2013) | |
$endTime = (Get-Date -Hour 00 -Minute 00 -Second 00 -Day 01 -Month 07 -Year 2014) | |
$exportFile = "C:\temp\calendar-export.csv" | |
$outlook = new-object -com outlook.application; | |
$mapi = $outlook.GetNameSpace("MAPI"); | |
$mailboxlist = $mapi.Folders | |
foreach ($mailbox in $mailboxlist) { | |
$MailboxName = $mailbox.Name | |
if ($mailboxname -notlike 'Mailbox -*' -and $mailboxname -notlike 'Personal*') { | |
write-host $MailboxName -ForegroundColor Red |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function WSUSUpdate { | |
$Criteria = "IsInstalled=0 and Type='Software'" | |
$Searcher = New-Object -ComObject Microsoft.Update.Searcher | |
try { | |
$SearchResult = $Searcher.Search($Criteria).Updates | |
if ($SearchResult.Count -eq 0) { | |
Write-Output "There are no applicable updates." | |
exit | |
} | |
else { |