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
#region Get-TypeDynamicParam | |
function Get-DynamicParamFromTypeName { | |
Param( | |
[string] | |
$TypeName | |
) | |
function New-ParamAttribute { | |
Param( | |
[Parameter(Mandatory=$true,ValueFromPipeLine=$false,ValueFromPipelineByPropertyName=$true, position=0)] | |
[string] |
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
. .\lib.common\MethodHelpers.ps1 | |
. .\lib.common\PowerObject.ps1 | |
function Resolve-DNSHost { | |
[cmdletBinding()] | |
Param () | |
DynamicParam { | |
Get-DynamicParamForMethod -method ([System.Net.Dns]::Resolve) | |
} | |
process { | |
try |
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
. .\lib.common\MethodHelpers.ps1 | |
. .\lib.common\PowerObject.ps1 | |
function Get-Color{ | |
[cmdletBinding()] | |
Param () | |
DynamicParam { | |
[System.Drawing.Color]::FromName,[System.Drawing.Color]::FromKnownColor | Get-DynamicParamForMethod | |
} | |
process { |
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
Invoke-Expression (New-Object Net.WebClient).DownloadString(‘https://raw.githubusercontent.com/kilasuit/PoshFunctions/Dev/Scripts/Install-WMF5.ps1’) |
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
New-VHD -Differencing -ParentPath .\BaseWMF5.vhd -Path .\BaseWMF5_diff.vhd | |
New-VM -Name TestBase -BootDevice IDE -VHDPath .\BaseWMF5_diff.vhd -SwitchName inet -Path .\hyperv\ | |
Start-VM TestBase |
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-PackageProvider -Name nuGet -Force -ForceBootstrap | |
Import-PackageProvider -Name nuGet -Force -ForceBootstrap | |
#Restart your PowerShell console / ISE. | |
Find-package Pester | install-package |
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
Describe 'Testing Image' { | |
It 'Should have WMF5' { | |
$PSVersionTable.PSVersion.Major -ge 5 | should be $true | |
} | |
} |
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
. '.\TestKitchen\script\IsoFile.ps1' | |
#create ISO with my Unattend.xml file | |
New-IsoFile -Source .\TestKitchen\Unattend.xml -Path .\TestKitchen\Unattendxml.iso -Force -Title MyISO |
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
New-VHD -Differencing -ParentPath .\BaseWMF5.vhd -Path .\BaseWMF5_diff.vhd | |
New-VM -Name TestBase -BootDevice IDE -VHDPath .\BaseWMF5_diff.vhd -SwitchName inet -Path .\hyperv\ | |
set-VMDvdDrive -VMName TestBase -Path .\Unattendxml.iso | |
Start-VM TestBase |
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
Mount-WindowsImage -ImagePath .\baseNoWMF5.vhd -Path ./VHD -Index 1 | |
Add-WindowsPackage -PackagePath .\Win8.1AndW2K12R2-KB3134758-x64.msu -Path .\VHD | |
Use-WindowsUnattend -UnattendPath C:\src\winopsconf\TestKitchen\Unattend.xml -Path .\VHD | |
Dismount-WindowsImage -Path .\VHD -Save |
OlderNewer