Refer to Elephant Brother's blog post, original post address http://hubuxcg.blog.51cto.com/2559426/458065
I was in the elephant Brother's code to add a collection of server system patch options, for everyone to see, a total of two places, listing patches, export to HTML, add code as follows
List patches, I am here to list the last three patches of system installation, you can modify them yourself
[String]$HotfixEvents =get-hotfix-computername $Computer |where{$_. Installedon-ge [datetime] "$ ($today. AddDays (-30)) "} | Select-object-first 3
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/77/67/wKiom1ZnmTSgLhdDAABKxbnbycw763.png "title=" 1.png " alt= "Wkiom1znmtsglhddaabkxbnbycw763.png"/>
2. Exporting to HTML
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/77/66/wKioL1ZnmsjxHFKDAAA8Su-KlVU520.png "title=" 2.png " alt= "Wkiol1znmsjxhfkdaaa8su-klvu520.png"/>
Can look at the effect
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/77/69/wKiom1ZnoJzw9i8iAABGZIDHBh4383.png "style=" float: none; "title=" 3.png "alt=" Wkiom1znojzw9i8iaabgzidhbh4383.png "/>
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/77/67/wKioL1ZnoQ3yBoncAAAsa_xlECs883.png "style=" float: none; "title=" 4.png "alt=" Wkiol1znoq3yboncaaasa_xlecs883.png "/>
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/77/68/wKioL1Znom6Br0xzAAWTOiAwhkQ930.png "title=" 5.png " alt= "Wkiol1znom6br0xzaawtoiawhkq930.png"/>
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/77/69/wKiom1ZnoJ2yNRnsAAAd_xn3zec993.png "style=" float: none; "title=" 6.png "alt=" Wkiom1znoj2ynrnsaaad_xn3zec993.png "/>
Accessories for Elephant Brother's code and I modified the code after
We need to modify the other party is the sender, the recipient, the sender of the server, CC, CC people, if you want to copy more people, it will be used "," "," to separate, and Serverlist.txt file, fill in the name of their server, if there are more than one row a list.
This article is from the "green Light Dad" blog, please make sure to keep this source http://lvguangbaba.blog.51cto.com/1271362/1721063
Collect server daily check reports with PowerShell, and send messages to administrators