Send D365BroadcastMessage - FH-Inway/d365fo.tools GitHub Wiki
Send broadcast message to online users in D365FO
Send-D365BroadcastMessage [[-Tenant] <String>] [[-URL] <String>] [[-ClientId] <String>]
[[-ClientSecret] <String>] [[-TimeZone] <String>] [[-StartTime] <DateTime>] [[-EndingInMinutes] <Int32>]
[-OnPremise] [<CommonParameters>]
Utilize the same messaging framework available from LCS and send a broadcast message to all online users in the environment
Send-D365BroadcastMessage
This will send a message to all active users that are working on default D365FO environment.
See the RELATED LINKS section for the supporting cmdlets needed to store a default configuration.
Send-D365BroadcastMessage -Tenant "e674da86-7ee5-40a7-b777-1111111111111" -URL "https://usnconeboxax1aos.cloud.onebox.dynamics.com" -ClientId "dea8d7a9-1602-4429-b138-111111111111" -ClientSecret "Vja/VmdxaLOPR+alkjfsadffelkjlfw234522"
This will send a message to all active users that are working on the D365FO environment located at "https://usnconeboxax1aos.cloud.onebox.dynamics.com". It will authenticate against the Azure Active Directory with the "e674da86-7ee5-40a7-b777-1111111111111" guid. It will use the ClientId "dea8d7a9-1602-4429-b138-111111111111" and ClientSecret "Vja/VmdxaLOPR+alkjfsadffelkjlfw234522" go get access to the environment. It will use the default value "UTC" Time Zone for converting the different time and dates. It will use the default start time which is NOW. It will use the default end time which is 60 minutes.
Send-D365BroadcastMessage -OnPremise -Tenant "https://adfs.local/adfs" -URL "https://ax-sandbox.d365fo.local" -ClientId "dea8d7a9-1602-4429-b138-111111111111" -ClientSecret "Vja/VmdxaLOPR+alkjfsadffelkjlfw234522"
This will send a message to all active users that are working on the D365FO OnPremise environment located at "https://ax-sandbox.d365fo.local". It will authenticate against Local ADFS with the "https://adfs.local/adfs" path It will use the ClientId "dea8d7a9-1602-4429-b138-111111111111" and ClientSecret "Vja/VmdxaLOPR+alkjfsadffelkjlfw234522" go get access to the environment. It will use the default value "UTC" Time Zone for converting the different time and dates. It will use the default start time which is NOW. It will use the default end time which is 60 minutes.
Azure Active Directory (AAD) tenant id (Guid) that the D365FO environment is connected to, that you want to send a message to
Type: String
Parameter Sets: (All)
Aliases: $AADGuid
Required: False
Position: 2
Default value: $Script:BroadcastTenant
Accept pipeline input: False
Accept wildcard characters: False
URL / URI for the D365FO environment you want to send a message to
Type: String
Parameter Sets: (All)
Aliases: URI
Required: False
Position: 3
Default value: $Script:BroadcastUrl
Accept pipeline input: False
Accept wildcard characters: False
The ClientId obtained from the Azure Portal when you created a Registered Application
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: $Script:BroadcastClientId
Accept pipeline input: False
Accept wildcard characters: False
The ClientSecret obtained from the Azure Portal when you created a Registered Application
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: $Script:BroadcastClientSecret
Accept pipeline input: False
Accept wildcard characters: False
Id of the Time Zone your environment is running in
You might experience that the local VM running the D365FO is running another Time Zone than the computer you are running this cmdlet from
All available .NET Time Zones can be traversed with tab for this parameter
The default value is "UTC"
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 6
Default value: $Script:BroadcastTimeZone
Accept pipeline input: False
Accept wildcard characters: False
The time and date you want the message to be displayed for the users
Default value is NOW
The specified StartTime will always be based on local Time Zone. If you specify a different Time Zone than the local computer is running, the start and end time will be calculated based on your selection.
Type: DateTime
Parameter Sets: (All)
Aliases:
Required: False
Position: 7
Default value: (Get-Date)
Accept pipeline input: False
Accept wildcard characters: False
Specify how many minutes into the future you want this message / maintenance window to last
Default value is 60 minutes
The specified StartTime will always be based on local Time Zone. If you specify a different Time Zone than the local computer is running, the start and end time will be calculated based on your selection.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 8
Default value: $Script:BroadcastEndingInMinutes
Accept pipeline input: False
Accept wildcard characters: False
Specify if environnement is an D365 OnPremise
Default value is "Not set" (= Cloud Environnement)
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: 9
Default value: $Script:BroadcastOnPremise
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
The specified StartTime will always be based on local Time Zone. If you specify a different Time Zone than the local computer is running, the start and end time will be calculated based on your selection.
For OnPremise environnement use -OnPremise flag to added "namespaces/AXSF" path to D365 URL and allow to get token from local ADFS server
Tags: Servicing, Message, Users, Environment
Author: Mötz Jensen (@Splaxi)
Add-D365BroadcastMessageConfig
Clear-D365ActiveBroadcastMessageConfig
Get-D365ActiveBroadcastMessageConfig
Get-D365BroadcastMessageConfig