Skip to content

Commit e19f809

Browse files
Get-DbaInstanceAudit - Fix MaximumFileSizeUnit casing (Mb -> MB, Gb -> GB, Tb -> TB)
(do Get-DbaInstanceAudit) Co-authored-by: Andreas Jordan <andreasjordan@users.noreply.github.com>
1 parent 27e4da9 commit e19f809

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

public/Get-DbaInstanceAudit.ps1

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,19 @@ function Get-DbaInstanceAudit {
114114
$remote = $fullname.Replace(":", "$")
115115
$remote = "\\$($currentaudit.Parent.ComputerName)\$remote"
116116

117+
$unit = switch ($currentaudit.MaximumFileSizeUnit) {
118+
"Mb" { "MB" }
119+
"Gb" { "GB" }
120+
"Tb" { "TB" }
121+
default { "$($currentaudit.MaximumFileSizeUnit)" }
122+
}
123+
117124
Add-Member -Force -InputObject $currentaudit -MemberType NoteProperty -Name ComputerName -value $currentaudit.Parent.ComputerName
118125
Add-Member -Force -InputObject $currentaudit -MemberType NoteProperty -Name InstanceName -value $currentaudit.Parent.ServiceName
119126
Add-Member -Force -InputObject $currentaudit -MemberType NoteProperty -Name SqlInstance -value $currentaudit.Parent.DomainInstanceName
120127
Add-Member -Force -InputObject $currentaudit -MemberType NoteProperty -Name FullName -value $fullname
121128
Add-Member -Force -InputObject $currentaudit -MemberType NoteProperty -Name RemoteFullName -value $remote
129+
Add-Member -Force -InputObject $currentaudit -MemberType NoteProperty -Name MaximumFileSizeUnit -value $unit
122130

123131
Select-DefaultView -InputObject $currentaudit -Property ComputerName, InstanceName, SqlInstance, Name, 'Enabled as IsEnabled', OnFailure, MaximumFiles, MaximumFileSize, MaximumFileSizeUnit, MaximumRolloverFiles, QueueDelay, ReserveDiskSpace, FullName
124132
}

0 commit comments

Comments
 (0)