Skip to content

Instantly share code, notes, and snippets.

View JaekelEDV's full-sized avatar
🎯
Focusing

@JaekelEDV JaekelEDV

🎯
Focusing
View GitHub Profile
@JaekelEDV
JaekelEDV / New-LabCert.ps1
Last active February 9, 2018 07:36
Powershell Script Create Selfsigned Certificate for Labs
<#
.SYNOPSIS
Function New-LabCert creates a selfsigned computercertificate for lab environments
.DESCRIPTION
This script creates a selfsigned computercertificate for lab environments. It is stored in cert:\localmachine\my
and from there it is exported as a pfx-file to c:\. This file then gets imported in 'Trusted Roots' to make it trustworthy.
Finally some cleanup is performed, e.g. the pfx-file will be deleted.
Please consider to run it with the -verbose parameter to receive some informative output.
.PARAMETER DNSName
This is the only but mandatory parameter. Please enter the DNSHostname of the machine you want this certificate for.
@JaekelEDV
JaekelEDV / New-LabVM.ps1
Last active August 28, 2018 13:27
Powershell Script Create Lab VM based on Master VHDx
<#
.SYNOPSIS
Function New-LabVM quickly creates VM on Hyper-V for Lab Environments
.DESCRIPTION
This Script creates a Windows Server 2016, Windows Server 2012 R2 or Windows 10 Generation 2 VM
with differencing disk based on existing Master-VHDx you have to create before executing this one.
Be sure to adjust paths in the "Parameter Section Region" according to your environment.
It connects to an existing external vSwitch to activate the License.
The VM starts automatically.
.PARAMETER OSType