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 Set-UnattendedYastProductKey
{
param (
[Parameter(Mandatory = $true)]
[string]$ProductKey
)
}
``` | /content/code_sandbox/AutomatedLabUnattended/internal/functions/Suse/Set-UnattendedYastProductKey.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 33 |
```powershell
function Import-UnattendedYastContent
{
param
(
[Parameter(Mandatory = $true)]
[xml]
$Content
)
$script:un = $Content
$script:ns = @{
un = "path_to_url"
'un:config' = "path_to_url"
}
$script:nsm = [System.Xml.XmlNamespaceManag... | /content/code_sandbox/AutomatedLabUnattended/internal/functions/Suse/Import-UnattendedYastContent.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 128 |
```powershell
function Set-UnattendedYastAdministratorName
{
param
(
$Name
)
$userNode = $script:un.SelectSingleNode('/un:profile/un:users', $script:nsm)
$user = $script:un.CreateElement('user', $script:nsm.LookupNamespace('un'))
$username = $script:un.CreateElement('username', $script... | /content/code_sandbox/AutomatedLabUnattended/internal/functions/Suse/Set-UnattendedYastAdministratorName.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 250 |
```powershell
function Add-UnattendedYastSynchronousCommand
{
param (
[Parameter(Mandatory)]
[string]$Command,
[Parameter(Mandatory)]
[string]$Description
)
}
``` | /content/code_sandbox/AutomatedLabUnattended/internal/functions/Suse/Add-UnattendedYastSynchronousCommand.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 42 |
```powershell
function Add-UnattendedYastNetworkAdapter
{
param (
[string]$Interfacename,
[AutomatedLab.IPNetwork[]]$IpAddresses,
[AutomatedLab.IPAddress[]]$Gateways,
[AutomatedLab.IPAddress[]]$DnsServers,
[string]$ConnectionSpecificDNSSuffix,
[string]$DnsDomain,... | /content/code_sandbox/AutomatedLabUnattended/internal/functions/Suse/Add-UnattendedYastNetworkAdapter.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,828 |
```powershell
function Set-UnattendedYastAutoLogon
{
param (
[Parameter(Mandatory = $true)]
[string]$DomainName,
[Parameter(Mandatory = $true)]
[string]$Username,
[Parameter(Mandatory = $true)]
[string]$Password
)
$logonNode = $script:un.CreateElement('login_settings', $script:nsm.LookupNamespace('... | /content/code_sandbox/AutomatedLabUnattended/internal/functions/Suse/Set-UnattendedYastAutoLogon.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 171 |
```powershell
function Set-UnattendedKickstartDomain
{
param (
[Parameter(Mandatory = $true)]
[string]$DomainName,
[Parameter(Mandatory = $true)]
[string]$Username,
[Parameter(Mandatory = $true)]
[string]$Password,
[Parameter()]
[string]$OrganizationalUnit
)
if ($OrganizationalUnit)
{
$scri... | /content/code_sandbox/AutomatedLabUnattended/internal/functions/RedHat/Set-UnattendedKickstartDomain.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 163 |
```powershell
function Set-UnattendedYastFirewallState
{
param (
[Parameter(Mandatory = $true)]
[boolean]$State
)
$fwState = $script:un.SelectSingleNode('/un:profile/un:firewall/un:enable_firewall', $script:nsm)
$fwState.InnerText = $State.ToString().ToLower()
}
``` | /content/code_sandbox/AutomatedLabUnattended/internal/functions/Suse/Set-UnattendedYastFirewallState.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 78 |
```powershell
function Set-UnattendedKickstartAutoLogon
{
param (
[Parameter(Mandatory = $true)]
[string]$DomainName,
[Parameter(Mandatory = $true)]
[string]$Username,
[Parameter(Mandatory = $true)]
[string]$Password
)
Write-PSFMessage -Message "Auto-logon not implemented yet for RHEL/CentOS/Fedo... | /content/code_sandbox/AutomatedLabUnattended/internal/functions/RedHat/Set-UnattendedKickstartAutoLogon.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 91 |
```powershell
function Set-UnattendedKickstartFirewallState
{
param
(
[Parameter(Mandatory = $true)]
[boolean]$State
)
if ($State)
{
$script:un.Add('firewall --enabled')
}
else
{
$script:un.Add('firewall --disabled')
}
}
``` | /content/code_sandbox/AutomatedLabUnattended/internal/functions/RedHat/Set-UnattendedKickstartFirewallState.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 75 |
```powershell
function Set-UnattendedKickstartAdministratorPassword
{
param (
[Parameter(Mandatory = $true)]
[string]$Password
)
$Script:un.Add("rootpw '$Password'")
$Script:un = [System.Collections.Generic.List[string]]($Script:un.Replace('%PASSWORD%', $Password))
}
``` | /content/code_sandbox/AutomatedLabUnattended/internal/functions/RedHat/Set-UnattendedKickstartAdministratorPassword.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 70 |
```powershell
function Add-UnattendedKickstartNetworkAdapter
{
param (
[string]$Interfacename,
[AutomatedLab.IPNetwork[]]$IpAddresses,
[AutomatedLab.IPAddress[]]$Gateways,
[AutomatedLab.IPAddress[]]$DnsServers
)
$linuxInterfaceName = ($Interfacename -replace '-',':').ToLower()
$adapterAddress =... | /content/code_sandbox/AutomatedLabUnattended/internal/functions/RedHat/Add-UnattendedKickstartNetworkAdapter.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 294 |
```powershell
function Set-UnattendedKickstartWorkgroup
{
param
(
[Parameter(Mandatory = $true)]
[string]
$WorkgroupName
)
$script:un.Add(('auth --smbworkgroup={0}' -f $WorkgroupName))
}
``` | /content/code_sandbox/AutomatedLabUnattended/internal/functions/RedHat/Set-UnattendedKickstartWorkgroup.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 60 |
```powershell
function Set-UnattendedKickstartUserLocale
{
param (
[Parameter(Mandatory = $true)]
[string]$UserLocale
)
try
{
$ci = [cultureinfo]::new($UserLocale)
}
catch
{
Write-PSFMessage -Message "Could not determine culture from $UserLocale. Assuming en_... | /content/code_sandbox/AutomatedLabUnattended/internal/functions/RedHat/Set-UnattendedKickstartUserLocale.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 189 |
```powershell
function Import-UnattendedKickstartContent
{
param
(
[Parameter(Mandatory = $true)]
[System.Collections.Generic.List[string]]
$Content
)
$script:un = $Content
}
``` | /content/code_sandbox/AutomatedLabUnattended/internal/functions/RedHat/Import-UnattendedKickstartContent.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 48 |
```powershell
function Set-UnattendedKickstartIpSettings
{
param (
[string]$IpAddress,
[string]$Gateway,
[String[]]$DnsServers,
[string]$DnsDomain
)
if (-not $IpAddress)
{
$configurationItem = "network --bootproto=dhcp"
}
else
{
$configurat... | /content/code_sandbox/AutomatedLabUnattended/internal/functions/RedHat/Set-UnattendedKickstartIpSettings.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 182 |
```powershell
function Set-UnattendedKickstartAntiMalware
{
param (
[Parameter(Mandatory = $true)]
[bool]$Enabled
)
if ($Enabled)
{
$Script:un.Add("selinux --enforcing")
}
else
{
$Script:un.Add("selinux --permissive") # Not a great idea to disable selinux all... | /content/code_sandbox/AutomatedLabUnattended/internal/functions/RedHat/Set-UnattendedKickstartAntiMalware.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 88 |
```powershell
function Set-UnattendedKickstartPackage
{
param
(
[string[]]$Package
)
if ($Package -like '*Gnome*')
{
$script:un.Add('xconfig --startxonboot --defaultdesktop=GNOME')
}
elseif ($Package -like '*KDE*')
{
Write-PSFMessage -Level Warning -Message 'Addi... | /content/code_sandbox/AutomatedLabUnattended/internal/functions/RedHat/Set-UnattendedKickstartPackage.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 325 |
```powershell
function Export-UnattendedKickstartFile
{
param (
[Parameter(Mandatory = $true)]
[string]$Path
)
$idx = $script:un.IndexOf('%post')
if ($idx -eq -1)
{
$script:un.Add('%post')
$idx = $script:un.IndexOf('%post')
}
$repoIp = try {
([Syste... | /content/code_sandbox/AutomatedLabUnattended/internal/functions/RedHat/Export-UnattendedKickstartFile.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 667 |
```powershell
function Set-UnattendedKickstartProductKey
{
param (
[Parameter(Mandatory = $true)]
[string]$ProductKey
)
Write-PSFMessage -Message 'No product key necessary for RHEL/CentOS/Fedora'
}
``` | /content/code_sandbox/AutomatedLabUnattended/internal/functions/RedHat/Set-UnattendedKickstartProductKey.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 56 |
```powershell
function Set-UnattendedKickstartLocalIntranetSites
{
param (
[Parameter(Mandatory = $true)]
[string[]]$Values
)
Write-PSFMessage -Message 'No local intranet sites for RHEL/CentOS/Fedora'
}
``` | /content/code_sandbox/AutomatedLabUnattended/internal/functions/RedHat/Set-UnattendedKickstartLocalIntranetSites.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 60 |
```powershell
function Set-UnattendedKickstartAdministratorName
{
param
(
$Name
)
$script:un.Add("user --name=$Name --groups=wheel --password='%PASSWORD%'")
}
``` | /content/code_sandbox/AutomatedLabUnattended/internal/functions/RedHat/Set-UnattendedKickstartAdministratorName.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 45 |
```powershell
function Add-UnattendedKickstartSynchronousCommand
{
param (
[Parameter(Mandatory)]
[string]$Command,
[Parameter(Mandatory)]
[string]$Description
)
Write-PSFMessage -Message "Adding command to %post section to $Description"
$idx = $script:un.IndexOf('%pos... | /content/code_sandbox/AutomatedLabUnattended/internal/functions/RedHat/Add-UnattendedKickstartSynchronousCommand.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 122 |
```powershell
function Set-UnattendedKickstartComputerName
{
param (
[Parameter(Mandatory = $true)]
[string]$ComputerName
)
$script:un.Add("network --hostname=$ComputerName")
}
``` | /content/code_sandbox/AutomatedLabUnattended/internal/functions/RedHat/Set-UnattendedKickstartComputerName.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 47 |
```powershell
function Add-UnattendedKickstartRenameNetworkAdapters
{
[CmdletBinding()]
param ( )
Write-PSFMessage -Message 'Method not yet implemented for RHEL/CentOS/Fedora'
}
``` | /content/code_sandbox/AutomatedLabUnattended/internal/functions/RedHat/Add-UnattendedKickstartRenameNetworkAdapters.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 47 |
```powershell
function Set-UnattendedKickstartTimeZone
{
param
(
[Parameter(Mandatory = $true)]
[string]$TimeZone
)
$tzInfo = Get-TimeZone -Id $TimeZone -ErrorAction SilentlyContinue
if (-not $tzInfo) { Get-TimeZone }
Write-PSFMessage -Message ('Since non-standard timezone nam... | /content/code_sandbox/AutomatedLabUnattended/internal/functions/RedHat/Set-UnattendedKickstartTimeZone.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 214 |
```powershell
function Set-UnattendedWindowsAntiMalware
{
param (
[Parameter(Mandatory = $true)]
[bool]$Enabled
)
$node = $script:un |
Select-Xml -XPath '//un:settings[@pass = "specialize"]/un:component[@name = "Security-Malware-Windows-Defender"]' -Namespace $ns |
Select-Object -Ex... | /content/code_sandbox/AutomatedLabUnattended/internal/functions/Win/Set-UnattendedWindowsAntiMalware.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 130 |
```powershell
function Set-UnattendedWindowsLocalIntranetSites
{
param (
[Parameter(Mandatory = $true)]
[string[]]$Values
)
$ieNode = $script:un |
Select-Xml -XPath '//un:settings[@pass = "specialize"]/un:component[@name = "Microsoft-Windows-IE-InternetExplorer"]' -Namespace $ns |
Select-Object -ExpandProp... | /content/code_sandbox/AutomatedLabUnattended/internal/functions/Win/Set-UnattendedWindowsLocalIntranetSites.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 109 |
```powershell
function Set-UnattendedWindowsAutoLogon
{
param (
[Parameter(Mandatory = $true)]
[string]$DomainName,
[Parameter(Mandatory = $true)]
[string]$Username,
[Parameter(Mandatory = $true)]
[string]$Password
)
$shellNode = $script:un |
Select-Xml -XPath '//un:settings[@pass = "specialize"]/un:... | /content/code_sandbox/AutomatedLabUnattended/internal/functions/Win/Set-UnattendedWindowsAutoLogon.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 370 |
```powershell
function Add-UnattendedWindowsRenameNetworkAdapters
{
function Add-XmlGroup
{
param
(
$XPath,
$ElementName,
$Action,
$KeyValue
)
Write-Debug -Message "XPath=$XPath"
Write-Debug -Message "ElementName=$ElementNa... | /content/code_sandbox/AutomatedLabUnattended/internal/functions/Win/Add-UnattendedWindowsRenameNetworkAdapters.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 737 |
```powershell
function Set-UnattendedWindowsProductKey
{
param (
[Parameter(Mandatory = $true)]
[string]$ProductKey
)
$setupNode = $script:un |
Select-Xml -XPath '//un:settings[@pass = "specialize"]/un:component[@name = "Microsoft-Windows-Shell-Setup"]' -Namespace $ns |
Select-Object -ExpandProperty Node
$p... | /content/code_sandbox/AutomatedLabUnattended/internal/functions/Win/Set-UnattendedWindowsProductKey.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 127 |
```powershell
function Import-UnattendedWindowsContent
{
param
(
[Parameter(Mandatory = $true)]
[xml]
$Content
)
$script:un = $Content
$script:ns = @{ un = 'urn:schemas-microsoft-com:unattend' }
$Script:wcmNamespaceUrl = 'path_to_url
}
``` | /content/code_sandbox/AutomatedLabUnattended/internal/functions/Win/Import-UnattendedWindowsContent.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 77 |
```powershell
function Set-UnattendedWindowsUserLocale
{
param (
[Parameter(Mandatory = $true)]
[string]$UserLocale
)
if (-not $script:un)
{
Write-Error 'No unattended file imported. Please use Import-UnattendedFile first'
return
}
$component = $script:un |
Select-Xml -XPath '//un:settings[@pass = "oob... | /content/code_sandbox/AutomatedLabUnattended/internal/functions/Win/Set-UnattendedWindowsUserLocale.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 452 |
```powershell
function Set-UnattendedWindowsTimeZone
{
param
(
[Parameter(Mandatory = $true)]
[string]$TimeZone
)
$component = $script:un |
Select-Xml -XPath '//un:settings[@pass = "specialize"]/un:component[@name = "Microsoft-Windows-Shell-Setup"]' -Namespace $ns |
Sele... | /content/code_sandbox/AutomatedLabUnattended/internal/functions/Win/Set-UnattendedWindowsTimeZone.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 97 |
```powershell
function Set-UnattendedWindowsDomain
{
param (
[Parameter(Mandatory = $true)]
[string]$DomainName,
[Parameter(Mandatory = $true)]
[string]$Username,
[Parameter(Mandatory = $true)]
[string]$Password,
[Parameter()]
[string]$OrganizationalUnit
)
$idNode = $script:un |
Select-Xml -XPat... | /content/code_sandbox/AutomatedLabUnattended/internal/functions/Win/Set-UnattededWindowsDomain.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 362 |
```powershell
function Set-UnattendedWindowsAdministratorName
{
param (
[Parameter(Mandatory = $true)]
[string]$Name
)
$shellNode = $script:un |
Select-Xml -XPath '//un:settings[@pass = "oobeSystem"]/un:component[@name = "Microsoft-Windows-Shell-Setup"]' -Namespace $ns |
Select-Object -ExpandProperty Node
$... | /content/code_sandbox/AutomatedLabUnattended/internal/functions/Win/Set-UnattendedWindowsAdministratorName.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 119 |
```powershell
function Set-UnattendedWindowsWorkgroup
{
param
(
[Parameter(Mandatory = $true)]
[string]
$WorkgroupName
)
$idNode = $script:un |
Select-Xml -XPath '//un:settings[@pass = "specialize"]/un:component[@name = "Microsoft-Windows-UnattendedJoin"]/un:Identification' -Namespac... | /content/code_sandbox/AutomatedLabUnattended/internal/functions/Win/Set-UnattendedWindowsWorkgroup.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 142 |
```powershell
function Add-UnattendedWindowsSynchronousCommand
{
param (
[Parameter(Mandatory)]
[string]$Command,
[Parameter(Mandatory)]
[string]$Description
)
$highestOrder = ($un | Select-Xml -Namespace $ns -XPath //un:RunSynchronous).Node.RunSynchronousCommand.Order |
... | /content/code_sandbox/AutomatedLabUnattended/internal/functions/Win/Add-UnattendedWindowsSynchronousCommand.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 332 |
```powershell
function Add-UnattendedWindowsNetworkAdapter
{
param (
[string]$Interfacename,
[AutomatedLab.IPNetwork[]]$IpAddresses,
[AutomatedLab.IPAddress[]]$Gateways,
[AutomatedLab.IPAddress[]]$DnsServers,
[string]$ConnectionSpecificDNSSuffix,
[string]$DnsDomain,
[string]$UseDo... | /content/code_sandbox/AutomatedLabUnattended/internal/functions/Win/Add-UnattendedWindowsNetworkAdapter.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 2,294 |
```powershell
function Set-UnattendedWindowsPackage
{
param
(
[string[]]$Package
)
}
``` | /content/code_sandbox/AutomatedLabUnattended/internal/functions/Win/Set-UnattendedWindowsPackage.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 24 |
```powershell
function Set-UnattendedWindowsAdministratorPassword
{
param (
[Parameter(Mandatory = $true)]
[string]$Password
)
$shellNode = $script:un |
Select-Xml -XPath '//un:settings[@pass = "oobeSystem"]/un:component[@name = "Microsoft-Windows-Shell-Setup"]' -Namespace $ns |
Select-Object -ExpandProperty ... | /content/code_sandbox/AutomatedLabUnattended/internal/functions/Win/Set-UnattendedWindowsAdministratorPassword.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 135 |
```powershell
function Set-UnattendedWindowsFirewallState
{
param (
[Parameter(Mandatory = $true)]
[boolean]$State
)
$setupNode = $script:un |
Select-Xml -XPath '//un:settings[@pass = "specialize"]/un:component[@name = "Networking-MPSSVC-Svc"]' -Namespace $ns |
Select-Object -ExpandProperty Node
$Windows... | /content/code_sandbox/AutomatedLabUnattended/internal/functions/Win/Set-UnattendedWindowsFirewallState.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 246 |
```powershell
function Set-UnattendedWindowsComputerName
{
param (
[Parameter(Mandatory = $true)]
[string]$ComputerName
)
$component = $script:un |
Select-Xml -XPath '//un:settings[@pass = "specialize"]/un:component[@name = "Microsoft-Windows-Shell-Setup"]' -Namespace $ns |
Select-Object -... | /content/code_sandbox/AutomatedLabUnattended/internal/functions/Win/Set-UnattendedWindowsComputerName.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 99 |
```powershell
function Export-UnattendedWindowsFile
{
param (
[Parameter(Mandatory = $true)]
[string]$Path
)
$script:un.Save($Path)
}
``` | /content/code_sandbox/AutomatedLabUnattended/internal/functions/Win/Export-UnattendedWindowsFile.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 39 |
```powershell
function Set-LabSnippet
{
[CmdletBinding()]
param
(
[Parameter(Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName)]
[string]
$Name,
[string[]]
$DependsOn,
[ValidateSet('Sample','Snippet', 'CustomRole')]
[string]
$Type... | /content/code_sandbox/AutomatedLab.Recipe/functions/Set-LabSnippet.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 326 |
```powershell
function Set-UnattendedWindowsIpSettings
{
param (
[string]$IpAddress,
[string]$Gateway,
[String[]]$DnsServers,
[string]$DnsDomain
)
$ethernetInterface = $script:un |
Select-Xml -XPath '//un:settings[@pass = "specialize"]/un:component[@name = "Microsoft-Windows-TCPIP"]/un:Interfac... | /content/code_sandbox/AutomatedLabUnattended/internal/functions/Win/Set-UnattendedWindowsIpSettings.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,297 |
```powershell
function Get-LabRecipe
{
[CmdletBinding()]
param
(
[Parameter()]
[string[]]
$Name,
[Parameter()]
[scriptblock]
$RecipeContent
)
if ($RecipeContent)
{
if ($Name.Count -gt 1)
{
Write-PSFMessage -Level Warni... | /content/code_sandbox/AutomatedLab.Recipe/functions/Get-LabRecipe.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 628 |
```powershell
function Get-LabSnippet
{
[CmdletBinding()]
param
(
[Parameter(ValueFromPipeline, ValueFromPipelineByPropertyName)]
[string[]]
$Name = '*',
[string]
$Description,
[ValidateSet('Sample', 'Snippet', 'CustomRole')]
[string]
$Type =... | /content/code_sandbox/AutomatedLab.Recipe/functions/Get-LabSnippet.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 325 |
```powershell
function Export-LabSnippet
{
[CmdletBinding()]
param
(
[Parameter(Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName)]
[string]
$Name,
[string[]]
$DependsOn,
[switch]
$MetaData
)
process
{
$schnippet = Ge... | /content/code_sandbox/AutomatedLab.Recipe/functions/Export-LabSnippet.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 970 |
```powershell
function Invoke-LabSnippet
{
[CmdletBinding()]
param
(
[Parameter(Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName)]
[string[]]
$Name,
[hashtable]
$LabParameter = @{}
)
begin
{
$scriptBlockOrder = @{}
try { [Aut... | /content/code_sandbox/AutomatedLab.Recipe/functions/Invoke-LabSnippet.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 566 |
```powershell
function New-LabRecipe
{
[CmdletBinding(SupportsShouldProcess)]
param
(
# Name of the lab and recipe
[Parameter(Mandatory)]
[string]
$Name,
# Description of lab
[Parameter()]
[string]
$Description,
[Parameter()]
... | /content/code_sandbox/AutomatedLab.Recipe/functions/New-LabRecipe.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 859 |
```powershell
function Save-LabRecipe
{
[CmdletBinding(SupportsShouldProcess)]
param
(
[Parameter(Mandatory, ValueFromPipeline)]
[pscustomobject]
$Recipe
)
$recipeFileName = Join-Path -Path $HOME -ChildPath "automatedLab\recipes\$($Recipe.Name).json"
if ($PSCmdlet.Shoul... | /content/code_sandbox/AutomatedLab.Recipe/functions/Save-LabRecipe.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 121 |
```powershell
function Update-LabSnippet
{
[CmdletBinding()]
param ( )
# Register all sample scripts
$location = Join-Path -Path (Get-LabSourcesLocation -Local) -ChildPath 'SampleScripts'
if (-not (Test-Path -Path $location)) { return }
foreach ($samplescript in (Get-ChildItem -Recurse -Path $l... | /content/code_sandbox/AutomatedLab.Recipe/functions/Update-LabSnippet.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,218 |
```powershell
function Invoke-LabRecipe
{
[CmdletBinding(SupportsShouldProcess)]
param
(
[Parameter(Mandatory, ValueFromPipelineByPropertyName, ValueFromPipeline, ParameterSetName = 'ByName')]
[string]
$Name,
[Parameter(Mandatory, ValueFromPipeline, ParameterSetName = 'ByRec... | /content/code_sandbox/AutomatedLab.Recipe/functions/Invoke-LabRecipe.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,529 |
```powershell
function Remove-LabRecipe
{
[CmdletBinding(SupportsShouldProcess)]
param
(
[Parameter(Mandatory, ValueFromPipelineByPropertyName, ValueFromPipeline, ParameterSetName = 'ByName')]
[string]
$Name,
[Parameter(Mandatory, ValueFromPipeline, ParameterSetName = 'ByRec... | /content/code_sandbox/AutomatedLab.Recipe/functions/Remove-LabRecipe.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 176 |
```powershell
function New-LabSnippet
{
[CmdletBinding()]
param
(
[Parameter(Mandatory)]
[string]
$Name,
[Parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[string]
$Description,
[Parameter(Mandatory)]
[ValidateSet('Sample', 'Snippet',... | /content/code_sandbox/AutomatedLab.Recipe/functions/New-LabSnippet.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 386 |
```powershell
function Remove-LabSnippet
{
[CmdletBinding()]
param
(
[Parameter(Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName)]
[string[]]
$Name
)
process
{
foreach ($snip in $Name)
{
$snip = $snip -replace 'AutomatedLab\..*\.'... | /content/code_sandbox/AutomatedLab.Recipe/functions/Remove-LabSnippet.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 226 |
```powershell
# Idea from path_to_url
function Get-ClonedObject
{
[CmdletBinding()]
param
(
[object]
$DeepCopyObject
)
$memStream = New-Object -TypeName IO.MemoryStream
$formatter = New-Object -TypeName Runtime.Serialization.Formatters.Binary.BinaryFormatter
$formatter.Seria... | /content/code_sandbox/AutomatedLab.Recipe/internal/functions/Get-ClonedObject.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 101 |
```powershell
# From path_to_url
function Get-TopologicalSort
{
param
(
[Parameter(Mandatory = $true, Position = 0)]
[hashtable]
$EdgeList
)
# Make sure we can use HashSet
Add-Type -AssemblyName System.Core
# Clone it so as to not alter original
$currentEdgeList... | /content/code_sandbox/AutomatedLab.Recipe/internal/functions/Get-TopologicalSort.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 693 |
```powershell
``` | /content/code_sandbox/AutomatedLab.Recipe/internal/scripts/sql.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1 |
```powershell
# Initialize settings
Set-PSFConfig -Module AutomatedLab.Recipe -Name SnippetStore -Value (Join-Path -Path $HOME -ChildPath 'automatedlab/snippets') -Validation string -Initialize -Description 'Snippet and recipe storage location'
Set-PSFConfig -Module AutomatedLab.Recipe -Name UseAzureBlobStorage -Value ... | /content/code_sandbox/AutomatedLab.Recipe/internal/scripts/00init.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 218 |
```powershell
$snippet = {
[CmdletBinding()]
param
(
[Parameter(Mandatory)]
[string]
$Name,
[Parameter(Mandatory)]
[string]
$DefaultVirtualizationEngine,
[Parameter(Mandatory)]
[AutomatedLab.IpNetwork]
$MachineNetwork,
[strin... | /content/code_sandbox/AutomatedLab.Recipe/internal/scripts/definition.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 458 |
```powershell
$snippet = {
[CmdletBinding()]
param
(
[Parameter(Mandatory)]
[string]
$DomainName,
[Parameter(Mandatory)]
[pscredential]
$AdminCredential,
[uint16]
$DomainControllerCount,
[uint16]
$RodcCount,
[switch]... | /content/code_sandbox/AutomatedLab.Recipe/internal/scripts/domain.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 489 |
```powershell
$snippet = {
param
(
[Parameter(Mandatory, ParameterSetName = 'NoDefaultSwitch')]
[switch]
$NoDefaultSwitch,
[Parameter(Mandatory, ParameterSetName = 'NoDefaultSwitch')]
[string]
$AdapterName
)
$externalNetworkName, $adapter = if ($NoDefaul... | /content/code_sandbox/AutomatedLab.Recipe/internal/scripts/internet.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 340 |
```powershell
@{
RootModule = 'AutomatedLabCore.psm1'
ModuleVersion = '1.0.0'
CompatiblePSEditions = 'Core', 'Desktop'
GUID = '6ee6d36f-7914-4bf6-9e3b-c0131669e808'
Author = 'Raimund Andree, Per Pedersen, Jan-Hendrik Peters'
CompanyNa... | /content/code_sandbox/AutomatedLabCore/AutomatedLabCore.psd1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,907 |
```powershell
function Enable-LabInternalRouting
{
[CmdletBinding()]
param
(
[Parameter(Mandatory)]
[string]
$RoutingNetworkName
)
Write-LogFunctionEntry
$routes = Get-FullMesh -List (Get-Lab).VirtualNetworks.Where( { $_.Name -ne $RoutingNetworkName }).AddressSpace.Fore... | /content/code_sandbox/AutomatedLabCore/functions/Routing/Enable-LabInternalRouting.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 539 |
```powershell
function Get-LabVHDX
{
[OutputType([AutomatedLab.Disk])]
param (
[Parameter(Mandatory = $true, ParameterSetName = 'ByName')]
[ValidateNotNullOrEmpty()]
[string[]]$Name,
[Parameter(Mandatory = $true, ParameterSetName = 'All')]
[switch]$All
)
Write-L... | /content/code_sandbox/AutomatedLabCore/functions/Disks/Get-LabVHDX.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 435 |
```powershell
function Install-LabRouting
{
[CmdletBinding()]
param (
[int]$InstallationTimeout = 15,
[ValidateRange(0, 300)]
[int]$ProgressIndicator = (Get-LabConfigurationItem -Name DefaultProgressIndicator)
)
Write-LogFunctionEntry
if (-not $PSBoundParameters.ContainsKe... | /content/code_sandbox/AutomatedLabCore/functions/Routing/Install-LabRouting.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 998 |
```powershell
function Update-LabBaseImage
{
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseCompatibleCmdlets", "")]
[CmdletBinding(PositionalBinding = $false)]
param(
[Parameter(Mandatory)]
[string]$BaseImagePath,
[Parameter(Mandatory)]
[string]$UpdateFolderPath
... | /content/code_sandbox/AutomatedLabCore/functions/Disks/Update-LabBaseImage.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 817 |
```powershell
function New-LabVHDX
{
[CmdletBinding()]
param (
[Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'ByName')]
[string[]]$Name,
[Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'All')]
[switch]$All
)
... | /content/code_sandbox/AutomatedLabCore/functions/Disks/New-LabVHDX.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 705 |
```powershell
function Update-LabIsoImage
{
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseCompatibleCmdlets", "")]
[CmdletBinding(PositionalBinding = $false)]
param(
[Parameter(Mandatory)]
[string]$SourceIsoImagePath,
[Parameter(Mandatory)]
[string]$TargetIsoImage... | /content/code_sandbox/AutomatedLabCore/functions/Disks/Update-LabIsoImage.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,826 |
```powershell
function New-LabBaseImages
{
[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
}
$oses = (Get-LabVm -All | Where-Object {[... | /content/code_sandbox/AutomatedLabCore/functions/Disks/New-LabBaseImages.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,508 |
```powershell
function New-LabCATemplate
{
[cmdletBinding()]
param(
[Parameter(Mandatory)]
[string]$TemplateName,
[string]$DisplayName,
[Parameter(Mandatory)]
[string]$SourceTemplateName,
[ValidateSet('EFS_RECOVERY', 'Auto Update CA Revocation', 'No OCSP Failo... | /content/code_sandbox/AutomatedLabCore/functions/ADCS/New-LabCATemplate.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 918 |
```powershell
function Enable-LabCertificateAutoenrollment
{
[cmdletBinding()]
param
(
[switch]$Computer,
[switch]$User,
[switch]$CodeSigning,
[string]$CodeSigningTemplateName = 'LabCodeSigning'
)
Write-LogFunctionEntry
$issuingCAs = Get-LabIssuingCA
W... | /content/code_sandbox/AutomatedLabCore/functions/ADCS/Enable-LabCertificateAutoenrollment.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 2,730 |
```powershell
function Test-LabCATemplate
{
[cmdletBinding()]
param(
[Parameter(Mandatory)]
[string]$TemplateName,
[Parameter(Mandatory)]
[string]$ComputerName
)
Write-LogFunctionEntry
$computer = Get-LabVM -ComputerName $ComputerName
if (-not $computer)
{... | /content/code_sandbox/AutomatedLabCore/functions/ADCS/Test-LabCATemplate.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 217 |
```powershell
function Request-LabCertificate
{
[CmdletBinding()]
param (
[Parameter(Mandatory, HelpMessage = 'Please enter the subject beginning with CN=')]
[ValidatePattern('CN=')]
[string]$Subject,
[Parameter(HelpMessage = 'Please enter the SAN domains as a comma separated l... | /content/code_sandbox/AutomatedLabCore/functions/ADCS/Request-LabCertificate.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 617 |
```powershell
function Get-LabCertificate
{
[cmdletBinding(DefaultParameterSetName = 'FindCer')]
param (
[Parameter(Mandatory = $true, ParameterSetName = 'FindCer')]
[Parameter(Mandatory = $true, ParameterSetName = 'FindPfx')]
[string]$SearchString,
[Parameter(Mandatory = $true... | /content/code_sandbox/AutomatedLabCore/functions/ADCS/Get-LabCertificate.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 558 |
```powershell
function Add-LabCertificate
{
[cmdletBinding(DefaultParameterSetName = 'ByteArray')]
param(
[Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'File')]
[string]$Path,
[Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $t... | /content/code_sandbox/AutomatedLabCore/functions/ADCS/Add-LabCertificate.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 420 |
```powershell
function Get-LabIssuingCA
{
[OutputType([AutomatedLab.Machine])]
[cmdletBinding()]
param(
[string]$DomainName
)
$lab = Get-Lab
if ($DomainName)
{
if ($DomainName -notin $lab.Domains.Name)
{
Write-Error "The domain '$DomainName' is not def... | /content/code_sandbox/AutomatedLabCore/functions/ADCS/Get-LabIssuingCA.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 435 |
```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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.