text
stringlengths
9
39.2M
dir
stringlengths
25
226
lang
stringclasses
163 values
created_date
timestamp[s]
updated_date
timestamp[s]
repo_name
stringclasses
751 values
repo_full_name
stringclasses
752 values
star
int64
1.01k
183k
len_tokens
int64
1
18.5M
```powershell function Install-LabAdfs { [CmdletBinding()] param () Write-LogFunctionEntry Write-ScreenInfo -Message 'Configuring ADFS roles...' if (-not (Get-LabVM)) { Write-ScreenInfo -Message 'No machine definitions imported, so there is nothing to do. Please use Import-Lab first' ...
/content/code_sandbox/AutomatedLabCore/functions/ADFS/Install-LabAdfs.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
1,882
```powershell function Enter-LabPSSession { param ( [Parameter(Mandatory, ParameterSetName = 'ByName', Position = 0)] [string]$ComputerName, [Parameter(Mandatory, ParameterSetName = 'ByMachine', Position = 0)] [AutomatedLab.Machine]$Machine, [switch]$DoNotUseCredSsp, ...
/content/code_sandbox/AutomatedLabCore/functions/Remoting/Enter-LabPSSession.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
204
```powershell function Install-LabConfigurationManager { [CmdletBinding()] param () $vms = Get-LabVm -Role ConfigurationManager Start-LabVm -Role ConfigurationManager -Wait #region Prereq: ADK, CM binaries, stuff Write-ScreenInfo -Message "Installing Prerequisites on $($vms.Count) machines" ...
/content/code_sandbox/AutomatedLabCore/functions/ConfigurationManager/Install-LabConfigurationManager.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
2,968
```powershell function Remove-LabCimSession { [CmdletBinding()] param ( [Parameter(Mandatory, ParameterSetName = 'ByName')] [string[]] $ComputerName, [Parameter(Mandatory, ParameterSetName = 'ByMachine')] [AutomatedLab.Machine[]] $Machine, [Parameter(Par...
/content/code_sandbox/AutomatedLabCore/functions/Remoting/Remove-LabCimSession.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
448
```powershell function UnInstall-LabSshKnownHost { [CmdletBinding()] param ( ) if (-not (Test-Path -Path $home/.ssh/known_hosts)) { return } $lab = Get-Lab if (-not $lab) { return } $machines = Get-LabVM -All -IncludeLinux | Where-Object -FilterScript { -not $_.SkipDeployment } if (-not $...
/content/code_sandbox/AutomatedLabCore/functions/Remoting/UnInstall-LabSshKnownHost.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
292
```powershell function Get-LabCimSession { [CmdletBinding()] [OutputType([Microsoft.Management.Infrastructure.CimSession])] param ( [string[]] $ComputerName, [switch] $DoNotUseCredSsp ) $pattern = '\w+_[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}...
/content/code_sandbox/AutomatedLabCore/functions/Remoting/Get-LabCimSession.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
296
```powershell function Remove-LabPSSession { [cmdletBinding()] param ( [Parameter(Mandatory, ParameterSetName = 'ByName')] [string[]]$ComputerName, [Parameter(Mandatory, ParameterSetName = 'ByMachine')] [AutomatedLab.Machine[]]$Machine, [Parameter(ParameterSetName = 'Al...
/content/code_sandbox/AutomatedLabCore/functions/Remoting/Remove-LabPSSession.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
625
```powershell function Install-LabRdsCertificate { [CmdletBinding()] param ( ) $lab = Get-Lab if (-not $lab) { return } $machines = Get-LabVM -All | Where-Object -FilterScript { $_.OperatingSystemType -eq 'Windows' -and $_.OperatingSystem.Version -ge 6.3 -and -not $_.SkipDeployment...
/content/code_sandbox/AutomatedLabCore/functions/Remoting/Install-LabRdsCertificate.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
580
```powershell function Get-LabPSSession { [cmdletBinding()] [OutputType([System.Management.Automation.Runspaces.PSSession])] param ( [string[]]$ComputerName, [switch]$DoNotUseCredSsp ) $pattern = '\w+_[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}' ...
/content/code_sandbox/AutomatedLabCore/functions/Remoting/Get-LabPSSession.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
348
```powershell function New-LabPSSession { param ( [Parameter(Mandatory, ParameterSetName = 'ByName', Position = 0)] [string[]]$ComputerName, [Parameter(Mandatory, ParameterSetName = 'ByMachine')] [AutomatedLab.Machine[]]$Machine, #this is used to recreate a broken session ...
/content/code_sandbox/AutomatedLabCore/functions/Remoting/New-LabPSSession.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
3,047
```powershell function Get-LabSshKnownHost { [CmdletBinding()] param () if (-not (Test-Path -Path $home/.ssh/known_hosts)) { return } Get-Content -Path $home/.ssh/known_hosts | ConvertFrom-String -Delimiter ' ' -PropertyNames ComputerName,Cipher,Fingerprint -ErrorAction SilentlyContinue } ```
/content/code_sandbox/AutomatedLabCore/functions/Remoting/Get-LabSshKnownHost.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
80
```powershell function Uninstall-LabRdsCertificate { [CmdletBinding()] param ( ) $lab = Get-Lab if (-not $lab) { return } foreach ($certFile in (Get-ChildItem -File -Path (Join-Path -Path $lab.LabPath -ChildPath Certificates) -Filter *.cer -ErrorAction SilentlyContinue)) { ...
/content/code_sandbox/AutomatedLabCore/functions/Remoting/Uninstall-LabRdsCertificate.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
165
```powershell function New-LabCimSession { [CmdletBinding()] param ( [Parameter(Mandatory, ParameterSetName = 'ByName', Position = 0)] [string[]] $ComputerName, [Parameter(Mandatory, ParameterSetName = 'ByMachine')] [AutomatedLab.Machine[]] $Machine, ...
/content/code_sandbox/AutomatedLabCore/functions/Remoting/New-LabCimSession.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
2,189
```powershell function Invoke-LabCommand { [cmdletBinding()] param ( [string]$ActivityName = '<unnamed>', [Parameter(Mandatory, ParameterSetName = 'ScriptBlockFileContentDependency', Position = 0)] [Parameter(Mandatory, ParameterSetName = 'ScriptFileContentDependency', Position = 0)] ...
/content/code_sandbox/AutomatedLabCore/functions/Remoting/Invoke-LabCommand.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
3,560
```powershell function Reset-AutomatedLab { Remove-Lab -Confirm:$false Remove-Module * } ```
/content/code_sandbox/AutomatedLabCore/functions/Internals/Reset-AutomatedLab.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
24
```powershell function Install-LabSshKnownHost { [CmdletBinding()] param ( ) $lab = Get-Lab if (-not $lab) { return } $machines = Get-LabVM -All -IncludeLinux | Where-Object -FilterScript { -not $_.SkipDeployment } if (-not $machines) { return } if (-not (T...
/content/code_sandbox/AutomatedLabCore/functions/Remoting/Install-LabSshKnownHost.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
1,467
```powershell function Get-LabHyperVAvailableMemory { # .ExternalHelp AutomatedLab.Help.xml if ($IsLinux -or $IsMacOS) { return [int]((Get-Content -Path /proc/meminfo) -replace ':', '=' -replace '\skB' | ConvertFrom-StringData).MemTotal } [int](((Get-CimInstance -Namespace Root\Cimv2 -Class...
/content/code_sandbox/AutomatedLabCore/functions/Internals/Get-LabHyperVAvailableMemory.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
110
```powershell function Enable-LabVMFirewallGroup { [cmdletbinding()] param ( [Parameter(Mandatory)] [string[]]$ComputerName, [Parameter(Mandatory)] [string[]]$FirewallGroup ) Write-LogFunctionEntry $machine = Get-LabVM -ComputerName $ComputerName Invoke-L...
/content/code_sandbox/AutomatedLabCore/functions/Internals/Enable-LabVMFirewallGroup.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
203
```powershell function Update-LabSysinternalsTools { [CmdletBinding()] param ( ) if ($IsLinux -or $IsMacOs) { return } if (Get-LabConfigurationItem -Name SkipSysInternals) {return} #Update SysInternals suite if needed $type = Get-Type -GenericType AutomatedLab.DictionaryXmlStore -T String, Date...
/content/code_sandbox/AutomatedLabCore/functions/Internals/Update-LabSysinternalsTools.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
1,646
```powershell function Disable-LabVMFirewallGroup { [cmdletbinding()] param ( [Parameter(Mandatory)] [string[]]$ComputerName, [Parameter(Mandatory)] [string[]]$FirewallGroup ) Write-LogFunctionEntry $machine = Get-LabVM -ComputerName $ComputerName Invoke-...
/content/code_sandbox/AutomatedLabCore/functions/Internals/Disable-LabVMFirewallGroup.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
203
```powershell function Restart-ServiceResilient { [cmdletbinding()] param ( [string[]]$ComputerName, $ServiceName, [switch]$NoNewLine ) Write-LogFunctionEntry $jobs = Invoke-LabCommand -ComputerName $ComputerName -AsJob -PassThru -NoDisplay -ActivityName "Restart servi...
/content/code_sandbox/AutomatedLabCore/functions/Internals/Restart-ServiceResilient.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
1,585
```powershell function Get-LabInternetFile { param( [Parameter(Mandatory = $true)] [string]$Uri, [Parameter(Mandatory = $true)] [string]$Path, [string]$FileName, [switch]$Force, [switch]$NoDisplay, [switch]$PassThru ) function Get-LabInt...
/content/code_sandbox/AutomatedLabCore/functions/Internals/Get-LabInternetFile.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
2,161
```powershell function Unblock-LabSources { param( [string]$Path = $global:labSources ) Write-LogFunctionEntry $lab = Get-Lab -ErrorAction SilentlyContinue if (-not $lab) { $lab = Get-LabDefinition -ErrorAction SilentlyContinue } if ($lab.DefaultVirtualizationEngine -...
/content/code_sandbox/AutomatedLabCore/functions/Internals/Unblock-LabSources.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
558
```powershell function Remove-LabDeploymentFiles { Invoke-LabCommand -ComputerName (Get-LabVM) -ActivityName 'Remove deployment files (files used during deployment)' -AsJob -NoDisplay -ScriptBlock ` { $paths = 'C:\Unattend.xml', 'C:\WSManRegKey.reg', 'C:\AdditionalDisksOnline.ps...
/content/code_sandbox/AutomatedLabCore/functions/Internals/Remove-LabDeploymentFiles.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
145
```powershell function Register-LabArgumentCompleters { $commands = Get-Command -Module AutomatedLab*, PSFileTransfer | Where-Object { $_.Parameters -and $_.Parameters.ContainsKey('ComputerName') } Register-PSFTeppArgumentCompleter -Command $commands -Parameter ComputerName -Name 'AutomatedLab-ComputerName' } ...
/content/code_sandbox/AutomatedLabCore/functions/Internals/Register-LabArgumentCompleters.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
73
```powershell function Get-LabSourcesLocationInternal { param ( [switch]$Local ) $lab = $global:AL_CurrentLab $defaultEngine = 'HyperV' $defaultEngine = if ($lab) { $lab.DefaultVirtualizationEngine } if ($lab.AzureSettings -and $lab.AzureSettings.IsAzureStack) ...
/content/code_sandbox/AutomatedLabCore/functions/Internals/Get-LabSourcesLocationInternal.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
501
```powershell function Install-LabRemoteDesktopServices { [CmdletBinding()] param ( ) Write-LogFunctionEntry $lab = Get-Lab Start-LabVm -Role RemoteDesktopConnectionBroker, RemoteDesktopGateway, RemoteDesktopLicensing, RemoteDesktopSessionHost, RemoteDesktopVirtualizationHost, RemoteDesktopWebAcc...
/content/code_sandbox/AutomatedLabCore/functions/Rds/Install-LabRemoteDesktopServices.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
2,691
```powershell function Install-LabScom { [CmdletBinding()] param ( ) Write-LogFunctionEntry # defaults $iniManagementServer = @{ ManagementGroupName = 'SCOM2019' SqlServerInstance = '' SqlInstancePort = '1433' DatabaseName ...
/content/code_sandbox/AutomatedLabCore/functions/Scom/Install-LabScom.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
6,661
```powershell function Install-LabFailoverCluster { [CmdletBinding()] param ( ) $failoverNodes = Get-LabVm -Role FailoverNode -ErrorAction SilentlyContinue $clusters = $failoverNodes | Group-Object { ($_.Roles | Where-Object -Property Name -eq 'FailoverNode').Properties['ClusterName'] } $useDiskWit...
/content/code_sandbox/AutomatedLabCore/functions/Failover/Install-LabFailoverCluster.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
2,002
```powershell function Add-LabWacManagedNode { [CmdletBinding()] param ( ) $lab = Get-Lab -ErrorAction SilentlyContinue if (-not $lab) { Write-Error -Message 'Please deploy a lab first.' return } $machines = Get-LabVM -Role WindowsAdminCenter # Add hosts through R...
/content/code_sandbox/AutomatedLabCore/functions/Wac/Add-LabWacManagedNode.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
890
```powershell function Install-LabWindowsAdminCenter { [CmdletBinding()] param ( ) $lab = Get-Lab -ErrorAction SilentlyContinue if (-not $lab) { Write-Error -Message 'Please deploy a lab first.' return } $machines = (Get-LabVM -Role WindowsAdminCenter).Where( { -not $_...
/content/code_sandbox/AutomatedLabCore/functions/Wac/Install-LabWindowsAdminCenter.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
1,115
```powershell function Install-LabSqlSampleDatabases { param ( [Parameter(Mandatory)] [AutomatedLab.Machine] $Machine ) Write-LogFunctionEntry $role = $Machine.Roles | Where-Object Name -like SQLServer* | Sort-Object Name -Descending | Select-Object -First 1 $roleName =...
/content/code_sandbox/AutomatedLabCore/functions/SQL/Install-LabSqlSampleDatabases.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
2,667
```powershell function Get-LabVMDotNetFrameworkVersion { [CmdletBinding()] param( [Parameter(Mandatory)] [string[]]$ComputerName, [switch]$NoDisplay ) Write-LogFunctionEntry $machines = Get-LabVM -ComputerName $ComputerName if (-not $machines) { Write-Erro...
/content/code_sandbox/AutomatedLabCore/functions/VirtualMachines/Get-LabVMDotNetFrameworkVersion.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
165
```powershell function Test-LabMachineInternetConnectivity { [OutputType([bool])] [CmdletBinding()] param ( [Parameter(Mandatory)] [string]$ComputerName, [int]$Count = 3, [switch]$AsJob ) $cmd = { $result = 1..$Count | ForEach-Object { T...
/content/code_sandbox/AutomatedLabCore/functions/VirtualMachines/Test-LabMachineInternetConnectivity.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
368
```powershell function Stop-LabVM { [CmdletBinding()] param ( [Parameter(Mandatory, ParameterSetName = 'ByName', Position = 0, ValueFromPipelineByPropertyName, ValueFromPipeline)] [string[]]$ComputerName, [double]$ShutdownTimeoutInMinutes = (Get-LabConfigurationItem -Name Timeout_StopLa...
/content/code_sandbox/AutomatedLabCore/functions/VirtualMachines/Stop-LabVM.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
1,028
```powershell function Connect-LabVM { param ( [Parameter(Mandatory)] [string[]]$ComputerName, [switch]$UseLocalCredential ) $machines = Get-LabVM -ComputerName $ComputerName -IncludeLinux $lab = Get-Lab foreach ($machine in $machines) { if ($UseLocalCredential...
/content/code_sandbox/AutomatedLabCore/functions/VirtualMachines/Connect-LabVM.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
1,012
```powershell function Wait-LabVMRestart { param ( [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] [string[]]$ComputerName, [switch]$DoNotUseCredSsp, [double]$TimeoutInMinutes = (Get-LabConfigurationItem -Name Timeout_WaitLabMachine_Online),...
/content/code_sandbox/AutomatedLabCore/functions/VirtualMachines/Wait-LabVMRestart.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
760
```powershell function Restart-LabVM { [CmdletBinding()] param ( [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] [string[]]$ComputerName, [switch]$Wait, [double]$ShutdownTimeoutInMinutes = (Get-LabConfigurationItem -Name Timeout_RestartL...
/content/code_sandbox/AutomatedLabCore/functions/VirtualMachines/Restart-LabVM.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
428
```powershell function Test-LabAutoLogon { [OutputType([System.Collections.Hashtable])] [CmdletBinding()] param ( [Parameter(Mandatory)] [string[]] $ComputerName, [switch] $TestInteractiveLogonSession ) Write-PSFMessage -Message "Testing autologon on $($...
/content/code_sandbox/AutomatedLabCore/functions/VirtualMachines/Test-LabAutoLogon.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
969
```powershell function Install-LabSqlServers { [CmdletBinding()] param ( [int]$InstallationTimeout = (Get-LabConfigurationItem -Name Timeout_Sql2012Installation), [switch]$CreateCheckPoints, [ValidateRange(0, 300)] [int]$ProgressIndicator = (Get-LabConfigurationItem -Name Defau...
/content/code_sandbox/AutomatedLabCore/functions/SQL/Install-LabSqlServers.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
7,062
```powershell function Join-LabVMDomain { [CmdletBinding()] param( [Parameter(Mandatory, Position = 0)] [AutomatedLab.Machine[]]$Machine ) Write-LogFunctionEntry #region Join-Computer function Join-Computer { [CmdletBinding()] param( [Parameter(...
/content/code_sandbox/AutomatedLabCore/functions/VirtualMachines/Join-LabVMDomain.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
1,691
```powershell function Get-LabVMRdpFile { [CmdletBinding()] param ( [Parameter(Mandatory, ParameterSetName = 'ByName')] [string[]] $ComputerName, [Parameter()] [switch] $UseLocalCredential, [Parameter(ParameterSetName = 'All')] [switch] ...
/content/code_sandbox/AutomatedLabCore/functions/VirtualMachines/Get-LabVMRdpFile.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
677
```powershell function Get-LabVMUptime { [CmdletBinding()] param ( [Parameter(Mandatory)] [string[]]$ComputerName ) Write-LogFunctionEntry $cmdGetUptime = { if ($IsLinux -or $IsMacOs) { (Get-Date) - [datetime](uptime -s) } else { ...
/content/code_sandbox/AutomatedLabCore/functions/VirtualMachines/Get-LabVMUptime.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
222
```powershell function Get-LabVMStatus { [CmdletBinding()] param ( [string[]]$ComputerName, [switch]$AsHashTable ) Write-LogFunctionEntry #required to suporess verbose messages, warnings and errors Get-CallerPreference -Cmdlet $PSCmdlet -SessionState $ExecutionContext.SessionS...
/content/code_sandbox/AutomatedLabCore/functions/VirtualMachines/Get-LabVMStatus.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
420
```powershell function Disable-LabMachineAutoShutdown { [CmdletBinding()] param ( [string[]] $ComputerName ) $lab = Get-Lab -ErrorAction Stop if ($ComputerName.Count -eq 0) { $ComputerName = Get-LabVm | Where-Object SkipDeployment -eq $false } switch ($lab.D...
/content/code_sandbox/AutomatedLabCore/functions/VirtualMachines/Disable-LabMachineAutoShutdown.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
160
```powershell function Initialize-LabWindowsActivation { [CmdletBinding()] param () Write-LogFunctionEntry $lab = Get-Lab -ErrorAction SilentlyContinue if (-not $lab) { Write-ScreenInfo -Type Warning -Message 'No lab imported, skipping activation' Write-LogFunctionExit ...
/content/code_sandbox/AutomatedLabCore/functions/VirtualMachines/Initialize-LabWindowsActivation.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
511
```powershell function Wait-LabVM { param ( [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] [string[]]$ComputerName, [double]$TimeoutInMinutes = (Get-LabConfigurationItem -Name Timeout_WaitLabMachine_Online), [int]$PostDelaySeconds = 0, ...
/content/code_sandbox/AutomatedLabCore/functions/VirtualMachines/Wait-LabVM.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
2,150
```powershell function Dismount-LabIsoImage { param( [Parameter(Mandatory, Position = 0)] [string[]]$ComputerName, [switch]$SupressOutput ) Write-LogFunctionEntry $machines = Get-LabVM -ComputerName $ComputerName | Where-Object SkipDeployment -eq $false if (-not $machines)...
/content/code_sandbox/AutomatedLabCore/functions/VirtualMachines/Dismount-LabIsoImage.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
386
```powershell function Set-LabVMUacStatus { [CmdletBinding()] param( [Parameter(Mandatory)] [string[]]$ComputerName, [bool]$EnableLUA, [int]$ConsentPromptBehaviorAdmin, [int]$ConsentPromptBehaviorUser, [switch]$PassThru ) Write-LogFunctionEntry $...
/content/code_sandbox/AutomatedLabCore/functions/VirtualMachines/Set-LabVMUacStatus.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
304
```powershell function Get-LabVM { [CmdletBinding(DefaultParameterSetName = 'ByName')] [OutputType([AutomatedLab.Machine])] param ( [Parameter(Position = 0, ParameterSetName = 'ByName', ValueFromPipeline, ValueFromPipelineByPropertyName)] [ValidateNotNullOrEmpty()] [SupportsWildcards...
/content/code_sandbox/AutomatedLabCore/functions/VirtualMachines/Get-LabVM.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
859
```powershell function Remove-LabVM { [CmdletBinding(DefaultParameterSetName='ByName')] param ( [Parameter(Mandatory, ParameterSetName = 'ByName', Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] [Alias('Name')] [string[]]$ComputerName, [Parameter(ParameterSetN...
/content/code_sandbox/AutomatedLabCore/functions/VirtualMachines/Remove-LabVM.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
629
```powershell function Enable-LabMachineAutoShutdown { [CmdletBinding()] param ( [string[]] $ComputerName, [Parameter(Mandatory)] [TimeSpan] $Time, [string] $TimeZone = (Get-TimeZone).Id ) $lab = Get-Lab -ErrorAction Stop if ($ComputerNa...
/content/code_sandbox/AutomatedLabCore/functions/VirtualMachines/Enable-LabMachineAutoShutdown.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
190
```powershell function Enable-LabAutoLogon { [CmdletBinding()] [Alias('Set-LabAutoLogon')] param ( [Parameter()] [string[]] $ComputerName ) Write-PSFMessage -Message "Enabling autologon on $($ComputerName.Count) machines" $machines = Get-LabVm @PSBoundParameters ...
/content/code_sandbox/AutomatedLabCore/functions/VirtualMachines/Enable-LabAutoLogon.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
533
```powershell function Remove-LabVMSnapshot { [CmdletBinding()] param ( [Parameter(Mandatory, ValueFromPipelineByPropertyName, ParameterSetName = 'ByNameAllSnapShots')] [Parameter(Mandatory, ValueFromPipelineByPropertyName, ParameterSetName = 'ByNameSnapshotByName')] [string[]]$ComputerN...
/content/code_sandbox/AutomatedLabCore/functions/VirtualMachines/Remove-LabVMSnapshot.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
538
```powershell function Copy-LabALCommon { [CmdletBinding()] param ( [Parameter(Mandatory)] [string[]] $ComputerName ) $childPath = foreach ($vm in $ComputerName) { Invoke-LabCommand -ScriptBlock { if ($PSEdition -eq 'Core') { ...
/content/code_sandbox/AutomatedLabCore/functions/VirtualMachines/Copy-LabALCommon.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
502
```powershell function Get-LabMachineAutoShutdown { [CmdletBinding()] param ( ) $lab = Get-Lab -ErrorAction Stop switch ($lab.DefaultVirtualizationEngine) { 'Azure' {Get-LWAzureAutoShutdown} 'HyperV' {Write-ScreenInfo -Type Warning -Message "No auto-shutdown on HyperV"} ...
/content/code_sandbox/AutomatedLabCore/functions/VirtualMachines/Get-LabMachineAutoShutdown.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
108
```powershell function Get-LabVMSnapshot { [CmdletBinding()] param ( [Parameter()] [string[]] $ComputerName, [Parameter()] [string] $SnapshotName ) Write-LogFunctionEntry if (-not (Get-LabVM)) { Write-Error 'No machine definitions im...
/content/code_sandbox/AutomatedLabCore/functions/VirtualMachines/Get-LabVMSnapshot.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
357
```powershell function Get-LabVMUacStatus { [CmdletBinding()] param( [Parameter(Mandatory)] [string[]]$ComputerName ) Write-LogFunctionEntry $machines = Get-LabVM -ComputerName $ComputerName if (-not $machines) { Write-Error 'The given machines could not be found' ...
/content/code_sandbox/AutomatedLabCore/functions/VirtualMachines/Get-LabVMUacStatus.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
149
```powershell function Checkpoint-LabVM { [CmdletBinding()] param ( [Parameter(Mandatory, ValueFromPipelineByPropertyName, ParameterSetName = 'ByName')] [string[]]$ComputerName, [Parameter(Mandatory, ValueFromPipelineByPropertyName, ParameterSetName = 'ByName')] [Parameter(Manda...
/content/code_sandbox/AutomatedLabCore/functions/VirtualMachines/Checkpoint-LabVM.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
410
```powershell function Restore-LabVMSnapshot { [CmdletBinding()] param ( [Parameter(Mandatory, ValueFromPipelineByPropertyName, ParameterSetName = 'ByName')] [string[]]$ComputerName, [Parameter(Mandatory, ValueFromPipelineByPropertyName, ParameterSetName = 'ByName')] [Parameter(...
/content/code_sandbox/AutomatedLabCore/functions/VirtualMachines/Restore-LabVMSnapshot.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
416
```powershell function New-LabVM { [CmdletBinding()] param ( [Parameter(Mandatory, ParameterSetName = 'ByName')] [string[]]$Name, [Parameter(ParameterSetName = 'All')] [switch]$All, [switch]$CreateCheckPoints, [int]$ProgressIndicator = 20 ) Write-LogFu...
/content/code_sandbox/AutomatedLabCore/functions/VirtualMachines/New-LabVM.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
1,286
```powershell function Disable-LabAutoLogon { [CmdletBinding()] param ( [Parameter()] [string[]] $ComputerName ) Write-PSFMessage -Message "Disabling autologon on $($ComputerName.Count) machines" $Machines = Get-LabVm @PSBoundParameters Invoke-LabCommand -ActivityN...
/content/code_sandbox/AutomatedLabCore/functions/VirtualMachines/Disable-LabAutoLogon.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
191
```powershell function Wait-LabVMShutdown { param ( [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] [string[]]$ComputerName, [double]$TimeoutInMinutes = (Get-LabConfigurationItem -Name Timeout_WaitLabMachine_Online), [ValidateRange(0, 300)] ...
/content/code_sandbox/AutomatedLabCore/functions/VirtualMachines/Wait-LabVMShutdown.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
532
```powershell function Mount-LabIsoImage { param( [Parameter(Mandatory, Position = 0)] [string[]]$ComputerName, [Parameter(Mandatory, Position = 1)] [string]$IsoPath, [switch]$SupressOutput, [switch]$PassThru ) Write-LogFunctionEntry $machines = Get-L...
/content/code_sandbox/AutomatedLabCore/functions/VirtualMachines/Mount-LabIsoImage.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
416
```powershell function Save-LabVM { [CmdletBinding(DefaultParameterSetName = 'ByName')] param ( [Parameter(Mandatory, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'ByName', Position = 0)] [string[]]$Name, [Parameter(Mandatory, ValueFromPipelineByPropertyName = $true, Para...
/content/code_sandbox/AutomatedLabCore/functions/VirtualMachines/Save-LabVM.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
610
```powershell function Remove-LabDscLocalConfigurationManagerConfiguration { param( [Parameter(Mandatory)] [string[]]$ComputerName ) Write-LogFunctionEntry function Remove-DscLocalConfigurationManagerConfiguration { param( [string[]]$ComputerName = 'localhost' ...
/content/code_sandbox/AutomatedLabCore/functions/Dsc/Remove-LabDscLocalConfigurationManagerConfiguration.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
490
```powershell function Start-LabVM { [CmdletBinding(DefaultParameterSetName = 'ByName')] param ( [Parameter(ParameterSetName = 'ByName', Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] [string[]]$ComputerName, [Parameter(Mandatory, ParameterSetName = 'ByRole')] ...
/content/code_sandbox/AutomatedLabCore/functions/VirtualMachines/Start-LabVM.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
2,718
```powershell function Set-LabDscLocalConfigurationManagerConfiguration { param( [Parameter(Mandatory)] [string[]]$ComputerName, [ValidateSet('ContinueConfiguration', 'StopConfiguration')] [string]$ActionAfterReboot, [string]$CertificateID, [string]$ConfigurationID...
/content/code_sandbox/AutomatedLabCore/functions/Dsc/Set-LabDscLocalConfigurationManagerConfiguration.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
1,746
```powershell function Install-LabDscClient { [CmdletBinding(DefaultParameterSetName = 'ByName')] param( [Parameter(Mandatory, ParameterSetName = 'ByName')] [string[]]$ComputerName, [Parameter(ParameterSetName = 'All')] [switch]$All, [string[]]$PullServer ) if ...
/content/code_sandbox/AutomatedLabCore/functions/Dsc/Install-LabDscClient.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
515
```powershell function Invoke-LabDscConfiguration { [CmdletBinding(DefaultParameterSetName = 'New')] param( [Parameter(Mandatory, ParameterSetName = 'New')] [System.Management.Automation.ConfigurationInfo]$Configuration, [Parameter(Mandatory)] [string[]]$ComputerName, ...
/content/code_sandbox/AutomatedLabCore/functions/Dsc/Invoke-LabDscConfiguration.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
1,833
```powershell ```
/content/code_sandbox/AutomatedLabCore/psfconfig/scriptblocks.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
1
```powershell function Install-ScvmmConsole { [CmdletBinding()] param ( [AutomatedLab.Machine[]] $Computer ) foreach ($vm in $Computer) { $iniConsole = $iniContentConsoleScvmm.Clone() $role = $vm.Roles | Where-Object Name -in Scvmm2016, Scvmm2019, Scvmm2022 ...
/content/code_sandbox/AutomatedLabCore/internal/functions/Install-ScvmmConsole.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
522
```powershell function Install-LabCA { [cmdletBinding()] param ([switch]$CreateCheckPoints) Write-LogFunctionEntry $roles = [AutomatedLab.Roles]::CaRoot -bor [AutomatedLab.Roles]::CaSubordinate $lab = Get-Lab if (-not $lab.Machines) { Write-LogFunctionExitWithError -Message 'No m...
/content/code_sandbox/AutomatedLabCore/internal/functions/Install-LabCA.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
1,633
```powershell function Get-VMUacStatus { [CmdletBinding()] param( [string]$ComputerName = $env:COMPUTERNAME ) $registryPath = 'Software\Microsoft\Windows\CurrentVersion\Policies\System' $uacStatus = $false $openRegistry = [Microsoft.Win32.RegistryKey]::OpenBaseKey([Microsoft.Win32.Regi...
/content/code_sandbox/AutomatedLabCore/internal/functions/Get-VMUacStatus.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
221
```powershell function Update-LabVMWareSettings { if ((Get-PSCallStack).Command -contains 'Import-Lab') { $Script:lab = Get-Lab } elseif ((Get-PSCallStack).Command -contains 'Add-LabVMWareSettings') { $Script:lab = Get-LabDefinition } } ```
/content/code_sandbox/AutomatedLabCore/internal/functions/Update-LabVMWareSettings.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
77
```powershell function Set-LabDefaultToolsPath { [Cmdletbinding()] Param( [Parameter(Mandatory)] [string]$Path ) $Global:labToolsPath = $Path } ```
/content/code_sandbox/AutomatedLabCore/internal/functions/Set-LabDefaultToolsPath.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
45
```powershell function Install-LabDscPullServer { [cmdletBinding()] param ( [int]$InstallationTimeout = 15 ) Write-LogFunctionEntry $online = $true $lab = Get-Lab $roleName = [AutomatedLab.Roles]::DSCPullServer $requiredModules = 'xPSDesiredStateConfiguration', 'xDscDiagnostics...
/content/code_sandbox/AutomatedLabCore/functions/Dsc/Install-LabDscPullServer.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
3,199
```powershell function Add-LabDomainAdmin { param( [Parameter(Mandatory)] [string]$Name, [Parameter(Mandatory)] [System.Security.SecureString]$Password, [string]$ComputerName ) $cmd = { param( [Parameter(Mandatory)] [string]$Name, ...
/content/code_sandbox/AutomatedLabCore/internal/functions/Add-LabDomainAdmin.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
252
```powershell function Send-FtpFolder { param( [Parameter(Mandatory)] [string]$Path, [Parameter(Mandatory)] [string]$DestinationPath, [Parameter(Mandatory)] [string]$HostUrl, [Parameter(Mandatory)] [System.Net.NetworkCredential]$Credential, ...
/content/code_sandbox/AutomatedLabCore/internal/functions/Send-FtpFolder.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
592
```powershell function Install-LabTeamFoundationServer { [CmdletBinding()] param ( ) $tfsMachines = Get-LabVM -Role Tfs2015, Tfs2017, Tfs2018, AzDevOps | Where-Object SkipDeployment -eq $false | Sort-Object { ($_.Roles | Where-Object Name -match 'Tfs\d{4}|AzDevOps').Name } -Descending if (-not $tfs...
/content/code_sandbox/AutomatedLabCore/internal/functions/Install-LabTeamFoundationServer.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
2,354
```powershell function New-LabSqlAccount { param ( [Parameter(Mandatory = $true)] [AutomatedLab.Machine] $Machine, [Parameter(Mandatory = $true)] [hashtable] $RoleProperties ) $usersAndPasswords = @{} $groups = @() if ($RoleProperties.ContainsKey...
/content/code_sandbox/AutomatedLabCore/internal/functions/New-LabSqlAccount.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
2,176
```powershell function Get-LabAzureLabSourcesContentRecursive { [CmdletBinding()] param ( [Parameter(Mandatory)] [object]$StorageContext, # Path relative to labsources file share [string] $Path ) Test-LabHostConnected -Throw -Quiet $content = @() $...
/content/code_sandbox/AutomatedLabCore/internal/functions/Get-LabAzureLabSourcesContentRecursive.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
214
```powershell function Install-VisualStudio2015 { [cmdletBinding()] param ( [int]$InstallationTimeout = (Get-LabConfigurationItem -Name Timeout_VisualStudio2015Installation) ) Write-LogFunctionEntry $roleName = [AutomatedLab.Roles]::VisualStudio2015 if (-not (Get-LabVM)) { ...
/content/code_sandbox/AutomatedLabCore/internal/functions/Install-VisualStudio2015.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
1,081
```powershell function Get-LabCAInstallCertificates { param ( [Parameter(Mandatory, ValueFromPipeline)] [AutomatedLab.Machine[]]$Machines ) begin { Write-LogFunctionEntry if (-not (Test-Path -Path "$((Get-Lab).LabPath)\Certificates")) { New-Item -Pa...
/content/code_sandbox/AutomatedLabCore/internal/functions/Get-LabCAInstallCertificates.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
289
```powershell function Install-LabFailoverStorage { [CmdletBinding()] param ( ) $storageNodes = Get-LabVM -Role FailoverStorage -ErrorAction SilentlyContinue $failoverNodes = Get-LabVM -Role FailoverNode -ErrorAction SilentlyContinue if ($storageNodes.Count -gt 1) { foreach ($failov...
/content/code_sandbox/AutomatedLabCore/internal/functions/Install-LabFailoverStorage.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
1,402
```powershell function Stop-LabVM2 { [CmdletBinding()] param ( [Parameter(Mandatory, ParameterSetName = 'ByName', Position = 0)] [string[]]$ComputerName, [int]$ShutdownTimeoutInMinutes = (Get-LabConfigurationItem -Name Timeout_StopLabMachine_Shutdown) ) $scriptBlock = { ...
/content/code_sandbox/AutomatedLabCore/internal/functions/Stop-LabVM2.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
322
```powershell function Install-CMSite { Param ( [Parameter(Mandatory)] [String]$CMServerName, [Parameter(Mandatory)] [String]$CMBinariesDirectory, [Parameter(Mandatory)] [String]$Branch, [Parameter(Mandatory)] [String]$CMPreReqsDirectory, [...
/content/code_sandbox/AutomatedLabCore/internal/functions/Install-CMSite.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
5,829
```powershell function Send-LabAzureWebAppContent { [OutputType([string])] param ( [Parameter(Mandatory, Position = 0, ParameterSetName = 'ByName', ValueFromPipelineByPropertyName)] [string]$Name, [Parameter(Position = 1, ParameterSetName = 'ByName', ValueFromPipelineByPropertyName)] ...
/content/code_sandbox/AutomatedLabCore/internal/functions/Send-LabAzureWebAppContent.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
247
```powershell function Install-ScvmmServer { [CmdletBinding()] param ( [AutomatedLab.Machine[]] $Computer ) $sqlcmd = Get-LabConfigurationItem -Name SqlCommandLineUtils $adk = Get-LabConfigurationItem -Name WindowsAdk $adkpe = Get-LabConfigurationItem -Name WindowsAdkPe ...
/content/code_sandbox/AutomatedLabCore/internal/functions/Install-ScvmmServer.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
2,716
```powershell function Connect-AzureLab { param ( [Parameter(Mandatory = $true)] [System.String] $SourceLab, [Parameter(Mandatory = $true)] [System.String] $DestinationLab ) Write-LogFunctionEntry Import-Lab $SourceLab -NoValidation $lab = Get-Lab...
/content/code_sandbox/AutomatedLabCore/internal/functions/Connect-AzureLab.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
1,170
```powershell function Mount-LabDiskImage { [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseCompatibleCmdlets", "")] [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingCmdletAliases", "")] [CmdletBinding()] param ( [Parameter(Mandatory)] [string] $ImageP...
/content/code_sandbox/AutomatedLabCore/internal/functions/Mount-LabDiskImage.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
363
```powershell function Install-VisualStudio2013 { [cmdletBinding()] param ( [int]$InstallationTimeout = (Get-LabConfigurationItem -Name Timeout_VisualStudio2013Installation) ) Write-LogFunctionEntry $roleName = [AutomatedLab.Roles]::VisualStudio2013 if (-not (Get-LabVM)) { ...
/content/code_sandbox/AutomatedLabCore/internal/functions/Install-VisualStudio2013.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
995
```powershell function Set-LabVMDescription { [CmdletBinding()] param ( [hashtable]$Hashtable, [string]$ComputerName ) Write-LogFunctionEntry $t = Get-Type -GenericType AutomatedLab.SerializableDictionary -T String, String $d = New-Object $t foreach ($kvp in $Hashtable.G...
/content/code_sandbox/AutomatedLabCore/internal/functions/Set-LabVMDescription.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
205
```powershell function Connect-OnPremisesWithEndpoint { param ( [Parameter(Mandatory = $true)] [System.String] $LabName, [Parameter(Mandatory = $true)] [System.String] $DestinationHost, [Parameter(Mandatory = $true)] [System.String[]] $Addr...
/content/code_sandbox/AutomatedLabCore/internal/functions/Connect-OnPremisesWithEndpoint.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
865
```powershell function Import-CMModule { Param( [String]$ComputerName, [String]$SiteCode ) if (-not(Get-Module ConfigurationManager)) { try { Import-Module ("{0}\..\ConfigurationManager.psd1" -f $ENV:SMS_ADMIN_UI_PATH) -ErrorAction "Stop" -ErrorVariable "Impor...
/content/code_sandbox/AutomatedLabCore/internal/functions/Import-CMModule.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
304
```powershell function Connect-OnPremisesWithAzure { param ( [Parameter(Mandatory = $true)] [System.String] $SourceLab, [Parameter(Mandatory = $true)] [System.String] $DestinationLab, [Parameter(Mandatory = $true)] [System.String[]] $AzureA...
/content/code_sandbox/AutomatedLabCore/internal/functions/Connect-OnPremisesWithAzure.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
2,518
```powershell function Set-LabADDNSServerForwarder { [CmdletBinding()] param ( ) Write-PSFMessage 'Setting DNS fowarder on all domain controllers in root domains' $rootDcs = Get-LabVM -Role RootDC $rootDomains = $rootDcs.DomainName $dcs = Get-LabVM -Role RootDC, DC | Where-Object DomainName ...
/content/code_sandbox/AutomatedLabCore/internal/functions/Set-LabADDNSServerForwarder.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
406
```powershell 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]($GenericType + '`' + $T.Count) $g...
/content/code_sandbox/AutomatedLabCore/internal/functions/Get-Type.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
126
```powershell function Test-FileName { param( [Parameter(Mandatory)] [string]$Path ) $fi = $null try { $fi = New-Object System.IO.FileInfo($Path) } catch [ArgumentException] { } catch [System.IO.PathTooLongException] { } catch [NotSupportedException] { } ...
/content/code_sandbox/AutomatedLabCore/internal/functions/Test-FileName.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
122
```powershell function Install-LabWebServers { [cmdletBinding()] param ([switch]$CreateCheckPoints) Write-LogFunctionEntry $roleName = [AutomatedLab.Roles]::WebServer if (-not (Get-LabVM)) { Write-LogFunctionExitWithError -Message 'No machine definitions imported, so there is nothing ...
/content/code_sandbox/AutomatedLabCore/internal/functions/Install-LabWebServers.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
519