Hi @Manuel Alfonso Naranjo Higuera (HOGAR SÍ) ,
Please follow the steps mentioned in the link from my earlier comment i.e., this document.
If you have already taken care of creating managed identity, the new script could be something like shown below.
try
{
"Logging in to Azure..."
Connect-AzAccount -Identity
}
catch {
Write-Error -Message $_.Exception
throw $_.Exception
}
Resume-AzPowerBIEmbeddedCapacity -Name Service Name
This sample script is also generated from the same document that I have referred earlier. Also, note that I have replaced Resume-AzureRmPowerBIEmbeddedCapacity cmdlet to Resume-AzPowerBIEmbeddedCapacity as AzureRm is not recommended to use. So, before you use Resume-AzPowerBIEmbeddedCapacity cmdlet, please ensure that the cmdlet related module (Az.PowerBIEmbedded) is imported in your Azure Automation account. For more information with regards to it, please refer this document.