This file contains hidden or 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-MyVM { | |
[cmdletbinding()] | |
param( | |
[Parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true,Position=0)] | |
$name, | |
[Parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true,Position=1)] | |
$AssetTag, | |
$Switch = ( Get-VMSwitch -SwitchType External | Select-object -first 1 -ExpandProperty Name ), | |
$DVDPath = 'C:\iso\ipxe\IPXE.NET.23.03.07.iso' |
This file contains hidden or 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
# This script will remove the VM *AND* Vhd | |
$VMs = get-vm | Out-GridView -OutputMode Multiple | |
$Disks = $VMs | Get-VMHardDiskDrive | % path | |
$VMs | stop-vm -Force -TurnOff -Confirm:$False -ErrorAction SilentlyContinue -WarningAction SilentlyContinue | |
$VMs | Remove-VM -Force -Confirm:$False |
This file contains hidden or 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 -RunAsAdministrator | |
<# | |
.Synopsis | |
Auto create a VM from your MDT Deployment Media | |
.DESCRIPTION | |
Given an MDT Litetouch Deployment Share, this script will enumerate | |
through all "Offline Media" shares, allow you to select one or more, | |
and then auto-update and auto-create the Virtual Machine. |
This file contains hidden or 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 -RunAsAdministrator | |
<# | |
.Synopsis | |
Launch network trace | |
.DESCRIPTION | |
Launches network trace and displays a | |
.EXAMPLE | |
Example of how to use this cmdlet | |
.NOTES |
This file contains hidden or 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 | |
Search WindowsUpdate Logs | |
.DESCRIPTION | |
Searches the Windows Update Log for a string | |
.NOTES | |
Ready to be used within a | |
Copyright Keith Garner, All rights reserved. |
This file contains hidden or 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
<# | |
Example of how to create a Device Collection and populate it with computer objects | |
The Faster way. <Yea!> | |
#> | |
[cmdletbinding()] | |
param( | |
$CollBaseName = 'MyTestCol_0C_{0:D4}', |
This file contains hidden or 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
<# | |
Example of how to create a Device Collection and populate it with computer objects | |
The Slow way. <Yuck> | |
#> | |
[cmdletbinding()] | |
param( | |
$CollBaseName = 'MyTestCol_03_{0:D4}', |
This file contains hidden or 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 | |
Report on Disk Hogs | |
.DESCRIPTION | |
Returns a list of the largest directories in use on the local machine | |
.NOTES | |
Copyright Keith Garner, All rights reserved. | |
Really Updated for Windows 7 and Optimized for !!!SPEED!!! | |
.PARAMETER Path | |
Start of the search, usually c:\ |
This file contains hidden or 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
<!-- https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/settings-for-automating-oobe --> | |
<?xml version="1.0" encoding="utf-8"?> | |
<unattend xmlns="urn:schemas-microsoft-com:unattend"> | |
<settings pass="specialize"> | |
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<ComputerName>*</ComputerName> | |
</component> | |
<component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<RunSynchronous> | |
<RunSynchronousCommand wcm:action="add"> |
This file contains hidden or 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
<# | |
Bypass file for OEM OOBE Setup. | |
Called from within Audit Mode. | |
#> | |
param( | |
[int] $TargetDisk = 0, | |
[string] $NewBootWim = "$PSScriptRoot\Generic_x64.wim", | |
[string] $UserName = 'MDTServer\MDTNonInteractive', | |
[string] $Password = 'UnSecurePassword1234', |
NewerOlder