Skip to content

Instantly share code, notes, and snippets.

View jacobludriks's full-sized avatar

Jacob Ludriks jacobludriks

View GitHub Profile
@jacobludriks
jacobludriks / meetingroomutilization.ps1
Last active October 31, 2016 10:43
meetingroomutilization
$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
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 {