#########################################################
#
# Name: InstallWindowsUpdates.ps1
# Author: Tony Murray
# Version: 1.0
# Date: 16/11/2010
# Comment: PowerShell script to install
# Windows Update files
#
######################################################### # Specify the location of the *.msu files
$updatedir = "C:\E2010 SP1 Prereqs\"
### $files = Get-ChildItem $updatedir -Recurse
$msus = $files | ? {$_.extension -eq ".msu"} foreach ($msu in $msus)
{
write-host "Installing update $msu ..."
$fullname = $msu.fullname
# Need to wrap in quotes as folder path may contain spaces
$fullname = "`"" + $fullname + "`""
# Specify the command line parameters for wusa.exe
$parameters = $fullname + " /quiet /norestart"
# Start wusa.exe and pass in the parameters
$install = [System.Diagnostics.Process]::Start( "wusa",$parameters )
$install.WaitForExit()
write-host "Finished installing $msu"
} write-host "Restarting Computer"
#Restart-Computer

Powershell script to install Windows Updates (msu) from folder的更多相关文章

  1. Send email alert from Performance Monitor using PowerShell script (检测windows服务器的cpu 硬盘 服务等性能,发email的方法) -摘自网络

    I have created an alert in Performance Monitor (Windows Server 2008 R2) that should be triggered whe ...

  2. 微软 PowerShell Script Explorer 满血复活,正式发布

    一年前的今天,微软在其Windows PowerShell官方博客声明中止 ‘Script Explorer’ 应用程序的开发. 一年后的今天,微软为其Script Explorer注入了新的生命.一 ...

  3. 微软 PowerShell Script Explorer

    微软 PowerShell Script Explorer 满血复活,正式发布 一年前的今天,微软在其Windows PowerShell官方博客声明中止 ‘Script Explorer’ 应用程序 ...

  4. SharePoint 2013 How to Backup Site Collection Automatically With a PowerShell Script

    In this post I will introduce a way how to run a script for backing up SharePoint data which could b ...

  5. [转]Install Windows Server 2012 in VMware Workstation

    本文转自:http://kb4you.wordpress.com/2012/06/28/install-windows-server-2012-in-vmware-workstation-2/ Thi ...

  6. SharePoint2013 Powershell script to get site Title, Site Owner, Site user count and usage

    Powershell script to get site Title, Site Owner, Site user count and usage Add-PSSnapin microsoft.sh ...

  7. Install Windows 2016 on VirtualBox

    Download ISO file for Windows 2016 (180 days free).  https://www.microsoft.com/en-us/evalcenter/eval ...

  8. Windows 上的 SSH?使用 PowerShell Remoting 远程管理 Windows 服务器

    作者:陈计节 个人博客:https://blog.jijiechen.com/post/powershell-remoting/ 在 Linux/Unix 世界里 SSH 是个好东西,SSH 是 Se ...

  9. How to install Windows 7 SP1 on Skylake

    Download gigabyte windows usb installation tool http://www.gigabyte.cn/WebPage/-79/usb.html get Wind ...

随机推荐

  1. Log4j2使用笔记

                 log4j2是log4j的最新版,现在已经有很多公司在使用了.log4j2和log4j的优缺点对比,请自行百度. 上一篇笔记讲了关于log4j的使用.这篇笔记主要讲解log4 ...

  2. 利用matplotlib的plot函数实现图像绘制

    模式识别的一个实验,要求画出贝叶斯决策的图.这里我是利用python中的matplotlib库实现的图线的拟合.主要对于matplotlib的使用可以参照博客:webary 如果要绘制三维图像可以参考 ...

  3. .NetCore实践篇:分布式监控Zipkin持久化之殇

    前言 本系列已写了四篇文章,读本篇之前,可以先读前面几篇. 思考大纲:.Net架构篇:思考如何设计一款实用的分布式监控系统? 实践篇一:.NetCore实践篇:分布式监控客户端ZipkinTracer ...

  4. ansible一键部署k8s单机环境

    一.虚拟机准备 干净的Centsot7.4.4G内存.2个CPU 最小化安装,最好带虚拟化 二.执行初始化脚本 注意:脚本中配置静态网卡根据实际网卡名称配置,我用的是ens33 可以用 sed -i ...

  5. 使用requests库提交multipart/form-data 格式的请求

    前言: Requests是用Python语言编写,基于urllib,采用Apache2 Licensed开源协议的HTTP库.它比urllib更加方便,可以节约我们大量的工作,完全满足HTTP测试需求 ...

  6. python基础学习笔记(十三)

    re模块包含对 正则表达式.本章会对re模块主要特征和正则表达式进行介绍. 什么是正则表达式 正则表达式是可以匹配文本片段的模式.最简单的正则表达式就是普通字符串,可以匹配其自身.换包话说,正则表达式 ...

  7. 团队项目第二周spec设计

    本系统针对局域网进行联机聊天.聊天室分为服务器端和和客户端俩部分,服务器端程序主要 负责侦听客户端发来的信息,客户端需要登录到服务器端才可以实现正常的聊天功能. 1.本软件是一款局域网聊天软件,不能进 ...

  8. personal project

    words count program 统计文本文件的字符数,单词数和行数. 实现一个统计程序,他能正确的统计程序文件中的字符数,单词数和行数. 源码链接 https://github.com/sup ...

  9. git心得

    使用Git得到了以下体会: github在新的目录下添加新的文件 git init //在相应的目录下添加 git add //添加目录 git commit -m "first commi ...

  10. MySQL中wait_timeout的坑

    今天遇到了一个问题,一个项目,放到服务器(tomcat)下面的跑,但第二天,总是报错,项目还不能跑 com.mysql.jdbc.exceptions.jdbc4.CommunicationsExce ...