PowerShell Management Series (37) PowerShell operations in the statistical domain of computer hardware assets

Source: Internet
Author: User
Tags diff

-----provide ad\exchange\lync\sharepoint\crm\sc\o365 and other Microsoft product implementation and outsourcing, qq:185426445. Phone 18666943750

Requirements: Sometimes we need to compare the CSV file report automatically acquired daily by the PowerShell program to determine what happens every day, as follows: We compare the column "Computer name" of the automatically generated CSV file before and after two days.

The script is as follows:

Diff-referenceobject (import-csv \ c \ Statistics Computer assets \2016-11-26.csv-encoding default |select-expandproperty computer name) '-diff ( IMPORT-CSV \ c \ Statistics Computer assets \2016-11-27.csv-encoding default |select-expandproperty computer name)

Or is:

diff (import-csv \ c \ statistics computer Asset \2016-11-25.csv-encoding default |select-expandproperty computer name) ' (Import-csv c \ n statistics computer assets \ 2016-11-27.csv-encoding default |select-expandproperty computer name)

The results are as follows:

650) this.width=650; "Width=" 501 "height=" 344 "title=" QQ picture 20161127123657.png "style=" WIDTH:725PX;HEIGHT:429PX; "alt= "Wkiom1g6ywdjih3naaeauqqnw8e998.png-wh_50" src= "http://s5.51cto.com/wyfs02/M02/8A/BF/ Wkiom1g6ywdjih3naaeauqqnw8e998.png-wh_500x0-wm_3-wmp_4-s_1193341870.png "/>

This article is from the "Zhou Ping Microsoft Technology Exchange Platform" blog, please be sure to keep this source http://yuntcloud.blog.51cto.com/1173839/1877008

PowerShell Management Series (37) PowerShell operations in the statistical domain of computer hardware assets

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.