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
#requires -module msterminalsettings,threadjob | |
###QUICKSTART | |
#FIRST: Run this in your Powershell Windows Terminal: Install-Module threadjob,msterminalsettings -scope currentuser | |
#THEN: iex (iwr git.io/invoketerminalgif) | |
#THEN: Get-Help Search-Giphy -Examples | |
#THEN: Get-Help Invoke-TerminalGif -Examples | |
#THEN: Search-Giphy | Format-List -prop * | |
#THEN: Invoke-TerminalGif https://media.giphy.com/media/g9582DNuQppxC/giphy.gif |
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
#requires -module PrtgApi,PowerHtml | |
function New-PrtgMethodParams { | |
[CmdletBinding()] | |
param ( | |
[Parameter(Mandatory)]$Command, | |
$Body = ([ordered]@{}), | |
$Method = 'GET', | |
$client = (Get-PRTGClient), | |
[Switch]$NoCredential | |
) |
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
Get-Command # Retrieves a list of all the commands available to PowerShell | |
# (native binaries in $env:PATH + cmdlets / functions from PowerShell modules) | |
Get-Command -Module Microsoft* # Retrieves a list of all the PowerShell commands exported from modules named Microsoft* | |
Get-Command -Name *item # Retrieves a list of all commands (native binaries + PowerShell commands) ending in "item" | |
Get-Help # Get all help topics | |
Get-Help -Name about_Variables # Get help for a specific about_* topic (aka. man page) | |
Get-Help -Name Get-Command # Get help for a specific PowerShell function | |
Get-Help -Name Get-Command -Parameter Module # Get help for a specific parameter on a specific command |
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
<# | |
.Parameter Credential | |
Enter WEBdav creds for an account with the WEBDav Read permission | |
.Parameter TOPdeskURL | |
The URL of the topdesk instance. eg: Support.Company.com, company.topdesk.net | |
.Parameter OutputFolder | |
Folder where you want the logs to be downloaded to. If not provided, the files will be downloaded into your tmp folder and will be cleaned up at the end. | |
.Parameter MonthsBack | |
Select how many months back you want to go. Default select the current month. 1 would be for this month, 3 whereas 3 would be the last 3 months | |
.Parameter DaysBack |
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
#Requires -Version 5 | |
# Define AuditSetting enum | |
[System.Flags()] | |
enum AuditSetting { | |
None = 0 | |
Success = 1 | |
Failure = 2 | |
All = 3 | |
} |
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
# Credential needs to | |
$Credential = Get-Credential -Message 'enter TOPdesk operator credential with WebDAV permissions.' | |
$OutputFolder = 'C:\path\to\folder' | |
$tdurl = 'company.topdesk.net' | |
$psDriveParams = @{ | |
PSProvider = 'FileSystem' | |
Root = "\\$tdUrl@SSL\webdav" # ex: '\\contoso.topdesk.net@SSL\webdav' | |
Credential = $Credential | |
Name = 'TOPdesk' |
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 Start-Deployment { | |
<# | |
.SYNOPSIS | |
Start a PDQ Deploy Deployment on a target machine | |
.DESCRIPTION | |
Trigger a PDQ Deploy deployment to start locally or on a remote machine with PDQ Deploy installed | |
.EXAMPLE | |
Start-Deployment -PackageName "Example Package" -Targets "Wolverine" |
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
<#PSScriptInfo | |
.VERSION 0.1.0 | |
.GUID 05c41fde-bd40-4dd3-a72e-12ec14a50676 | |
.AUTHOR Tyler Leonhardt | |
.COMPANYNAME Tyler Leonhardt |
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
#requires -module PrtgAPI -version 5 | |
using namespace PrtgAPI | |
function Get-PRTGDeviceSysInfo { | |
<# | |
.SYNOPSIS | |
Retrieve PRTG Device System Information via the (undocumented) API. | |
.EXAMPLE | |
Get-PRTGDeviceSysInfo -ID 13926 |