Starting: Create and Update Alert Rules
==============================================================================
Description : Run a PowerShell script within an Azure environment
Author : Microsoft Corporation
Help : https://aka.ms/azurepowershelltroubleshooting
==============================================================================
## Validating Inputs Complete
## Initializing Az module
Import-Module -Name C:\Modules\az_6.4.0\Az.Accounts\2.5.3\Az.Accounts.psd1 -Global
##[warning]Both Az and AzureRM modules were detected on this machine. Az and AzureRM modules cannot be imported in the same session or used in the same script or runbook. If you are running PowerShell in an environment you control you can use the 'Uninstall-AzureRm' cmdlet to remove all AzureRm modules from your machine. If you are running in Azure Automation, take care that none of your runbooks import both Az and AzureRM modules. More information can be found here: https://aka.ms/azps-migration-guide
Clear-AzContext -Scope CurrentUser -Force -ErrorAction SilentlyContinue
Clear-AzContext -Scope Process
Connect-AzAccount -ServicePrincipal -Tenant *** -Credential System.Management.Automation.PSCredential -Environment AzureCloud @processScope
Set-AzContext -SubscriptionId xxxxxxxxxxxxxxxxxxx -TenantId ***
## Az module initialization Complete
## Beginning Script Execution
========================== Starting Command Output ===========================
"C:\Program Files\PowerShell\7\pwsh.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'D:\a\_temp\d63227d4-d187-49c2-8d50-5426ca35994b.ps1'"
Install-Package: C:\program files\powershell\7\Modules\PowerShellGet\PSModule.psm1:9711
9711 | … talledPackages = PackageManagement\Install-Package @PSBoundParameters
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| The following commands are already available on this
| system:'Get-AzSentinelAlertRule,Get-AzSentinelAlertRuleAction,Get-AzSentinelDataConnector,Get-AzSentinelIncident,New-AzSentinelAlertRule,New-AzSentinelAlertRuleAction,Remove-AzSentinelAlertRule,Remove-AzSentinelAlertRuleAction,Update-AzSentinelIncident'. This module 'AzSentinel' may override the existing commands. If you still want to install this module 'AzSentinel', use -AllowClobber parameter.
##[warning]A parameter cannot be found that matches parameter name 'and'.
## Script Execution Complete
Finishing: Create and Update Alert Rules