PowerShell module for interacting with the Matrix API
Go to file
James a9bc50465f
add `Remove-MatrixRoomMessage` (#4)
* fix debug url

* fix `MatrixMessage` type

* add `Remove-MatrixRoomMessage`

* add `Get-Help` block
2022-04-05 17:15:17 +01:00
private add function for getting joined rooms 2022-03-27 19:23:38 +01:00
public add `Remove-MatrixRoomMessage` (#4) 2022-04-05 17:15:17 +01:00
.gitignore add initial module files 2022-03-12 22:07:14 +00:00
PSMatrix.psd1 add `Remove-MatrixRoomMessage` (#4) 2022-04-05 17:15:17 +01:00
PSMatrix.psm1 add initial module files 2022-03-12 22:07:14 +00:00
PSMatrixTypes.ps1xml add `Remove-MatrixRoomMessage` (#4) 2022-04-05 17:15:17 +01:00
README.md add missing `cd` to README 2022-04-05 15:58:56 +01:00

README.md

PSMatrix

PowerShell module for interacting with the Matrix API

Installation

  1. Clone repo:
git clone https://github.com/Thumbscrew/PSMatrix.git
  1. Import module:
cd PSMatrix
Import-Module ./PSMatrix

Getting Started

  1. Create a PSCredential object:
$creds = Get-Credential

PowerShell credential request
Enter your credentials.
User: username
Password for user username: **************
  1. Get an access token from your Matrix homeserver (this will be required for subsequent authenticated requests):
# DeviceDisplayName is optional and will default to "PSMatrix"
$token = New-MatrixAccessToken -ServerUrl "https://example.matrix.com" -Credentials $creds -DeviceDisplayName "PSMatrix"

Examples

Get a list Matrix rooms you've joined

$rooms = Get-MatrixJoinedRooms -ServerUrl "https://matrix.example.com" -AccessToken $token

Get all members of a joined room

Get-MatrixJoinedMembers -ServerUrl "https://matrix.example.com" -AccessToken $token -RoomId "!ehXvUhWNASUkSLvAGP:matrix.org"

Log out of your session

Remove-MatrixAccessToken -ServerUrl "https://matrix.example.com" -AccessToken $token