< Back
Send-HipchatMessage
Post
NAME Send-HipchatMessage
SYNOPSIS
Sends a message to a HipChat room.
SYNTAX
Send-HipchatMessage [-Message] <String> [-RoomName] <String> [-From <String>] [-Color <String>] -Notify <Boolean>
-ApiToken <String> [<CommonParameters>]
DESCRIPTION
Sends a message to a HipChat room. The message will always display as the
user whom the API Token belongs to. If this will be used by an application
or automated script, a dedicated user and API Token should be created.
PARAMETERS
-Message <String>
Required: The contents of the message.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-RoomName <String>
Required: The name of the room where the message will be sent.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-From <String>
Optional: The user or application who will be shown as the sender of the
message. This will be displayed next to the sender's name, and does not
override the sender's actual name.
Required? false
Position? named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-Color <String>
Optional: The background color of the message. Defaults to gray.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Notify <Boolean>
Optional: Whether or not HipChat should notify users of your message.
Defaults to false.
Required? true
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-ApiToken <String>
Required: Your HipChat API Token. You can obtain an API Token from the
HipChat website by navigating to Account Settings > API Access.
Required? true
Position? named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
NOTES
Version: 1.0
Author: Corey Fonseca
Creation Date: 3/17/17
Purpose/Change: Full Functionality
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Send-HipchatMessage 'Deployment Failed!' -From 'Jenkins' -Color 'Red' -Notify -ApiToken
'REXsCauSe553gsoIJg1Gj4zwNsSAwS'
Sends a message from Jenkins with a red background that will notify all users in the room.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Send-HipchatMessage 'Testing 123' -Color 'Green' -ApiToken 'REXsCauSe553gsoIJg1Gj4zwNsSAwS'
Sends a message with a green background that will not send a notification.
RELATED LINKS
SYNOPSIS
Sends a message to a HipChat room.
SYNTAX
Send-HipchatMessage [-Message] <String> [-RoomName] <String> [-From <String>] [-Color <String>] -Notify <Boolean>
-ApiToken <String> [<CommonParameters>]
DESCRIPTION
Sends a message to a HipChat room. The message will always display as the
user whom the API Token belongs to. If this will be used by an application
or automated script, a dedicated user and API Token should be created.
PARAMETERS
-Message <String>
Required: The contents of the message.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-RoomName <String>
Required: The name of the room where the message will be sent.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-From <String>
Optional: The user or application who will be shown as the sender of the
message. This will be displayed next to the sender's name, and does not
override the sender's actual name.
Required? false
Position? named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-Color <String>
Optional: The background color of the message. Defaults to gray.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Notify <Boolean>
Optional: Whether or not HipChat should notify users of your message.
Defaults to false.
Required? true
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-ApiToken <String>
Required: Your HipChat API Token. You can obtain an API Token from the
HipChat website by navigating to Account Settings > API Access.
Required? true
Position? named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
NOTES
Version: 1.0
Author: Corey Fonseca
Creation Date: 3/17/17
Purpose/Change: Full Functionality
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Send-HipchatMessage 'Deployment Failed!' -From 'Jenkins' -Color 'Red' -Notify -ApiToken
'REXsCauSe553gsoIJg1Gj4zwNsSAwS'
Sends a message from Jenkins with a red background that will notify all users in the room.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Send-HipchatMessage 'Testing 123' -Color 'Green' -ApiToken 'REXsCauSe553gsoIJg1Gj4zwNsSAwS'
Sends a message with a green background that will not send a notification.
RELATED LINKS