Solved

Strange results of the powershell inventory

Posted on 2013-11-18
2
266 Views
Last Modified: 2013-11-22
Hi folks,

I have a script (provided) with which I am doing an inventory of computers. in the org units. In one of them after the script I got a strange result. (Table attached). What means the values ¿¿in columns "ip address" and "MAC address". and how to get normal values¿¿. And the second small issue, is what means value ¿in the column "Motherboard":  to be filled by O.E.M  

Help me, please
sys-object.csv
Inventory3.myapp
0
Comment
Question by:nesher13
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 40

Assisted Solution

by:Subsun
Subsun earned 200 total points
ID: 39656533
IPaddress and MacAddress are multivalued properties, you can expand it before you export to csv file..

Change last line to..
$AllComputers | select CompName,{$_.IPaddress},{$_.MacAddress},WindowsVersion,ServicePack,WinInsDate,CurrentUser,ProcType,Motherboard,DiskSize,MemoryCapacity  | Export-Csv c:\Powershell\change5.csv -NoTypeInformation 

Open in new window

0
 
LVL 40

Accepted Solution

by:
footech earned 300 total points
ID: 39656873
You could also join all the elements of the IPAddress and MacAddress so that it is a single string.  For that you could change the lines as shown below.
 $IPAddress = (foreach($Adapter in $Netadapters){$adapter.ipaddress}) -join ";"
 $MacAddress = (foreach($Adapter in $Netadapters){$adapter.MacAddress}) -join ";"

Open in new window

0

Featured Post

Major Incident Management Communications

Major incidents and IT service outages cost companies millions. Often the solution to minimizing damage is automated communication. Find out more in our Major Incident Management Communications infographic.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
My attempt to use PowerShell and other great resources found online to simplify the deployment of Office 365 ProPlus client components to any workstation that needs it, regardless of existing Office components that may be needing attention.
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question