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-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
```powershell function Install-LabAdfs { [CmdletBinding()] param () Write-LogFunctionEntry Write-ScreenInfo -Message 'Configuring ADFS roles...' if (-not (Get-LabVM)) { Write-ScreenInfo -Message 'No machine definitions imported, so there is nothing to do. Please use Import-Lab first' ...
/content/code_sandbox/AutomatedLabCore/functions/ADFS/Install-LabAdfs.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
1,882
```powershell function Enter-LabPSSession { param ( [Parameter(Mandatory, ParameterSetName = 'ByName', Position = 0)] [string]$ComputerName, [Parameter(Mandatory, ParameterSetName = 'ByMachine', Position = 0)] [AutomatedLab.Machine]$Machine, [switch]$DoNotUseCredSsp, ...
/content/code_sandbox/AutomatedLabCore/functions/Remoting/Enter-LabPSSession.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
204
```powershell function Install-LabConfigurationManager { [CmdletBinding()] param () $vms = Get-LabVm -Role ConfigurationManager Start-LabVm -Role ConfigurationManager -Wait #region Prereq: ADK, CM binaries, stuff Write-ScreenInfo -Message "Installing Prerequisites on $($vms.Count) machines" ...
/content/code_sandbox/AutomatedLabCore/functions/ConfigurationManager/Install-LabConfigurationManager.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
2,968
```powershell function Remove-LabCimSession { [CmdletBinding()] param ( [Parameter(Mandatory, ParameterSetName = 'ByName')] [string[]] $ComputerName, [Parameter(Mandatory, ParameterSetName = 'ByMachine')] [AutomatedLab.Machine[]] $Machine, [Parameter(Par...
/content/code_sandbox/AutomatedLabCore/functions/Remoting/Remove-LabCimSession.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
448
```powershell function UnInstall-LabSshKnownHost { [CmdletBinding()] param ( ) if (-not (Test-Path -Path $home/.ssh/known_hosts)) { return } $lab = Get-Lab if (-not $lab) { return } $machines = Get-LabVM -All -IncludeLinux | Where-Object -FilterScript { -not $_.SkipDeployment } if (-not $...
/content/code_sandbox/AutomatedLabCore/functions/Remoting/UnInstall-LabSshKnownHost.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
292
```powershell function Get-LabCimSession { [CmdletBinding()] [OutputType([Microsoft.Management.Infrastructure.CimSession])] param ( [string[]] $ComputerName, [switch] $DoNotUseCredSsp ) $pattern = '\w+_[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}...
/content/code_sandbox/AutomatedLabCore/functions/Remoting/Get-LabCimSession.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
296
```powershell function Remove-LabPSSession { [cmdletBinding()] param ( [Parameter(Mandatory, ParameterSetName = 'ByName')] [string[]]$ComputerName, [Parameter(Mandatory, ParameterSetName = 'ByMachine')] [AutomatedLab.Machine[]]$Machine, [Parameter(ParameterSetName = 'Al...
/content/code_sandbox/AutomatedLabCore/functions/Remoting/Remove-LabPSSession.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
625
```powershell function Install-LabRdsCertificate { [CmdletBinding()] param ( ) $lab = Get-Lab if (-not $lab) { return } $machines = Get-LabVM -All | Where-Object -FilterScript { $_.OperatingSystemType -eq 'Windows' -and $_.OperatingSystem.Version -ge 6.3 -and -not $_.SkipDeployment...
/content/code_sandbox/AutomatedLabCore/functions/Remoting/Install-LabRdsCertificate.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
580
```powershell function Get-LabPSSession { [cmdletBinding()] [OutputType([System.Management.Automation.Runspaces.PSSession])] param ( [string[]]$ComputerName, [switch]$DoNotUseCredSsp ) $pattern = '\w+_[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}' ...
/content/code_sandbox/AutomatedLabCore/functions/Remoting/Get-LabPSSession.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
348
```powershell function New-LabPSSession { param ( [Parameter(Mandatory, ParameterSetName = 'ByName', Position = 0)] [string[]]$ComputerName, [Parameter(Mandatory, ParameterSetName = 'ByMachine')] [AutomatedLab.Machine[]]$Machine, #this is used to recreate a broken session ...
/content/code_sandbox/AutomatedLabCore/functions/Remoting/New-LabPSSession.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
3,047
```powershell function Get-LabSshKnownHost { [CmdletBinding()] param () if (-not (Test-Path -Path $home/.ssh/known_hosts)) { return } Get-Content -Path $home/.ssh/known_hosts | ConvertFrom-String -Delimiter ' ' -PropertyNames ComputerName,Cipher,Fingerprint -ErrorAction SilentlyContinue } ```
/content/code_sandbox/AutomatedLabCore/functions/Remoting/Get-LabSshKnownHost.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
80
```powershell function Uninstall-LabRdsCertificate { [CmdletBinding()] param ( ) $lab = Get-Lab if (-not $lab) { return } foreach ($certFile in (Get-ChildItem -File -Path (Join-Path -Path $lab.LabPath -ChildPath Certificates) -Filter *.cer -ErrorAction SilentlyContinue)) { ...
/content/code_sandbox/AutomatedLabCore/functions/Remoting/Uninstall-LabRdsCertificate.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
165
```powershell function New-LabCimSession { [CmdletBinding()] param ( [Parameter(Mandatory, ParameterSetName = 'ByName', Position = 0)] [string[]] $ComputerName, [Parameter(Mandatory, ParameterSetName = 'ByMachine')] [AutomatedLab.Machine[]] $Machine, ...
/content/code_sandbox/AutomatedLabCore/functions/Remoting/New-LabCimSession.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
2,189
```powershell function Invoke-LabCommand { [cmdletBinding()] param ( [string]$ActivityName = '<unnamed>', [Parameter(Mandatory, ParameterSetName = 'ScriptBlockFileContentDependency', Position = 0)] [Parameter(Mandatory, ParameterSetName = 'ScriptFileContentDependency', Position = 0)] ...
/content/code_sandbox/AutomatedLabCore/functions/Remoting/Invoke-LabCommand.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
3,560
```powershell function Reset-AutomatedLab { Remove-Lab -Confirm:$false Remove-Module * } ```
/content/code_sandbox/AutomatedLabCore/functions/Internals/Reset-AutomatedLab.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
24
```powershell function Install-LabSshKnownHost { [CmdletBinding()] param ( ) $lab = Get-Lab if (-not $lab) { return } $machines = Get-LabVM -All -IncludeLinux | Where-Object -FilterScript { -not $_.SkipDeployment } if (-not $machines) { return } if (-not (T...
/content/code_sandbox/AutomatedLabCore/functions/Remoting/Install-LabSshKnownHost.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
1,467
```powershell function Get-LabHyperVAvailableMemory { # .ExternalHelp AutomatedLab.Help.xml if ($IsLinux -or $IsMacOS) { return [int]((Get-Content -Path /proc/meminfo) -replace ':', '=' -replace '\skB' | ConvertFrom-StringData).MemTotal } [int](((Get-CimInstance -Namespace Root\Cimv2 -Class...
/content/code_sandbox/AutomatedLabCore/functions/Internals/Get-LabHyperVAvailableMemory.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
110
```powershell function Enable-LabVMFirewallGroup { [cmdletbinding()] param ( [Parameter(Mandatory)] [string[]]$ComputerName, [Parameter(Mandatory)] [string[]]$FirewallGroup ) Write-LogFunctionEntry $machine = Get-LabVM -ComputerName $ComputerName Invoke-L...
/content/code_sandbox/AutomatedLabCore/functions/Internals/Enable-LabVMFirewallGroup.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
203
```powershell function Update-LabSysinternalsTools { [CmdletBinding()] param ( ) if ($IsLinux -or $IsMacOs) { return } if (Get-LabConfigurationItem -Name SkipSysInternals) {return} #Update SysInternals suite if needed $type = Get-Type -GenericType AutomatedLab.DictionaryXmlStore -T String, Date...
/content/code_sandbox/AutomatedLabCore/functions/Internals/Update-LabSysinternalsTools.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
1,646
```powershell function Disable-LabVMFirewallGroup { [cmdletbinding()] param ( [Parameter(Mandatory)] [string[]]$ComputerName, [Parameter(Mandatory)] [string[]]$FirewallGroup ) Write-LogFunctionEntry $machine = Get-LabVM -ComputerName $ComputerName Invoke-...
/content/code_sandbox/AutomatedLabCore/functions/Internals/Disable-LabVMFirewallGroup.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
203
```powershell function Restart-ServiceResilient { [cmdletbinding()] param ( [string[]]$ComputerName, $ServiceName, [switch]$NoNewLine ) Write-LogFunctionEntry $jobs = Invoke-LabCommand -ComputerName $ComputerName -AsJob -PassThru -NoDisplay -ActivityName "Restart servi...
/content/code_sandbox/AutomatedLabCore/functions/Internals/Restart-ServiceResilient.ps1
powershell
2016-08-23T00:08:15
2024-08-16T12:01:05
AutomatedLab
AutomatedLab/AutomatedLab
1,988
1,585