Measure max log-size on multiple servers

I got a little fuzzy case of how much disk all our server event-logs consume. Since the purchaser is still on vacation and couldn’t answer any questions I put together a 0.1 version with the old get-eventlog commandlet, depending on meeting with the purchaser I might replace it with the get-winevent that is a little more powerfull. The text displayed to the user is in Swedish since I´m working against swedes. First the script collects all servers in the active directory. After that I built the function get-logs that first collect all event-logs and then calculates the size of all logs and add the size and servername in an pscustomobject variable, it also adds the servers log size to the global variable $total to get a total size from all servers. I then use the function in an foreach loop with all the collected servers as targets. In the end it send a pop-up window to the user asking if he/she wants to export the result to an CSV-file. If you are interested in what the Swedish sentences means I recommend

#Global variables
$computerarray = @()
[int]$total = ""

#Array of computers
$servers1 = Get-ADComputer -Filter * -SearchBase "OU=Servers,DC=your,DC=domain,DC=here"
$servers2 = Get-ADComputer -Filter * -SearchBase "OU=Server,OU=Data,DC=your,DC=domain,DC=here"
$DCs = Get-ADComputer -Filter * -SearchBase  "OU=Domain Controllers,DC=your,DC=domain,DC=here"

$computers = $servers1 + $servers2 + $DCs

#function to collect all eventlogs and check max size and fill 
function get-logs 

param( $computer = $env:COMPUTERNAME

$logs = Get-EventLog -ComputerName $computer -LogName * | select *

[int]$Mbytes = ""

foreach ($log in $logs)
{$Mbytes += $log.maximumkilobytes
$global:result = $Mbytes * 1024 /1MB
$global:total += $result

$script:computerarray += New-Object psobject -Property @{
                      Datornamn = $computer
                      Loggar_i_MB = $result -as [int]

# Use function get-logs on all computers in array.
foreach ($computer in $
   Write-Host "kollar $computer"
   get-logs -computer $computer

# Add total size to result array.
$script:computerarray += New-Object psobject -Property @{
                      Datornamn = "Total"
                      Loggar_i_MB = $total

# Export to CSV
$title = "Exportera till CSV"
$message = "Vill du exportera reslutatet till en CSV fil(C:\temp\comp.csv)?"

$yes = New-Object System.Management.Automation.Host.ChoiceDescription "&Ja"

$no = New-Object System.Management.Automation.Host.ChoiceDescription "&Nej"

$options = [System.Management.Automation.Host.ChoiceDescription[]]($yes, $no)

$result = $host.ui.PromptForChoice($title, $message, $options, 0) 

switch ($result)
        0 {$computerarray | select Datornamn, Loggar_i_MB | Export-Csv C:\temp\comp.csv -NoTypeInformation}
        1 {"OK, allt är klart"}