text stringlengths 9 39.2M | dir stringlengths 26 295 | lang stringclasses 185
values | created_date timestamp[us] | updated_date timestamp[us] | repo_name stringlengths 1 97 | repo_full_name stringlengths 7 106 | star int64 1k 183k | len_tokens int64 1 13.8M |
|---|---|---|---|---|---|---|---|---|
```powershell
function Stop-ShellHWDetectionService
{
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseCompatibleCmdlets", "")]
[CmdletBinding()]
param ( )
Write-LogFunctionEntry
$service = Get-Service -Name ShellHWDetection -ErrorAction SilentlyContinue
if (-not $service)
{
... | /content/code_sandbox/AutomatedLabCore/internal/functions/Stop-ShellHWDetectionService.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 284 |
```powershell
function New-LabNetworkSwitches
{
[cmdletBinding()]
param ()
Write-LogFunctionEntry
$Script:data = Get-Lab
if (-not $Script:data)
{
Write-Error 'No definitions imported, so there is nothing to do. Please use Import-Lab first'
return
}
$vmwareNetworks = $d... | /content/code_sandbox/AutomatedLabCore/internal/functions/New-LabNetworkSwitches.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 290 |
```powershell
function Update-CMSite
{
[CmdletBinding()]
Param (
[Parameter(Mandatory)]
[String]$CMSiteCode,
[Parameter(Mandatory)]
[String]$CMServerName
)
#region Initialise
$CMServer = Get-LabVM -ComputerName $CMServerName
$CMServerFqdn = $CMServer.FQDN
W... | /content/code_sandbox/AutomatedLabCore/internal/functions/Update-CMSite.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,658 |
```powershell
function Set-VMUacStatus
{
[CmdletBinding()]
param(
[bool]$EnableLUA,
[int]$ConsentPromptBehaviorAdmin,
[int]$ConsentPromptBehaviorUser
)
$currentSettings = Get-VMUacStatus -ComputerName $ComputerName
$uacStatusChanged = $false
$registryPath = 'Software\... | /content/code_sandbox/AutomatedLabCore/internal/functions/Set-VMUacStatus.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 352 |
```powershell
function ValidateUpdate-ConfigurationData
{
param (
[Parameter(Mandatory)]
[hashtable]$ConfigurationData
)
if( -not $ConfigurationData.ContainsKey('AllNodes'))
{
$errorMessage = 'ConfigurationData parameter need to have property AllNodes.'
$exception = New-... | /content/code_sandbox/AutomatedLabCore/internal/functions/ValidateUpdate-ConfigurationData.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 591 |
```powershell
function Reset-LabAdPassword
{
param(
[Parameter(Mandatory)]
[string]$DomainName
)
$lab = Get-Lab
$domain = $lab.Domains | Where-Object Name -eq $DomainName
$vm = Get-LabVM -Role RootDC, FirstChildDC | Where-Object DomainName -eq $DomainName
Invoke-LabComm... | /content/code_sandbox/AutomatedLabCore/internal/functions/Reset-LabAdPassword.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 247 |
```powershell
function Publish-LabCAInstallCertificates
{
param (
[switch]$PassThru
)
#Install the certificates to all machines in lab
Write-LogFunctionEntry
$targetMachines = @()
#Publish to all Root DC machines (only one DC from each Root domain)
$targetMachines += Get-LabVM -... | /content/code_sandbox/AutomatedLabCore/internal/functions/Publish-LabCAInstallCertificates.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,372 |
```powershell
$adInstallRootDcScriptPre2012 = {
param (
[string]$DomainName,
[string]$Password,
[string]$ForestFunctionalLevel,
[string]$DomainFunctionalLevel,
[string]$NetBiosDomainName,
[string]$DatabasePath,
[string]$LogPath,
[string]$SysvolPath,
... | /content/code_sandbox/AutomatedLabCore/internal/scripts/Variables.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 11,432 |
```powershell
if ($PSEdition -eq 'Core')
{
Add-Type -Path $PSScriptRoot/lib/core/AutomatedLab.dll
# These modules SHOULD be marked as Core compatible, as tested with Windows 10.0.18362.113
# However, if they are not, they need to be imported.
$requiredModules = @('Dism')
$requiredModulesImplicit = ... | /content/code_sandbox/AutomatedLabCore/internal/scripts/Initialization.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 13,156 |
```powershell
@{
RootModule = 'PSFileTransfer.psm1'
ModuleVersion = '1.0.0'
CompatiblePSEditions = 'Core', 'Desktop'
GUID = '789c9c76-4756-4489-a74f-31ca64488c7b'
Author = 'Raimund Andree, Per Pedersen'
CompanyName = 'Autom... | /content/code_sandbox/PSFileTransfer/PSFileTransfer.psd1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 247 |
```powershell
function Receive-Directory
{
param (
## The target path on the remote computer
[Parameter(Mandatory = $true)]
$SourceFolderPath,
## The path on the local computer
[Parameter(Mandatory = $true)]
$DestinationFolderPath,
## The session that repres... | /content/code_sandbox/PSFileTransfer/functions/Core/Receive-Directory.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 465 |
```powershell
function Receive-File
{
param (
[Parameter(Mandatory = $true)]
[string]$SourceFilePath,
[Parameter(Mandatory = $true)]
[string]$DestinationFilePath,
[Parameter(Mandatory = $true)]
[System.Management.Automation.Runspaces.PSSession] $Session
)
$... | /content/code_sandbox/PSFileTransfer/functions/Core/Receive-File.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 362 |
```powershell
function Send-Directory
{
param (
## The path on the local computer
[Parameter(Mandatory = $true)]
$SourceFolderPath,
## The target path on the remote computer
[Parameter(Mandatory = $true)]
$DestinationFolderPath,
## The session that represent... | /content/code_sandbox/PSFileTransfer/functions/Core/Send-Directory.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 603 |
```powershell
function Send-File
{
param (
[Parameter(Mandatory = $true)]
[string]$SourceFilePath,
[Parameter(Mandatory = $true)]
[string]$DestinationFolderPath,
[Parameter(Mandatory = $true)]
[System.Management.Automation.Runspaces.PSSession[]]$Session,
[s... | /content/code_sandbox/PSFileTransfer/functions/Core/Send-File.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 503 |
```powershell
function Get-FileLength
{
[OutputType([int])]
param (
[Parameter(Mandatory = $true)]
[string]$FilePath
)
try
{
$FilePath = $executionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($FilePath)
}
catch
{
throw $_
}
(Get-... | /content/code_sandbox/PSFileTransfer/internal/functions/Get-FileLength.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 89 |
```powershell
function Write-File
{
param (
[Parameter(Mandatory = $true)]
[string]$DestinationFullName,
[Parameter(Mandatory = $true)]
[byte[]]$Bytes,
[bool]$Erase,
[bool]$Force
)
Write-Debug -Message "Send-File $($env:COMPUTERNAME): writing $DestinationF... | /content/code_sandbox/PSFileTransfer/internal/functions/Write-File.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 410 |
```powershell
$certStoreTypes = @'
using System;
using System.Runtime.InteropServices;
namespace System.Security.Cryptography.X509Certificates
{
public class Win32
{
[DllImport("crypt32.dll", EntryPoint="CertOpenStore", CharSet=CharSet.Auto, SetLastError=true)]
public static extern IntPtr CertO... | /content/code_sandbox/AutomatedLabCore/internal/scripts/Types.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 10,128 |
```powershell
$chunkSize = 1MB
``` | /content/code_sandbox/PSFileTransfer/internal/scripts/Initialize.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 9 |
```powershell
function Read-File
{
[OutputType([Byte[]])]
param (
[Parameter(Mandatory = $true)]
[string]$SourceFile,
[Parameter(Mandatory = $true)]
[int]$Offset,
[int]$Length
)
#Convert the destination path to a full filesytem path (to support relative paths)
... | /content/code_sandbox/PSFileTransfer/internal/functions/Read-File.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 230 |
```powershell
function Write-LogFunctionEntry
{
[CmdletBinding()]
param()
$Global:LogFunctionEntryTime = Get-Date
Get-CallerPreference -Cmdlet $PSCmdlet -SessionState $ExecutionContext.SessionState
$Message = 'Entering...'
$caller = (Get-PSCallStack)[1]
$callerFunctionName = $caller.Comm... | /content/code_sandbox/PSLog/functions/Core/Write-LogFunctionEntry.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 631 |
```powershell
@{
RootModule = 'PSLog.psm1'
ModuleVersion = '1.0.0'
CompatiblePSEditions = 'Core', 'Desktop'
GUID = 'cd303a6c-f405-4dcb-b1ce-fbc2c52264e9'
Author = 'Raimund Andree, Per Pedersen'
Description = 'Redirects stan... | /content/code_sandbox/PSLog/PSLog.psd1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 337 |
```powershell
function Write-LogFunctionExit
{
[CmdletBinding()]
param
(
[Parameter(Position = 0)]
[string]$ReturnValue
)
if ($Global:LogFunctionEntryTime)
{
$ts = New-TimeSpan -Start $Global:LogFunctionEntryTime -End (Get-Date)
}
else
{
$ts = New-Tim... | /content/code_sandbox/PSLog/functions/Core/Write-LogFunctionExit.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 303 |
```powershell
function Write-ProgressIndicator
{
if (-not (Get-PSCallStack)[1].InvocationInfo.BoundParameters['ProgressIndicator'])
{
return
}
Write-ScreenInfo -Message '.' -NoNewline
}
``` | /content/code_sandbox/PSLog/functions/Core/Write-ProgressIndicator.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 51 |
```powershell
function Write-LogFunctionExitWithError
{
[CmdletBinding(
ConfirmImpact = 'Low',
DefaultParameterSetName = 'Message'
)]
param
(
[Parameter(Position = 0, ParameterSetName = 'Message')]
[ValidateNotNullOrEmpty()]
[string]$Message,
[Parameter(... | /content/code_sandbox/PSLog/functions/Core/Write-LogFunctionExitWithError.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 435 |
```powershell
function Write-ScreenInfo
{
param
(
[Parameter(Position = 1)]
[string[]]$Message,
[Parameter(Position = 2)]
[timespan]$TimeDelta,
[Parameter(Position = 3)]
[timespan]$TimeDelta2,
[ValidateSet('Error', 'Warning', 'Info', 'Verbose', 'Debug'... | /content/code_sandbox/PSLog/functions/Core/Write-ScreenInfo.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,762 |
```powershell
function Write-LogError
{
[CmdletBinding(
ConfirmImpact = 'Low',
DefaultParameterSetName = 'Name'
)]
param
(
[Parameter(Position = 0, Mandatory = $true, ParameterSetName = 'Message')]
[ValidateNotNullOrEmpty()]
[string]$Message,
[Parameter(P... | /content/code_sandbox/PSLog/functions/Core/Write-LogError.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 374 |
```powershell
function Write-ProgressIndicatorEnd
{
if (-not (Get-PSCallStack)[1].InvocationInfo.BoundParameters['ProgressIndicator'])
{
return
}
if ((Get-PSCallStack)[1].InvocationInfo.BoundParameters['NoNewLine'].IsPresent)
{
return
}
Write-ScreenInfo -Message '.'
}
``` | /content/code_sandbox/PSLog/functions/Core/Write-ProgressIndicatorEnd.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 79 |
```smalltalk
using System;
using System.Collections.Generic;
using System.Linq;
using System.Management.Automation;
using System.Management.Automation.Runspaces;
using System.Text;
using System.Threading.Tasks;
namespace TestClient
{
public class PowerShellHelper : IDisposable
{
Runspace runspace;
... | /content/code_sandbox/TestClient/PowerShellHelper.cs | smalltalk | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 426 |
```powershell
function Get-CallerPreference
{
[CmdletBinding(DefaultParameterSetName = 'AllVariables')]
param (
[Parameter(Mandatory = $true)]
[ValidateScript( { $_.GetType().FullName -eq 'System.Management.Automation.PSScriptCmdlet' })]
$Cmdlet,
[Parameter(Mandatory = $true)]
... | /content/code_sandbox/PSLog/functions/Core/Get-CallerPreference.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 856 |
```smalltalk
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security;
using System.Text;
namespace AutomatedLab
{
static class Extensions
{
public delegate TOut Action2<TIn, TOut>(TIn element);
public static IEnumerable<TOut> ForEach<TIn, TOut>(this IEnumerable... | /content/code_sandbox/TestClient/Extensions.cs | smalltalk | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 371 |
```smalltalk
//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Net;
//using System.Text;
//using System.Threading.Tasks;
//namespace AutomatedLab
//{
// class IpConfig
// {
// private int prefix;
// private IPAddress address;
// public int Prefix
// ... | /content/code_sandbox/TestClient/IpConfig.cs | smalltalk | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 535 |
```smalltalk
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: Assem... | /content/code_sandbox/TestClient/Properties/AssemblyInfo.cs | smalltalk | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 276 |
```smalltalk
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Management.Automation;
using System.Reflection;
using AutomatedLab;
using LabXml;
using AutomatedLab.Azure;
using System.Xml;
namespace TestClient
{
public enum MyColor
{
Black = 0,
Dar... | /content/code_sandbox/TestClient/Program.cs | smalltalk | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 3,534 |
```powershell
@{
RootModule = 'AutomatedLab.Ships.psm1'
CompatiblePSEditions = 'Core', 'Desktop'
ModuleVersion = '1.0.0'
GUID = 'fc08e0e1-d274-41a3-afdd-09247e497c08'
Author = 'Raimund Andree, Per Pedersen, Jan-Hendrik Peters'
CompanyName ... | /content/code_sandbox/AutomatedLab.Ships/AutomatedLab.Ships.psd1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 261 |
```powershell
using namespace Microsoft.PowerShell.SHiPS
[SHiPSProvider(UseCache = $true)]
[SHiPSProvider(BuiltinProgress = $false)]
class LabHost : SHiPSDirectory {
LabHost(
[string]$name) : base($name) {
}
[object[]] GetChildItem() {
if (-not (Get-Module -ListAvailable AutomatedLabCore))... | /content/code_sandbox/AutomatedLab.Ships/AutomatedLab.Ships.psm1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 592 |
```powershell
BeforeDiscovery {
$rootpath = $PSScriptRoot
if (-not (Get-Module -List AutomatedLab.Common)) { Install-Module -Name AutomatedLab.Common -Force -SkipPublisherCheck -AllowClobber }
if (-not (Get-Module -List PSFramework)) { Install-Module -Name PSFramework -Force -SkipPublisherCheck -AllowClobb... | /content/code_sandbox/Tests/Integration/Get-LabConfigurationItem.tests.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 794 |
```powershell
<#
Ensure that all exported cmdlets offer help that is not auto-generated
#>
BeforeDiscovery {
$rootpath = $PSScriptRoot
$skippedCommands = @(
# @raandree --> :)
'Add-LabAzureWebAppDefinition'
'Get-LabAzureWebApp'
'Get-LabAzureWebApp'
'Get-LabAzureWebAppDefi... | /content/code_sandbox/Tests/Integration/Help.tests.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,586 |
```powershell
$labName = 'CRMLab1'
# Create an empty lab template and define where the lab XML files and the VMs will be stored
New-LabDefinition -Name $labName -DefaultVirtualizationEngine HyperV
# Make the network definition
Add-LabVirtualNetworkDefinition -Name $labName -AddressSpace 192.168.81.0/24
Set-LabInstal... | /content/code_sandbox/LabSources/SampleScripts/HyperV/Single 2012R2 Server DC SQL2014 Web CA.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 417 |
```powershell
$labName = 'Test5'
#create an empty lab template and define where the lab XML files and the VMs will be stored
New-LabDefinition -Name $labName -DefaultVirtualizationEngine HyperV
#make the network definition
Add-LabVirtualNetworkDefinition -Name $labName -AddressSpace 192.168.71.0/24
#and the domain d... | /content/code_sandbox/LabSources/SampleScripts/HyperV/MediumLab 2012R2 SQL.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 967 |
```powershell
$labName = 'Test5'
#create an empty lab template and define where the lab XML files and the VMs will be stored
New-LabDefinition -Name $labName -DefaultVirtualizationEngine HyperV
#make the network definition
Add-LabVirtualNetworkDefinition -Name $labName -AddressSpace 192.168.71.0/24
#and the domain d... | /content/code_sandbox/LabSources/SampleScripts/HyperV/MediumLab 2012R2 SQL EX.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,031 |
```powershell
$labName = 'ALLovesLinux'
New-LabDefinition -Name $labName -DefaultVirtualizationEngine HyperV
Add-LabVirtualNetworkDefinition -Name $labName -AddressSpace 192.168.130.0/24
Add-LabVirtualNetworkDefinition -Name 'Default Switch' -HyperVProperties @{ SwitchType = 'External'; AdapterName = 'Ethernet' }
$P... | /content/code_sandbox/LabSources/SampleScripts/HyperV/AL Loves Linux.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 593 |
```powershell
$labName = 'Test3'
#create an empty lab template and define where the lab XML files and the VMs will be stored
New-LabDefinition -Name $labName -DefaultVirtualizationEngine HyperV
#make the network definition
Add-LabVirtualNetworkDefinition -Name $labName -AddressSpace 192.168.50.0/24
#and the domain d... | /content/code_sandbox/LabSources/SampleScripts/HyperV/BigLab 2012R2 EX SQL ORCH VS OFF.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,712 |
```powershell
# Sample script for installing office 365ProPlus as a custom role
$labName = 'SingleMachine'
#create an empty lab template and define where the lab XML files and the VMs will be stored
New-LabDefinition -Name $labName -DefaultVirtualizationEngine HyperV
#Our one and only machine with nothing on it
$role... | /content/code_sandbox/LabSources/SampleScripts/HyperV/Single 10 Client with Office2019.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 169 |
```powershell
$labName = 'ExSmall1'
#create an empty lab template and define where the lab XML files and the VMs will be stored
New-LabDefinition -Name $labName -DefaultVirtualizationEngine HyperV
#make the network definition
Add-LabVirtualNetworkDefinition -Name $labName -AddressSpace 192.168.84.0/24
Set-LabInstall... | /content/code_sandbox/LabSources/SampleScripts/HyperV/SmallLab 2012R2 EX.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 376 |
```powershell
<# Prerequisites :
- VMware environment with vCenter server
- ResourcePool 'Test'
- A VM folder named Templates
- In that folder, a powered down VM named 'AL_WindowsServer2012R2DataCenter', fully installed with said OS, and VMware tools installed.\
- A snapshot of the VM above (this is... | /content/code_sandbox/LabSources/SampleScripts/VMWare/VMWare Single Server.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 408 |
```powershell
<#
.SYNOPSIS
Use Azure Stack Hub as a target for AutomatedLab
.DESCRIPTION
Requires Azure Stack Hub - deploy an SDK here: path_to_url
Requires that Azure Stack Hub is registered properly.
Requires connectivity to your Azure Stack Hub ARM APIs, for example via VPN or ExpressRoute.
Not... | /content/code_sandbox/LabSources/SampleScripts/Azure/AzureStackHub.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 878 |
```powershell
$labName = 'MultiForest<SOME UNIQUE DATA>' #THIS NAME MUST BE GLOBALLY UNIQUE
$azureDefaultLocation = 'West Europe' #COMMENT OUT -DefaultLocationName BELOW TO USE THE FASTEST LOCATION
#your_sha256_hash----------------------------------------------------
#----------------------- CHANGING ANYTHING BEYOND ... | /content/code_sandbox/LabSources/SampleScripts/Azure/MultiForestLab 2012R2.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,264 |
```powershell
@{
Tag = 'DomainJoined','ActiveDirectory','MultiForest','Azure'
Description = 'This sample script deploys a multi-forest lab on Azure, including VNET peering, using very old server versions'
Name = 'MultiforestOnAzure2012'
}
``` | /content/code_sandbox/LabSources/SampleScripts/Azure/MultiForestLab 2012R2.psd1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 60 |
```powershell
param
(
[string]
$LabName = ('mnmf-{0:yyyyMMdd}' -f (Get-Date)),
[string]
$AzureDefaultLocation = 'West Europe'
)
#create an empty lab template and define where the lab XML files and the VMs will be stored
New-LabDefinition -Name $labName -DefaultVirtualizationEngine Azure
Add-LabAzureSub... | /content/code_sandbox/LabSources/SampleScripts/Azure/MultiNetMultiForest.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,210 |
```powershell
@{
Tag = 'DomainJoined','ActiveDirectory','MultiForest','Azure'
Description = 'This sample script deploys a multi-forest lab on Azure, including VNET peering'
Name = 'MultiForestOnAzure'
}
``` | /content/code_sandbox/LabSources/SampleScripts/Azure/MultiNetMultiForest.psd1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 51 |
```powershell
<#
.DESCRIPTION
This script deploys a Hyper-V VM using nested virtualization and deploys a build agent on it, connected to an Azure DevOps organisation's agent pool
#>
param
(
# Your user name on Azure DevOps, or an organisation's name
[Parameter(Mandatory)]
[string]
$Organisation,
... | /content/code_sandbox/LabSources/SampleScripts/Scenarios/AzureDevOpsBuildAgent.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 364 |
```powershell
#Requires -Module AutomatedLab
param
(
[AutomatedLab.VirtualizationHost]
$Engine = 'HyperV',
[string]
$LabName = 'SCVMM'
)
New-LabDefinition -Name $LabName -DefaultVirtualizationEngine $Engine
$PSDefaultParameterValues = @{
'Add-LabMachineDefinition:Network' = $LabName
'Add-LabMa... | /content/code_sandbox/LabSources/SampleScripts/Scenarios/SCVMM2019.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 799 |
```powershell
<#
This scenario demos a DSC pull server. The lab must have an internet connection in order to download additional required bits. PowerShell 5.0
or greater is required on all DSC pull servers or clients. Please take a look at introduction script '10 ISO Offline Patching.ps1' if you
want to create a Window... | /content/code_sandbox/LabSources/SampleScripts/Scenarios/DSC Pull Scenario 1 (Pull Configuration, SQL Reporting).ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,009 |
```powershell
<#
This scenario demos a DSC pull server. The lab must have an internet connection in order to download additional required bits. PowerShell 5.0
or greater is required on all DSC pull servers or clients. Please take a look at introduction script '10 ISO Offline Patching.ps1' if you
want to create a Window... | /content/code_sandbox/LabSources/SampleScripts/Scenarios/DSC Pull Scenario 1 (Pull Configuration).ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 888 |
```powershell
<#
This lab script serves the purpose of showing you how to create and connect two Azure labs in different resource groups e.g. in different locations
You will need an Azure subscription and both labs need to be created within the same subscription. Otherwise you can have a look at the other
options that... | /content/code_sandbox/LabSources/SampleScripts/Azure/VpnConnectedLab.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 813 |
```powershell
New-LabDefinition -Name TFS2015 -DefaultVirtualizationEngine HyperV
$PSDefaultParameterValues = @{
'Add-LabMachineDefinition:OperatingSystem' = 'Windows Server 2016 Datacenter (Desktop Experience)'
'Add-LabMachineDefinition:DomainName' = 'contoso.com'
'Add-LabMachineDefinition:Memory' ... | /content/code_sandbox/LabSources/SampleScripts/Scenarios/TFS 2015 Deployment.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 393 |
```powershell
$labname = 'FailOverLab3'
New-LabDefinition -Name $labname -DefaultVirtualizationEngine HyperV
Add-LabDomainDefinition -Name contoso.com -AdminUser Install -AdminPassword Somepass1
Set-LabInstallationCredential -Username Install -Password Somepass1
# Two cluster networks with an IP out of each one
# One... | /content/code_sandbox/LabSources/SampleScripts/Scenarios/Failover Clustering 3 MultipleNetworks.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 754 |
```powershell
New-LabDefinition -Name MDTLab2 -DefaultVirtualizationEngine HyperV
$PSDefaultParameterValues = @{
'Add-LabMachineDefinition:ToolsPath' = "$labSources\Tools"
'Add-LabMachineDefinition:OperatingSystem' = 'Windows Server 2016 Datacenter (Desktop Experience)'
'Add-LabMachineDefinition:Memory' = ... | /content/code_sandbox/LabSources/SampleScripts/Scenarios/MDT Lab 2, DC and MDT Server.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 342 |
```powershell
param
(
[Parameter()]
[string]
$LabName = 'nuget',
[Parameter()]
[string]
[ValidateSet('Azure', 'HyperV')]
$Engine = 'HyperV'
)
New-LabDefinition -Name $LabName -DefaultVirtualizationEngine $Engine
Add-LabVirtualNetworkDefinition -Name $labName -AddressSpace 192.168.30.0/24
A... | /content/code_sandbox/LabSources/SampleScripts/Scenarios/NuGetServer.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 503 |
```powershell
# Checkout the other parameters for Add-LabAzureSubscription! Get-Command -Syntax Add-LabAzureSubscription
$subscriptionName = 'Your subscription'
$labname = 'FailOverLab3'
New-LabDefinition -Name $labname -DefaultVirtualizationEngine Azure
Add-LabAzureSubscription -SubscriptionName $subscriptionName
Add... | /content/code_sandbox/LabSources/SampleScripts/Scenarios/Failover Clustering 3 MultipleNetworksAzure.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 810 |
```powershell
$labName = 'WACLab'
$domainName = 'contoso.com'
New-LabDefinition -Name $labname -DefaultVirtualizationEngine HyperV
Add-LabDomainDefinition -Name $domainName -AdminUser Install -AdminPassword Somepass1
Set-LabInstallationCredential -Username Install -Password Somepass1
$PSDefaultParameterValues = @{
... | /content/code_sandbox/LabSources/SampleScripts/Scenarios/WindowsAdminCenter.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 445 |
```powershell
$labName = 'SharingIsCaring'
New-LabDefinition -Name $labName -DefaultVirtualizationEngine HyperV
Add-LabVirtualNetworkDefinition -Name $labName -AddressSpace 192.168.30.0/24
Add-LabDomainDefinition -Name contoso.com -AdminUser Install -AdminPassword Somepass1
Set-LabInstallationCredential -Username Inst... | /content/code_sandbox/LabSources/SampleScripts/Scenarios/SharePoint2016.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 295 |
```powershell
@{
Tag = 'DomainJoined', 'Arc', 'Azure'
Description = 'Deploys a Hyper-V lab with Domain Services, Certificate Services, SQL Server and web servers and connects VMs using Azure Arc.'
Name = 'AzureArcConnectedHyperV'
}
``` | /content/code_sandbox/LabSources/SampleScripts/Scenarios/AzureArcConnectedHyperV.psd1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 59 |
```powershell
<#
Deploy ConfigurationManager in a lab
#>
param
(
# Lab Name
[string]
$LabName = 'cm2203',
# Hypervisor to use
[ValidateSet('Azure', 'HyperV')]
[string]
$Engine = 'HyperV',
# Domain FQDn
[string]
$DomainName = 'contoso.com',
# Path to SQL 2019, leave empty t... | /content/code_sandbox/LabSources/SampleScripts/Scenarios/CM-2203.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 768 |
```powershell
[CmdletBinding()]
param
(
# Select platform, defaults to HyperV
[AutomatedLab.VirtualizationHost]
$Hypervisor = 'HyperV',
# Indicates that the installation of Dynamics should be split
# into its three components
[switch]
$IndividualComponents
)
New-LabDefinition -name dynamic... | /content/code_sandbox/LabSources/SampleScripts/Scenarios/Dynamics365.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 417 |
```powershell
New-LabDefinition -Name MDTLab1 -DefaultVirtualizationEngine HyperV
$mdtRole = Get-LabPostInstallationActivity -CustomRole MDT -Properties @{
DeploymentFolder = 'C:\DeploymentShare'
DeploymentShare = 'DeploymentShare$'
InstallUserID = 'MdtService'
InstallPassword = 'Somepass1'
Operati... | /content/code_sandbox/LabSources/SampleScripts/Scenarios/MDT Lab 1, MDT Server 1.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 238 |
```powershell
#This lab installs the SCCM role (1702). All required resources except the SQL Server ISO are downloaded during the deployment.
New-LabDefinition -Name SccmLab1 -DefaultVirtualizationEngine HyperV
$PSDefaultParameterValues = @{
'Add-LabMachineDefinition:ToolsPath' = "$labSources\Tools"
'Add-LabM... | /content/code_sandbox/LabSources/SampleScripts/Scenarios/SCCM Lab 1.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 400 |
```powershell
$labName = "ProGet_$((1..6 | ForEach-Object { [char[]](97..122) | Get-Random }) -join '')"
$azureLocation = 'West Europe'
#your_sha256_hash----------------------------------------------------
#----------------------- CHANGING ANYTHING BEYOND THIS LINE SHOULD NOT BE REQUIRED ------------------------------... | /content/code_sandbox/LabSources/SampleScripts/Scenarios/ProGet Lab - Azure.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,121 |
```powershell
<#
Build a lab with the help of nested virtualization. Adjust the machine memory if necessary.
The build worker will use Polaris as a simple REST endpoint that takes your lab data to deploy.
AutomatedLab will be copied to the machine. Lab sources will be mirrored to the machine as well, so that lab deplo... | /content/code_sandbox/LabSources/SampleScripts/Scenarios/Lab in a Box 3 - Build worker.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 699 |
```powershell
<#
This scenario demos a DSC pull server confuguration using 3 pull servers. Each pull server publishes a configuration and the clients are
pulling the configurations from all three servers (see "partial configuration').
The lab must have an internet connection in order to download additional required bi... | /content/code_sandbox/LabSources/SampleScripts/Scenarios/DSC Pull Scenario 2 (Pull Partial Configuration).ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,000 |
```powershell
<#
.SYNOPSIS
An AutomatedLab script for Configuration Manager 1902 with support for installing updates.
.DESCRIPTION
An AutomatedLab script for Configuration Manager 1902 with support for installing updates.
.PARAMETER LabName
The name of the AutomatedLab lab created by this script.
.PARAMETER... | /content/code_sandbox/LabSources/SampleScripts/Scenarios/CM-1902.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 5,247 |
```powershell
$labName = 'ProGet'
#your_sha256_hash----------------------------------------------------
#----------------------- CHANGING ANYTHING BEYOND THIS LINE SHOULD NOT BE REQUIRED ----------------------------------
#----------------------- + EXCEPT FOR THE LINES STARTING WITH: REMOVE THE COMMENT TO ------------... | /content/code_sandbox/LabSources/SampleScripts/Scenarios/ProGet Lab - HyperV.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,167 |
```powershell
$labName = 'WACLab'
$domainName = 'contoso.com'
New-LabDefinition -Name $labname -DefaultVirtualizationEngine HyperV
Add-LabDomainDefinition -Name $domainName -AdminUser Install -AdminPassword Somepass1
Set-LabInstallationCredential -Username Install -Password Somepass1
$PSDefaultParameterValues = @{
... | /content/code_sandbox/LabSources/SampleScripts/Scenarios/WindowsAdminCenter-OnPrem.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 696 |
```powershell
$labname = 'SCVMMHV'
New-LabDefinition -Name $labname -DefaultVirtualizationEngine HyperV
Add-LabDomainDefinition -Name contoso.com -AdminUser Install -AdminPassword Somepass1
Set-LabInstallationCredential -Username Install -Password Somepass1
Add-LabVirtualNetworkDefinition -Name $labname -AddressSpac... | /content/code_sandbox/LabSources/SampleScripts/Scenarios/HyperVClusterWithVmm.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 531 |
```powershell
$labname = 'FailOverLab1'
New-LabDefinition -Name $labname -DefaultVirtualizationEngine HyperV
Add-LabDomainDefinition -Name contoso.com -AdminUser Install -AdminPassword Somepass1
Set-LabInstallationCredential -Username Install -Password Somepass1
Add-LabVirtualNetworkDefinition -Name $labname -Addres... | /content/code_sandbox/LabSources/SampleScripts/Scenarios/Failover Clustering 1.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 494 |
```powershell
<#
.SYNOPSIS
Deploy Hyper-V lab and connect VMs to Azure
.DESCRIPTION
Deploys a Hyper-V lab with Domain Services, Certificate Services, SQL Server and web servers
and connects VMs using Azure Arc.
Prerequisites:
- Ensure that the HybridCompute provider is registered: Get-AzResourcePr... | /content/code_sandbox/LabSources/SampleScripts/Scenarios/AzureArcConnectedHyperV.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,455 |
```powershell
New-LabDefinition -Name ScomDev -DefaultVirtualizationEngine HyperV
$PSDefaultParameterValues = @{
'Add-LabMachineDefinition:OperatingSystem' = 'Windows Server 2019 Datacenter (Desktop Experience)'
'Add-LabMachineDefinition:DomainName' = 'contoso.com'
'Add-LabMachineDefinition:Memory' ... | /content/code_sandbox/LabSources/SampleScripts/Scenarios/SCOMDistributed.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 501 |
```powershell
<#
In this scenario AutomatedLab builds a lab inside a lab. Thanks to nested virtualization in Hyper-V and Azure,
this can be done on a Windows Server 2016 or Windows 10 host machine.
This lab contains:
- ADDC1 with the role root domain controller
- AL1, the virtualized host machine on Windows Ser... | /content/code_sandbox/LabSources/SampleScripts/Scenarios/Lab in a Box 2 - Azure.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,159 |
```powershell
<#
This lab script serves the purpose of showing you how to create and connect an on-premises to an Azure lab.
You will need an Azure subscription.
#>
# Define your labs. Make sure that the virtual network address spaces do not overlap.
$labs = @(
@{
LabName = 'SourceNameHere'
Addres... | /content/code_sandbox/LabSources/SampleScripts/Scenarios/Hybrid Environment HyperV and Azure 1.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,046 |
```powershell
#Lab for working with the Advanced Group Policy Management Console (AGMP)
#The following files are required:
# - agpm_403_server_amd64.exe
# - agpm_403_client_amd64.exe
# - agpm4.0-Server-KB3127165-x64.exe
New-LabDefinition -Name AgpmLab10 -DefaultVirtualizationEngine HyperV #Azure
#Add-LabAzureSubscrip... | /content/code_sandbox/LabSources/SampleScripts/Scenarios/AGPM Lab 1.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,544 |
```powershell
<#
This demo creates a failover cluster with 2 nodes, and 2 shared disks
that can be added to cluster roles.
#>
$labname = 'FailOverLab2'
New-LabDefinition -Name $labname -DefaultVirtualizationEngine HyperV
Add-LabDomainDefinition -Name contoso.com -AdminUser Install -AdminPassword Somepass1
Set-LabIns... | /content/code_sandbox/LabSources/SampleScripts/Scenarios/Failover Clustering 2 (Shared Storage).ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 433 |
```powershell
<#
.SYNOPSIS
An AutomatedLab script for Configuration Manager 2002 with support for installing updates.
.DESCRIPTION
An AutomatedLab script for Configuration Manager 2002 with support for installing updates.
.PARAMETER LabName
The name of the AutomatedLab lab created by this script.
.PARAMETER... | /content/code_sandbox/LabSources/SampleScripts/Scenarios/CM-2002.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 5,622 |
```powershell
<#
.SYNOPSIS
Deploy one Hyper-V and one Azure lab, connect labs, onboard VMs to Arc
.DESCRIPTION
Deploys one Hyper-V and one Azure lab with
- Domain Services
- Web server
- File Server
and connects VMs using Azure Arc.
Prerequisites:
- Ensure that the HybridCompute provi... | /content/code_sandbox/LabSources/SampleScripts/Scenarios/HybridHyperVAzureArc.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,989 |
```powershell
#Requires -Module AutomatedLab
param
(
[AutomatedLab.VirtualizationHost]
$Engine = 'HyperV',
[string]
$LabName = 'SCVMM'
)
New-LabDefinition -Name $LabName -DefaultVirtualizationEngine $Engine
$PSDefaultParameterValues = @{
'Add-LabMachineDefinition:Network' = $LabName
'Add-LabMa... | /content/code_sandbox/LabSources/SampleScripts/Scenarios/SCVMM2022.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 807 |
```powershell
<#
.DESCRIPTION
This script deploys a Hyper-V VM using nested virtualization and deploys a build agent on it, connected to an Azure DevOps organisation's agent pool.
This lab includes a reference to Azure DevOps in addition to the build agent
#>
param
(
# Your user name on Azure DevOps, or an orga... | /content/code_sandbox/LabSources/SampleScripts/Scenarios/AzureDevOpsCloudConnection.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 394 |
```powershell
$labName = 'DscReleasePipeline'
#your_sha256_hash----------------------------------------------------
#----------------------- CHANGING ANYTHING BEYOND THIS LINE SHOULD NOT BE REQUIRED ----------------------------------
#----------------------- + EXCEPT FOR THE LINES STARTING WITH: REMOVE THE COMMENT TO ... | /content/code_sandbox/LabSources/SampleScripts/Scenarios/DSC With Release Pipeline.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,411 |
```powershell
New-LabDefinition -Name TFS2017 -DefaultVirtualizationEngine HyperV
$PSDefaultParameterValues = @{
'Add-LabMachineDefinition:OperatingSystem' = 'Windows Server 2016 Datacenter (Desktop Experience)'
'Add-LabMachineDefinition:DomainName' = 'contoso.com'
'Add-LabMachineDefinition:Memory' ... | /content/code_sandbox/LabSources/SampleScripts/Scenarios/TFS 2017 Deployment.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 468 |
```powershell
[CmdletBinding()]
param
(
# Select platform, defaults to HyperV
[AutomatedLab.VirtualizationHost]
$Hypervisor = 'HyperV'
)
New-LabDefinition -Name RDS -DefaultVirtualizationEngine $Hypervisor
Add-LabDomainDefinition -Name contoso.com -AdminUser Install -AdminPassword Somepass1
Set-LabInstall... | /content/code_sandbox/LabSources/SampleScripts/Scenarios/RemoteDesktopServices.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 404 |
```powershell
$labName = 'ADMultiForest'
#create an empty lab template and define where the lab XML files and the VMs will be stored
New-LabDefinition -Name $labName -DefaultVirtualizationEngine HyperV
#and the domain definition with the domain admin account
Add-LabDomainDefinition -Name forest1.net -AdminUser Instal... | /content/code_sandbox/LabSources/SampleScripts/Scenarios/Multi-AD Forest with Trusts.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 747 |
```powershell
[CmdletBinding()]
param
(
[string]
$DomainName = 'contoso.com',
[Parameter(Mandatory)]
[pscredential]
$DomainJoinCredential,
# The name of the adapter that can be used for the external VSwitch
[string]
$ExternalAdapterName = 'Ethernet'
)
New-LabDefinition -Name ExDomLab ... | /content/code_sandbox/LabSources/SampleScripts/Scenarios/ExistingDomainLab.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 518 |
```powershell
<#
In this scenario AutomatedLab builds a lab inside a lab. Thanks to nested virtualization in Hyper-V and Azure,
this can be done on a Windows Server 2016 or Windows 10 host machine.
This lab contains:
- ADDC1 with the role root domain controller. This machine also has the... | /content/code_sandbox/LabSources/SampleScripts/Scenarios/Lab in a Box 1 - HyperV.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 955 |
```powershell
<#
.SYNOPSIS
An AutomatedLab script for Configuration Manager 2103 with support for installing updates.
.DESCRIPTION
An AutomatedLab script for Configuration Manager 2103 with support for installing updates.
.PARAMETER LabName
The name of the AutomatedLab lab created by this script.
.PARAMETER... | /content/code_sandbox/LabSources/SampleScripts/Scenarios/CM-2103.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 5,616 |
```powershell
<#
This sample creates a lab with multiple networks which are connected
using Routing role VMs and their shared network "RoutingPlane".
Clients on each network can communicate with each other.
This also enables advanced scenarios that call Install-Lab -Routing
before deploying the Domains in order to te... | /content/code_sandbox/LabSources/SampleScripts/Scenarios/InternalRouting.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 596 |
```powershell
#This intro script is extending '03 Single domain-joined server.ps1'. An additional ISO is added to the lab which is required to install SQL Server 2014. The script makes
#use of the $PSDefaultParameterValues feature introduced in PowerShell version 4. Settings that are the same for all machines can be su... | /content/code_sandbox/LabSources/SampleScripts/Introduction/06 SQL Server and client, domain joined.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 267 |
```powershell
#It couldn't be easier. These 3 lines install a lab with just a single Windows 10 machine.
#AL takes care of configuring network settings like creating a virtual switch and finding a suitable IP range.
New-LabDefinition -Name Win10 -DefaultVirtualizationEngine HyperV
Add-LabMachineDefinition -Name Client... | /content/code_sandbox/LabSources/SampleScripts/Introduction/01 Single Win10 Client.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 87 |
```powershell
# The is similar to the '05 SQL Server and client, domain joined.ps1' but installs an Exchange 2019 server instead
# of a SQL Server.
# IMPORTANT NOTE: You must have Exchange 2019 ISO or CU already available. Microsoft has limited Exchange 2019 access to VL & MSDN
# so it is not publicly available for do... | /content/code_sandbox/LabSources/SampleScripts/Introduction/07.3 Exchange 2019 Server and client, domain joined.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 321 |
```powershell
#This intro script is extending '03 Single domain-joined server.ps1'. Two additional ISOs are added to the lab which are required to install
#Visual Studio 2015 and SQL Server 2014. After the lab is installed, AutomatedLab installs Redgate Relector on the DevClient1.
New-LabDefinition -Name LabDev1 -Defa... | /content/code_sandbox/LabSources/SampleScripts/Introduction/10 Development Client, domain joined (internet facing).ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 471 |
```powershell
#The is almost the same like '05 SQL Server and client, domain joined.ps1' but installs a Certificate Authority instead
#of a SQL Server. The CA is installed with standard settings. Customizing the CA installation will be shown later.
New-LabDefinition -Name Lab1CA1 -DefaultVirtualizationEngine HyperV
#... | /content/code_sandbox/LabSources/SampleScripts/Introduction/08 Standalone Root CA, Sub Ca domain joined.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 224 |
```powershell
#This intro script is pretty almost the same like the previous one. But this lab is connected to the internet over the external virtual switch.
#The IP addresses are assigned automatically like in the previous samples but AL also assignes the gateway and the DNS servers to all machines
#that are part of t... | /content/code_sandbox/LabSources/SampleScripts/Introduction/05 Single domain-joined server (internet facing).ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 319 |
```powershell
#The is almost the same like '07 Standalone Root CA, Sub Ca domain joined.ps1' but this adds a web server and requests
#a web sever certificate for SSL. This certificate is then used for the SSL binding.
New-LabDefinition -Name LabSsl1 -DefaultVirtualizationEngine HyperV
#defining default parameter valu... | /content/code_sandbox/LabSources/SampleScripts/Introduction/09 Web Servers with SSL certs, Root CA, domain joined.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 370 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.