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
# Original from here: https://gallery.technet.microsoft.com/A-PowerShell-Happy-983c1253 | |
$BeepList = @( | |
@{ Pitch = 1000; Length = 300; }; | |
@{ Pitch = 1000; Length = 200; }; | |
@{ Pitch = 1150; Length = 500; }; | |
@{ Pitch = 1000; Length = 500; }; | |
@{ Pitch = 1350; Length = 500; }; | |
@{ Pitch = 1250; Length = 800; }; |
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
#documentation: https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/windows-scripting/x83z1d9f(v=vs.84) | |
$title = "Message from IT" | |
$message = "Click Ok to update the application now or Cancel to exit." | |
$secondsToWait = 120 # seconds for the window to be visible. 0 seconds will wait until user closes the window. | |
$wshell = New-Object -ComObject Wscript.Shell # Create message box object | |
$exitcode = $wshell.Popup($message, $secondsToWait, $title, 0x1031) #1000 = start on top; 0030 = warning icon; 0001 = Ok/Cancel buttons | |
# $exitcode 1 = OK button, 2 = Cancel button, -1 = Msg box closed after $seconsdToWait timed out | |
exit $exitcode |
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
$OutputPath = $env:TEMP | |
#xPathQuery for wevutil to grab event logs from Deploy, Inventory, Inventory Agent, and .NET Runtime from the last 30 days: | |
$xPathQuery = "*[System[Provider[@Name='PDQ Deploy' or @Name='PDQ Inventory' or @Name='PDQ Inventory Agent' or @Name='.NET Runtime'] and TimeCreated[timediff(@SystemTime) <= 2592000000]]]" | |
wevtutil export-log Application $OutputPath\PDQEventLogs.evtx /query:"$xPathQuery" /overwrite:true #export event logs to evtx file based on xPathQuery | |
$wshell = New-Object -ComObject Wscript.Shell # Create message box | |
$wshell.Popup("Log files saved at $OutputPath\PDQEventLogs.evtx.`n`nClick Ok to open containing folder.", 0, "PDQ Event Logs", 0x0) | |
Invoke-Item $OutputPath #Open up the Log folder in explorer for easy access to PDQEventLogs.evtx |
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
# Find ssb-interop.js file thata needs to be patched | |
# Test-Path Machine-Wide 64-bit install | |
If (Test-Path "C:\Program Files\Slack\resources\app.asar.unpacked\src\static\ssb-interop.js") { | |
$ssbinteropPath = "C:\Program Files\Slack\resources\app.asar.unpacked\src\static\ssb-interop.js" | |
$exePath = "C:\Program Files\Slack\Slack.exe" | |
} | |
# Test-Path Machine-Wide 32-bit install | |
ElseIf (Test-Path "C:\Program Files (x86)\Slack\resources\app.asar.unpacked\src\static\ssb-interop.js") { | |
$ssbinteropPath = "C:\Program Files (x86)\Slack\resources\app.asar.unpacked\src\static\ssb-interop.js" | |
$exePath = "C:\Program Files (x86)\Slack\Slack.exe" |
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
SELECT | |
Computers.Name as "Computer", | |
Applications.Name as "Application", | |
Applications.InstallDate | |
FROM Computers | |
JOIN Applications on Applications.ComputerId = Computers.ComputerId | |
WHERE Applications.InstallDate > date('now', '-7 day') | |
AND Applications.Name NOT IN | |
(SELECT | |
Applications.Name |
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
SELECT | |
Computers.Name as "Computer", | |
group_concat(Applications.Name, ", ") "Applications", | |
Count(Computers.Name) as Count | |
FROM Applications | |
JOIN Computers on Computers.ComputerId=Applications.ComputerId | |
WHERE Applications.Name LIKE "Java SE Development Kit 8%" | |
GROUP by Computers.Name | |
HAVING Count(Computers.Name) > 1 |