Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Powershell-based bot framework

License

NotificationsYou must be signed in to change notification settings

poshbotio/PoshBot

Azure PipelinesGitHub ActionsDocumentationPS GalleryLicense
Azure Pipelines Build StatusGitHub Actions StatusDocumentation StatusPowerShell GalleryLicense

Supporting PoshBot

PoshBot is a MIT-licensed open source project. Ongoing development is made possible thanks to the support of sponsors.If you'd like to become a sponsor, you can do so throughGitHub Sponsors orPatreon.

Silver Sponsors


Want some in-depth guides? Check outChatOps the Easy Way onLeanpub!

ChatOps the Easy Way

Introduction

PoshBot is a chat bot written inPowerShell.It makes extensive use of classes introduced in PowerShell 5.0.PowerShell modules are loaded into PoshBot and instantly become available as bot commands.PoshBot currently supports connecting to Slack to provide you with awesome ChatOps goodness.

What Can PoshBot Do?

Pretty much anything you want :) No seriously.PoshBot executes functions or cmdlets from PowerShell modules.Use PoshBot to connect to servers and report status, deploy code, execute runbooks, query APIs, etc.If you can write it in PowerShell, PoshBot can execute it.

Documentation

Detailed documentation can be found atReadTheDocs.

Building PoshBot

SeeBuilding PoshBot for documentation on how to build PoshBot from source.

Changelog

Detailed changes for each release are documented in therelease notes.

[YouTube] PowerShell Summit 2018 - Invoke-ChatOps: Level up and change your culture with chat and PowerShell

Alt text

Quickstart

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

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

# Install the module from PSGalleryInstall-Module-Name PoshBot-Repository PSGallery# Import the moduleImport-Module-Name PoshBot# Create a bot configuration$botParams=@{Name='name'BotAdmins=@('<SLACK-CHAT-HANDLE>')CommandPrefix='!'LogLevel='Info'BackendConfiguration=@{Name='SlackBackend'Token='<SLACK-API-TOKEN>'    }AlternateCommandPrefixes='bender','hal'}$myBotConfig=New-PoshBotConfiguration@botParams# Start a new instance of PoshBot interactively or in a job.Start-PoshBot-Configuration$myBotConfig#-AsJob

Basic usage:

# Create a Slack backend$backendConfig=@{Name='SlackBackend';Token='<SLACK-API-TOKEN>'}$backend=New-PoshBotSlackBackend-Configuration$backendConfig# Create a PoshBot configuration$pbc=New-PoshBotConfiguration-BotAdmins@('<MY-SLACK-HANDLE>')-BackendConfiguration$backendConfig# Save configurationSave-PoshBotConfiguration-InputObject$pbc-Path .\PoshBotConfig.psd1# Load configuration$pbc=Get-PoshBotConfiguration-Path .\PoshBotConfig.psd1# Create an instance of the bot$bot=New-PoshBotInstance-Configuration$pbc-Backend$backend# Start the bot$bot.Start()# Available commandsGet-Command-Module PoshBotCommandType     Name                                               Version    Source----------------------------FunctionGet-PoshBot                                        0.12.0     poshbotFunction        Get-PoshBotConfiguration                           0.12.0     poshbotFunction        Get-PoshBotStatefulData                            0.12.0     poshbotFunction        New-PoshBotCardResponse                            0.12.0     poshbotFunction        New-PoshBotConfiguration                           0.12.0     poshbotFunction        New-PoshBotDiscordBackend                          0.12.0     poshbotFunction        New-PoshBotFileUpload                              0.12.0     poshbotFunction        New-PoshBotInstance                                0.12.0     poshbotFunction        New-PoshBotMiddlewareHook                          0.12.0     poshbotFunction        New-PoshBotScheduledTask                           0.12.0     poshbotFunction        New-PoshBotSlackBackend                            0.12.0     poshbotFunction        New-PoshBotTeamsBackend                            0.12.0     poshbotFunction        New-PoshBotTextResponse                            0.12.0     poshbotFunction        Remove-PoshBotStatefulData                         0.12.0     poshbotFunction        Save-PoshBotConfiguration                          0.12.0     poshbotFunction        Set-PoshBotStatefulData                            0.12.0     poshbotFunction        Start-PoshBot                                      0.12.0     poshbotFunction        Stop-Poshbot                                       0.12.0     poshbot

Sponsor this project

  •  

Packages

No packages published

Contributors23


[8]ページ先頭

©2009-2025 Movatter.jp