This article explains how to manage agent provisioning in Microsoft Power Pages. It shows how service admins use PowerShell scripts to disable default agent provisioning. By following these steps, admins ensure agents are created only when needed.
Service admins in the following Microsoft Entra roles can use a PowerShell script to change the tenant-level enableChatbotOnWebsiteCreation
setting:
The default value of the tenant-level setting is null
, which is equivalent to true
and creates a bot during site creation. Admins can set the value to true
or false
.
Get the current value of the setting
To get the current value of the tenant-level setting, run the Get-TenantSettings command. Here's an example:
$myTenantSettings = Get-TenantSettings
$myTenantSettings.powerPlatform.powerPages
Note
The Get-TenantSettings
command doesn't list tenant settings where the value is null
. Because the default value of the tenant-level enableChatbotOnWebsiteCreation
setting is null
, this setting doesn't appear in the list the first time you run the script. After you set its value to true
or false
, the setting appears in the list.
Set the value
Set a value for enableChatbotOnWebsiteCreation
by using the Set-TenantSettings command. This example sets the value to false
:
$requestBody = @{
powerPlatform = @{
powerPages = @{
enableChatbotOnWebsiteCreation = $false
}
}
}
Set-TenantSettings -RequestBody $requestBody