#########################################################
#
# 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. 生成、查看文件的MD5、SHA、SHA256值

    生成文件的MD5.SHA.SHA256 Linux系统生成MD5.SHA.SHA256 md5sum file1.zip  >> MD5.txt sha1sum file1.zip > ...

  2. CF 799B T-shirt buying

    一道超级水的练习STL的题目 题目大意:有\(n\)件T恤,每件T恤都分别有价格(每件衣服的价格不重复).前面的颜色.背部的颜色三种属性.接下来有\(m\)个人每个人都有一种喜欢的颜色,他们按先后顺序 ...

  3. [数据可视化之一]Pandas单变量画图

    Pandas单变量画图 Bar Chat Line Chart Area Chart Histogram df.plot.bar() df.plot.line() df.plot.area() df. ...

  4. Python高阶函数--map

    map()函数 map()是 Python 内置的高阶函数,它接收一个函数 f 和一个 list,并通过把list 的每个元素依次作用在函数 f 上,得到一个新的 list 并返回. 例如,对于lis ...

  5. Linux基础命令-Nginx-正则表达式( grep sed awk )-Shell Script--etc

    Linux基础使用 学习内容博客 内存 查看swap分区信息 > swapon -s 添加swap分区 > mkswap /dev/sdb2 > 激活 swapon -a /dev/ ...

  6. 《linux内核设计与实现》第五章

    第五章 系统调用 一.与内核通信 系统调用在用户空间进程和硬件设备之间添加了一个中间层.作用: 为用户空间提供了一种硬件的抽象接口. 系统调用保证了系统的稳定和安全. 每个进程都运行在虚拟系统中,而在 ...

  7. Alpha冲刺随笔汇总

    项目Alpha冲刺(团队) Alpha冲刺随笔汇总 姓名 学号 博客链接 何守成 031602408 http://www.cnblogs.com/heshoucheng/ 黄锦峰 031602411 ...

  8. 使用PHP + Apache访问有错误的php脚本时不报错

    遇到一个问题: 在命令行编辑php脚本后,直接使用php命令行执行该php脚本,如果脚本出现错误,在命令行的情况下会报错,显示错误信息,比如下面的情况. [root@localhost wwwroot ...

  9. TimeLine CSS/Javascript 时间线

    https://casbootadminserver.herokuapp.com/#/applications/23bd8218/trace

  10. FileUtils功能概述

    https://commons.apache.org/proper/commons-io/javadocs/api-release/org/apache/commons/io/FileUtils.ht ...