PoshBot – Powershell-based Bot Framework

PoshBot - Powershell-based Bot Framework

PoshBot is a chat bot published in PowerShell. It helps make comprehensive use of courses launched in PowerShell 5.. PowerShell modules are loaded into PoshBot and instantly develop into accessible as bot commands. PoshBot at present supports connecting to Slack to provide you with amazing ChatOps goodness.

What Can PoshBot Do?

Really significantly anything at all you want 🙂 No very seriously. PoshBot executes capabilities or cmdlets from PowerShell modules. Use PoshBot to hook up to servers and report status, deploy code, execute runbooks, query APIs, etcetera. If you can write it in PowerShell, PoshBot can execute it.

Documentation

Thorough documentation can be identified at ReadTheDocs.

Developing PoshBot

See Developing PoshBot for documentation on how to build PoshBot from source.

Changelog

Comprehensive variations for each launch are documented in the launch notes.

[YouTube] PowerShell Summit 2018 – Invoke-ChatOps: Level up and transform your society with chat and PowerShell

Quickstart

To get commenced now, get a SLACK-API-TOKEN for your bot:

https://my.slack.com/companies/new/bot

# Put in the module from PSGallery
Put in-Module -Identify PoshBot -Repository PSGallery

# Import the module
Import-Module -Name PoshBot

# Create a bot configuration
$botParams = @
Identify="name"
BotAdmins = @('')
CommandPrefix = '!'
LogLevel="Details"
BackendConfiguration = @
Identify="SlackBackend"
Token = ''

AlternateCommandPrefixes="bender", 'hal'


$myBotConfig = New-PoshBotConfiguration @botParams

# Get started a new occasion of PoshBot interactively or in a position.
Get started-PoshBot -Configuration $myBotConfig #-AsJob

Fundamental usage:

# Develop a Slack backend
$backendConfig = @Title="SlackBackend" Token = ''
$backend = New-PoshBotSlackBackend -Configuration $backendConfig

# Build a PoshBot configuration
$pbc = New-PoshBotConfiguration -BotAdmins @('') -BackendConfiguration $backendConfig

# Conserve configuration
Preserve-PoshBotConfiguration -InputObject $pbc -Route .PoshBotConfig.psd1

# Load configuration
$pbc = Get-PoshBotConfiguration -Route .PoshBotConfig.psd1

# Generate an instance of the bot
$bot = New-PoshBotInstance -Configuration $pbc -Backend $backend

# Commence the bot
$bot.Begin()

# Accessible commands
Get-Command -Module PoshBot

CommandType Title Edition Resource
----------- ---- ------- ------
Purpose Get-PoshBot .12. poshbot
Functionality Get-PoshBotConfiguration .12. poshbot
Perform Get-PoshBotStatefulData .12. poshbot
Function New-PoshBotCardResponse .12. poshbot
Function New-PoshBotConfiguration .12. poshbot
Operate New-PoshBotDiscordBackend .12. poshbot
Perform New-PoshBotFileUpload .12. poshbot
Function New-PoshBotInstance .12. poshbot
Perform New-PoshBotMiddlewareHook .12. poshbot
Operate New-PoshBotScheduledTask .12. poshbot
Operate New-PoshBotSlackBackend .12. poshbot
Function New-PoshBotTeamsBackend .12. poshbot
Function New-PoshBotTextResponse .12. poshbot
Perform Eliminate-PoshBotStatefulData .12. poshbot
Functionality Help save-PoshBotConfiguration .12. poshbot
Function Established-PoshBotStatefulData .12. poshbot
Functionality Begin-PoshBot .12. poshbot
Perform Halt-Poshbot .12. poshbot

Picture and Post Resource link

Browse More on Pentesting Instruments

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *