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 #The is almost the same like '05 SQL Server and client, domain joined.ps1' but installs an Exchange 2016 server instead #of a SQL Server. # # IMPORTANT NOTE: Make sure you have installed at least the CU KB3206632 before installing Exchange 2016, this is a requirement. # Refer to the introduction script '1...
/content/code_sandbox/LabSources/SampleScripts/Introduction/07.2 Exchange 2016 Server and client, domain joined.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
472
```powershell $labName = 'ADRES<SOME UNIQUE DATA>' #THIS NAME MUST BE GLOBALLY UNIQUE $azureDefaultLocation = 'West Europe' #COMMENT OUT -DefaultLocationName BELOW TO USE THE FASTEST LOCATION #setting addMemberServer to $true installes an additional server in the lab $addMemberServer = $false #your_sha256_hash------...
/content/code_sandbox/LabSources/SampleScripts/Workshops/ADRecoveryLab - Azure.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
1,440
```powershell $labName = 'Kerberos101' #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/Workshops/Kerberos 101 Lab with Linux - HyperV.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
2,630
```powershell $labName = 'POSH' #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/Workshops/PowerShell Lab - HyperV.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
1,233
```powershell $labName = 'POSH' #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/Workshops/PowerShell Lab - HyperV with Internet.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
1,344
```powershell $labName = 'POSH<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 THIS LI...
/content/code_sandbox/LabSources/SampleScripts/Workshops/PowerShell Lab - Azure.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
1,368
```batchfile REPADMIN /viewlist * > DCs.txt :: FOR /F "tokens=3" %%a IN (DCs.txt) DO ECHO dadasdads %%a FOR /F "tokens=3" %%a IN (DCs.txt) DO CALL REPADMIN /SyncAll /AeP %%a DEL DCs.txt REPADMIN /ReplSum ```
/content/code_sandbox/LabSources/Tools/RepAll.bat
batchfile
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
80
```html <!DOCTYPE html> <html lang="en" xmlns="path_to_url"> <head> <meta charset="utf-8" /> <title>Azure Web Site created by AutomatedLab</title> </head> <body> <h3>This Azure Web Site was created by AutomatedLab. Checkout the fastest way to get you lab deployed on Azure or Hyper-V</h3> <img src="path...
/content/code_sandbox/LabSources/PostInstallationActivities/WebSiteDefaultContent/Default.html
html
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
101
```powershell $labName = 'ADRecovery' #setting addMemberServer to $true installes an additional server in the lab $addMemberServer = $false #setting createCheckpoint to $true creates a checkpoint of the whole lab after the deployment is finished $createCheckpoint = $false #your_sha256_hash---------------------------...
/content/code_sandbox/LabSources/SampleScripts/Workshops/ADRecoveryLab - HyperV.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
1,490
```powershell function Get-ConfigSet { $class = Get-WmiObject -List -Namespace root\microsoft -Class MSReportServer_ConfigurationSetting -Recurse Get-CimInstance -Namespace $class.__NAMESPACE -Class $class.Name if ($class.__NAMESPACE -match '\\v(?<version>\d\d)\\*.') { $version = $Matches.versi...
/content/code_sandbox/LabSources/PostInstallationActivities/SqlServer/SetupSqlServerReportingServices.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
934
```powershell function Install-NetFramework35 { <# .SYNOPSIS Install-OSCNetFx3 is an advanced function which can be used to install .NET Framework 3.5 in Windows 8. .DESCRIPTION Install-OSCNetFx3 is an advanced function which can be used to install .NET Framework 3.5 in Windo...
/content/code_sandbox/LabSources/PostInstallationActivities/DotNet35Client/DotNet35Client.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
809
```powershell #The file that contains the user information was created using [Spawner Data Generator path_to_url #The column definition used is saved in the file 'SpawnerTableDefinition.txt'. #To add a new column to the output file containing the user name again (Name -> SamAccountName) the following PowerShell comman...
/content/code_sandbox/LabSources/PostInstallationActivities/PrepareFirstChildDomain/New-ADLabAccounts 2.0.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
1,232
```batchfile REPADMIN /viewlist * > DCs.txt :: FOR /F "tokens=3" %%a IN (DCs.txt) DO ECHO dadasdads %%a FOR /F "tokens=3" %%a IN (DCs.txt) DO CALL REPADMIN /SyncAll /AeP %%a DEL DCs.txt REPADMIN /ReplSum PAUSE ```
/content/code_sandbox/LabSources/PostInstallationActivities/PrepareRootDomain/RepAll.bat
batchfile
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
83
```powershell Import-Module -Name ActiveDirectory if (-not (Get-Command -Name Get-ADReplicationSite -ErrorAction SilentlyContinue)) { Write-ScreenInfo 'The script "PrepareRootDomain.ps1" script runs only if the ADReplication cmdlets are available' -Type Warning return } $password = "Password1" $securePassword...
/content/code_sandbox/LabSources/PostInstallationActivities/PrepareRootDomain/PrepareRootDomain.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
677
```powershell param ( [string]$ComputerName, [string]$CertificateThumbPrint, [Parameter(Mandatory)] [string]$RegistrationKey ) Import-Module -Name xPSDesiredStateConfiguration, PSDesiredStateConfiguration Configuration SetupDscPullServer { param ( [string[]]$NodeName = 'localhost', ...
/content/code_sandbox/LabSources/PostInstallationActivities/SetupDscPullServer/SetupDscPullServerEdb.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
481
```powershell #region Internals #region Get-Type (helper function for creating generic types) function Get-Type { param( [Parameter(Position=0,Mandatory=$true)] [string] $GenericType, [Parameter(Position=1,Mandatory=$true)] [string[]] $T ) $T = $T -as [type[]] try { $generic = [type]($GenericTyp...
/content/code_sandbox/LabSources/PostInstallationActivities/DnsAndTrustSetup/DnsAndTrustSetup.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
1,364
```powershell param ( [string]$ComputerName, [string]$CertificateThumbPrint, [Parameter(Mandatory)] [string]$RegistrationKey, [Parameter(Mandatory)] [string]$SqlServer, [Parameter(Mandatory)] [string]$DatabaseName ) Import-Module -Name xPSDesiredStateConfiguration, PSDesiredStateCon...
/content/code_sandbox/LabSources/PostInstallationActivities/SetupDscPullServer/SetupDscPullServerSql.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
687
```powershell param ( [string]$ComputerName, [string]$CertificateThumbPrint, [Parameter(Mandatory)] [string]$RegistrationKey ) Import-Module -Name xPSDesiredStateConfiguration, PSDesiredStateConfiguration Configuration SetupDscPullServer { param ( [string[]]$NodeName = 'localhost', ...
/content/code_sandbox/LabSources/PostInstallationActivities/SetupDscPullServer/SetupDscPullServerMdb.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
743
```powershell Configuration "TestConfig$($env:COMPUTERNAME)" { Import-DscResource -ModuleName 'PSDesiredStateConfiguration' Node localhost { File "TestFile$($env:COMPUTERNAME)" { Ensure = 'Present' Type = 'File' DestinationPath = "C:\DscTestFile_$($env:CO...
/content/code_sandbox/LabSources/PostInstallationActivities/SetupDscPullServer/DscTestConfig.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
154
```powershell param( [Parameter(Mandatory)] [string[]] $PullServer, [Parameter(Mandatory)] [string[]] $RegistrationKey, [bool] $UseSsl = $true ) [DSCLocalConfigurationManager()] Configuration PullClient { param( [Parameter(Mandatory)] [string[]] $PullServer, [Para...
/content/code_sandbox/LabSources/PostInstallationActivities/SetupDscClients/SetupDscClients.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
819
```powershell param( [Parameter(Mandatory)] [string]$ComputerName, [string]$OrganizationName ) function Download-ExchangeSources { Write-ScreenInfo -Message 'Download Exchange 2019 requirements' -TaskStart $downloadTargetFolder = "$labSources\ISOs" Write-ScreenInfo -Message "Downloading Exch...
/content/code_sandbox/LabSources/CustomRoles/Exchange2019/HostStart.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
4,002
```powershell param ( [Parameter(Mandatory)] [string] $ComputerName, [Parameter(Mandatory)] [string]$IsoPath ) $config2019Xml = @" <Configuration> <Add OfficeClientEdition="32"> <Product ID="O365ProPlusRetail"> <Language ID="en-us" /> </Product> </Add> <Updates Enabled="TRUE" ...
/content/code_sandbox/LabSources/CustomRoles/Office2019/HostStart.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
746
```powershell Param ( [Parameter(Mandatory)] [string]$CMBinariesDirectory, [Parameter(Mandatory)] [string]$CMPreReqsDirectory ) Write-ScreenInfo -Message "Starting CM binaries and prerequisites download process" -TaskStart #region CM binaries Write-ScreenInfo -Message "Downloading CM binaries archive...
/content/code_sandbox/LabSources/CustomRoles/CM-1902/Invoke-DownloadCM.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
843
```powershell param ( [Parameter(Mandatory)] [string] $DomainAndComputerName, [bool] $UseNwFeature = $false ) [string]$createDbQuery = @' USE [master] GO /****** Object: Database [DSC] Script Date: 07.04.2021 16:59:54 ******/ DECLARE @DefaultDataPath varchar(max) SET @DefaultDataPath = (SELECT CONVERT(varch...
/content/code_sandbox/LabSources/PostInstallationActivities/SetupDscPullServer/CreateDscSqlDatabase.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
8,865
```powershell Param ( [Parameter()] [String]$DoNotDownloadWMIEv2 ) $DoNotDownloadWMIEv2 = [Convert]::ToBoolean($DoNotDownloadWMIEv2) Write-ScreenInfo -Message "Starting miscellaneous items download process" -TaskStart #region Download Microsoft SQL Server 2012 Native Client QFE # path_to_url Write-ScreenInfo...
/content/code_sandbox/LabSources/CustomRoles/CM-1902/Invoke-DownloadMisc.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
776
```powershell Param ( [Parameter(Mandatory)] [String]$ComputerName, [Parameter(Mandatory)] [String]$CMSiteCode, [Parameter(Mandatory)] [String]$CMSiteName, [Parameter(Mandatory)] [ValidatePattern('^EVAL$|^\w{5}-\w{5}-\w{5}-\w{5}-\w{5}$', Options = 'IgnoreCase')] [String]$...
/content/code_sandbox/LabSources/CustomRoles/CM-1902/HostStart.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
2,784
```powershell Param ( [Parameter(Mandatory)] [String]$ADKDownloadPath, [Parameter(Mandatory)] [String]$WinPEDownloadPath ) Write-ScreenInfo -Message "Starting ADK / WinPE download process" -TaskStart #region ADK installer Write-ScreenInfo -Message "Downloading ADK installer" -TaskStart $ADKExePath =...
/content/code_sandbox/LabSources/CustomRoles/CM-1902/Invoke-DownloadADK.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
1,206
```powershell Param ( [Parameter(Mandatory)] [String]$ComputerName, [Parameter(Mandatory)] [String]$LogViewer ) #region Define functions function New-Shortcut { Param ( [Parameter(Mandatory=$true)] [String]$Target, [Parameter(Mandatory=$false)] [String]$TargetArgu...
/content/code_sandbox/LabSources/CustomRoles/CM-1902/Invoke-CustomiseCM.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
2,882
```powershell Param ( [Parameter(Mandatory)] [String]$ComputerName, [Parameter(Mandatory)] [String]$CMSiteCode, [Parameter(Mandatory)] [String]$Version ) #region Define functions function Update-CMSite { [CmdletBinding()] Param ( [Parameter(Mandatory)] [String]$CMSit...
/content/code_sandbox/LabSources/CustomRoles/CM-1902/Invoke-UpdateCM.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
4,119
```powershell param( [Parameter(Mandatory)] [string]$FeatureName, [string[]]$RemoteFolders ) Install-WindowsFeature -Name XPS-Viewer foreach ($folder in $RemoteFolders) { New-Item -ItemType Directory -Path $folder } ```
/content/code_sandbox/LabSources/CustomRoles/DemoCustomRole/DemoCustomRole.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
58
```powershell param( [Parameter(Mandatory)] [string]$LocalSoftwareFolder, [Parameter(Mandatory)] [string]$NotepadDownloadUrl, [Parameter(Mandatory)] [string]$ComputerName ) Import-Lab -Name $data.Name New-Item -ItemType Directory -Path $LocalSoftwareFolder -Force | Out-Null $notepadInstalle...
/content/code_sandbox/LabSources/CustomRoles/DemoCustomRole/HostStart.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
124
```powershell param( [Parameter(Mandatory)] [string[]]$LocalSoftwareFolder ) Remove-Item -Path $LocalSoftwareFolder -Recurse -Force ```
/content/code_sandbox/LabSources/CustomRoles/DemoCustomRole/HostEnd.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
34
```powershell # Use this metadata table to discover your custom role a little better. # This is of course entirely optional. @{ Description = 'This role does things' Tag = 'Dsc','Domainjoined','Awesome' } ```
/content/code_sandbox/LabSources/CustomRoles/DemoCustomRole/DemoCustomRole.psd1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
47
```powershell Param ( [Parameter(Mandatory)] [String]$ComputerName, [Parameter(Mandatory)] [String]$CMBinariesDirectory, [Parameter(Mandatory)] [String]$CMPreReqsDirectory, [Parameter(Mandatory)] [String]$CMSiteCode, [Parameter(Mandatory)] [String]$CMSiteName, [Paramete...
/content/code_sandbox/LabSources/CustomRoles/CM-1902/Invoke-InstallCM.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
8,918
```powershell param ( [Parameter(Mandatory)] [string] $ComputerName, [Parameter(ParameterSetName = 'PackageList')] [string[]] $Package, [Parameter(ParameterSetName = 'PackagePath')] [string] $PackagePath, [Parameter(ParameterSetName = 'PackageList')] [string] ...
/content/code_sandbox/LabSources/CustomRoles/NuGetServer/HostStart.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
1,219
```powershell param( [Parameter(Mandatory)] [string]$ComputerName, [string]$OrganizationName, [ValidateSet('True', 'False')] [string]$AddAdRightsInRootDomain, [ValidateSet('True', 'False')] [string]$PrepareSchema, [ValidateSet('True', 'False')] [string]$PrepareAD, [ValidateS...
/content/code_sandbox/LabSources/CustomRoles/Exchange2013/HostStart.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
5,139
```asp <%@ Page Language="C#" %> <%@ Import Namespace="NuGet.Server" %> <%@ Import Namespace="NuGet.Server.App_Start" %> <%@ Import Namespace="NuGet.Server.Infrastructure" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "path_to_url"> <html xmlns="path_to_url"> <head id="Head1" runat="server"> <t...
/content/code_sandbox/LabSources/CustomRoles/NuGetServer/AutomatedLab.Feed/AutomatedLab.Feed/Default.aspx
asp
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
563
```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/LabSources/CustomRoles/NuGetServer/AutomatedLab.Feed/AutomatedLab.Feed/Properties/AssemblyInfo.cs
smalltalk
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
272
```smalltalk using System.Net.Http; using System.Web.Http; using System.Web.Http.ExceptionHandling; using System.Web.Http.Routing; using NuGet.Server; using NuGet.Server.Infrastructure; using NuGet.Server.V2; [assembly: WebActivatorEx.PreApplicationStartMethod(typeof(AutomatedLab.Feed.App_Start.NuGetODataConfig), "Sta...
/content/code_sandbox/LabSources/CustomRoles/NuGetServer/AutomatedLab.Feed/AutomatedLab.Feed/App_Start/NuGetODataConfig.cs
smalltalk
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
279
```powershell param( [Parameter(Mandatory)] [string]$ProGetDownloadLink, [Parameter(Mandatory)] [string]$SqlServer, [Parameter(Mandatory)] [string]$ComputerName ) Import-Lab -Name $data.Name -NoValidation -NoDisplay $proGetServer = Get-LabVM -ComputerName $ComputerName $flatDomainName = $proG...
/content/code_sandbox/LabSources/CustomRoles/ProGet5/HostStart.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
1,853
```powershell param( [Parameter(Mandatory)] [string] $ComputerName, [string] $Repository = 'PSGallery', [string] $LabSourcesDrive = 'C', [ValidateSet('yes', 'no')] $TelemetryOptIn = 'no' ) if (-not (Get-Lab -ErrorAction SilentlyContinue)) { Import-Lab -Name $data.Name -NoDisp...
/content/code_sandbox/LabSources/CustomRoles/LabBuilder/HostStart.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
2,241
```powershell Param ( [Parameter(Mandatory)] [String]$CMBinariesDirectory, [Parameter(Mandatory)] [String]$CMPreReqsDirectory, [Parameter(Mandatory)] [String]$CMDownloadURL, [Parameter(Mandatory)] [String]$Branch ) Write-ScreenInfo -Message "Starting Configuration Manager and prerequ...
/content/code_sandbox/LabSources/CustomRoles/CM-2103/Invoke-DownloadCM.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
1,174
```powershell Param ( [Parameter()] [String]$DoNotDownloadWMIEv2 ) $DoNotDownloadWMIEv2 = [Convert]::ToBoolean($DoNotDownloadWMIEv2) Write-ScreenInfo -Message "Starting miscellaneous items download process" -TaskStart #region Download Microsoft SQL Server 2012 Native Client QFE # path_to_url Write-ScreenInfo...
/content/code_sandbox/LabSources/CustomRoles/CM-2103/Invoke-DownloadMisc.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
807
```powershell Import-Module -Name Pode Start-PodeServer { Add-PodeEndpoint -Address 127.0.0.1 -Protocol Http New-PodeLoggingMethod -File -Path C:\LabBuilder -Name AlCapode_success | Enable-PodeRequestLogging New-PodeLoggingMethod -File -Path C:\LabBuilder -Name AlCapode_error | Enable-PodeErrorLogging ...
/content/code_sandbox/LabSources/CustomRoles/LabBuilder/server.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
2,547
```powershell Param ( [Parameter(Mandatory)] [String]$ComputerName, [Parameter(Mandatory)] [String]$LogViewer ) #region Define functions function New-Shortcut { Param ( [Parameter(Mandatory=$true)] [String]$Target, [Parameter(Mandatory=$false)] [String]$TargetArgu...
/content/code_sandbox/LabSources/CustomRoles/CM-2103/Invoke-CustomiseCM.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
2,877
```powershell Param ( [Parameter(Mandatory)] [String]$ComputerName, [Parameter(Mandatory)] [String]$CMSiteCode, [Parameter(Mandatory)] [String]$CMSiteName, [Parameter(Mandatory)] [ValidatePattern('^EVAL$|^\w{5}-\w{5}-\w{5}-\w{5}-\w{5}$', Options = 'IgnoreCase')] [String]$...
/content/code_sandbox/LabSources/CustomRoles/CM-2103/HostStart.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
2,925
```powershell Param ( [Parameter(Mandatory)] [String]$AdkDownloadURL, [Parameter(Mandatory)] [String]$AdkDownloadPath, [Parameter(Mandatory)] [String]$WinPEDownloadURL, [Parameter(Mandatory)] [String]$WinPEDownloadPath ) Write-ScreenInfo -Message "Starting ADK and WinPE download proc...
/content/code_sandbox/LabSources/CustomRoles/CM-2103/Invoke-DownloadADK.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
1,265
```powershell Param ( [Parameter(Mandatory)] [String]$ComputerName, [Parameter(Mandatory)] [String]$CMSiteCode, [Parameter(Mandatory)] [String]$Version ) #region Define functions function Update-CMSite { [CmdletBinding()] Param ( [Parameter(Mandatory)] [String]$CMSit...
/content/code_sandbox/LabSources/CustomRoles/CM-2103/Invoke-UpdateCM.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
4,131
```powershell param( [Parameter(Mandatory)] [string]$DeploymentFolder, [Parameter(Mandatory)] [string]$DeploymentShare, [Parameter(Mandatory)] [string]$InstallUserID, [Parameter(Mandatory)] [string]$InstallPassword, [Parameter(Mandatory)] [string]$ComputerName, [Para...
/content/code_sandbox/LabSources/CustomRoles/MDT/HostStart.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
374
```powershell param ( [Parameter(Mandatory)] [String]$ComputerName, [Parameter(Mandatory)] [String]$CMBinariesDirectory, [Parameter(Mandatory)] [String]$CMPreReqsDirectory, [Parameter(Mandatory)] [String]$CMSiteCode, [Parameter(Mandatory)] [String]$CMSiteName, [Paramete...
/content/code_sandbox/LabSources/CustomRoles/CM-2103/Invoke-InstallCM.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
10,301
```powershell param( [Parameter(Mandatory)] [string]$AdkDownloadUrl, [Parameter(Mandatory)] [string]$AdkDownloadPath, [Parameter(Mandatory)] [string]$AdkWinPeDownloadUrl ) $adkSetup = Get-LabInternetFile -Uri $AdkDownloadUrl -Path $labSources\SoftwarePackages -PassThru if (-not (Test-Path -P...
/content/code_sandbox/LabSources/CustomRoles/MDT/DownloadAdk.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
419
```powershell param ( [Parameter(Mandatory)] [string] $ComputerName ) $lab = Get-Lab $vm = Get-LabVm -ComputerName $ComputerName $cert = 'none' if (Get-LabVm -Role CaRoot) { $sans = @( $ComputerName ) if ($lab.DefaultVirtualizationEngine -eq 'Azure') { $sans += $vm.AzureCon...
/content/code_sandbox/LabSources/CustomRoles/PowerShellWebAccess/HostStart.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
578
```powershell <# Author: Glenn Corbett @glennjc Contributors: @randree Updated: 23/12/2018 #> param( [Parameter(Mandatory)] [string]$DeploymentFolder, [Parameter(Mandatory)] [string]$DeploymentShare, [Parameter(Mandatory)] [string]$InstallUserID, [Parameter(Ma...
/content/code_sandbox/LabSources/CustomRoles/MDT/InstallMDT.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
6,766
```powershell param( [Parameter(Mandatory)] [string]$ComputerName, [Parameter(Mandatory)] [string]$SccmSiteCode, [Parameter(Mandatory)] [string]$SccmBinariesDirectory, [Parameter(Mandatory)] [string]$SccmPreReqsDirectory, [Parameter(Mandatory)] [string]$AdkDownloadPath, ...
/content/code_sandbox/LabSources/CustomRoles/SCCM/HostStart.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
445
```powershell param( [Parameter(Mandatory)] [string]$ComputerName, [string]$OrganizationName ) function Download-ExchangeSources { Write-ScreenInfo -Message 'Download Exchange 2016 requirements' -TaskStart $downloadTargetFolder = "$labSources\ISOs" Write-ScreenInfo -Message "Downloading Excha...
/content/code_sandbox/LabSources/CustomRoles/Exchange2016/HostStart.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
3,538
```powershell param( [Parameter(Mandatory)] [string]$SccmBinariesDirectory, [Parameter(Mandatory)] [string]$SccmPreReqsDirectory ) $sccm1702Url = 'path_to_url $sccmSetup = Get-LabInternetFile -Uri $sccm1702Url -Path $labSources\SoftwarePackages -PassThru if (-not (Test-Path -Path $SccmBinariesDirecto...
/content/code_sandbox/LabSources/CustomRoles/SCCM/DownloadSccm.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
435
```powershell <# .SYNOPSIS Install a functional SCCM Primary Site using the Automated-Lab tookit with SCCM being installed using the "CustomRoles" approach .DESCRIPTION Long description .EXAMPLE PS C:\> <example usage> Explanation of what the example does ...
/content/code_sandbox/LabSources/CustomRoles/SCCM/InstallSCCM.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
3,196
```powershell param( [Parameter(Mandatory)] [string]$AdkDownloadPath ) $windowsAdkUrl = 'path_to_url $adkSetup = Get-LabInternetFile -Uri $windowsAdkUrl -Path $labSources\SoftwarePackages -PassThru if (-not (Test-Path -Path $AdkDownloadPath)) { $p = Start-Process -FilePath $adkSetup.FullName -ArgumentList...
/content/code_sandbox/LabSources/CustomRoles/SCCM/DownloadAdk.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
205
```powershell Param ( [Parameter(Mandatory)] [String]$ComputerName, [Parameter(Mandatory)] [String]$CMSiteCode, [Parameter(Mandatory)] [String]$CMSiteName, [Parameter(Mandatory)] [ValidatePattern('^EVAL$|^\w{5}-\w{5}-\w{5}-\w{5}-\w{5}$', Options = 'IgnoreCase')] [String]$...
/content/code_sandbox/LabSources/CustomRoles/CM-2002/HostStart.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
2,910
```powershell Param ( [Parameter(Mandatory)] [String]$ComputerName, [Parameter(Mandatory)] [String]$LogViewer ) #region Define functions function New-Shortcut { Param ( [Parameter(Mandatory=$true)] [String]$Target, [Parameter(Mandatory=$false)] [String]$TargetArgu...
/content/code_sandbox/LabSources/CustomRoles/CM-2002/Invoke-CustomiseCM.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
2,862
```powershell Param ( [Parameter(Mandatory)] [String]$ComputerName, [Parameter(Mandatory)] [String]$CMSiteCode, [Parameter(Mandatory)] [String]$Version ) #region Define functions function Update-CMSite { [CmdletBinding()] Param ( [Parameter(Mandatory)] [String]$CMSit...
/content/code_sandbox/LabSources/CustomRoles/CM-2002/Invoke-UpdateCM.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
4,119
```powershell param ( [Parameter(Mandatory)] [string] $ComputerName, [Parameter()] [string] $WacDownloadLink = 'path_to_url [Parameter()] [uint16] $Port = 443, [bool] $EnableDevMode ) $lab = Import-Lab -Name $data.Name -NoValidation -NoDisplay -PassThru if (-not $lab) { ...
/content/code_sandbox/LabSources/CustomRoles/WindowsAdminCenter/HostStart.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
1,299
```powershell Param ( [Parameter(Mandatory)] [String]$ComputerName, [Parameter(Mandatory)] [String]$CMBinariesDirectory, [Parameter(Mandatory)] [String]$CMPreReqsDirectory, [Parameter(Mandatory)] [String]$CMSiteCode, [Parameter(Mandatory)] [String]$CMSiteName, [Paramete...
/content/code_sandbox/LabSources/CustomRoles/CM-2002/Invoke-InstallCM.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
10,285
```powershell @{ RootModule = 'AutomatedLabDefinition.psm1' ModuleVersion = '1.0.0' CompatiblePSEditions = 'Core', 'Desktop' GUID = 'e85df8ec-4ce6-4ecc-9720-1d08e14f27ad' Author = 'Raimund Andree, Per Pedersen, Jan-Hendrik Peters' Com...
/content/code_sandbox/AutomatedLabDefinition/AutomatedLabDefinition.psd1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
564
```powershell function Get-LabVirtualNetwork { [cmdletBinding(DefaultParameterSetName = 'ByName')] param ( [Parameter(ParameterSetName = 'ByName')] [string]$Name, [Parameter(ParameterSetName = 'All')] [switch]$All ) $virtualnetworks = @() $lab = Get-Lab -ErrorAction...
/content/code_sandbox/AutomatedLabDefinition/functions/Core/Get-LabVirtualNetwork.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
351
```powershell function Add-LabDiskDefinition { [CmdletBinding()] [OutputType([AutomatedLab.Disk])] param ( [Parameter(Mandatory, ValueFromPipelineByPropertyName)] [ValidateScript( { $doesAlreadyExist = Test-Path -Path $_ if ($doesAlreadyExist) ...
/content/code_sandbox/AutomatedLabDefinition/functions/Core/Add-LabDiskDefinition.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
552
```powershell function Get-LabDomainDefinition { Write-LogFunctionEntry return $script:lab.Domains Write-LogFunctionExit } ```
/content/code_sandbox/AutomatedLabDefinition/functions/Core/Get-LabDomainDefinition.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
33
```powershell function Add-LabMachineDefinition { [CmdletBinding(DefaultParameterSetName = 'Network')] [OutputType([AutomatedLab.Machine])] param ( [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true)] [ValidatePattern("^([\'\""a-zA-Z0-9-]){1,15}$")] [string]$Na...
/content/code_sandbox/AutomatedLabDefinition/functions/Core/Add-LabMachineDefinition.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
10,691
```powershell function Get-LabMachineRoleDefinition { [CmdletBinding()] param ( [Parameter(Mandatory)] [AutomatedLab.Roles] $Role, [hashtable] $Properties, [switch] $Syntax ) $roleObjects = @() $availableRoles = [Enum]::GetNames([AutomatedLa...
/content/code_sandbox/AutomatedLabDefinition/functions/Core/Get-LabMachineRoleDefinition.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
312
```powershell function Remove-LabDomainDefinition { [CmdletBinding()] param ( [Parameter(Mandatory)] [string]$Name ) Write-LogFunctionEntry $domain = $script:lab.Domains | Where-Object { $_.Name -eq $Name } if (-not $domain) { Write-ScreenInfo "There is no domain d...
/content/code_sandbox/AutomatedLabDefinition/functions/Core/Remove-LabDomainDefinition.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
150
```powershell function Get-LabAvailableAddresseSpace { $defaultAddressSpace = Get-LabConfigurationItem -Name DefaultAddressSpace if (-not $defaultAddressSpace) { Write-Error 'Could not get the PrivateData value DefaultAddressSpace. Cannot find an available address space.' return } ...
/content/code_sandbox/AutomatedLabDefinition/functions/Core/Get-LabAvailableAddresseSpace.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
518
```powershell function Get-LabInstallationActivity { [CmdletBinding()] param ( [Parameter(Mandatory, ParameterSetName = 'FileContentDependencyRemoteScript')] [Parameter(Mandatory, ParameterSetName = 'FileContentDependencyLocalScript')] [string]$DependencyFolder, [Parameter(Manda...
/content/code_sandbox/AutomatedLabDefinition/functions/Core/Get-LabInstallationActivity.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
1,387
```powershell function Add-LabIsoImageDefinition { [CmdletBinding()] param ( [string]$Name, [string]$Path, [Switch]$IsOperatingSystem, [switch]$NoDisplay ) Write-LogFunctionEntry if ($IsOperatingSystem) { Write-ScreenInfo -Message 'The -IsOperatingSy...
/content/code_sandbox/AutomatedLabDefinition/functions/Core/Add-LabIsoImageDefinition.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
1,867
```powershell function Add-LabDomainDefinition { [CmdletBinding()] param ( [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true)] [string]$Name, [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true)] [string]$AdminUser, [Parameter(Manda...
/content/code_sandbox/AutomatedLabDefinition/functions/Core/Add-LabDomainDefinition.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
296
```powershell function Export-LabDefinition { [CmdletBinding()] param ( [switch] $Force, [switch] $ExportDefaultUnattendedXml = $true, [switch] $Silent ) Write-LogFunctionEntry if (Get-LabMachineDefinition | Where-Object HostType -eq 'HyperV') ...
/content/code_sandbox/AutomatedLabDefinition/functions/Core/Export-LabDefinition.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
3,101
```powershell function Set-LabDefinition { param ( [AutomatedLab.Lab] $Lab, [AutomatedLab.Machine[]] $Machines, [AutomatedLab.Disk[]] $Disks ) if ($Lab) { $script:lab = $Lab } if ($Machines) { if (-not $script:machines) ...
/content/code_sandbox/AutomatedLabDefinition/functions/Core/Set-LabDefinition.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
181
```powershell function Import-LabDefinition { [CmdletBinding(DefaultParameterSetName = 'ByName')] param ( [Parameter(Mandatory, ParameterSetName = 'ByPath', Position = 1)] [string]$Path, [Parameter(Mandatory, ParameterSetName = 'ByName', Position = 1)] [string]$Name, [s...
/content/code_sandbox/AutomatedLabDefinition/functions/Core/Import-LabDefinition.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
1,746
```powershell function Get-LabIsoImageDefinition { Write-LogFunctionEntry $script:lab.Sources.ISOs Write-LogFunctionExit } ```
/content/code_sandbox/AutomatedLabDefinition/functions/Core/Get-LabIsoImageDefinition.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
35
```powershell function Get-LabVolumesOnPhysicalDisks { [CmdletBinding()] $physicalDisks = Get-PhysicalDisk $disks = Get-CimInstance -Class Win32_DiskDrive $labVolumes = foreach ($disk in $disks) { $query = 'ASSOCIATORS OF {{Win32_DiskDrive.DeviceID="{0}"}} WHERE AssocClass=Win32_DiskDriveT...
/content/code_sandbox/AutomatedLabDefinition/functions/Core/Get-LabVolumesOnPhysicalDisks.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
332
```powershell function Get-LabMachineDefinition { [CmdletBinding(DefaultParameterSetName = 'ByName')] [OutputType([AutomatedLab.Machine])] param ( [Parameter(Position = 0, ParameterSetName = 'ByName', ValueFromPipeline, ValueFromPipelineByPropertyName)] [ValidateNotNullOrEmpty()] [s...
/content/code_sandbox/AutomatedLabDefinition/functions/Core/Get-LabMachineDefinition.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
395
```powershell function Remove-LabMachineDefinition { [CmdletBinding()] param ( [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true)] [string]$Name ) Write-LogFunctionEntry $machine = $script:machines | Where-Object Name -eq $Name if (-not $machine) { ...
/content/code_sandbox/AutomatedLabDefinition/functions/Core/Remove-LabMachineDefinition.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
153
```powershell function Repair-LabDuplicateIpAddresses { [CmdletBinding()] param ( ) foreach ($machine in (Get-LabMachineDefinition)) { foreach ($adapter in $machine.NetworkAdapters) { foreach ($ipAddress in $adapter.Ipv4Address | Where-Object { $_.IPAddress.IsAutoGenerated }...
/content/code_sandbox/AutomatedLabDefinition/functions/Core/Repair-LabDuplicateIpAddresses.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
188
```powershell function Remove-LabIsoImageDefinition { [CmdletBinding()] param ( [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true)] [string]$Name ) Write-LogFunctionEntry $iso = $script:lab.Sources.ISOs | Where-Object -FilterScript { $_.Name -eq $Name ...
/content/code_sandbox/AutomatedLabDefinition/functions/Core/Remove-LabIsoImageDefinition.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
178
```powershell function Get-LabDefinition { [CmdletBinding()] [OutputType([AutomatedLab.Lab])] param () Write-LogFunctionEntry return $script:lab Write-LogFunctionExit } ```
/content/code_sandbox/AutomatedLabDefinition/functions/Core/Get-LabDefinition.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
50
```powershell function Set-LabLocalVirtualMachineDiskAuto { [CmdletBinding()] param ( [int64] $SpaceNeeded ) $type = Get-Type -GenericType AutomatedLab.ListXmlStore -T AutomatedLab.LocalDisk $drives = New-Object $type #read the cache try { if ($IsLinux -or $...
/content/code_sandbox/AutomatedLabDefinition/functions/Core/Set-LabLocalVirtualMachineDiskAuto.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
1,586
```powershell function Get-DiskSpeed { [CmdletBinding()] param ( [ValidatePattern('[a-zA-Z]')] [Parameter(Mandatory)] [string]$DriveLetter, [ValidateRange(1, 50)] [int]$Interations = 1 ) Write-LogFunctionEntry if (-not $labSources) { $labSources...
/content/code_sandbox/AutomatedLabDefinition/functions/Core/Get-DiskSpeed.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
419
```powershell function Test-LabDefinition { [CmdletBinding()] param ( [string]$Path, [switch]$Quiet ) Write-LogFunctionEntry $lab = Get-LabDefinition if (-not $lab) { $lab = Get-Lab -ErrorAction SilentlyContinue } if (-not $lab -and -not $Path) { ...
/content/code_sandbox/AutomatedLabDefinition/functions/Core/Test-LabDefinition.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
1,158
```powershell function Get-LabAzureWebAppDefinition { [CmdletBinding(DefaultParameterSetName = 'All')] [OutputType([AutomatedLab.Azure.AzureRmService])] param ( [Parameter(Position = 0, ParameterSetName = 'ByName', ValueFromPipeline, ValueFromPipelineByPropertyName)] [string[]]$Name ...
/content/code_sandbox/AutomatedLabDefinition/functions/AzureServices/Get-LabAzureWebAppDefinition.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
214
```powershell function Get-LabAzureAppServicePlanDefinition { [CmdletBinding(DefaultParameterSetName = 'All')] [OutputType([AutomatedLab.Azure.AzureRmServerFarmWithRichSku])] param ( [Parameter(Position = 0, ParameterSetName = 'ByName', ValueFromPipeline, ValueFromPipelineByPropertyName)] ...
/content/code_sandbox/AutomatedLabDefinition/functions/AzureServices/Get-LabAzureAppServicePlanDefinition.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
223
```powershell function Add-LabAzureAppServicePlanDefinition { [CmdletBinding()] [OutputType([AutomatedLab.Azure.AzureRmService])] param ( [Parameter(Mandatory)] [string]$Name, [string]$ResourceGroup, [string]$Location, [ValidateSet('Basic', 'Free', 'Premium', 'Sh...
/content/code_sandbox/AutomatedLabDefinition/functions/AzureServices/Add-LabAzureAppServicePlanDefinition.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
363
```powershell function Add-LabAzureWebAppDefinition { [CmdletBinding()] [OutputType([AutomatedLab.Azure.AzureRmService])] param ( [Parameter(Mandatory)] [string]$Name, [string]$ResourceGroup, [string]$Location, [string]$AppServicePlan, [switch]$PassThru ...
/content/code_sandbox/AutomatedLabDefinition/functions/AzureServices/Add-LabAzureWebAppDefinition.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
382
```powershell function New-LabDefinition { [CmdletBinding()] param ( [string]$Name, [string]$VmPath = (Get-LabConfigurationItem -Name VmPath), [int]$ReferenceDiskSizeInGB = 50, [long]$MaxMemory = 0, [hashtable]$Notes, [switch]$UseAllMemory = $false, ...
/content/code_sandbox/AutomatedLabDefinition/functions/Core/New-LabDefinition.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
2,232
```powershell function Remove-LabVirtualNetworkDefinition { [CmdletBinding()] param ( [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true)] [string[]]$Name ) Write-LogFunctionEntry foreach ($n in $Name) { $network = $script:lab.VirtualNetworks | Wher...
/content/code_sandbox/AutomatedLabDefinition/functions/Network/Remove-LabVirtualNetworkDefinition.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
176
```powershell function Get-LabVirtualNetworkDefinition { [CmdletBinding()] [OutputType([AutomatedLab.VirtualNetwork])] param( [Parameter(ParameterSetName = 'ByName')] [string]$Name, [Parameter(Mandatory, ParameterSetName = 'ByAddressSpace')] [string]$AddressSpace ) ...
/content/code_sandbox/AutomatedLabDefinition/functions/Network/Get-LabVirtualNetworkDefinition.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
193
```powershell function New-LabNetworkAdapterDefinition { [CmdletBinding(DefaultParameterSetName = 'manual')] param ( [Parameter(Mandatory)] [string]$VirtualSwitch, [string]$InterfaceName, [Parameter(ParameterSetName = 'dhcp')] [switch]$UseDhcp, [Parameter(Param...
/content/code_sandbox/AutomatedLabDefinition/functions/Network/New-LabNetworkAdapterDefinition.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
1,407
```powershell function Get-LabFreeDiskSpace { param( [Parameter(Mandatory)] [string]$Path ) [uint64]$freeBytesAvailable = 0 [uint64]$totalNumberOfBytes = 0 [uint64]$totalNumberOfFreeBytes = 0 $success = [AutomatedLab.DiskSpaceWin32]::GetDiskFreeSpaceEx($Path, [ref]$freeBytesAva...
/content/code_sandbox/AutomatedLabDefinition/internal/functions/Get-LabFreeDiskSpace.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
184
```powershell function Get-OnlineAdapterHardwareAddress { [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseCompatibleCmdlets", "", Justification="Special handling for Linux")] [OutputType([string[]])] [CmdletBinding()] param ( ) if ($IsLinux) { ip link show up | ForEach-Object {...
/content/code_sandbox/AutomatedLabDefinition/internal/functions/Get-OnlineAdapterHardwareAddress.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
165
```powershell function Add-LabVirtualNetworkDefinition { [CmdletBinding()] param ( [string]$Name = (Get-LabDefinition).Name, [AllowNull()] [AutomatedLab.IPNetwork]$AddressSpace, [AutomatedLab.VirtualizationHost]$VirtualizationEngine, [hashtable[]]$HyperVProperties, ...
/content/code_sandbox/AutomatedLabDefinition/functions/Network/Add-LabVirtualNetworkDefinition.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
1,560
```powershell @{ RootModule = 'AutomatedLabTest.psm1' ModuleVersion = '1.0.0' CompatiblePSEditions = 'Core', 'Desktop' GUID = '16580260-aab3-4f4c-a7ca-75cd310e4f0b' Author = 'Raimund Andree, Per Pedersen', 'Jan-Hendrik Peters' Company...
/content/code_sandbox/AutomatedLabTest/AutomatedLabTest.psd1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
289
```powershell Describe "[$($Lab.Name)] SCVMM2016" -Tag SCVMM2016 { Context "Role deployment successful" { It "[SCVMM2016] Should return the correct amount of machines" { (Get-LabVm -Role SCVMM2016).Count | Should -Be $(Get-Lab).Machines.Where({$_.Roles.Name -contains 'SCVMM2016'}).Count } ...
/content/code_sandbox/AutomatedLabTest/tests/SCVMM2016.tests.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
274