This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Can't Access mounted ISO Image PSDrive | |
<# | |
概要: | |
Dismount-DiskImage コマンドはマウントされていないISOイメージに対して呼出しても特にエラーは発生しない。 | |
ただ、特定の条件が重なった場合に、マウントしたPSドライブにアクセスできない問題が発生することを確認。 | |
問題が発生した場合はPowerShellのRunSpaceの再起動が必要となる? | |
再現条件: | |
1. Dismount-DiskImage を 2回以上呼出 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.Synopsis | |
Extract WinSxS data from Windows Image and copy to destination folder | |
.Description | |
WinSxS is used to enable Windows features which removed from disk. | |
In offline environment. Enable feature in ServerCore installation need | |
WinSxS data that included in full installer image. | |
WIM extract takes long times operation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function New-VyattaVM | |
{ | |
[Cmdletbinding()] | |
param( | |
[string]$VmName, | |
[string]$ExternalSwitchName, | |
[string]$InternalSwitchName, | |
[string]$VyattaLiveCDPath, | |
[string]$VyattaConfigVfdPath | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Create OS BaseImage VHD | |
function New-OSBaseImage | |
{ | |
[Cmdletbinding()] | |
param( | |
$VhdPath, | |
$OSImageName, | |
$MediaPath, | |
$VhdConfig, | |
$DismConfig, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Requires –Version 3 | |
#Get WindowsUpdate List for offline patch | |
function Get-WindowsUpdateFileList | |
{ | |
param( | |
[Parameter(Mandatory=$True)] | |
[string] $Filter | |
) | |
$objSession = New-Object -ComObject "Microsoft.Update.Session" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Add-WindowsDefenderExclusionsPolicy | |
{ | |
$ErrorActionPreference="Stop" | |
Set-StrictMode -Version Latest | |
#Get Hyper-V Settings | |
$vmHost = Get-VMHost | |
#Default Exclusion Entries | |
$excludes = @{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Install-VisualStudio | |
{ | |
[CmdletBinding()] | |
param ( | |
[string] $ImagePath, | |
[string[]] $ArgumentList, | |
[string] $InstallPath, | |
[string] $ProductKey | |
) | |
Write-Verbose "Install Visual Studio 2012..." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Install-ManagementStudio | |
{ | |
[CmdletBinding()] | |
param( | |
$ImagePath, | |
$WinSxS | |
) | |
Set-StrictMode -Version Latest | |
$ErrorActionPreference = "Stop" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Based on <http://gallery.technet.microsoft.com/scriptcenter/Get-PendingReboot-Query-bdb79542> | |
function Test-RebootRequired | |
{ | |
$result = @{ | |
CBSRebootPending =$false | |
WindowsUpdateRebootRequired = $false | |
FileRenamePending = $false | |
SCCMRebootPending = $false | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Install SysInternals BGInfo/AutoLogon tools | |
function Install-SysInternalsTool | |
{ | |
#Target directory is %WinDir%C:\Windows\System32\SysInternals | |
$targetDir = Join-Path $env:WinDir "System32\SysInternals" | |
#Tools to be downloaded | |
$tools = @{ | |
Bginfo = "http://live.sysinternals.com/Bginfo.exe" | |
Autologon = "http://live.sysinternals.com/Autologon.exe" |
OlderNewer