Hi everybody,
I'm not a killer in powershell and i want to retrieve localhostname, current user logged in, and macaddresses of local computer to export all in CSV file.
I writed a litle script to do this and I need your help to debug it
Here is my script
$macAddresses = Get-WmiObject win32_networkadapterconfiguration $tab=$macAddresses.macaddress $netbiosName=$(Get-WmiObject Win32_Computersystem).name $currentUser=$(Get-WmiObject Win32_Computersystem).username foreach ($mc in $tab) { write-output $mc write-output $tab write-output $netbiosName write-output $currentUser } | Export-Csv c:\temp\result.txt -NoTypeInformation -Encoding UTF8
here is error:
Thank you fro your help
Orwell