Skip to content
This repository has been archived by the owner on Nov 15, 2024. It is now read-only.

Commit

Permalink
v4.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jdhitsolutions committed Sep 30, 2019
1 parent c4e3e01 commit 7cc0583
Show file tree
Hide file tree
Showing 21 changed files with 371 additions and 113 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Lab definition
# Lab Definition

This lab is specifically designed for the Implementing Windows Server 2016 DHCP from Pluralsight.com. It will provide a fully-function AD environment using company.pri for a domain, and it builds the following servers:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,15 @@ $Secure = ConvertTo-SecureString -String "$($labdata.allnodes.labpassword)" -AsP
$credential = New-Object -typename Pscredential -ArgumentList Administrator, $secure

#region DSC Resources
Import-DSCresource -ModuleName PSDesiredStateConfiguration,
@{ModuleName="xPSDesiredStateConfiguration";ModuleVersion="8.9.0.0"},
@{ModuleName="xActiveDirectory";ModuleVersion="3.0.0.0"},
@{ModuleName="xComputerManagement";ModuleVersion="4.1.0.0"},
@{ModuleName="xNetworking";ModuleVersion="5.7.0.0"},
@{ModuleName="xDhcpServer";ModuleVersion="2.0.0.0"},
@{ModuleName='xWindowsUpdate';ModuleVersion = '2.8.0.0'},
@{ModuleName='xPendingReboot';ModuleVersion = '0.4.0.0'},
@{ModuleName='xADCSDeployment';ModuleVersion = '1.4.0.0'}

Import-DSCresource -ModuleName "PSDesiredStateConfiguration" -ModuleVersion "1.1"
Import-DSCResource -modulename "xPSDesiredStateConfiguration" -ModuleVersion "8.9.0.0"
Import-DSCResource -modulename "xActiveDirectory" -ModuleVersion "3.0.0.0"
Import-DSCResource -modulename "xComputerManagement" -ModuleVersion "4.1.0.0"
Import-DSCResource -modulename "xNetworking" -ModuleVersion "5.7.0.0"
Import-DSCResource -modulename "xDhcpServer" -ModuleVersion "2.0.0.0"
Import-DSCResource -modulename 'xWindowsUpdate' -ModuleVersion '2.8.0.0'
Import-DSCResource -modulename 'xPendingReboot' -ModuleVersion '0.4.0.0'
Import-DSCResource -modulename 'xADCSDeployment' -ModuleVersion '1.4.0.0'
#endregion
#region All Nodes
node $AllNodes.Where({$true}).NodeName {
Expand Down
4 changes: 2 additions & 2 deletions Configurations/Jason-DSC-Env/Instructions.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Lab definition
# Lab Definition

This lab builds the following:

Expand All @@ -17,7 +17,7 @@ This lab builds the following:
Run the following for initial setup:
PS> Setup-Lab

To start the LAb, and apply configurations the first time:
To start the Lab, and apply configurations the first time:
PS> Run-Lab

To enable Internet access for the VM's, run:
Expand Down
18 changes: 9 additions & 9 deletions Configurations/Jason-DSC-Env/VMConfiguration.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ Configuration AutoLab {
$credential = New-Object -typename Pscredential -ArgumentList Administrator, $secure

#region DSC Resources
Import-DSCresource -ModuleName PSDesiredStateConfiguration,
@{ModuleName = 'xActiveDirectory'; ModuleVersion = '3.0.0.0'},
@{ModuleName = 'xComputerManagement'; ModuleVersion = '4.1.0.0'},
@{ModuleName = 'xNetworking'; ModuleVersion = '5.7.0.0'},
@{ModuleName = 'xDhcpServer'; ModuleVersion = '2.0.0.0'},
@{ModuleName = 'xWindowsUpdate'; ModuleVersion = '2.8.0.0'},
@{ModuleName = 'xPSDesiredStateConfiguration'; ModuleVersion = '8.9.0.0'},
@{ModuleName = 'xPendingReboot'; ModuleVersion = '0.4.0.0'},
@{ModuleName = 'xADCSDeployment'; ModuleVersion = '1.4.0.0'}
Import-DSCResource -ModuleName 'PSDesiredStateConfiguration' -ModuleVersion '1.1'
Import-DSCResource -ModuleName 'xActiveDirectory' -ModuleVersion '3.0.0.0'
Import-DSCResource -ModuleName 'xComputerManagement' -ModuleVersion '4.1.0.0'
Import-DSCResource -ModuleName 'xNetworking' -ModuleVersion '5.7.0.0'
Import-DSCResource -ModuleName 'xDhcpServer' -ModuleVersion '2.0.0.0'
Import-DSCResource -ModuleName 'xWindowsUpdate' -ModuleVersion '2.8.0.0'
Import-DSCResource -ModuleName 'xPSDesiredStateConfiguration' -ModuleVersion '8.9.0.0'
Import-DSCResource -ModuleName 'xPendingReboot' -ModuleVersion '0.4.0.0'
Import-DSCResource -ModuleName 'xADCSDeployment' -ModuleVersion '1.4.0.0'


#endregion
Expand Down
6 changes: 3 additions & 3 deletions Configurations/MultiRole/Instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ If you were instructed to use that configuration, this one should work for you.

The lab builds the following:

* 1 DC
* 1 Server (s1)
* 1 DC (DC1)
* 1 Server (S1)
* 1 Nano (N1)
* 1 Client with RSAT (Cli1)

Expand All @@ -20,7 +20,7 @@ The lab builds the following:
Run the following for initial setup:
PS> Setup-Lab

To start the LAb, and apply configurations the first time:
To start the Lab, and apply configurations the first time:
PS> Run-Lab

To enable Internet access for the VM's, run:
Expand Down
21 changes: 11 additions & 10 deletions Configurations/MultiRole/VMConfiguration.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,17 @@ $Secure = ConvertTo-SecureString -String "$($labdata.allnodes.labpassword)" -AsP
$credential = New-Object -typename Pscredential -ArgumentList Administrator, $secure

#region DSC Resources
Import-DSCresource -ModuleName PSDesiredStateConfiguration,
@{ModuleName = "xPSDesiredStateConfiguration"; ModuleVersion = "8.9.0.0"},
@{ModuleName = "xActiveDirectory"; ModuleVersion = "3.0.0.0"},
@{ModuleName = "xComputerManagement"; ModuleVersion = "4.1.0.0"},
@{ModuleName = "xNetworking"; ModuleVersion = "5.7.0.0"},
@{ModuleName = "xDhcpServer"; ModuleVersion = "2.0.0.0"},
@{ModuleName = 'xWindowsUpdate'; ModuleVersion = '2.8.0.0'},
@{ModuleName = 'xPendingReboot'; ModuleVersion = '0.4.0.0'},
@{ModuleName = 'xADCSDeployment'; ModuleVersion = '1.4.0.0'},
@{ModuleName = 'xDnsServer'; ModuleVersion = '1.14.0.0'}
Import-DSCresource -ModuleName "PSDesiredStateConfiguration" -ModuleVersion "1.1"
Import-DSCResource -modulename "xPSDesiredStateConfiguration" -ModuleVersion "8.9.0.0"
Import-DSCResource -modulename "xActiveDirectory" -ModuleVersion "3.0.0.0"
Import-DSCResource -modulename "xComputerManagement" -ModuleVersion "4.1.0.0"
Import-DSCResource -modulename "xNetworking" -ModuleVersion "5.7.0.0"
Import-DSCResource -modulename "xDhcpServer" -ModuleVersion "2.0.0.0"
Import-DSCResource -modulename 'xWindowsUpdate' -ModuleVersion '2.8.0.0'
Import-DSCResource -modulename 'xPendingReboot' -ModuleVersion '0.4.0.0'
Import-DSCResource -modulename 'xADCSDeployment' -ModuleVersion '1.4.0.0'
Import-DSCResource -modulename 'xDnsServer' -ModuleVersion '1.14.0.0'


#endregion
#region All Nodes
Expand Down
10 changes: 5 additions & 5 deletions Configurations/PowerShellLab/Instructions.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Lab definition
# Lab Definition

This lab builds the following:

* 1 Windows Server 2016 domain controller with users, groups and OU's - GUI
* 1 DHCP server on the DOM1
* 1 Windows Server 2016 domain controller (DOM1) with users, groups and OU's - Server Core
* 1 DHCP server on DOM1
* 2 Domain joined servers (SRV1 and SRV2) running Windows Server 2016 Core
* 1 workgroup based server (SRV3) running Windows Server 2019 Core
* 1 Domain joined Windows 10 Client with RSAT tools installed
* 1 Domain joined Windows 10 Client (Win10) with RSAT tools installed

## To get started

Expand All @@ -21,7 +21,7 @@ To run the commands individually to setup the lab environment:
Run the following for initial setup:

```powershell
PS> Setup-Lab
PS> Setup-Lab
```

To start the Lab, and apply configurations the first time:
Expand Down
22 changes: 11 additions & 11 deletions Configurations/PowerShellLab/VMConfiguration.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ Configuration AutoLab {
$credential = New-Object -typename Pscredential -ArgumentList Administrator, $secure

#region DSC Resources
Import-DSCresource -ModuleName PSDesiredStateConfiguration,
@{ModuleName = "xPSDesiredStateConfiguration"; ModuleVersion = "8.9.0.0"},
@{ModuleName = "xActiveDirectory"; ModuleVersion = "3.0.0.0"},
@{ModuleName = "xComputerManagement"; ModuleVersion = "4.1.0.0"},
@{ModuleName = "xNetworking"; ModuleVersion = "5.7.0.0"},
@{ModuleName = "xDhcpServer"; ModuleVersion = "2.0.0.0"},
@{ModuleName = 'xWindowsUpdate'; ModuleVersion = '2.8.0.0'},
@{ModuleName = 'xPendingReboot'; ModuleVersion = '0.4.0.0'},
@{ModuleName = 'xADCSDeployment'; ModuleVersion = '1.4.0.0'},
@{ModuleName = 'xDnsServer'; ModuleVersion = '1.14.0.0'},
@{ModuleName = 'xWebAdministration'; ModuleVersion = '2.7.0.0'}
Import-DSCresource -ModuleName "PSDesiredStateConfiguration" -ModuleVersion "1.1"
Import-DSCResource -modulename "xPSDesiredStateConfiguration" -ModuleVersion "8.9.0.0"
Import-DSCResource -modulename "xActiveDirectory" -ModuleVersion "3.0.0.0"
Import-DSCResource -modulename "xComputerManagement" -ModuleVersion "4.1.0.0"
Import-DSCResource -modulename "xNetworking" -ModuleVersion "5.7.0.0"
Import-DSCResource -modulename "xDhcpServer" -ModuleVersion "2.0.0.0"
Import-DSCResource -modulename 'xWindowsUpdate' -ModuleVersion '2.8.0.0'
Import-DSCResource -modulename 'xPendingReboot' -ModuleVersion '0.4.0.0'
Import-DSCResource -modulename 'xADCSDeployment' -ModuleVersion '1.4.0.0'
Import-DSCResource -modulename 'xDnsServer' -ModuleVersion '1.14.0.0'
Import-DSCResource -modulename 'xWebAdministration' -ModuleVersion '2.7.0.0'

#endregion
#region All Nodes
Expand Down
8 changes: 4 additions & 4 deletions Configurations/SingleServer/VMConfiguration.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Configuration AutoLab {
$credential = New-Object -typename Pscredential -ArgumentList Administrator, $secure

#region DSC Resources
Import-DSCresource -ModuleName PSDesiredStateConfiguration,
@{ModuleName = "xPSDesiredStateConfiguration"; ModuleVersion = "8.9.0.0"},
@{ModuleName = "xComputerManagement"; ModuleVersion = "4.1.0.0"},
@{ModuleName = "xNetworking"; ModuleVersion = "5.7.0.0"}
Import-DSCresource -ModuleName "PSDesiredStateConfiguration" -ModuleVersion "1.1"
Import-DSCResource -modulename "xPSDesiredStateConfiguration" -ModuleVersion "8.9.0.0"
Import-DSCResource -modulename "xComputerManagement" -ModuleVersion "4.1.0.0"
Import-DSCResource -modulename "xNetworking" -ModuleVersion "5.7.0.0"

#endregion
#region All Nodes
Expand Down
4 changes: 2 additions & 2 deletions Configurations/Windows10/Instructions.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Lab definition
# Lab Definition

This lab builds the following:

Expand All @@ -16,7 +16,7 @@ It will also create a local user account with a password of `P@ssw0rd` using sam
Run the following for initial setup:
PS> Setup-Lab

To start the LAb, and apply configurations the first time:
To start the Lab, and apply configurations the first time:
PS> Run-Lab

To enable Internet access for the VM's, run:
Expand Down
16 changes: 10 additions & 6 deletions Configurations/Windows10/VMConfiguration.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,24 @@ demonstrations and would need to be modified for your environment.
#>


Configuration AutoLab {

$LabData = Import-PowerShellDataFile -Path $PSScriptroot\VMConfigurationData.psd1
$Secure = ConvertTo-SecureString -String "$($labdata.allnodes.labpassword)" -AsPlainText -Force
$credential = New-Object -typename Pscredential -ArgumentList Administrator, $secure

Import-DscResource -ModuleName "PSDesiredStateConfiguration" -ModuleVersion "1.1"

#import dscresources from the configuration data
Import-DscResource -ModuleName "xPSDesiredStateConfiguration" -ModuleVersion "8.9.0.0"
Import-DscResource -ModuleName "xComputerManagement" -ModuleVersion "4.1.0.0"
Import-DscResource -ModuleName "xNetworking" -ModuleVersion "5.7.0.0"
Import-DscResource -ModuleName "xWindowsUpdate" -ModuleVersion "2.8.0.0"
Import-DscResource -ModuleName "xPendingReboot" -ModuleVersion "0.4.0.0"

Node $AllNodes.Where( {$true}).NodeName {

Node $AllNodes.Where( { $true }).NodeName {
xComputer ComputerName {
Name = $Node.NodeName
WorkGroupName = "Lab"
Expand Down Expand Up @@ -122,7 +126,7 @@ Configuration AutoLab {
#endregion

#region RSAT config
node $AllNodes.Where( {$_.Role -eq 'RSAT'}).NodeName {
node $AllNodes.Where( { $_.Role -eq 'RSAT' }).NodeName {
# Adds RSAT which is now a Windows Capability in Windows 10

Script RSAT {
Expand All @@ -138,18 +142,18 @@ Configuration AutoLab {

GetScript = {
$packages = Get-WindowsCapability -online -Name Rsat* | Select-Object Displayname, State
$installed = $packages.Where( {$_.state -eq "Installed"})
Return @{Result = "$($installed.count)/$($packages.count) RSAT features installed"}
$installed = $packages.Where( { $_.state -eq "Installed" })
Return @{Result = "$($installed.count)/$($packages.count) RSAT features installed" }
}

SetScript = {
Get-WindowsCapability -online -Name Rsat* | Where-Object {$_.state -ne "installed"} | Add-WindowsCapability -online
Get-WindowsCapability -online -Name Rsat* | Where-Object { $_.state -ne "installed" } | Add-WindowsCapability -online
}
}
} #end RSAT Config

#region RDP config
node $AllNodes.Where( {$_.Role -eq 'RDP'}).NodeName {
node $AllNodes.Where( { $_.Role -eq 'RDP' }).NodeName {
# Adds RDP support and opens Firewall rules

Registry RDP {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Lab definition
# Lab Definition

This lab builds the following:

* 1 DC
* 1 Server (s1)
* 1 DC (DC1)
* 1 Server (S1)
* 1 Nano (N1)
* 1 Client with RSAT (Cli1)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ Configuration AutoLab {
$credential = New-Object -typename Pscredential -ArgumentList Administrator, $secure

#region DSC Resources
Import-DSCresource -ModuleName PSDesiredStateConfiguration,
@{ModuleName = "xPSDesiredStateConfiguration"; ModuleVersion = "8.9.0.0"},
@{ModuleName = "xActiveDirectory"; ModuleVersion = "3.0.0.0"},
@{ModuleName = "xComputerManagement"; ModuleVersion = "4.1.0.0"},
@{ModuleName = "xNetworking"; ModuleVersion = "5.7.0.0"},
@{ModuleName = "xDhcpServer"; ModuleVersion = "2.0.0.0"},
@{ModuleName = 'xWindowsUpdate'; ModuleVersion = '2.8.0.0'},
@{ModuleName = 'xPendingReboot'; ModuleVersion = '0.4.0.0'},
@{ModuleName = 'xADCSDeployment'; ModuleVersion = '1.4.0.0'}
Import-DSCresource -ModuleName "PSDesiredStateConfiguration" -ModuleVersion "1.1"
Import-DSCResource -modulename "xPSDesiredStateConfiguration" -ModuleVersion "8.9.0.0"
Import-DSCResource -modulename "xActiveDirectory" -ModuleVersion "3.0.0.0"
Import-DSCResource -modulename "xComputerManagement" -ModuleVersion "4.1.0.0"
Import-DSCResource -modulename "xNetworking" -ModuleVersion "5.7.0.0"
Import-DSCResource -modulename "xDhcpServer" -ModuleVersion "2.0.0.0"
Import-DSCResource -modulename 'xWindowsUpdate' -ModuleVersion '2.8.0.0'
Import-DSCResource -modulename 'xPendingReboot' -ModuleVersion '0.4.0.0'
Import-DSCResource -modulename 'xADCSDeployment' -ModuleVersion '1.4.0.0'

#endregion
#region All Nodes
Expand Down
Binary file modified PSAutoLab.psd1
Binary file not shown.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ Unattend-Lab

Assuming you don't need to install a newer version of nuget, you can leave the setup alone.
It will run all of the manual steps for you.
Beginning in version 4.3.0 you also have the option to run the unattend process in a PowerShell background job.

### Stopping a Lab

Expand Down Expand Up @@ -288,6 +289,6 @@ These are some of the items that are being considered for future updates:
* Integrate the [PostSetup](.\Configurations\PowerShellLab\PostSetup\README.md) tools from the PowerShellLab configuration
* Offer an easy way to customize a lab configuration such as time zone, node names and operating systems.

A complete list of enhancements can be found in Issues.
A complete list of enhancements can be found in [Issues](https://github.com/pluralsight/PS-AutoLab-Env/issues).

Last Updated 2019-09-21 03:35:56Z UTC
Last Updated 2019-09-30 16:50:51Z UTC
11 changes: 11 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
Changelog for PSAutoLab

v4.3.0

Added code when setting up host to update Pester (Issue #195)
Updated configurations to use xComputerManagement (Issue #196)
Updated configuration scripts to better import DSC resource modules
Modified Wipe-Lab to allow removing lab elements without prompting and removing Lab switch is now optional. (Issue #191)
Modified Unattend-Lab to run in a background job (Issue #190)
Updated Get-PSAutolabSetting to get Pester version (Issue #197)
Updated Get-Labsnapshot (Issue #192)
Help updates

v4.2.0

Updates to Setup-Lab to better handle DSCResource installation (Issue #194)
Expand Down
28 changes: 27 additions & 1 deletion docs/Invoke-UnattendLab.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ Create an Autolab configuration unattended
## SYNTAX

```yaml
Invoke-UnattendLab [[-Path] <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Invoke-UnattendLab [[-Path] <String>] [-AsJob] [-WhatIf] [-Confirm] [<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -45,6 +46,15 @@ PS C:\Autolab\Configurations\PowerShellLab> Unattend-Lab

Follow any onscreen instructions or prompts.


### Example 2

```powershell
PS C:\Autolab\Configurations\MultiRole> Unattend-Lab -asJob
```

Run the setup unattended in a background job.

## PARAMETERS

### -Confirm
Expand Down Expand Up @@ -96,6 +106,22 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -AsJob
Run the unattend process in a PowerShell background job.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
Expand Down
Loading

0 comments on commit 7cc0583

Please sign in to comment.