Get-PC/Get-PC/Private/ExportTo-Excel.ps1

9 lines
246 B
PowerShell

function ExportToExcel{
param (
$GetPCArray
)
$timestamp = get-date -Format "MMddhhmmssms"
$outfile = "$env:TMP\getpcoutput$timestamp.csv"
$GetPCArray | Export-Csv $outfile -NoTypeInformation
Invoke-Item $outfile
}