Powershell since version 7.2 no longer comes bundled with PSDesiredStateConfiguration module, so one need to install it:
Install-Module -Name PSDesiredStateConfiguration -Repository PSGallery
To deploy Bicep template run:
$deploymentParams = @{
Name = "<deployment-name>"
ResourceGroupName = "<resource-group-name>"
TemplateFile = "mainTemplate.bicep"
TemplateParameterFile = "mainTemplate.parameters.json"
}
New-AzResourceGroupDeployment @deploymentParams
https://learn.microsoft.com/en-us/azure/virtual-machines/extensions/dsc-template
Ms Reference: https://download.microsoft.com/download/4/3/1/43113F44-548B-4DEA-B471-0C2C8578FBF8/Quick_Reference_DSC_WS12R2.pdf