Skip to content

Commit

Permalink
Fix commands
Browse files Browse the repository at this point in the history
  • Loading branch information
johlju committed Mar 1, 2023
1 parent 5ad9c4a commit 17e5812
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion source/Public/Disable-SqlDscAudit.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ function Disable-SqlDscAudit
}

# If this command does not find the audit it will throw an exception.
$AuditObject = Get-SqlDscAudit @getSqlDscAuditParameters
$AuditObject = Get-SqlDscAudit @getSqlDscAuditParameters |
Select-Object -First 1
}

$verboseDescriptionMessage = $script:localizedData.Audit_Disable_ShouldProcessVerboseDescription -f $AuditObject.Name, $AuditObject.Parent.InstanceName
Expand Down
3 changes: 2 additions & 1 deletion source/Public/Enable-SqlDscAudit.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ function Enable-SqlDscAudit
}

# If this command does not find the audit it will throw an exception.
$AuditObject = Get-SqlDscAudit @getSqlDscAuditParameters
$AuditObject = Get-SqlDscAudit @getSqlDscAuditParameters |
Select-Object -First 1
}

$verboseDescriptionMessage = $script:localizedData.Audit_Enable_ShouldProcessVerboseDescription -f $AuditObject.Name, $AuditObject.Parent.InstanceName
Expand Down
3 changes: 2 additions & 1 deletion source/Public/New-SqlDscAudit.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,8 @@ function New-SqlDscAudit
ErrorAction = 'SilentlyContinue'
}

$auditObject = Get-SqlDscAudit @getSqlDscAuditParameters
$auditObject = Get-SqlDscAudit @getSqlDscAuditParameters |
Select-Object -First 1

if ($auditObject)
{
Expand Down
3 changes: 2 additions & 1 deletion source/Public/Set-SqlDscAudit.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,8 @@ function Set-SqlDscAudit
ErrorAction = 'Stop'
}

$AuditObject = Get-SqlDscAudit @getSqlDscAuditParameters
$AuditObject = Get-SqlDscAudit @getSqlDscAuditParameters |
Select-Object -First 1
}

if ($Refresh.IsPresent)
Expand Down

0 comments on commit 17e5812

Please sign in to comment.