-
Notifications
You must be signed in to change notification settings - Fork 0
Home
- Introduction
- Messaging Services
- Getting Started
- Configure ScriptMessage PowerShell Module
- Sample Script
- Other Notes
- Troubleshooting
PowerShell Module to Connect Scripts to Messaging Services (Email, Chat, etc.).
This module currently supports:
- Microsoft Graph PowerShell SDK - Email & Chat
- GoogleWorkspace PowerShell Module - Email
Most services (Microsoft 365, Google Workspace, etc.) require you to create or register applications to be able to use their APIs. Please see the wiki page for each supported service below for more information:
- Microsoft 365 (Wiki page coming soon!)
- Google Workspace (Wiki page coming soon!)
There are a number of different ways to install PowerShell modules. Adjust the directions below depending on your organization's needs and policies.
The ScriptMessage PowerShell Module is published on Microsoft's central repository for PowerShell content called the PowerShell Gallery. PowerShell comes with the PowerShellGet module, which is used to install packages from the PowerShell Gallery.
If you are running PowerShell 6 or higher, you have a usable version of PowerShellGet.
- PowerShell 6.0 shipped with version 1.6.0 of PowerShellGet.
- PowerShell 7.0 shipped with version 2.2.3 of PowerShellGet.
If you are running Windows PowerShell 5.1, you should install a newer version of PowerShellGet. More information from Microsoft is available here. For best results, you should always install the latest supported version.
Run one of the following commands from the PowerShell console of the version of PowerShell you will be using the module under:
<#
Install the Latest Version in the Default Location
In PowerShellGet 1.x versions, the default install location is AllUsers ($env:ProgramFiles\PowerShell\Modules), which requires elevation for install.
In PowerShellGet versions 2.0.0 and above, the default is CurrentUser (PS Desktop: $home\Documents\WindowsPowerShell\Modules or PS Core: $home\Documents\PowerShell\Modules), which does not require elevation for install.
#>
Install-Module -Name ScriptMessage
# Specify the Location to Install
Install-Module -Name ScriptMessage -Scope AllUsers
Install-Module -Name ScriptMessage -Scope CurrentUser
# Specify an Older Version Example
Install-Module -Name ScriptMessage -RequiredVersion 1.0.5
# Update an Already Installed Module to the Latest Version
Update-Module -Name ScriptMessage
Tip: Run the following command from the version of PowerShell you plan to use to see your specific module install locations:
$env:PSModulePath -split ';'
- Clone or download the repo.
- Since the file was downloaded from the internet, if necessary, unblock the ZIP file using Windows Explorer (right-click on the ZIP file and select Properties) or the Unblock-File cmdlet.
- Copy the ScriptMessage folder to the location you desire. Below are some example locations.
- PowerShell Desktop (5.1)
- Current User: [Environment]::GetFolderPath("MyDocuments")\WindowsPowerShell\Modules
- All Users: $Env:ProgramFiles\WindowsPowerShell\Modules
- PowerShell Core (6+)
- Current User: [Environment]::GetFolderPath("MyDocuments")\PowerShell\Modules
- All Users: $Env:ProgramFiles\PowerShell\Modules
- All Users (Specific Version Example): $Env:ProgramFiles\PowerShell\7\Modules
- PowerShell Desktop (5.1)
Documentation coming soon!
Documentation coming soon!
Documentation coming soon!
Documentation coming soon!