Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Strange results of the powershell inventory

Posted on 2013-11-18
2
Medium Priority
?
273 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
2 Comments
 
LVL 40

Assisted Solution

by:Subsun
Subsun earned 800 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 41

Accepted Solution

by:
footech earned 1200 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

NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

Question has a verified solution.

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

A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
A walk-through example of how to obtain and apply new DID phone numbers to your cloud PBX enabled users that are configured in Office 365. Whether you have 1, 10 or 100+ users in your tenant, it's quite easy to get them phone-enabled and making/rece…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Suggested Courses

926 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