NotePage, Inc. Forum Index

Powershell Script for GetWeb

 
Post new topic   Reply to topic    NotePage, Inc. Forum Index -> Integration Related Questions
View previous topic :: View next topic  
Author Message
Tech Support



Joined: 25 Aug 2003
Posts: 4351

PostPosted: Tue Apr 03, 2018 10:19 am    Post subject: Powershell Script for GetWeb Reply with quote

This is for use with GetWeb and requires the GetWeb interface be configured. Basic information and an overview of GetWeb can be found here:
https://www.notepage.net/videos/overview-of-pagegate-web-interface.htm

Configuration steps can be found in our video tutorial series here:
https://www.notepage.net/videos/how-to-configure-web-interface.htm

You can also find detailed information in the PageGate Admin - GetWeb section of our documentation:
https://www.notepage.net/manuals/pg/v8/server/html/index.html

The following Powershell script can be used to make calls to GetWeb's CGI Executable.
# set each part of the URL to send
$UrlToCgi="http://127.0.0.1/scripts/webgate.exe"
$RecipientVar="?USER="
$Recipient="pageyou"
$SenderVar="&FRM="
$Sender="fromme"
$MessageVar="&MSG="
# set message to all the text sent on the command line
$Message=$args
# url encode message text
[uri]::EscapeUriString($Message)
# build the request URL
$FullUrl=$UrlToCgi + $RecipientVar + $Recipient + $SenderVar + $Sender + $MessageVar + $Message
# send the request
Invoke-WebRequest -Uri $FullUrl

Notes:
This is only compatible with Powershell v3 or newer.

Some systems might not have script execute rights. A way to temporarily give the right is to run the following command in the current powershell session:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy RemoteSigned


You'll want to update the UrlToCgi value to the URL to your hosted webgate.exe

Update the Recipient value to the name of the recipient or group you want the messages delivered to. This doesn't necessarily have to be a static value, it can be set to a variable value. However, the name variable you submit to the field must match the name of a recipient or group as it exists in the PageGate Admin.

Update the Sender variable with the desired sender's name.

Happy messaging!



_________________
Tech Support
support@notepage.com
http://www.notepage.net
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    NotePage, Inc. Forum Index -> Integration Related Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
Theme created by Vjacheslav Trushkin