# PSAutoLab
[![PSGallery Version](https://img.shields.io/powershellgallery/v/PSAutoLab.png?style=for-the-badge&logo=powershell&label=PowerShell%20Gallery)](https://www.powershellgallery.com/packages/PSAutoLab/) [![PSGallery Downloads](https://img.shields.io/powershellgallery/dt/PSAutoLab.png?style=for-the-badge&label=Downloads)](https://www.powershellgallery.com/packages/PSAutoLab/)
## Overview
This 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.
**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.**
Beginning 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.
## Requirements
This 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.
Using this in a nested virtual environment _may_ work, but don't be surprised if there are problems, especially related to networking and NAT.
The host computer, where you are installing, must meet the following requirements:
* Windows PowerShell 5.1.
* A high-speed internet connection.
* Minimum 16GB of RAM (32GB is recommended).
* Minimum 100GB free disk space preferably on a fast SSD device or equivalent.
* An Intel i5 processor or equivalent. An i7 is recommended for the best performance.
* Windows PowerShell Remoting enabled.
* 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 logon to Windows.
You 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.
**This module and configurations have NOT been tested running from PowerShell Core or PowerShell 7 and is not supported at this time.**
### Pester Requirement
The module uses a standard PowerShell tool called Pester to validate lab configurations. Without getting into technical details, if you are running the out-of-the-box version of Pester on Windows 10, you need to manually update Pester before attempting to install this module. In an elevated Windows PowerShell session run this command:
```powershell
Get-Module Pester -ListAvailable
```
If the _only_ result you get is for version `3.4.0`, then you must run:
```powershell
Install-Module Pester -RequiredVersion 4.10.1 -Force -SkipPublisherCheck
```
Re-run the `Get-Module` to verify version `4.10.1` is installed. If you have newer versions installed, that will have no effect on this module. Once you have verified Pester version 4.10.1 you can install the PSAutoLab module.
## Installation
This module has been published to the PowerShell Gallery. It is recommended that you have at least version 2.2 of the `PowerShellGet` module which handles module installations.
Open an elevated PowerShell prompt and run:
```powershell
Install-Module PSAutoLab -Force -SkipPublisherCheck
```
The installation should install required dependencies which is why you need the additional parameters.
If 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.
**Do not download or use any of the release packages from this Github repository. You must install this module from the PowerShell Gallery.**
See the [Changelog](https://github.com/pluralsight/PS-AutoLab-Env/blob/master/changelog.md) for update details.
**DO NOT run this module on any mission-critical or production system.**
If you encounter issues with a basic installation and setup, you should read and use the [detailed setup instructions](Detailed-Setup-Instructions.md).
You can verify the module with these commands:
```powershell
PS C:\> Import-Module PSAutoLab -force
PS C:\> Get-Module PSAutoLab
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 4.18.0 PSAutoLab {Enable-Internet, Get-LabSnapshot,...}
```
Your version number may differ.
### Hyper-V
This 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`.
```powershell
PS C:\> Get-NetNat LabNat
Name : LabNat
ExternalIPInterfaceAddressPrefix :
InternalIPInterfaceAddressPrefix : 192.168.3.0/24
IcmpQueryTimeout : 30
TcpEstablishedConnectionTimeout : 1800
TcpTransientConnectionTimeout : 120
TcpFilteringBehavior : AddressDependentFiltering
UdpFilteringBehavior : AddressDependentFiltering
UdpIdleSessionTimeout : 120
UdpInboundRefresh : False
Store : Local
Active : True
```
The `Instructions.md` file in each configuration folder should provide an indication of what VMs will be created. You can also check the `VMConfigurationData.psd1` file.
```powershell
PS C:\Autolab\Configurations\MultiRole\> (Import-PowerShellDataFile .\VMConfigurationData.psd1).allnodes.Nodename
*
DC1
S1
Cli1
```
Current configurations will use these names for the virtual machine and computer name:
* DC1
* S1
* S2
* Cli1
* Cli2
* PullServer
* DOM1
* SRV1
* SRV2
* SRV3
* WIN10
* WIN11
* Win10Ent
* S12R2
* S12R2GUI
_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._
### Previous Versions
If 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:
```powershell
Get-Module PSAutoLab -ListAvailable | Select-Object Path
```
To identify the module location. Use this information to delete the PSAutoLab folder.
**The previous version was not installed using PowerShell's module cmdlets so it can't be updated or removed except manually.**
### Note for VMware Users
This project is desig
没有合适的资源?快使用搜索试试~ 我知道了~
一个PowerShell模块,用于使用Lability和DesiredStateConfiguration创建实验室配置.zip
共195个文件
ps1:82个
md:45个
json:30个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 132 浏览量
2023-04-22
16:15:32
上传
评论
收藏 1.85MB ZIP 举报
温馨提示
一个PowerShell模块,用于使用Lability和DesiredStateConfiguration创建实验室配置.zip
资源推荐
资源详情
资源评论
收起资源包目录
一个PowerShell模块,用于使用Lability和DesiredStateConfiguration创建实验室配置.zip (195个子文件)
.gitattributes 42B
AD-Users.json 13KB
AD-Users.json 4KB
AD-Users.json 4KB
AD-Users.json 4KB
AD-Users.json 4KB
AD-Users.json 4KB
AD-Users.json 4KB
AD-Users.json 4KB
AD-Users.json 4KB
AD-Users.json 4KB
AD-Group.json 2KB
AD-Group.json 2KB
AD-Group.json 2KB
AD-Group.json 2KB
AD-Group.json 2KB
AD-Group.json 2KB
AD-Group.json 2KB
AD-Group.json 2KB
AD-Group.json 2KB
AD-Group.json 2KB
AD-OU.json 591B
AD-OU.json 494B
AD-OU.json 494B
AD-OU.json 494B
AD-OU.json 494B
AD-OU.json 494B
AD-OU.json 494B
AD-OU.json 491B
AD-OU.json 423B
AD-OU.json 423B
LICENSE 1KB
README.md 33KB
Detailed-Setup-Instructions.md 17KB
changelog.md 15KB
about_PSAutoLab.md 11KB
Usage-FAQ.md 10KB
Authoring-FAQ.md 3KB
Invoke-UnattendLab.md 3KB
Update-Lab.md 3KB
Get-LabSummary.md 3KB
Instructions.md 3KB
Invoke-RefreshHost.md 3KB
Invoke-WipeLab.md 3KB
Invoke-SetupLab.md 3KB
Invoke-ValidateLab.md 3KB
Instructions.md 3KB
Updating.md 3KB
Instructions.md 3KB
Instructions.md 3KB
Invoke-SetupHost.md 3KB
Instructions.md 2KB
Test-LabDSCResource.md 2KB
Instructions.md 2KB
Get-PSAutoLabSetting.md 2KB
README.md 2KB
Invoke-SnapshotLab.md 2KB
Instructions.md 2KB
Invoke-RefreshLab.md 2KB
Invoke-ShutdownLab.md 2KB
Get-LabSnapshot.md 2KB
Invoke-RunLab.md 2KB
Enable-Internet.md 2KB
Instructions.md 2KB
Test-ISOImage.md 2KB
Instructions.md 2KB
Instructions.md 2KB
Instructions.md 2KB
Instructions.md 2KB
Instructions.md 2KB
Instructions.md 1KB
Instructions.md 1KB
Open-PSAutoLabHelp.md 1KB
Instructions.md 892B
intro.md 659B
ModuleCommands.md 404B
README.md 234B
get-labsummary.png 1.49MB
command-console_Orange.png 12KB
public.ps1 54KB
DCDHCPADCS-Client-Servers-GUI.ps1 45KB
VMConfiguration.ps1 39KB
VMConfiguration.ps1 37KB
VMConfiguration.ps1 37KB
VMConfiguration.ps1 37KB
VMConfiguration.ps1 37KB
VMConfiguration.ps1 37KB
VMConfiguration.ps1 36KB
VMConfiguration.ps1 34KB
VMConfiguration.ps1 34KB
VMConfiguration.ps1 34KB
DCDHCP-Client-Servers-GUI.ps1 19KB
DC-Client-Servers-GUI.ps1 18KB
DC-Client-Servers-Core.ps1 18KB
VMValidate.test.ps1 14KB
DCDHCPADCS-Client-Servers-GUI.tests.ps1 12KB
VMValidate.test.ps1 10KB
VMConfiguration.ps1 9KB
VMValidate.test.ps1 9KB
private.ps1 8KB
共 195 条
- 1
- 2
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9154
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功