Click here to Skip to main content
15,885,309 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
PHP
[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
Posted
Updated 15-Aug-14 8:07am
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900