Public/Invoke-GetPackages.ps1
function Invoke-GetPackages { <# .SYNOPSIS Get PDQ Deploy package names .EXAMPLE !packages #> [PoshBot.BotCommand( CommandName = 'packages', Aliases = ('package', 'packagenames', 'pdq') )] [cmdletbinding()] param() $getpackages = Invoke-Command -ComputerName pdq.sunssc.local -ScriptBlock { $packagenames = PDQDeploy.exe getpackagenames $packagenames } New-PoshBotCardResponse -Type Normal -Text ($getpackages -Join "`n") -Title "PDQ Deployment Packages" } |