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 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
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 |
```powershell
function Update-LabMemorySettings
{
# Cmdlet is not called on Linux systems
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseCompatibleCmdlets", "")]
[Cmdletbinding()]
Param ()
Write-LogFunctionEntry
$machines = Get-LabVM -All -IncludeLinux | Where-Object SkipDeployment -... | /content/code_sandbox/AutomatedLabCore/internal/functions/Update-LabMemorySettings.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,309 |
```powershell
function Remove-LabAzureWebApp
{
param (
[Parameter(Mandatory, Position = 0, ParameterSetName = 'ByName', ValueFromPipeline, ValueFromPipelineByPropertyName)]
[string[]]$Name,
[Parameter(Mandatory, Position = 1, ValueFromPipeline, ValueFromPipelineByPropertyName)]
[str... | /content/code_sandbox/AutomatedLabCore/internal/functions/Remove-LabAzureWebApp.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 258 |
```powershell
function Remove-LabAzureAppServicePlan
{
param (
[Parameter(Mandatory, Position = 0, ParameterSetName = 'ByName', ValueFromPipeline, ValueFromPipelineByPropertyName)]
[string[]]$Name,
[Parameter(Mandatory, Position = 1, ValueFromPipeline, ValueFromPipelineByPropertyName)]
... | /content/code_sandbox/AutomatedLabCore/internal/functions/Remove-LabAzureAppServicePlan.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 266 |
```powershell
function New-LabADSite
{
[CmdletBinding()]
param
(
[Parameter(Mandatory)]
[string]$ComputerName,
[Parameter(Mandatory)]
[string]$SiteName,
[Parameter(Mandatory)]
[string]$SiteSubnet
)
Write-LogFunctionEntry
$lab = Get-Lab
$mac... | /content/code_sandbox/AutomatedLabCore/internal/functions/New-LabADSite.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 985 |
```powershell
function New-LabAzureCertificate
{
[CmdletBinding()]
param ()
throw New-Object System.NotImplementedException
Write-LogFunctionEntry
Update-LabAzureSettings
$certSubject = "CN=$($Script:lab.Name).cloudapp.net"
$service = Get-LabAzureDefaultResourceGroup
$cert = Get-ChildI... | /content/code_sandbox/AutomatedLabCore/internal/functions/New-LabAzureCertificate.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 358 |
```powershell
function Set-LabBuildWorkerCapability
{
[CmdletBinding()]
param
( )
$buildWorkers = Get-LabVM -Role TfsBuildWorker
if (-not $buildWorkers)
{
return
}
foreach ($machine in $buildWorkers)
{
$role = $machine.Roles | Where-Object Name -eq TfsBuildWorker
... | /content/code_sandbox/AutomatedLabCore/internal/functions/Set-LabBuildWorkerCapability.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 354 |
```powershell
function Install-LabSharePoint
{
[CmdletBinding()]
param
(
[switch]
$CreateCheckPoints
)
Write-LogFunctionEntry
$lab = Get-Lab
if (-not (Get-LabVM))
{
Write-LogFunctionExitWithError -Message 'No machine definitions imported, so there is nothing to... | /content/code_sandbox/AutomatedLabCore/internal/functions/Install-LabSharePoint.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 2,325 |
```powershell
function New-LabSourcesPath
{
[CmdletBinding()]
param
(
[string]
$RelativePath,
[Microsoft.Azure.Storage.File.CloudFileShare]
$Share
)
$container = Split-Path -Path $RelativePath
if (-not $container)
{
New-AzStorageDirectory -Share $Sha... | /content/code_sandbox/AutomatedLabCore/internal/functions/New-LabSourcesPath.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 161 |
```powershell
function Install-LabCAMachine
{
[CmdletBinding()]
param (
[Parameter(Mandatory)]
[AutomatedLab.Machine]$Machine,
[int]$PreDelaySeconds,
[switch]$PassThru
)
Write-LogFunctionEntry
Write-PSFMessage -Message '******************************************... | /content/code_sandbox/AutomatedLabCore/internal/functions/Install-LabCAMachine.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 15,163 |
```powershell
function Get-LabImageOnLinux
{
[CmdletBinding()]
param
(
[Parameter(Mandatory)]
[string]
$MountPoint,
[IO.FileInfo]
$IsoFile
)
$dismPattern = 'Index:\s+(?<Index>\d{1,2})(\r)?\nName:\s+(?<Name>.+)'
$standardImagePath = Join-Path -Path $Mount... | /content/code_sandbox/AutomatedLabCore/internal/functions/Get-LabImageOnLinux.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,674 |
```powershell
function Move-LabDomainController
{
[CmdletBinding()]
param
(
[Parameter(Mandatory)]
[string]$ComputerName,
[Parameter(Mandatory)]
[string]$SiteName
)
Write-LogFunctionEntry
$dcRole = (Get-LabVM -ComputerName $ComputerName).Roles | Where-Object N... | /content/code_sandbox/AutomatedLabCore/internal/functions/Move-LabDomainController.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 521 |
```powershell
function Initialize-GatewayNetwork
{
param
(
[Parameter(Mandatory = $true)]
[AutomatedLab.Lab]
$Lab
)
Write-LogFunctionEntry
Write-PSFMessage -Message ('Creating gateway subnet for lab {0}' -f $Lab.Name)
$targetNetwork = $Lab.VirtualNetworks | Select-Objec... | /content/code_sandbox/AutomatedLabCore/internal/functions/Initialize-GatewayNetwork.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 742 |
```powershell
function Start-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/Start-ShellHWDetectionService.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 329 |
```powershell
function Set-VpnDnsForwarders
{
param
(
[Parameter(Mandatory = $true)]
[System.String]
$SourceLab,
[Parameter(Mandatory = $true)]
[System.String]
$DestinationLab
)
Import-Lab $SourceLab -NoValidation
$sourceDcs = Get-LabVM -Role DC, Root... | /content/code_sandbox/AutomatedLabCore/internal/functions/Set-VpnDnsForwarders.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 535 |
```powershell
function Reset-DNSConfiguration
{
[CmdletBinding()]
param
(
[string[]]$ComputerName,
[int]$ProgressIndicator,
[switch]$NoNewLine
)
Write-LogFunctionEntry
$machines = Get-LabVM -ComputerName $ComputerName
$jobs = @()
foreach ($machine in $machine... | /content/code_sandbox/AutomatedLabCore/internal/functions/Reset-DNSConfiguration.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 361 |
```powershell
function Remove-LabNetworkSwitches
{
[cmdletBinding()]
param (
[switch]$RemoveExternalSwitches
)
$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
}
... | /content/code_sandbox/AutomatedLabCore/internal/functions/Remove-LabNetworkSwitches.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 451 |
```powershell
function Get-LabImageOnWindows
{
[CmdletBinding()]
param
(
[Parameter(Mandatory)]
[char]
$DriveLetter,
[IO.FileInfo]
$IsoFile
)
$dismPattern = 'Index : (?<Index>\d{1,2})(\r)?\nName : (?<Name>.+)'
$standardImagePath = Get-Item -Path "$DriveL... | /content/code_sandbox/AutomatedLabCore/internal/functions/Get-LabImageOnWindows.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 2,431 |
```powershell
function Install-LabOrchestrator2012
{
[cmdletBinding()]
param ()
Write-LogFunctionEntry
#region prepare setup script
function Install-LabPrivateOrchestratorRole
{
param (
[Parameter(Mandatory)]
[string]$OrchServiceUser,
[Parameter(Man... | /content/code_sandbox/AutomatedLabCore/internal/functions/Install-LabOrchestrator2012.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,478 |
```powershell
function Install-LabFileServers
{
[cmdletBinding()]
param ([switch]$CreateCheckPoints)
Write-LogFunctionEntry
$roleName = [AutomatedLab.Roles]::FileServer
if (-not (Get-LabVM))
{
Write-LogFunctionExitWithError -Message 'No machine definitions imported, so there is n... | /content/code_sandbox/AutomatedLabCore/internal/functions/Install-LabFileServers.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 542 |
```powershell
function Test-LabAzureSubscription
{
[CmdletBinding()]
param ( )
Test-LabHostConnected -Throw -Quiet
try
{
$ctx = Get-AzContext
}
catch
{
throw "No Azure Context found, Please run 'Connect-AzAccount' first"
}
}
``` | /content/code_sandbox/AutomatedLabCore/internal/functions/Test-LabAzureSubscription.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 72 |
```powershell
function Get-LabAzureDefaultSubscription
{
[CmdletBinding()]
param ()
Write-LogFunctionEntry
Update-LabAzureSettings
$script:lab.AzureSettings.DefaultSubscription
Write-LogFunctionExit
}
``` | /content/code_sandbox/AutomatedLabCore/internal/functions/Get-LabAzureDefaultSubscription.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 51 |
```powershell
function Dismount-LabDiskImage
{
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseCompatibleCmdlets", "")]
[CmdletBinding()]
param
(
[Parameter(Mandatory)]
[string]
$ImagePath
)
if (Get-Command -Name Dismount-DiskImage -ErrorAction SilentlyContinue)... | /content/code_sandbox/AutomatedLabCore/internal/functions/Dismount-LabDiskImage.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 159 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.