internal static void SetAuditConfigurationRule(Workload workload, OrganizationIdParameter organizationId, MultiValuedProperty <AuditableOperations> auditOpsToSet, out IEnumerable <ErrorRecord> pipelineErrors) { Guid guid; if (!AuditPolicyUtility.GetRuleGuidFromWorkload(workload, out guid)) { pipelineErrors = new List <ErrorRecord>(); return; } Command command = new Command("Get-AuditConfigurationRule"); if (organizationId != null) { command.Parameters.Add("Organization", organizationId); } command.Parameters.Add("Identity", guid.ToString()); Command command2 = new Command("Set-AuditConfigurationRule"); command2.Parameters.Add("AuditOperation", auditOpsToSet); AuditConfigUtility.InvokeCommands(new List <Command> { command, command2 }, out pipelineErrors); }
private static object InvokeCommand(Command cmd, out IEnumerable <ErrorRecord> pipelineErrors) { return(AuditConfigUtility.InvokeCommands(new List <Command> { cmd }, out pipelineErrors)); }