{"id":13598908,"url":"https://github.com/pluralsight/PS-AutoLab-Env","last_synced_at":"2025-04-10T10:30:38.301Z","repository":{"id":37979738,"uuid":"68215841","full_name":"pluralsight/PS-AutoLab-Env","owner":"pluralsight","description":"A PowerShell module for creating lab configurations using Lability and Desired State Configuration. Look at README.md for more information.","archived":true,"fork":false,"pushed_at":"2024-02-18T16:07:07.000Z","size":197293,"stargazers_count":269,"open_issues_count":5,"forks_count":76,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-04-06T07:52:59.308Z","etag":null,"topics":["desired-state-configuration","pluralsight","powershell"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pluralsight.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-14T14:57:29.000Z","updated_at":"2025-02-20T22:29:27.000Z","dependencies_parsed_at":"2024-02-15T16:29:20.844Z","dependency_job_id":"e8c599fd-6df1-4cf7-b15d-1dc63d52477c","html_url":"https://github.com/pluralsight/PS-AutoLab-Env","commit_stats":null,"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pluralsight%2FPS-AutoLab-Env","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pluralsight%2FPS-AutoLab-Env/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pluralsight%2FPS-AutoLab-Env/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pluralsight%2FPS-AutoLab-Env/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pluralsight","download_url":"https://codeload.github.com/pluralsight/PS-AutoLab-Env/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248199136,"owners_count":21063641,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["desired-state-configuration","pluralsight","powershell"],"created_at":"2024-08-01T17:00:58.018Z","updated_at":"2025-04-10T10:30:37.037Z","avatar_url":"https://github.com/pluralsight.png","language":"PowerShell","funding_links":[],"categories":["PowerShell"],"sub_categories":[],"readme":"# PSAutoLab\n\n[![PSGallery Version](https://img.shields.io/powershellgallery/v/PSAutoLab.png?style=for-the-badge\u0026logo=powershell\u0026label=PowerShell%20Gallery)](https://www.powershellgallery.com/packages/PSAutoLab/) [![PSGallery Downloads](https://img.shields.io/powershellgallery/dt/PSAutoLab.png?style=for-the-badge\u0026label=Downloads)](https://www.powershellgallery.com/packages/PSAutoLab/)\n\n## Version 5.0.0\n\nThis is a **major** update to the module with many breaking changes. It is recommended that you finish and remove all lab configurations before installing this update. Read the [documentation on upgrading to version 5](update-v5.md) for more information.\n\n## Overview\n\nThis project serves as a set of \"wrapper\" commands that utilize the [Lability](https://github.com/VirtualEngine/Lability) module which is a terrific tool for creating a lab environment of Windows-based systems. The downside is that it is a difficult module for less experienced PowerShell users. The configurations and control commands for the Hyper-V virtual machines in this module are written in PowerShell using `Desired State Configuration (DSC)` and deployed via Lability commands. If you feel sufficiently skilled, you can skip using this project and use the Lability module on your own. Note that the Lability module is not owned or managed by Pluralsight. This project and all files are released under an MIT License - meaning you can copy and use as your own, modify, borrow, steal - whatever you want.\n\n**While this project is under the Pluralsight banner, it is offered AS-IS as a free tool with no official support from Pluralsight. Pluralsight makes no guarantees or warranties. This project is intended to be used for educational purposes only.**\n\nBeginning with module version 4.17.0, you can run [Open-PSAutoLabHelp](docs/Open-PSAutoLabHelp.md) to view a local PDF version of the module's documentation.\n\n```shell\nPS C:\\\u003e Open-PSAutoLabHelp\n```\n\n## Requirements\n\nThis module is designed and intended to be run on a **Windows 10/11** client that supports virtualization. Windows 10 Pro or Enterprise and later should be sufficient. It is assumed you will be installing this on a Windows 10/11 desktop running Windows PowerShell 5.1. This module will **not** work and is unsupported on any Home or Student edition, although there are reports of the module working on Windows 10 Education. The module _might_ run on Windows Server (2016 or 2019) platforms, but this capability has not been fully tested nor is it supported.\n\nUsing this in a nested virtual environment _may_ work, but don't be surprised if there are problems, especially related to networking and NAT.\n\nThe host computer, where you are installing, must meet the following requirements:\n\n* Windows PowerShell 5.1.\n* A high-speed internet connection.\n* Minimum 16GB of RAM (32GB is recommended).\n* Minimum 100GB free disk space preferably on a fast SSD device or equivalent.\n* An Intel i5 processor or equivalent. An i7 is recommended for the best performance.\n* Windows PowerShell Remoting enabled.\n* You should be logged in with a local or domain user account. The setup process may not work properly if using an O365 or Microsoft account to log on to Windows.\n\nYou must have administrator access and be able to update the `TrustedHosts` setting for PowerShell remoting. If you are in a corporate environment, these settings may be locked down or restricted. If this applies to you, this module may not work properly, if at all.\n\n**This module and configurations have NOT been tested running under PowerShell 7. You must run this under Windows PowerShell 5.1.**\n\n### Pester Requirement\n\nThe module uses a standard PowerShell tool called Pester to validate lab configurations. It is a module dependency and the latest version should be installed with the PSAutolab module. Previous versions of this module required Pester version 4.10. Beginning with version 5.0 of this module, all Pester tests have been revised to support Pester version 5.\n\n## Installation\n\nThis module has been published in the PowerShell Gallery. It is recommended that you have at least version 2.2 of the `PowerShellGet` module which handles module installations.\n\nOpen an elevated PowerShell prompt and run:\n\n```shell\nInstall-Module PSAutoLab -Force -SkipPublisherCheck\n```\n\nIf you are using the `Microsoft.PowerShell.PSResourceGet`module run:\n\n```shell\nInstall-PSResource PSAutoLab -Force\n```\n\nThe installation should install the required dependencies of the Lability and Pester modules.** You must include the `-SkipPublisherCheck` to ensure the Pester module is installed**.\n\nIf prompted, answer yes to update the Nuget version and to install from an untrusted repository, unless you've already marked the PSGallery as trusted. If you have an old copy of this module from before Pluralsight took ownership, you will get an error. Manually remove the old module files and try again. See [this document](Updating.md) for more information.\n\n**Do not download or use any of the release packages from this GitHub repository. You must install this module from the PowerShell Gallery.**\n\nSee the [Changelog](https://github.com/pluralsight/PS-AutoLab-Env/blob/master/changelog.md) for update and version details.\n\n**DO NOT run this module on any mission-critical or production system.**\n\nIf you encounter issues with a basic installation and setup, you should read and use the [detailed setup instructions](Detailed-Setup-Instructions.md).\n\nYou can verify the module with these commands:\n\n```shell\nPS C:\\\u003e Import-Module PSAutoLab -force\nPS C:\\\u003e Get-Module PSAutoLab\n\nModuleType Version    Name           ExportedCommands\n---------- -------    ----           ----------------\nScript     5.0.0      PSAutoLab     {Enable-Internet, Get-LabSnapshot,...}\n```\n\nYour version number may differ.\n\n### Hyper-V\n\nThis module and its configurations should not conflict with any existing Hyper-V virtual machines or networking. But you should be aware that the module will create a new., internal Hyper-V switch called `LabNet`. This switch will use a NAT configuration called `LabNat`.\n\n```shell\nPS C:\\\u003e Get-NetNat LabNat\n\n\nName                             : LabNat\nExternalIPInterfaceAddressPrefix :\nInternalIPInterfaceAddressPrefix : 192.168.3.0/24\nIcmpQueryTimeout                 : 30\nTcpEstablishedConnectionTimeout  : 1800\nTcpTransientConnectionTimeout    : 120\nTcpFilteringBehavior             : AddressDependentFiltering\nUdpFilteringBehavior             : AddressDependentFiltering\nUdpIdleSessionTimeout            : 120\nUdpInboundRefresh                : False\nStore                            : Local\nActive                           : True\n```\n\nThe `Instructions` file in each configuration folder documents VMs will be created. You can also check the `VMConfigurationData.psd1` file.\n\n```shell\nPS C:\\Autolab\\Configurations\\MultiRole\\\u003e (Import-PowerShellDataFile .\\VMConfigurationData.psd1).AllNodes.NodeName\n*\nDC1\nS1\nCli1\n```\n\nCurrent configurations will use these names for the virtual machine and computer name:\n\n* DC1\n* S1\n* S2\n* Cli1\n* Cli2\n* DOM1\n* SRV1\n* SRV2\n* SRV3\n* WIN10\n* WIN11\n* Win10Ent\n\n_Nano Server images have been removed from configurations. These configurations were using the now deprecated version of Nano. Microsoft has changed direction with regards to Nano Server and none of the existing configurations use this new version._\n\n### Upgrading Previous Versions\n\n#### Upgrading from v3.x\n\nIf you installed previous versions of this module (v3.x) and struggled, hopefully, this version will be an improvement. To avoid any other complications, it is STRONGLY recommended that you manually remove the old version which is most likely under `C:\\Program Files\\WindowsPowerShell\\Modules\\PSAutoLab`. You can run a command like:\n\n```shell\nGet-Module PSAutoLab -ListAvailable | Select-Object Path\n```\n\nTo identify the module location. Use this information to delete the PSAutoLab folder.\n\n**The previous version was not installed using PowerShell's module cmdlets so it can't be updated or removed except manually.**\n\n### Upgrading from v4.x\n\nPlease read [this document](update-v5.md) for more information on the steps to follow to update this module from version `4.x` to `5.x`\n\n### Note for VMware Users\n\nThis project is designed to work with Hyper-V. If you are going to build a Host VM of Server 2016 or Windows 10, In the general settings for your VM, you must change the OS type to `Hyper-V(Unsupported)` or the Host Hyper-V will not work! This module and its configurations have **not** been tested for compatibility with VMware.\n\n## Aliases and Language\n\nWhile this module follows proper naming conventions, the commands you will typically use employ aliases that use non-standard verbs such as `Run-Lab`. This is to avoid conflicts with commands in the Lability module and to maintain backward compatibility. You can use the aliases or the full function name. All references in this document use the aliases. You do not need to run any commands from the Lability module.\n\n## Setup Host\n\nThe first time you use this module, you will need to configure the local machine or host. Open an elevated PowerShell session and run:\n\n```shell\nSetup-Host\n```\n\nThis will install and configure the Lability module and install the Hyper-V feature if it is missing. By default, all AutoLab files will be stored under `C:\\AutoLab`, which the setup process will create. If you prefer to use a different drive, you can specify it during setup.\n\n```shell\nSetup-Host -DestinationPath D:\\AutoLab\n```\n\nYou will be prompted to reboot, which you should do especially if the setup had to add the Hyper-V feature. To verify your configuration open an elevated PowerShell session and run this command:\n\n```shell\nPS C:\\\u003e Get-PSAutoLabSetting\n\n\nAutoLab                     : C:\\Autolab\nPSVersion                   : 5.1.19041.1\nPSEdition                   : Desktop\nOS                          : Microsoft Windows 10 Pro\nFreeSpaceGB                 : 172.49\nMemoryGB                    : 32\nPctFreeMemory               : 44.66\nProcessor                   : Intel(R) Core(TM) i7-7700T CPU @ 2.90GHz\nIsElevated                  : True\nRemotingEnabled             : True\nNetConnectionProfile        : Private\nHyperV                      : 10.0.19041.1\nPSAutoLab                   : {4.18.0, 4.17.0}\nLability                    : {0.19.1, 0.19.0, 0.18.0}\nPester                      : {4.10.1, 4.10.0, 4.9.0, 4.4.4...}\nPowerShellGet               : 2.2.3\nPSDesiredStateConfiguration : 1.1\n```\n\nSome of your values may be different. Please include this information when reporting any problems or issues.\n\n### Lab Summary\n\nOnce the host setup is complete, you can use the module's [Get-LabSummary](docs/Get-LabSummary.md) command to better understand what the lab configuration will set up. Run the command in the configuration folder.\n\n```shell\nPS C:\\Autolab\\Configurations\\SingleServer-GUI-2016\\\u003e Get-LabSummary\n\n\n   Computername: S1 VMName: S1\n\nLab                       IPAddress       MemGB Procs Role    Description\n---                       ---------       ----- ----- ----    -----------\nSingleServer-GUI-2016     192.168.3.75        4     1 RDP     Windows Server\n                                                              2016 Standard\n                                                              64bit English\n                                                              Evaluation\n```\n\nThe module includes a custom format file. You might also run the command like this:\n\n```shell\nPS C:\\Autolab\\Configurations\\SingleServer-GUI-2016\u003e Get-LabSummary |\nSelect-Object *\n\n\nComputername : S1\nVMName       : S1\nInstallMedia : 2016_x64_Standard_EN_Eval\nDescription  : Windows Server 2016 Standard 64bit English Evaluation\nRole         : RDP\nIPAddress    : 192.168.3.75\nMemoryGB     : 4\nProcessors   : 1\nLab          : SingleServer-GUI-2016\n```\n\nThe `Computername` and `VMName` properties might differ if you are using an environmental prefix. The `Computername` is how the virtual machines refer to themselves and each other. The `VMName` is how you reference them in Hyper-V.\n\n## Creating a Lab\n\nLab information is stored under the AutoLab Configurations folder, which is `C:\\AutoLab\\Configurations` by default. Open an elevated PowerShell prompt and change your location to the desired configuration folder. View the `Instructions` and/or `README` markdown files in the folder to learn more about the configuration.\n\nYou can also run `Get-LabSummary` in the lab configuration folder to see what the configuration will create.\n\nWhere possible, information about what course goes with a particular Pluralsight course will be indicated.\n\n### A Note on Pluralsight Labs\n\n_This module started several years _ago and _several Pluralsight courses rely_ on configurations_ that may no longer exist. Configurations that were named with `Test` or `POC` were not assumed to be used in any courses. But that is turning out to not be the case. If you are trying to set up a lab for a specific course, and can't find the configuration the instructor calls for, please post an issue indicating the configuration you are looking for and the title of the Pluralsight course. Hopefully, there is an existing configuration you can use. Or the module can be updated with an appropriate lab configuration. In some cases, the course may assume a different password. All configurations use `P@ssw0rd` for all passwords._\n\nThe first time you set up a lab, Lability will download evaluation versions of required operating systems in ISO format. This may take some time depending on your Internet connection. These downloads only happen when the required ISO is not found locally. When you wipe and rebuild a lab it won't download files a second time.\n\nOnce the lab is created, you can use the PSAutoLab commands to manage it. If you have additional PowerShell experience, you can manage individual virtual machines using the Hyper-V manager or cmdlets.\n\n_It is assumed that you will only have one lab configuration created at a time._\n\nPlease be aware that all configurations were created for an `EN-US` culture and keyboard.\n\n### Manual Setup\n\nMost, if not all, configurations should follow the same manual process. Run each command after the previous one has finished.\n\n* [Setup-Lab](docs/Invoke-SetupLab.md)\n* [Run-Lab](docs/Invoke-RunLab.md)\n* [Enable-Internet](docs/Enable-Internet.md)\n\nTo verify that all virtual machines are properly configured you can run [Validate-Lab](docs/Invoke-ValidateLab.md). This will invoke a set of tests and keep looping until everything passes. Due to the nature of DSC and the complexity of some configurations, this could take up to 60 minutes. You can use `Ctrl+C` to break out of the testing loop at any time. You can manually run the test one time to see the current state of the configuration.\n\n```shell\nPS C:\\Autolab\\Configurations\\SingleServer\\\u003e Invoke-Pester VMValidate.test.ps1\n```\n\nThis can be useful for troubleshooting.\n\n### Unattended Setup\n\nAs an alternative, you can set up a lab environment with minimal prompting.\n\n```shell\nPS C:\\Autolab\\Configurations\\SingleServer\\\u003e Unattend-Lab\n```\n\nAssuming 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 unattended setup in a PowerShell background job.\n\n```shell\nPS C:\\Autolab\\Configurations\\SingleServer\\\u003e Unattend-Lab -AsJob\n```\n\nUse the PowerShell job cmdlets to manage.\n\n### Stopping a Lab\n\nTo stop the lab VMs, change to the configuration folder in an elevated Windows PowerShell session and run:\n\n```shell\nPS C:\\Autolab\\Configurations\\SingleServer\\\u003e Shutdown-Lab\n```\n\nYou can also use the Hyper-V manager or cmdlets to manually shut down virtual machines. If your lab contains a domain controller such as `DOM1` or `DC1`, that should be the last virtual machine to shut down.\n\n### Starting a Lab\n\nThe setup process will leave the virtual machines running. If you have stopped the lab and need to start it, change to the configuration folder in an elevated Windows PowerShell session and run:\n\n```shell\nPS C:\\Autolab\\Configurations\\SingleServer\\\u003e Run-Lab\n```\n\nYou can also use the Hyper-V manager or cmdlets to manually start virtual machines. If your lab contains a domain controller such as `DOM1` or `DC1`, that should be the first virtual machine to start up.\n\n### Lab Checkpoints\n\nYou can snapshot the entire lab very easily. Change to the configuration folder in an elevated Windows PowerShell session and run:\n\n```shell\nPS C:\\Autolab\\Configurations\\SingleServer\\\u003e Snapshot-Lab\n```\n\nTo quickly rebuild the labs from the checkpoint, run:\n\n```shell\nPS C:\\Autolab\\Configurations\\SingleServer\\\u003e Refresh-Lab\n```\n\nOr you can use the Hyper-V cmdlets to create and manage VM snapshots.\n\n### To Remove a Lab\n\nTo destroy the lab completely, change to the configuration folder in an elevated Windows PowerShell session and run:\n\n```shell\nPS C:\\Autolab\\Configurations\\SingleServer\\\u003e Wipe-Lab\n```\n\nThis will remove the virtual machines and DSC configuration files. If you intend to rebuild the lab or another configuration, you can keep the `LabNat` virtual switch. This is the default behavior. If you want to remove everything you would need to run a command like this:\n\n```shell\nPS C:\\Autolab\\Configurations\\SingleServer\\\u003e Wipe-Lab -force -RemoveSwitch\n```\n\n### Customizing a Lab\n\nIt is possible to customize a lab configuration by editing the `VMConfigurationData.psd1` file that is in each configuration folder. You must modify the file before creating the lab. For example, the configuration might use Server Core and you want the Desktop Experience on the server. Open the file in your scripting editor and scroll down to find the Node definitions.\n\n```shell\n@{\n    NodeName                = 'DOM1'\n    IPAddress               = '192.168.3.10'\n    Role                    = @('DC', 'DHCP', 'ADCS')\n    Lability_BootOrder      = 10\n    Lability_BootDelay      = 60\n    Lability_timeZone       = 'US Mountain Standard Time'\n    Lability_Media          = '2016_x64_Standard_Core_EN_Eval'\n    Lability_MinimumMemory  = 2GB\n    Lability_ProcessorCount = 2\n    CustomBootStrap         = @'\n            # This must be set to handle larger .mof files\n            Set-Item -path wsman:\\localhost\\maxenvelopesize -value 1000\n'@\n},\n\n@{\n    NodeName           = 'SRV1'\n    IPAddress          = '192.168.3.50'\n    Role               = @('DomainJoin')\n    Lability_BootOrder = 20\n    Lability_timeZone  = 'US Mountain Standard Time'\n    Lability_Media     = '2016_x64_Standard_Core_EN_Eval'\n},\n```\n\nYou can edit the `Lability_Media` setting. Change the setting using one of these ID values from running `Get-LabMedia`.\n\n```shell\nPS C:\\\u003e Get-LabMedia\n\nId                                      Arch Media Description\n--                                      ---- ----- -----------\n2022_x64_Standard_EN_Eval                x64   ISO Windows Server 2022 Standard 64bit English Evaluation with Deskto...\n2022_x64_Standard_EN_Core_Eval           x64   ISO Windows Server 2022 Standard 64bit English Evaluation\n2022_x64_Datacenter_EN_Eval              x64   ISO Windows Server 2022 Datacenter 64bit English Evaluation with Desk...\n2022_x64_Datacenter_EN_Core_Eval         x64   ISO Windows Server 2022 Datacenter Evaluation in Core mode\n2019_x64_Standard_EN_Eval                x64   ISO Windows Server 2019 Standard 64bit English Evaluation with Deskto...\n2019_x64_Standard_EN_Core_Eval           x64   ISO Windows Server 2019 Standard 64bit English Evaluation\n2019_x64_Datacenter_EN_Eval              x64   ISO Windows Server 2019 Datacenter 64bit English Evaluation with Desk...\n...\n```\n\nYou can also make changes to values such as minimum memory and processor count. When you run `Unattend-Lab` or `Setup-Lab` you can use the `-UseLocalTimeZone` to set all virtual machines to use your time zone. You could make _minor_ changes to the IP address such as changing the address from `192.168.3.50` to `192.168.3.60`. Changing the entire subnet will require modifying the virtual switch and should not be attempted unless you are very proficient with PowerShell and Hyper-V.\n\n**Note that if you make changes, the validation test may fail unless you modify it. But you can always try to run the lab without validating it.**\n\nIf you make a mistake or want to restore the original configurations, run the `Refresh-Host` command.\n\n## Windows 10 Remote Server Administration Tools (RSAT)\n\nSeveral lab configurations that include a Windows 10 client will also install RSAT. In the past, this has meant trying to install _all_ RSAT features. This takes a long time and has caused validation issues. Beginning with v4.21.0 of the PSAutolab module, the RSAT configuration and testing will only use a subset of features.\n\n* ActiveDirectory\n* BitLocker\n+*CertificateServices\n* DHCP\n* DNS\n* FailoverCluster\n* FileServices\n* GroupPolicy\n* IPAM.Client\n* ServerManager\n\nIf you require any other tool, you will need to use `Add-WindowsCapability` in the Windows 10/11 client to add it.\n\nThis change has improved setup performance and module stability.\n\n## Windows Updates\n\nWhen you build a lab, you are creating Windows virtual machines based on evaluation software. You might still want to make sure the virtual machines are up to date with security patches and updates. You can use [Update-Lab](docs/Update-Lab.md) to start the Windows update process on all lab members. This can be a time-consuming process. You have an option to run the updates as a background job. Do not close your PowerShell session before the jobs are complete or the build process will be interrupted.\n\n```shell\nPS C:\\Autolab\\Configurations\\PowerShellLab\\\u003e update-lab -AsJob\n\nId   Name        PSJobTypeName   State      HasMoreData   Location    Command\n--   ----        -------------   -----      -----------   --------    -------\n18   WUUpdate    RemoteJob       Running    True          DOM1        WUUpdate\n21   WUUpdate    RemoteJob       Running    True          SRV1        WUUpdate\n24   WUUpdate    RemoteJob       Running    True          SRV2        WUUpdate\n27   WUUpdate    RemoteJob       Running    True          SRV3        WUUpdate\n30   WUUpdate    RemoteJob       Running    True          WIN10       WUUpdate\n\nPS C:\\Autolab\\Configurations\\PowerShellLab\u003e receive-job -id 27 -Keep\n[11/22/2019 12:05:43] Found 5 updates to install on SRV3\n[11/22/2019 12:25:13] Update process complete on SRV3\nWARNING: SRV3 requires a reboot\n```\n\nRun the update process as a background job. Use the PowerShell job cmdlets to manage.\n\n## Updating PSAutoLab\n\nAs this module is updated over time, new configurations may be added, or bugs fixed in existing configurations. There may also be new Lability updates. Use PowerShell to check for new versions:\n\n```shell\nFind-Module PSAutoLab\n```\n\nAnd update:\n\n```shell\nUpdate-Module PSAutoLab -Force\n```\n\nIf you update, it is recommended that you update the AutoLab configuration.\n\n```shell\nRefresh-Host\n```\n\nThis will update the Lability and Pester modules if required and copy all new configuration files to your AutoLab\\Configurations folder. It will NOT delete any files or folders.\n\n## Removing PSAutoLab\n\nIf you want to completely remove the PSAutoLab module, first use `Wipe-Lab` to remove any existing lab configurations including the Hyper-V switch. Run this command to uninstall the module and its dependencies\n\n```shell\nUninstall-Module PSAutoLab,Lability\n```\n\nYou may need to manually delete the `C:\\Autolab` folder. If you want to remove the NAT configuration\"\n\n```shell\nRemove-NetNat LabNat\n```\n\nIf you want to remove Hyper-V you can use the Control Panel to manually remove the optional feature. Or you can try using PowerShell.\n\n```shell\nGet-WindowsOptionalFeature -FeatureName *Hyper* -online |\nDisable-WindowsOptionalFeature -Online\n```\n\nYou will almost certainly need to reboot to complete the removal process.\n\n## Troubleshooting\n\n### Package Provider or Module Installation\n\nIf you try to install a module or update the NuGet provider, you might see warnings like these:\n\n```shell\nWARNING: Unable to download from URI 'https://go.microsoft.com/fwlink/?LinkID=627338\u0026clcid=0x409' to ''.\nWARNING: Unable to download the list of available providers. Check your internet connection.\nPackageManagement\\Install-PackageProvider : No match was found for the specified search criteria for the provider 'NuGet'. The package provider requires 'PackageManagement' and\n'Provider' tags.\n```\n\nThe first thing to check is to make sure you are using valid TLS settings. You can try running this command in PowerShell:\n\n```shell\n[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\n```\n\nBeginning with v4.17.0 of this module, this change is made when the module is imported. It will only last for as long as your PowerShell session is running.\n\nYou could also modify the registry in an elevated PowerShell session for a more permanent solution.\n\n```shell\nSet-ItemProperty -Path 'HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319' -Name 'SchUseStrongCrypto' -Value 1\n```\n\nModifying the registry will require a reboot for the changes to take effect.\n\nIf the problem is the Nuget provider, after making the TLS changes try:\n\n```shell\nInstall-PackageProvider Nuget -force -ForceBootStrap\n```\n\nYou might also need to update the `PackageManagement` and/or `PowerShellGet` modules.\n\n```shell\nUpdate-Module PowershellGet,PackageManagement -force\n```\n\n### Autolab Configurations\n\nThe commands and configurations in this module are not foolproof. During testing a lab configuration will run quickly and without error on one Windows 10 desktop but fail or take much longer on a different Windows 10 desktop. Most setups should be completed in under an hour. If validation is failing, manually run the validation test in the configuration folder.\n\n```shell\nPS C:\\Autolab\\Configurations\\SingleServer\\\u003e Invoke-Pester VMValidate.test.ps1 -Show All -WarningAction SilentlyContinue\n```\n\nTake note of which virtual machines are generating errors. Verify the virtual machine is running in Hyper-V. On occasion, for reasons still undetermined, sometimes a virtual machine will shut down and not reboot. This often happens with the client nodes of the lab configuration. Verify that all virtual machines are running and manually start those that have stopped using the Hyper-V manager or cmdlets.\n\n```shell\nStart-VM Win10\n```\n\nSometimes even if the virtual machine is running, manually shutting it down and restarting it can resolve the problem. Remember to wait at least 5 minutes before manually running the validation test again when restarting any virtual machine.\n\nAs a last resort, manually break out of any testing loop, wipe the lab, and restart the test.\n\nIf you _still_ are having problems, wipe the lab and try a different configuration. This will help determine if the problem is with the configuration or a larger compatibility problem.\n\nAt this point, you can open an issue in this repository. Open an elevated PowerShell prompt and run [Get-PSAutoLabSetting](docs/Get-PSAutoLabSetting.md) which will provide useful information. Copy and paste the results into a new issue along with any error messages you are seeing.\n\n## Known Issues\n\n### _I get an error when importing the module_\n\nStarting with version 4.12.0 of this module, you might see this error when you import the module.\n\n```shell\nImport-Module : Assertion operator name 'Be' has been added multiple times.\n```\n\nThis is most likely due to a conflict in Pester module versions. The solution is to remove the Pester module from your current session.\n\n```shell\nGet-Module Pester | Remove-Module\n```\n\nThen import this module again.\n\n### _I get an error when attempting to update the Lability module_\n\nIf you try to run `Refresh-Host` you might see an error about a certificate mismatch. Between v0.18.0 and v0.19.0 the Lability module changed code signing certificates. If you encounter this problem, run\n\n```shell\nRefresh-Host -SkipPublisherCheck\n```\n\n### Multiple DSC Resources\n\nDue to what is probably a bug in the current implementation of Desired State Configuration in Windows, if you have multiple versions of the same resource, a previous version might be used instead of the required one. You might especially see this with the `xNetworking` module and the `xIPAddress` resource. If you have any version older than 5.7.0.0 you might encounter problems. Run this command to see what you have installed:\n\n```shell\nGet-DSCResource xIPAddress\n```\n\nIf you have older versions of the module, uninstall them if you can.\n\n```shell\nUninstall-Module xNetworking -RequiredVersion 3.0.0.0\n```\n\nBeginning with version 4.20.0, you might see the same type of errors with the xDHCP resource. If you encounter errors like `Invalid MOF definition for node 'DC1': Exception calling \"ValidateInstanceText\" with \"1\" argument(s): \"Undefined\nproperty IsSingleInstance` you might have an older version of a DSCResource module installed.\n\nRun `Get-Module xdhcpserver -list` and remove anything older than version 3.0.0.\n\n```shell\nUninstall-Module xdhcpserver -RequiredVersion 2.0.0.0\n```\n\nIt is recommended that you restart your PowerShell session and try the lab setup again.\n\n## Acknowledgments\n\nThis module is a continuation of the work done by Jason Helmick and Melissa (Missy) Januszko, whose efforts are greatly appreciated. Beginning with v4.0.0, this module is unrelated to any projects Jason or Missy may be developing under similar names.\n\nWe also appreciate all of the work that has gone into the Lability module. The Lability and PSAutoLab modules are completely separate and independently maintained.\n\n## Road Map\n\nThese are some of the items that are being considered for future updates:\n\n* While Lability currently is for Windows only, it would be nice to deploy a Linux VM.\n* Offer an easy way to customize a lab configuration such as node names and operating systems.\n\nA complete list of enhancements (and bugs) can be found in the [Issues](https://github.com/pluralsight/PS-AutoLab-Env/issues) section of this module's GitHub repository. Feel free to make a suggestion.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpluralsight%2FPS-AutoLab-Env","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpluralsight%2FPS-AutoLab-Env","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpluralsight%2FPS-AutoLab-Env/lists"}