[CmdletBinding()] param ($computerissue = (Read-Host "Please state the problem you are having"), $subject = "### Incoming Ticket From User: $env:USERNAME Computer: $env:COMPUTERNAME ###", $to = "NCIT.Help@us.af.mil", $bcc = '', $body = $Collection, [string]$ErrorLog = 'c:\powershell\useful\errorlog\retry.txt', [switch]$LogErrors ) [Array]$Collection = foreach($computer in $computerissue) { $body = New-Object -TypeName PSObject -Property @{ Problem = $computer; } | format-list | out-string #$obj | convertTo-csv | out-string #$obj = $body #$Collection = [string]$body #[String]$Collection [string]$body Start-Process -FilePath "mailto:$to&subject=$subject&body=$body" } $Collection
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)