cmdlet Get-AzSentinelAlertRuleTemplate at command pipeline position 1
Supply values for the following parameters:
(Type !? for Help.)
ResourceGroupName: MyResourceGroup
WorkspaceName: MyWorkspaceName
Get-AzSentinelAlertRuleTemplate: Value cannot be null. (Parameter 'source')
Environment data
$PSVersion
Name Value
PSVersion 7.1.3
PSEdition Core
GitCommitId 7.1.3
OS Microsoft Windows 10.0.19042
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Module versions
ModuleType Version PreRelease Name PSEdition ExportedCommands
Get-AzSentinelAlertRuleTemplate: Resource group 'MyResourceGroup' could not be found.
Error output
PS C:\Windows\System32> Resolve-AzError
WARNING: Upcoming breaking changes in the cmdlet 'Resolve-AzError' :
The Resolve-Error alias will be removed in a future release. Please change any scripts that use this alias to use Resolve-AzError instead.
Note : Go to https://aka.ms/azps-changewarnings for steps to suppress this breaking change warning, and other information on breaking changes in Azure PowerShell.
HistoryId: 9
RequestId : d507a95a-170e-46b4-b261-706ad6fa9373
Message : Resource group 'MyResourceGroup' could not be found.
ServerMessage : ResourceGroupNotFound: Resource group 'MyResourceGroup' could not be found.
(System.Collections.Generic.List`1[Microsoft.Rest.Azure.CloudError])
ServerResponse : {NotFound}
RequestMessage : {GET https://management.azure.com/subscriptions/8a6d2938-80eb-43bf-9a78-1427a031ab90/resourceGroups/ci
aops/providers/Microsoft.OperationalInsights/workspaces/mms-seau/providers/Microsoft.SecurityInsights/
alertRuleTemplates?api-version=2020-01-01}
InvocationInfo : {Get-AzSentinelAlertRuleTemplate}
Line : Get-AzSentinelAlertRuleTemplate
Position : At line:1 char:1
Get-AzSentinelAlertRuleTemplate
StackTrace : at Microsoft.Azure.Management.SecurityInsights.AlertRuleTemplatesOperations.ListWithHttpMessagesAsy
nc(String resourceGroupName, String workspaceName, Dictionary`2 customHeaders, CancellationToken
cancellationToken)
at Microsoft.Azure.Management.SecurityInsights.AlertRuleTemplatesOperationsExtensions.ListAsync(IAl
ertRuleTemplatesOperations operations, String resourceGroupName, String workspaceName,
CancellationToken cancellationToken)
at Microsoft.Azure.Management.SecurityInsights.AlertRuleTemplatesOperationsExtensions.List(IAlertRu
leTemplatesOperations operations, String resourceGroupName, String workspaceName)
at Microsoft.Azure.Commands.SecurityInsights.Cmdlets.AlertRulesTemplates.GetAlertRuleTemplate.Execu
teCmdlet()
at Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.<>c__3`1.<ExecuteSynchronously
OrAsJob>b__3_0(T c)
at
Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.ExecuteSynchronouslyOrAsJob[T](T
cmdlet, Action`1 executor)
at
Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.ExecuteSynchronouslyOrAsJob[T](T
cmdlet)
at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
HistoryId : 9
HistoryId: 5
Message : A parameter cannot be found that matches parameter name 'listallavailable'.
StackTrace : at System.Management.Automation.CmdletParameterBinderController.VerifyArgumentsProcessed(ParameterB
indingException originalBindingException)
at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParametersNoValidati
on(Collection1 arguments) at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParameters(Collection1
arguments)
at System.Management.Automation.CommandProcessor.BindCommandLineParameters()
at System.Management.Automation.CommandProcessor.Prepare(IDictionary psDefaultParameterValues)
at System.Management.Automation.CommandProcessorBase.DoPrepare(IDictionary
psDefaultParameterValues)
at System.Management.Automation.Internal.PipelineProcessor.Start(Boolean incomingStream)
at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object
input)
--- End of stack trace from previous location ---
at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object
input)
at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput,
CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][]
commandRedirections, FunctionContext funcContext)
at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame
frame)
Exception : System.Management.Automation.ParameterBindingException
InvocationInfo : {Get-Module}
Line : Get-Module -listallavailable
Position : At line:1 char:13
Get-Module -listallavailable
HistoryId : 5
HistoryId: 2
Message : Value cannot be null. (Parameter 'source')
StackTrace : at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
at System.Linq.Enumerable.Select[TSource,TResult](IEnumerable1 source, Func2 selector)
at Microsoft.Azure.Commands.SecurityInsights.Models.AlertRuleTemplates.PSSentinelAlertRuleTemplateC
onvertors.ConvertToPSType(IEnumerable1 value) at Microsoft.Azure.Commands.SecurityInsights.Models.AlertRuleTemplates.PSSentinelAlertRuleTemplateC onvertors.ConvertToPSType(ScheduledAlertRuleTemplate value) at Microsoft.Azure.Commands.SecurityInsights.Models.AlertRuleTemplates.PSSentinelAlertRuleTemplateC onvertors.ConvertToPSType(AlertRuleTemplate value) at Microsoft.Azure.Commands.SecurityInsights.Models.AlertRuleTemplates.PSSentinelAlertRuleTemplateC onvertors.<>c.<ConvertToPSType>b__1_0(AlertRuleTemplate dss) at System.Linq.Enumerable.SelectEnumerableIterator2.ToList()
at Microsoft.Azure.Commands.SecurityInsights.Models.AlertRuleTemplates.PSSentinelAlertRuleTemplateC
onvertors.ConvertToPSType(IEnumerable1 value) at Microsoft.Azure.Commands.SecurityInsights.Cmdlets.AlertRulesTemplates.GetAlertRuleTemplate.Execu teCmdlet() at Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.<>c__31.<ExecuteSynchronously
OrAsJob>b__3_0(T c)
at
Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.ExecuteSynchronouslyOrAsJob[T](T
cmdlet, Action`1 executor)
at
Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.ExecuteSynchronouslyOrAsJobT
at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
Exception : System.ArgumentNullException
InvocationInfo : {Get-AzSentinelAlertRuleTemplate}
Line : Get-AzSentinelAlertRuleTemplate
Position : At line:1 char:1
Description
The cmdlet get-azsentinelalertruletemplate returns "value is null" error when run with parameters and interactively.
Steps to reproduce
$AlertRuleTemplates = Get-AzSentinelAlertRuleTemplate -ResourceGroupName "MyResourceGroup" -WorkspaceName "MyWorkspaceName"
Get-AzSentinelAlertRuleTemplate : Value cannot be null. Parameter name: source At line:1 char:1
Get-AzSentinelAlertRuleTemplate -ResourceGroupName "MyResourceGroup" -Worksp ...
Interactively PS C:\Windows\System32> Get-AzSentinelAlertRuleTemplate
cmdlet Get-AzSentinelAlertRuleTemplate at command pipeline position 1 Supply values for the following parameters: (Type !? for Help.) ResourceGroupName: MyResourceGroup WorkspaceName: MyWorkspaceName Get-AzSentinelAlertRuleTemplate: Value cannot be null. (Parameter 'source')
Environment data
$PSVersion
Name Value
PSVersion 7.1.3 PSEdition Core GitCommitId 7.1.3 OS Microsoft Windows 10.0.19042 Platform Win32NT PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…} PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 WSManStackVersion 3.0
Module versions
ModuleType Version PreRelease Name PSEdition ExportedCommands
Script 0.1.0 Az.SecurityInsights Core,Desk {Get-AzSentinelAlertRuleAction, New-AzS…
Debug output
Get-AzSentinelAlertRuleTemplate: Resource group 'MyResourceGroup' could not be found.
Error output
PS C:\Windows\System32> Resolve-AzError WARNING: Upcoming breaking changes in the cmdlet 'Resolve-AzError' : The
Resolve-Error
alias will be removed in a future release. Please change any scripts that use this alias to useResolve-AzError
instead. Note : Go to https://aka.ms/azps-changewarnings for steps to suppress this breaking change warning, and other information on breaking changes in Azure PowerShell.HistoryId: 9
RequestId : d507a95a-170e-46b4-b261-706ad6fa9373 Message : Resource group 'MyResourceGroup' could not be found. ServerMessage : ResourceGroupNotFound: Resource group 'MyResourceGroup' could not be found. (System.Collections.Generic.List`1[Microsoft.Rest.Azure.CloudError]) ServerResponse : {NotFound} RequestMessage : {GET https://management.azure.com/subscriptions/8a6d2938-80eb-43bf-9a78-1427a031ab90/resourceGroups/ci aops/providers/Microsoft.OperationalInsights/workspaces/mms-seau/providers/Microsoft.SecurityInsights/ alertRuleTemplates?api-version=2020-01-01} InvocationInfo : {Get-AzSentinelAlertRuleTemplate} Line : Get-AzSentinelAlertRuleTemplate Position : At line:1 char:1
Message : A parameter cannot be found that matches parameter name 'listallavailable'. StackTrace : at System.Management.Automation.CmdletParameterBinderController.VerifyArgumentsProcessed(ParameterB indingException originalBindingException) at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParametersNoValidati on(Collection
1 arguments) at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParameters(Collection
1 arguments) at System.Management.Automation.CommandProcessor.BindCommandLineParameters() at System.Management.Automation.CommandProcessor.Prepare(IDictionary psDefaultParameterValues) at System.Management.Automation.CommandProcessorBase.DoPrepare(IDictionary psDefaultParameterValues) at System.Management.Automation.Internal.PipelineProcessor.Start(Boolean incomingStream) at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input) --- End of stack trace from previous location --- at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input) at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext) at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) Exception : System.Management.Automation.ParameterBindingException InvocationInfo : {Get-Module} Line : Get-Module -listallavailable Position : At line:1 char:13Message : Value cannot be null. (Parameter 'source') StackTrace : at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument) at System.Linq.Enumerable.Select[TSource,TResult](IEnumerable
1 source, Func
2 selector) at Microsoft.Azure.Commands.SecurityInsights.Models.AlertRuleTemplates.PSSentinelAlertRuleTemplateC onvertors.ConvertToPSType(IEnumerable1 value) at Microsoft.Azure.Commands.SecurityInsights.Models.AlertRuleTemplates.PSSentinelAlertRuleTemplateC onvertors.ConvertToPSType(ScheduledAlertRuleTemplate value) at Microsoft.Azure.Commands.SecurityInsights.Models.AlertRuleTemplates.PSSentinelAlertRuleTemplateC onvertors.ConvertToPSType(AlertRuleTemplate value) at Microsoft.Azure.Commands.SecurityInsights.Models.AlertRuleTemplates.PSSentinelAlertRuleTemplateC onvertors.<>c.<ConvertToPSType>b__1_0(AlertRuleTemplate dss) at System.Linq.Enumerable.SelectEnumerableIterator
2.ToList() at Microsoft.Azure.Commands.SecurityInsights.Models.AlertRuleTemplates.PSSentinelAlertRuleTemplateC onvertors.ConvertToPSType(IEnumerable1 value) at Microsoft.Azure.Commands.SecurityInsights.Cmdlets.AlertRulesTemplates.GetAlertRuleTemplate.Execu teCmdlet() at Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.<>c__3
1.<ExecuteSynchronously OrAsJob>b__3_0(T c) at Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.ExecuteSynchronouslyOrAsJob[T](T cmdlet, Action`1 executor) at Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.ExecuteSynchronouslyOrAsJobT at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord() Exception : System.ArgumentNullException InvocationInfo : {Get-AzSentinelAlertRuleTemplate} Line : Get-AzSentinelAlertRuleTemplate Position : At line:1 char:1The Azure PowerShell team is listening, please let us know how we are doing: https://aka.ms/azpssurvey?Q_CHL=ERROR.