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-LabScvmm
{
[CmdletBinding()]
param ( )
# defaults
$iniContentServer = @{
UserName = 'Administrator'
CompanyName = 'AutomatedLab'
ProgramFiles = 'C:\Program Files\Microsoft System Center\Virtual Mach... | /content/code_sandbox/AutomatedLabCore/functions/Scvmm/Install-LabScvmm.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 627 |
```powershell
function Add-LabVMWareSettings
{
param (
[Parameter(Mandatory)]
[string]$DataCenterName,
[Parameter(Mandatory)]
[string]$DataStoreName,
[Parameter(Mandatory)]
[string]$ResourcePoolName,
[Parameter(Mandatory)]
[string]$VCenterServerName,
[Parameter(Mandatory)]
[ps... | /content/code_sandbox/AutomatedLabCore/functions/VMWare/Add-LabVMWareSettings.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 533 |
```powershell
function Install-LabHyperV
{
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseCompatibleCmdlets", "", Justification="Not relevant on Linux")]
[CmdletBinding()]
param
( )
Write-LogFunctionEntry
$vms = Get-LabVm -Role HyperV | Where-Object SkipDeployment -eq $false
Wri... | /content/code_sandbox/AutomatedLabCore/functions/HyperV/Install-LabHyperV.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 866 |
```powershell
function Test-LabAzureModuleAvailability
{
[OutputType([System.Boolean])]
[CmdletBinding()]
param
(
[switch]
$AzureStack
)
[hashtable[]] $modules = if ($AzureStack.IsPresent) { Get-LabConfigurationItem -Name RequiredAzStackModules } else { Get-LabConfigurationItem... | /content/code_sandbox/AutomatedLabCore/functions/Azure/Test-LabAzureModuleAvailability.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 363 |
```powershell
function Test-LabPathIsOnLabAzureLabSourcesStorage
{
[CmdletBinding()]
param
(
[Parameter(Mandatory)]
[string]$Path
)
if (-not (Test-LabHostConnected)) { return $false }
try
{
if (Test-LabAzureLabSourcesStorage)
{
$azureLabSources =... | /content/code_sandbox/AutomatedLabCore/functions/Azure/Test-LabPathIsOnLabAzureLabSourcesStorage.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 131 |
```powershell
function Request-LabAzureJitAccess
{
[CmdletBinding()]
param
(
[string[]]
$ComputerName,
# Local end time, will be converted to UTC for request
[timespan]
$Duration = '04:45:00'
)
$lab = Get-Lab
if ($lab.AzureSettings.IsAzureStack)
{
... | /content/code_sandbox/AutomatedLabCore/functions/Azure/Request-LabAzureJitAccess.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 476 |
```powershell
function Set-LabAzureDefaultLocation
{
param (
[Parameter(Mandatory)]
[string]$Name
)
Write-LogFunctionEntry
Update-LabAzureSettings
if (-not ($Name -in $script:lab.AzureSettings.Locations.DisplayName -or $Name -in $script:lab.AzureSettings.Locations.Location))
... | /content/code_sandbox/AutomatedLabCore/functions/Azure/Set-LabAzureDefaultLocation.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 164 |
```powershell
function Install-LabAzureRequiredModule
{
[CmdletBinding()]
param
(
[string]
$Repository = 'PSGallery',
[ValidateSet('CurrentUser', 'AllUsers')]
[string]
$Scope = 'CurrentUser',
[switch]
$AzureStack
)
[hashtable[]] $modules = i... | /content/code_sandbox/AutomatedLabCore/functions/Azure/Install-LabAzureRequiredModule.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 242 |
```powershell
function Test-LabAzureLabSourcesStorage
{
[OutputType([System.Boolean])]
[CmdletBinding()]
param ( )
Test-LabHostConnected -Throw -Quiet
if ((Get-LabDefinition -ErrorAction SilentlyContinue).AzureSettings.IsAzureStack -or (Get-Lab -ErrorAction SilentlyContinue).AzureSettings.IsAzureS... | /content/code_sandbox/AutomatedLabCore/functions/Azure/Test-LabAzureLabSourcesStorage.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 155 |
```powershell
function Get-LabAzureDefaultResourceGroup
{
[CmdletBinding()]
param ()
Write-LogFunctionEntry
Update-LabAzureSettings
if ($script:lab.AzureSettings.DefaultResourceGroup) { return $script:lab.AzureSettings.DefaultResourceGroup }
$script:lab.AzureSettings.ResourceGroups | Where-O... | /content/code_sandbox/AutomatedLabCore/functions/Azure/Get-LabAzureDefaultResourceGroup.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 89 |
```powershell
function Add-LabAzureSubscription
{
[CmdletBinding(DefaultParameterSetName = 'ByName')]
param (
[Parameter(ParameterSetName = 'ByName')]
[string]$SubscriptionName,
[Parameter(ParameterSetName = 'ById')]
[guid]$SubscriptionId,
[string]
$Environment,... | /content/code_sandbox/AutomatedLabCore/functions/Azure/Add-LabAzureSubscription.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 4,296 |
```powershell
function Get-LabAzureAvailableSku
{
[CmdletBinding(DefaultParameterSetName = 'DisplayName')]
param
(
[Parameter(Mandatory, ParameterSetName = 'DisplayName')]
[Alias('Location')]
[string]
$DisplayName,
[Parameter(Mandatory, ParameterSetName = 'Name')]
... | /content/code_sandbox/AutomatedLabCore/functions/Azure/Get-LabAzureAvailableSku.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,391 |
```powershell
function Update-LabAzureSettings
{
[CmdletBinding()]
param ( )
if ((Get-PSCallStack).Command -contains 'Import-Lab')
{
$Script:lab = Get-Lab
}
elseif ((Get-PSCallStack).Command -contains 'Add-LabAzureSubscription')
{
$Script:lab = Get-LabDefinition
if (-... | /content/code_sandbox/AutomatedLabCore/functions/Azure/Update-LabAzureSettings.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 178 |
```powershell
function Get-LabAzureLabSourcesContent
{
[CmdletBinding()]
param
(
[string]
$RegexFilter,
# Path relative to labsources file share
[string]
$Path,
[switch]
$File,
[switch]
$Directory
)
Test-LabHostConnected -Th... | /content/code_sandbox/AutomatedLabCore/functions/Azure/Get-LabAzureLabSourcesContent.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 340 |
```powershell
function Sync-LabAzureLabSources
{
[CmdletBinding()]
param
(
[switch]
$SkipIsos,
[switch]
$DoNotSkipOsIsos,
[int]
$MaxFileSizeInMb,
[string]
$Filter,
[switch]
$NoDisplay
)
Test-LabHostConnected -Throw ... | /content/code_sandbox/AutomatedLabCore/functions/Azure/Sync-LabAzureLabSources.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,084 |
```powershell
function Get-LabAzureResourceGroup
{
[CmdletBinding(DefaultParameterSetName = 'ByName')]
param (
[Parameter(Position = 0, ParameterSetName = 'ByName')]
[string[]]$ResourceGroupName,
[Parameter(Position = 0, ParameterSetName = 'ByLab')]
[switch]$CurrentLab
)
... | /content/code_sandbox/AutomatedLabCore/functions/Azure/Get-LabAzureResourceGroup.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 254 |
```powershell
function Remove-LabAzureLabSourcesStorage
{
[CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = 'High')]
param
()
Test-LabHostConnected -Throw -Quiet
Write-LogFunctionExit
Test-LabAzureSubscription
if (Test-LabAzureLabSourcesStorage)
{
$azureLabStorage ... | /content/code_sandbox/AutomatedLabCore/functions/Azure/Remove-LabAzureLabSourcesStorage.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 168 |
```powershell
function Get-LabAzureCertificate
{
[OutputType([System.Security.Cryptography.X509Certificates.X509Certificate2])]
[CmdletBinding()]
param ()
throw New-Object System.NotImplementedException
Write-LogFunctionEntry
Update-LabAzureSettings
$certSubject = "CN=$($Script:lab.Name).... | /content/code_sandbox/AutomatedLabCore/functions/Azure/Get-LabAzureCertificate.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 164 |
```powershell
function New-LabAzureRmResourceGroup
{
[CmdletBinding()]
param (
[Parameter(Mandatory, Position = 0)]
[string[]]$ResourceGroupNames,
[Parameter(Mandatory, Position = 1)]
[string]$LocationName,
[switch]$PassThru
)
Test-LabHostConnected -Throw -Quie... | /content/code_sandbox/AutomatedLabCore/functions/Azure/New-LabAzureRmResourceGroup.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 356 |
```powershell
function New-LabAzureLabSourcesStorage
{
[CmdletBinding()]
param
(
[string]$LocationName,
[switch]$NoDisplay
)
Test-LabHostConnected -Throw -Quiet
Write-LogFunctionEntry
Test-LabAzureSubscription
$azureLabSourcesResourceGroupName = 'AutomatedLabSources'
... | /content/code_sandbox/AutomatedLabCore/functions/Azure/New-LabAzureLabSourcesStorage.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 622 |
```powershell
function Register-LabAzureRequiredResourceProvider
{
[CmdletBinding()]
param
(
[Parameter(Mandatory = $true)]
[string]
$SubscriptionName,
[Parameter()]
[int]
$ProgressIndicator = 5,
[Parameter()]
[switch]
$NoDisplay
... | /content/code_sandbox/AutomatedLabCore/functions/Azure/Register-LabAzureRequiredResourceProvider.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 487 |
```powershell
function Get-LabAzureSubscription
{
[CmdletBinding()]
param ()
Write-LogFunctionEntry
Update-LabAzureSettings
$script:lab.AzureSettings.Subscriptions
Write-LogFunctionExit
}
``` | /content/code_sandbox/AutomatedLabCore/functions/Azure/Get-LabAzureSubscription.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 50 |
```powershell
function Get-LabAzureAvailableRoleSize
{
[CmdletBinding(DefaultParameterSetName = 'DisplayName')]
param
(
[Parameter(Mandatory, ParameterSetName = 'DisplayName')]
[Alias('Location')]
[string]
$DisplayName,
[Parameter(Mandatory, ParameterSetName = 'Name'... | /content/code_sandbox/AutomatedLabCore/functions/Azure/Get-LabAzureAvailableRoleSize.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 660 |
```powershell
function Enable-LabAzureJitAccess
{
[CmdletBinding()]
param
(
[timespan]
$MaximumAccessRequestDuration = '05:00:00',
[switch]
$PassThru
)
$vms = Get-LWAzureVm
$lab = Get-Lab
if ($lab.AzureSettings.IsAzureStack)
{
Write-Error -Mess... | /content/code_sandbox/AutomatedLabCore/functions/Azure/Enable-LabAzureJitAccess.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 459 |
```powershell
function Get-LabAzureLocation
{
[CmdletBinding()]
param (
[string]$LocationName,
[switch]$List
)
Test-LabHostConnected -Throw -Quiet
Write-LogFunctionEntry
$azureLocations = Get-AzLocation
if ($LocationName)
{
if ($LocationName -notin ($azureLoc... | /content/code_sandbox/AutomatedLabCore/functions/Azure/Get-LabAzureLocation.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 635 |
```powershell
function Get-LabAzureLabSourcesStorage
{
[CmdletBinding()]
param
()
Test-LabHostConnected -Throw -Quiet
Write-LogFunctionEntry
Test-LabAzureSubscription
$azureLabSourcesResourceGroupName = 'AutomatedLabSources'
$currentSubscription = (Get-AzContext).Subscription
$s... | /content/code_sandbox/AutomatedLabCore/functions/Azure/Get-LabAzureLabSourcesStorage.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 252 |
```powershell
function Import-LabAzureCertificate
{
[CmdletBinding()]
param ()
Test-LabHostConnected -Throw -Quiet
throw New-Object System.NotImplementedException
Write-LogFunctionEntry
Update-LabAzureSettings
$resourceGroup = Get-AzResourceGroup -name (Get-LabAzureDefaultResourceGroup)
... | /content/code_sandbox/AutomatedLabCore/functions/Azure/Import-LabAzureCertificate.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 216 |
```powershell
function Get-LabAzureDefaultLocation
{
[CmdletBinding()]
param ()
Write-LogFunctionEntry
Update-LabAzureSettings
if (-not $Script:lab.AzureSettings.DefaultLocation)
{
Write-Error 'The default location is not defined. Use Set-LabAzureDefaultLocation to define it.'
... | /content/code_sandbox/AutomatedLabCore/functions/Azure/Get-LabAzureDefaultLocation.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 94 |
```powershell
function Clear-Lab
{
[cmdletBinding()]
param ()
Write-LogFunctionEntry
$Script:data = $null
foreach ($module in $MyInvocation.MyCommand.Module.NestedModules | Where-Object ModuleType -eq 'Script')
{
& $module { $Script:data = $null }
}
Write-LogFunctionExit
}
`... | /content/code_sandbox/AutomatedLabCore/functions/Core/Clear-Lab.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 80 |
```powershell
function Remove-LabAzureResourceGroup
{
[CmdletBinding()]
param (
[Parameter(Mandatory, Position = 0, ValueFromPipelineByPropertyName)]
[string[]]$ResourceGroupName,
[switch]$Force
)
begin
{
Test-LabHostConnected -Throw -Quiet
Write-LogFunctio... | /content/code_sandbox/AutomatedLabCore/functions/Azure/Remove-LabAzureResourceGroup.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 274 |
```powershell
function Clear-LabCache
{
[cmdletBinding()]
param()
Write-LogFunctionEntry
if ($IsLinux -or $IsMacOs)
{
$storePath = Join-Path -Path (Get-LabConfigurationItem -Name LabAppDataRoot) -ChildPath 'Stores'
Get-ChildItem -Path $storePath -Filter *.xml | Remove-Item -Force ... | /content/code_sandbox/AutomatedLabCore/functions/Core/Clear-LabCache.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 224 |
```powershell
function Test-LabHostConnected
{
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseCompatibleCmdlets", "")]
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingComputerNameHardcoded", "")]
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("ALSimpleNullComparison", "", Justi... | /content/code_sandbox/AutomatedLabCore/functions/Core/Test-LabHostConnected.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 467 |
```powershell
function Set-LabInstallationCredential
{
[OutputType([System.Int32])]
[CmdletBinding(DefaultParameterSetName = 'All')]
Param (
[Parameter(Mandatory, ParameterSetName = 'All')]
[Parameter(Mandatory=$false, ParameterSetName = 'Prompt')]
[ValidatePattern('^([\w\.-]){2,15}$... | /content/code_sandbox/AutomatedLabCore/functions/Core/Set-LabInstallationCredential.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,035 |
```powershell
function Enable-LabTelemetry
{
if ($IsLinux -or $IsMacOs)
{
$null = New-Item -ItemType File -Path "$((Get-PSFConfigValue -FullName AutomatedLab.LabAppDataRoot))/telemetry.enabled" -Force
}
else
{
[Environment]::SetEnvironmentVariable('AUTOMATEDLAB_TELEMETRY_OPTIN', 'tru... | /content/code_sandbox/AutomatedLabCore/functions/Core/Enable-LabTelemetry.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 114 |
```powershell
function Undo-LabHostRemoting
{
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseCompatibleCmdlets", "")]
param(
[switch]$Force,
[switch]$NoDisplay
)
if ($IsLinux) { return }
Write-LogFunctionEntry
if (-not (Test-IsAdministrator))
{
throw 'Thi... | /content/code_sandbox/AutomatedLabCore/functions/Core/Undo-LabHostRemoting.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,136 |
```powershell
function Get-LabConfigurationItem
{
[CmdletBinding()]
param
(
[Parameter()]
[string]
$Name,
[Parameter()]
$Default
)
if ($Name)
{
$setting = (Get-PSFConfig -Module AutomatedLab -Name $Name -Force).Value
if (-not $setting -an... | /content/code_sandbox/AutomatedLabCore/functions/Core/Get-LabConfigurationItem.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 111 |
```powershell
function Remove-LabVariable
{
$pattern = 'AL_([a-zA-Z0-9]{8})+[-.]+([a-zA-Z0-9]{4})+[-.]+([a-zA-Z0-9]{4})+[-.]+([a-zA-Z0-9]{4})+[-.]+([a-zA-Z0-9]{12})'
Get-LabVariable | Remove-Variable -Scope Global
}
``` | /content/code_sandbox/AutomatedLabCore/functions/Core/Remove-LabVariable.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 96 |
```powershell
function Enable-LabHostRemoting
{
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseCompatibleCmdlets", "")]
param(
[switch]$Force,
[switch]$NoDisplay
)
if ($IsLinux) { return }
Write-LogFunctionEntry
if (-not (Test-IsAdministrator))
{
throw '... | /content/code_sandbox/AutomatedLabCore/functions/Core/Enable-LabHostRemoting.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 3,114 |
```powershell
function Add-LabVMUserRight
{
param
(
[Parameter(Mandatory, ValueFromPipelineByPropertyName, ParameterSetName = 'ByMachine')]
[String[]]$ComputerName,
[string[]]$UserName,
[validateSet('SeNetworkLogonRight',
'SeRemoteInteractiveLogonRight',
... | /content/code_sandbox/AutomatedLabCore/functions/Core/Add-LabVMUserRight.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 558 |
```powershell
function Invoke-Ternary ([scriptblock]$decider, [scriptblock]$ifTrue, [scriptblock]$ifFalse)
{
if (&$decider)
{
&$ifTrue
}
else
{
&$ifFalse
}
}
``` | /content/code_sandbox/AutomatedLabCore/functions/Core/Invoke-Ternary.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 57 |
```powershell
function Test-LabHostRemoting
{
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseCompatibleCmdlets", "")]
[OutputType([System.Boolean])]
[CmdletBinding()]
param()
if ($IsLinux) { return }
Write-LogFunctionEntry
$configOk = $true
if ($IsLinux -or $IsMacOs)
{
... | /content/code_sandbox/AutomatedLabCore/functions/Core/Test-LabHostRemoting.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 998 |
```powershell
function Install-LabSoftwarePackages
{
param (
[Parameter(Mandatory, ValueFromPipelineByPropertyName)]
[AutomatedLab.Machine[]]$Machine,
[Parameter(Mandatory, ValueFromPipelineByPropertyName)]
[AutomatedLab.SoftwarePackage[]]$SoftwarePackage,
[switch]$WaitForI... | /content/code_sandbox/AutomatedLabCore/functions/Core/Install-LabSoftwarePackages.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 396 |
```powershell
function Get-LabVariable
{
$pattern = 'AL_([a-zA-Z0-9]{8})+[-.]+([a-zA-Z0-9]{4})+[-.]+([a-zA-Z0-9]{4})+[-.]+([a-zA-Z0-9]{4})+[-.]+([a-zA-Z0-9]{12})'
Get-Variable -Scope Global | Where-Object Name -Match $pattern
}
``` | /content/code_sandbox/AutomatedLabCore/functions/Core/Get-LabVariable.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 100 |
```powershell
function Set-LabGlobalNamePrefix
{
[Cmdletbinding()]
Param (
[Parameter(Mandatory = $false)]
[ValidatePattern("^([\'\""a-zA-Z0-9]){1,4}$|()")]
[string]$Name
)
$Global:labNamePrefix = $Name
}
``` | /content/code_sandbox/AutomatedLabCore/functions/Core/Set-LabGlobalNamePrefix.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 70 |
```powershell
function Get-LabSourcesLocation
{
param
(
[switch]$Local
)
Get-LabSourcesLocationInternal -Local:$Local
}
``` | /content/code_sandbox/AutomatedLabCore/functions/Core/Get-LabSourcesLocation.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 35 |
```powershell
function Uninstall-LabWindowsFeature
{
[cmdletBinding()]
param (
[Parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[string[]]$ComputerName,
[Parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[string[]]$FeatureName,
[switch]$IncludeManagement... | /content/code_sandbox/AutomatedLabCore/functions/Core/Uninstall-LabWindowsFeature.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 609 |
```powershell
function Remove-Lab
{
[CmdletBinding(DefaultParameterSetName = 'ByName', ConfirmImpact = 'High', SupportsShouldProcess)]
param (
[Parameter(Mandatory, ParameterSetName = 'ByPath', ValueFromPipeline)]
[string]$Path,
[Parameter(ParameterSetName = 'ByName', ValueFromPipelineB... | /content/code_sandbox/AutomatedLabCore/functions/Core/Remove-Lab.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 2,131 |
```powershell
function Get-LabWindowsFeature
{
[cmdletBinding()]
param (
[Parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[string[]]$ComputerName,
[ValidateNotNullOrEmpty()]
[string[]]$FeatureName = '*',
[switch]$UseLocalCredential,
[int]$ProgressIndic... | /content/code_sandbox/AutomatedLabCore/functions/Core/Get-LabWindowsFeature.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 578 |
```powershell
function Copy-LabFileItem
{
param (
[Parameter(Mandatory)]
[string[]]$Path,
[Parameter(Mandatory)]
[string[]]$ComputerName,
[string]$DestinationFolderPath,
[switch]$Recurse,
[bool]$FallbackToPSSession = $true,
[bool]$UseAzureLabSourc... | /content/code_sandbox/AutomatedLabCore/functions/Core/Copy-LabFileItem.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,191 |
```powershell
function Get-LabAvailableOperatingSystem
{
[cmdletBinding(DefaultParameterSetName='Local')]
[OutputType([AutomatedLab.OperatingSystem])]
param
(
[Parameter(ParameterSetName='Local')]
[string[]]$Path,
[switch]$UseOnlyCache,
[switch]$NoDisplay,
[Par... | /content/code_sandbox/AutomatedLabCore/functions/Core/Get-LabAvailableOperatingSystem.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,911 |
```powershell
function Get-LabSoftwarePackage
{
param (
[Parameter(Mandatory)]
[ValidateScript({
Test-Path -Path $_
}
)]
[string]$Path,
[string]$CommandLine,
[int]$Timeout = 10
)
Write-LogFunctionEntry
$pack = New-Ob... | /content/code_sandbox/AutomatedLabCore/functions/Core/Get-LabSoftwarePackage.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 127 |
```powershell
function Install-LabWindowsFeature
{
[cmdletBinding()]
param (
[Parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[string[]]$ComputerName,
[Parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[string[]]$FeatureName,
[switch]$IncludeAllSubFeatur... | /content/code_sandbox/AutomatedLabCore/functions/Core/Install-LabWindowsFeature.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 720 |
```powershell
function Get-Lab
{
[CmdletBinding()]
[OutputType([AutomatedLab.Lab])]
param (
[switch]$List
)
if ($List)
{
$labsPath = "$((Get-LabConfigurationItem -Name LabAppDataRoot))/Labs"
foreach ($path in Get-ChildItem -Path $labsPath -Directory -ErrorAction Silent... | /content/code_sandbox/AutomatedLabCore/functions/Core/Get-Lab.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 195 |
```powershell
function Set-LabDefaultVirtualizationEngine
{
[Cmdletbinding()]
Param(
[Parameter(Mandatory)]
[ValidateSet('Azure', 'HyperV', 'VMware')]
[string]$VirtualizationEngine
)
if (Get-LabDefinition)
{
(Get-LabDefinition).DefaultVirtualizationEngine = $Virtuali... | /content/code_sandbox/AutomatedLabCore/functions/Core/Set-LabDefaultVirtualizationEngine.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 111 |
```powershell
function Export-Lab
{
[cmdletBinding()]
param ()
Write-LogFunctionEntry
$lab = Get-Lab
Remove-Item -Path $lab.LabFilePath
Remove-Item -Path $lab.MachineDefinitionFiles[0].Path
Remove-Item -Path $lab.DiskDefinitionFiles[0].Path
$lab.Machines.Export($lab.MachineDefiniti... | /content/code_sandbox/AutomatedLabCore/functions/Core/Export-Lab.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 253 |
```powershell
function Import-Lab
{
[CmdletBinding(DefaultParameterSetName = 'ByName')]
param (
[Parameter(Mandatory, ParameterSetName = 'ByPath', Position = 1)]
[string]$Path,
[Parameter(Mandatory, ParameterSetName = 'ByName', Position = 1)]
[string]$Name,
[Parameter(M... | /content/code_sandbox/AutomatedLabCore/functions/Core/Import-Lab.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 2,296 |
```powershell
function Disable-LabTelemetry
{
if ($IsLinux -or $IsMacOs)
{
$null = New-Item -ItemType File -Path "$((Get-PSFConfigValue -FullName AutomatedLab.LabAppDataRoot))/telemetry.disabled" -Force
}
else
{
[Environment]::SetEnvironmentVariable('AUTOMATEDLAB_TELEMETRY_OPTIN', 'f... | /content/code_sandbox/AutomatedLabCore/functions/Core/Disable-LabTelemetry.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 114 |
```powershell
function Enable-LabVMRemoting
{
[cmdletBinding()]
param (
[Parameter(Mandatory, ValueFromPipelineByPropertyName, ParameterSetName = 'ByName')]
[string[]]$ComputerName,
[Parameter(Mandatory, ValueFromPipelineByPropertyName, ParameterSetName = 'All')]
[switch]$All
... | /content/code_sandbox/AutomatedLabCore/functions/Core/Enable-LabVMRemoting.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 332 |
```powershell
function Install-LabSoftwarePackage
{
param (
[Parameter(Mandatory, ParameterSetName = 'SinglePackage')]
[ValidateNotNullOrEmpty()]
[string]$Path,
[Parameter(Mandatory, ParameterSetName = 'SingleLocalPackage')]
[ValidateNotNullOrEmpty()]
[string]$LocalP... | /content/code_sandbox/AutomatedLabCore/functions/Core/Install-LabSoftwarePackage.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 2,217 |
```powershell
function Set-LabDefaultOperatingSystem
{
[Cmdletbinding()]
Param(
[Parameter(Mandatory)]
[Alias('Name')]
[string]
$OperatingSystem,
[string]
$Version
)
$labDefinition = Get-LabDefinition -ErrorAction SilentlyContinue
if (-not $labDefin... | /content/code_sandbox/AutomatedLabCore/functions/Core/Set-LabDefaultOperatingSystem.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 463 |
```powershell
function Get-LabCache
{
[CmdletBinding()]
param
( )
$regKey = [Microsoft.Win32.RegistryKey]::OpenBaseKey('CurrentUser', 'Default')
try
{
$key = $regKey.OpenSubKey('Software\AutomatedLab\Cache')
foreach ($value in $key.GetValueNames())
{
$content... | /content/code_sandbox/AutomatedLabCore/functions/Core/Get-LabCache.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 156 |
```powershell
function New-LabSourcesFolder
{
[CmdletBinding(
SupportsShouldProcess = $true,
ConfirmImpact = 'Medium')]
param
(
[Parameter(Mandatory = $false)]
[System.String]
$DriveLetter,
[switch]
$Force,
[switch]
$FolderStructureOn... | /content/code_sandbox/AutomatedLabCore/functions/Core/New-LabSourcesFolder.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,025 |
```powershell
function Show-LabDeploymentSummary
{
[OutputType([System.TimeSpan])]
[Cmdletbinding()]
param (
[switch]$Detailed
)
if (-not (Get-Lab -ErrorAction SilentlyContinue))
{
Write-ScreenInfo "There is no lab information available in the current PowerShell session. Deploy ... | /content/code_sandbox/AutomatedLabCore/functions/Core/Show-LabDeploymentSummary.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 950 |
```powershell
function Install-LabAzureServices
{
[CmdletBinding()]
param ()
Write-LogFunctionEntry
$lab = Get-Lab
if (-not $lab)
{
Write-Error 'No definitions imported, so there is nothing to do. Please use Import-Lab first'
return
}
Write-ScreenInfo -Message "Startin... | /content/code_sandbox/AutomatedLabCore/functions/AzureServices/Install-LabAzureServices.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 258 |
```powershell
function Get-LabAzureWebAppStatus
{
[CmdletBinding(DefaultParameterSetName = 'All')]
[OutputType([System.Collections.Hashtable])]
param (
[Parameter(Mandatory, Position = 0, ParameterSetName = 'ByName', ValueFromPipeline, ValueFromPipelineByPropertyName)]
[string[]]$Name,
... | /content/code_sandbox/AutomatedLabCore/functions/AzureServices/Get-LabAzureWebAppStatus.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 582 |
```powershell
function Start-LabAzureWebApp
{
[OutputType([AutomatedLab.Azure.AzureRmService])]
param (
[Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)]
[string[]]$Name,
[Parameter(Mandatory, Position = 1, ValueFromPipeline, ValueFromPipelineByPro... | /content/code_sandbox/AutomatedLabCore/functions/AzureServices/Start-LabAzureWebApp.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 353 |
```powershell
function Set-LabAzureWebAppContent
{
param (
[Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)]
[string[]]$Name,
[Parameter(Mandatory, Position = 1)]
[string]$LocalContentPath
)
begin
{
Write-LogFunctionEntry
... | /content/code_sandbox/AutomatedLabCore/functions/AzureServices/Set-LabAzureWebAppContent.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 329 |
```powershell
function Install-Lab
{
[cmdletBinding()]
param (
[switch]$NetworkSwitches,
[switch]$BaseImages,
[switch]$VMs,
[switch]$Domains,
[switch]$AdTrusts,
[switch]$DHCP,
[switch]$Routing,
[switch]$PostInstallations,
[switch]$SQLServer... | /content/code_sandbox/AutomatedLabCore/functions/Core/Install-Lab.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 10,070 |
```powershell
function New-LabAzureWebApp
{
[OutputType([AutomatedLab.Azure.AzureRmService])]
param (
[Parameter(Position = 0, ParameterSetName = 'ByName', ValueFromPipeline, ValueFromPipelineByPropertyName)]
[string[]]$Name,
[switch]$PassThru
)
begin
{
Write-LogFun... | /content/code_sandbox/AutomatedLabCore/functions/AzureServices/New-LabAzureWebApp.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 494 |
```powershell
function Get-LabAzureAppServicePlan
{
[CmdletBinding(DefaultParameterSetName = 'All')]
[OutputType([AutomatedLab.Azure.AzureRmServerFarmWithRichSku])]
param (
[Parameter(Position = 0, ParameterSetName = 'ByName', ValueFromPipeline, ValueFromPipelineByPropertyName)]
[string[]]$N... | /content/code_sandbox/AutomatedLabCore/functions/AzureServices/Get-LabAzureAppServicePlan.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 273 |
```powershell
function New-LabAzureAppServicePlan
{
[OutputType([AutomatedLab.Azure.AzureRmServerFarmWithRichSku])]
param (
[Parameter(Position = 0, ParameterSetName = 'ByName', ValueFromPipeline, ValueFromPipelineByPropertyName)]
[string[]]$Name,
[switch]$PassThru
)
begin
... | /content/code_sandbox/AutomatedLabCore/functions/AzureServices/New-LabAzureAppServicePlan.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 422 |
```powershell
function Stop-LabAzureWebApp
{
[OutputType([AutomatedLab.Azure.AzureRmService])]
param (
[Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)]
[string[]]$Name,
[Parameter(Mandatory, Position = 1, ValueFromPipeline, ValueFromPipelineByProp... | /content/code_sandbox/AutomatedLabCore/functions/AzureServices/Stop-LabAzureWebApp.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 360 |
```powershell
function Get-LabAzureWebApp
{
[CmdletBinding(DefaultParameterSetName = 'All')]
[OutputType([AutomatedLab.Azure.AzureRmService])]
param (
[Parameter(Position = 0, ParameterSetName = 'ByName', ValueFromPipeline, ValueFromPipelineByPropertyName)]
[string[]]$Name
)
begin
... | /content/code_sandbox/AutomatedLabCore/functions/AzureServices/Get-LabAzureWebApp.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 210 |
```powershell
function Install-LabRootDcs
{
[CmdletBinding()]
param (
[int]$DcPromotionRestartTimeout = (Get-LabConfigurationItem -Name Timeout_DcPromotionRestartAfterDcpromo),
[int]$AdwsReadyTimeout = (Get-LabConfigurationItem -Name Timeout_DcPromotionAdwsReady),
[switch]$CreateCheckP... | /content/code_sandbox/AutomatedLabCore/functions/ADDS/Install-LabRootDcs.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 3,157 |
```powershell
function Install-LabDcs
{
[CmdletBinding()]
param (
[int]$DcPromotionRestartTimeout = (Get-LabConfigurationItem -Name Timeout_DcPromotionRestartAfterDcpromo),
[int]$AdwsReadyTimeout = (Get-LabConfigurationItem -Name Timeout_DcPromotionAdwsReady),
[switch]$CreateCheckPoint... | /content/code_sandbox/AutomatedLabCore/functions/ADDS/Install-LabDcs.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 2,162 |
```powershell
function Install-LabDynamics
{
[CmdletBinding()]
param
(
[switch]
$CreateCheckPoints
)
Write-LogFunctionEntry
$lab = Get-Lab -ErrorAction Stop
$vms = Get-LabVm -Role Dynamics
$sql = Get-LabVm -Role SQLServer2016, SQLServer2017 | Sort-Object { $_.Roles.Name... | /content/code_sandbox/AutomatedLabCore/functions/Dynamics/Install-LabDynamics.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 4,188 |
```powershell
function Install-LabDnsForwarder
{
$forestNames = (Get-LabVM -Role RootDC).DomainName
if (-not $forestNames)
{
Write-Error 'Could not get forest names from the lab'
return
}
$forwarders = Get-FullMesh -List $forestNames
foreach ($forwarder in $forwarders)
{
... | /content/code_sandbox/AutomatedLabCore/functions/ADDS/Install-LabDnsForwarder.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 397 |
```powershell
function Install-LabADDSTrust
{
$forestNames = (Get-LabVM -Role RootDC).DomainName
if (-not $forestNames)
{
Write-Error 'Could not get forest names from the lab'
return
}
$forwarders = Get-FullMesh -List $forestNames
foreach ($forwarder in $forwarders)
{
... | /content/code_sandbox/AutomatedLabCore/functions/ADDS/Install-LabADDSTrust.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 835 |
```powershell
function Wait-LabADReady
{
param (
[Parameter(Mandatory)]
[string[]]$ComputerName,
[int]$TimeoutInMinutes = 15,
[int]$ProgressIndicator,
[switch]$NoNewLine
)
Write-LogFunctionEntry
$start = Get-Date
$machines = Get-LabVM -ComputerName $Comp... | /content/code_sandbox/AutomatedLabCore/functions/ADDS/Wait-LabADReady.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 600 |
```powershell
function Test-LabADReady
{
param (
[Parameter(Mandatory)]
[string]$ComputerName
)
Write-LogFunctionEntry
$machine = Get-LabVM -ComputerName $ComputerName
if (-not $machine)
{
Write-Error "The machine '$ComputerName' could not be found in the lab"
r... | /content/code_sandbox/AutomatedLabCore/functions/ADDS/Test-LabADReady.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 254 |
```powershell
function New-LabADSubnet
{
[CmdletBinding()]
param(
[switch]$PassThru
)
Write-LogFunctionEntry
$createSubnetScript = {
param(
$NetworkInfo
)
$PSDefaultParameterValues = @{
'*-AD*:Server' = $env:COMPUTERNAME
}
#... | /content/code_sandbox/AutomatedLabCore/functions/ADDS/New-LabADSubnet.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 732 |
```powershell
function Sync-LabActiveDirectory
{
[CmdletBinding()]
param
(
[Parameter(Mandatory)]
[string[]]$ComputerName,
[int]$ProgressIndicator,
[switch]$AsJob,
[switch]$Passthru
)
Write-LogFunctionEntry
$machines = Get-LabVM -ComputerName $Compute... | /content/code_sandbox/AutomatedLabCore/functions/ADDS/Sync-LabActiveDirectory.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,079 |
```powershell
function Get-LabTfsUri
{
[CmdletBinding()]
param
(
[string]
$ComputerName
)
if (-not (Get-Lab -ErrorAction SilentlyContinue))
{
throw 'No lab imported. Please use Import-Lab to import the target lab containing at least one TFS server'
}
$tfsvm = Ge... | /content/code_sandbox/AutomatedLabCore/functions/Tfs/Get-LabTfsUri.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 385 |
```powershell
function Get-LabBuildStep
{
param
(
[string]
$ComputerName
)
if (-not (Get-Lab -ErrorAction SilentlyContinue))
{
throw 'No lab imported. Please use Import-Lab to import the target lab containing at least one TFS server'
}
$tfsvm = Get-LabVm -Role Tfs20... | /content/code_sandbox/AutomatedLabCore/functions/Tfs/Get-LabBuildStep.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 209 |
```powershell
function Test-LabTfsEnvironment
{
param
(
[Parameter(Mandatory)]
[string]
$ComputerName,
[switch]
$SkipServer,
[switch]
$SkipWorker,
[switch]
$NoDisplay
)
$lab = Get-Lab -ErrorAction Stop
$machine = Get-LabVm -... | /content/code_sandbox/AutomatedLabCore/functions/Tfs/Test-LabTfsEnvironment.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 868 |
```powershell
function Install-LabFirstChildDcs
{
[CmdletBinding()]
param (
[int]$DcPromotionRestartTimeout = (Get-LabConfigurationItem -Name Timeout_DcPromotionRestartAfterDcpromo),
[int]$AdwsReadyTimeout = (Get-LabConfigurationItem -Name Timeout_DcPromotionAdwsReady),
[switch]$Create... | /content/code_sandbox/AutomatedLabCore/functions/ADDS/Install-LabFirstChildDcs.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 2,995 |
```powershell
function Open-LabTfsSite
{
param
(
[string]
$ComputerName
)
Start-Process -FilePath (Get-LabTfsUri @PSBoundParameters)
}
``` | /content/code_sandbox/AutomatedLabCore/functions/Tfs/Open-LabTfsSite.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 45 |
```powershell
function Get-LabTfsFeed
{
param
(
[Parameter(Mandatory)]
[string]
$ComputerName,
[string]
$FeedName
)
$lab = Get-Lab
$tfsVm = Get-LabVM -ComputerName $ComputerName
$defaultParam = Get-LabTfsParameter -ComputerName $ComputerName
... | /content/code_sandbox/AutomatedLabCore/functions/Tfs/Get-LabTfsFeed.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 421 |
```powershell
function New-LabTfsFeed
{
param
(
[Parameter(Mandatory)]
[string]
$ComputerName,
[Parameter(Mandatory)]
[string]
$FeedName,
[object[]]
$FeedPermissions,
[switch]
$PassThru
)
$tfs... | /content/code_sandbox/AutomatedLabCore/functions/Tfs/New-LabTfsFeed.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 256 |
```powershell
function Install-LabTeamFoundationEnvironment
{
[CmdletBinding()]
param
( )
$tfsMachines = Get-LabVM -Role Tfs2015, Tfs2017, Tfs2018, AzDevOps | Where-Object {
-not $_.SkipDeployment -and -not (Test-LabTfsEnvironment -ComputerName $_.Name -NoDisplay).ServerDeploymentOk
}
$... | /content/code_sandbox/AutomatedLabCore/functions/Tfs/Install-LabTeamFoundationEnvironment.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,038 |
```powershell
function Get-LabReleaseStep
{
param
(
[string]
$ComputerName
)
if (-not (Get-Lab -ErrorAction SilentlyContinue))
{
throw 'No lab imported. Please use Import-Lab to import the target lab containing at least one TFS server'
}
$tfsvm = Get-LabVm -Role Tfs... | /content/code_sandbox/AutomatedLabCore/functions/Tfs/Get-LabReleaseStep.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 210 |
```powershell
function Get-LabTfsParameter
{
param
(
[Parameter(Mandatory)]
[string]
$ComputerName,
[switch]
$Local
)
$lab = Get-Lab
$tfsVm = Get-LabVM -ComputerName $ComputerName
$role = $tfsVm.Roles | Where-Object -Property Name -match 'Tfs\d{4}|Az... | /content/code_sandbox/AutomatedLabCore/functions/Tfs/Get-LabTfsParameter.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,037 |
```powershell
function Install-LabBuildWorker
{
[CmdletBinding()]
param
( )
$buildWorkers = Get-LabVM -Role TfsBuildWorker
if (-not $buildWorkers)
{
return
}
$buildWorkerUri = Get-LabConfigurationItem -Name BuildAgentUri
$buildWorkerPath = Join-Path -Path $labsources -Child... | /content/code_sandbox/AutomatedLabCore/functions/Tfs/Install-LabBuildWorker.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 2,081 |
```powershell
function New-LabReleasePipeline
{
[CmdletBinding(DefaultParameterSetName = 'CloneRepo')]
param
(
[string]
$ProjectName = 'ALSampleProject',
[Parameter(Mandatory, ParameterSetName = 'CloneRepo')]
[Parameter(ParameterSetName = 'LocalSource')]
[string]
... | /content/code_sandbox/AutomatedLabCore/functions/Tfs/New-LabReleasePipeline.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 3,091 |
```powershell
function Restore-LabConnection
{
param
(
[Parameter(Mandatory = $true)]
[System.String]
$SourceLab,
[Parameter(Mandatory = $true)]
[System.String]
$DestinationLab
)
if ((Get-Lab -List) -notcontains $SourceLab)
{
throw "Source la... | /content/code_sandbox/AutomatedLabCore/functions/Hybrid/Restore-LabConnection.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 761 |
```powershell
function Connect-Lab
{
[CmdletBinding(DefaultParameterSetName = 'Lab2Lab')]
param
(
[Parameter(Mandatory = $true, Position = 0)]
[System.String]
$SourceLab,
[Parameter(Mandatory = $true, ParameterSetName = 'Lab2Lab', Position = 1)]
[System.String]
... | /content/code_sandbox/AutomatedLabCore/functions/Hybrid/Connect-Lab.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,045 |
```powershell
function Disconnect-Lab
{
[CmdletBinding()]
param
(
[Parameter(Mandatory)]
$SourceLab,
[Parameter(Mandatory)]
$DestinationLab
)
Write-LogFunctionEntry
foreach ($LabName in @($SourceLab, $DestinationLab))
{
Import-Lab -Name $LabName -Er... | /content/code_sandbox/AutomatedLabCore/functions/Hybrid/Disconnect-Lab.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 609 |
```powershell
function Install-LabOffice2016
{
[CmdletBinding()]
param ()
Write-LogFunctionEntry
$config2016XmlTemplate = @"
<Configuration>
<Add OfficeClientEdition="32">
<Product ID="O365ProPlusRetail">
<Language ID="en-us" />
</Product>
</Add>
<Updates Enabled="TRUE" />
<Displ... | /content/code_sandbox/AutomatedLabCore/functions/Office/Install-LabOffice2016.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 886 |
```powershell
function Install-LabOffice2013
{
[CmdletBinding()]
param ()
Write-LogFunctionEntry
$lab = Get-Lab
$roleName = [AutomatedLab.Roles]::Office2013
if (-not (Get-LabVM))
{
Write-LogFunctionExitWithError -Message 'No machine definitions imported, so there is nothing to do. ... | /content/code_sandbox/AutomatedLabCore/functions/Office/Install-LabOffice2013.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,232 |
```powershell
function Install-LabAdfsProxy
{
[CmdletBinding()]
param ()
Write-LogFunctionEntry
Write-ScreenInfo -Message 'Configuring ADFS roles...'
$lab = Get-Lab
if (-not (Get-LabVM))
{
Write-ScreenInfo -Message 'No machine definitions imported, so there is nothing to do. Plea... | /content/code_sandbox/AutomatedLabCore/functions/ADFS/Install-LabAdfsProxy.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 677 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.