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 Set-UnattendedProductKey
{
[CmdletBinding()]
param (
[Parameter(Mandatory = $true)]
[string]$ProductKey
)
Write-PSFMessage "No product key required on CloudInit/Ubuntu"
}
``` | /content/code_sandbox/AutomatedLabUnattended/internal/functions/CloudInit/Set-UnattendedCloudInitProductKey.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 53 |
```powershell
function Set-UnattendedCloudInitDomain
{
[CmdletBinding()]
param (
[Parameter(Mandatory = $true)]
[string]$DomainName,
[Parameter(Mandatory = $true)]
[string]$Username,
[Parameter(Mandatory = $true)]
[string]$Password,
[Parameter()]
[string]$OrganizationalUnit
)
if ($Organizational... | /content/code_sandbox/AutomatedLabUnattended/internal/functions/CloudInit/Set-UnattendedCloudInitDomain.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 179 |
```powershell
function Add-UnattendedCloudInitRenameNetworkAdapters
{
[CmdletBinding()]
param
(
)
Write-PSFMessage -Message 'Method not required on Ubuntu/Cloudinit'
}
``` | /content/code_sandbox/AutomatedLabUnattended/internal/functions/CloudInit/Add-UnattendedCloudInitRenameNetworkAdapters.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 46 |
```powershell
function Set-UnattendedCloudInitAntiMalware
{
[CmdletBinding()]
param (
[Parameter(Mandatory = $true)]
[bool]$Enabled
)
Write-PSFMessage -Message "No anti-malware settings for CloudInit/Ubuntu"
}
``` | /content/code_sandbox/AutomatedLabUnattended/internal/functions/CloudInit/Set-UnattendedCloudInitAntiMalware.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 60 |
```powershell
function Set-UnattendedCloudInitAdministratorPassword
{
param
(
[Parameter(Mandatory = $true)]
[string]
$Password
)
$pw = [System.Text.Encoding]::UTF8.GetBytes($Password)
$sha = [System.Security.Cryptography.SHA512Managed]::new()
$hsh = $sha.ComputeHash($pw... | /content/code_sandbox/AutomatedLabUnattended/internal/functions/CloudInit/Set-UnattendedCloudInitAdministratorPassword.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 100 |
```powershell
function Set-UnattendedYastAdministratorPassword
{
param (
[Parameter(Mandatory = $true)]
[string]$Password
)
$passwordNodes = $script:un.SelectNodes('/un:profile/un:users/un:user/un:user_password', $script:nsm)
foreach ($node in $passwordNodes)
{
$node.InnerText = $Password
}
}
``` | /content/code_sandbox/AutomatedLabUnattended/internal/functions/Suse/Set-UnattendedYastAdministratorPassword.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 85 |
```powershell
function Add-UnattendedYastRenameNetworkAdapters
{
}
``` | /content/code_sandbox/AutomatedLabUnattended/internal/functions/Suse/Add-UnattendedYastRenameNetworkAdapters.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 14 |
```powershell
function Set-UnattendedYastIpSettings
{
param (
[string]$IpAddress,
[string]$Gateway,
[String[]]$DnsServers,
[string]$DnsDomain
)
}
``` | /content/code_sandbox/AutomatedLabUnattended/internal/functions/Suse/Set-UnattendedYastIpSettings.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 45 |
```powershell
function Set-UnattendedYastAntiMalware
{
param (
[Parameter(Mandatory = $true)]
[bool]$Enabled
)
}
``` | /content/code_sandbox/AutomatedLabUnattended/internal/functions/Suse/Set-UnattendedYastAntiMalware.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 33 |
```powershell
function Set-UnattendedYastTimeZone
{
param
(
[Parameter(Mandatory = $true)]
[string]$TimeZone
)
$tzInfo = Get-TimeZone -Id $TimeZone
Write-PSFMessage -Message ('Since non-standard timezone names are used, we revert to Etc/GMT{0}' -f $tzInfo.BaseUtcOffset.TotalHours)
... | /content/code_sandbox/AutomatedLabUnattended/internal/functions/Suse/Set-UnattendedYastTimeZone.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 208 |
```powershell
function Set-UnattendedYastWorkgroup
{
param
(
[Parameter(Mandatory = $true)]
[string]
$WorkgroupName
)
$smbClientNode = $script:un.CreateElement('samba-client', $script:nsm.LookupNamespace('un'))
$boolAttrib = $script:un.CreateAttribute('config','type', $script:nsm.Loo... | /content/code_sandbox/AutomatedLabUnattended/internal/functions/Suse/Set-UnattendedYastWorkgroup.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 544 |
```powershell
function Set-UnattendedCloudInitWorkgroup
{
[CmdletBinding()]
param (
[Parameter(Mandatory = $true)]
[string]$WorkgroupName
)
$script:un['late-commands'] += "sed -i 's|[#]*workgroup = WORKGROUP|workgroup = {0}|g' /etc/samba/smb.conf" -f $WorkgroupName
}
``` | /content/code_sandbox/AutomatedLabUnattended/internal/functions/CloudInit/Set-UnattendedCloudInitWorkgroup.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 88 |
```powershell
function Set-UnattendedYastUserLocale
{
param (
[Parameter(Mandatory = $true)]
[string]$UserLocale
)
$language = $script:un.SelectSingleNode('/un:profile/un:language', $script:nsm)
$languageNode = $script:un.SelectSingleNode('/un:profile/un:language/un:language', $script:n... | /content/code_sandbox/AutomatedLabUnattended/internal/functions/Suse/Set-UnattendedYastUserLocale.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 285 |
```powershell
function Set-UnattendedYastComputerName
{
param (
[Parameter(Mandatory = $true)]
[string]$ComputerName
)
$component = $script:un.SelectSingleNode('/un:profile/un:networking/un:dns/un:hostname', $script:nsm)
$component.InnerText = $ComputerName
}
``` | /content/code_sandbox/AutomatedLabUnattended/internal/functions/Suse/Set-UnattendedYastComputerName.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 71 |
```powershell
function Set-UnattendedYastDomain
{
param (
[Parameter(Mandatory = $true)]
[string]$DomainName,
[Parameter(Mandatory = $true)]
[string]$Username,
[Parameter(Mandatory = $true)]
[string]$Password,
[Parameter()]
[string]$OrganizationalUnit
)
$smbClientNode = $script:un.CreateElemen... | /content/code_sandbox/AutomatedLabUnattended/internal/functions/Suse/Set-UnattendedYastDomain.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,400 |
```powershell
function Set-UnattendedYastLocalIntranetSites
{
param (
[Parameter(Mandatory = $true)]
[string[]]$Values
)
}
``` | /content/code_sandbox/AutomatedLabUnattended/internal/functions/Suse/Set-UnattendedYastLocalIntranetSites.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 36 |
```powershell
function Set-UnattendedYastPackage
{
param
(
[string[]]$Package
)
$packagesNode = $script:un.SelectSingleNode('/un:profile/un:software/un:patterns', $script:nsm)
foreach ($p in $Package)
{
$packageNode = $script:un.CreateElement('pattern', $script:nsm.LookupNamespa... | /content/code_sandbox/AutomatedLabUnattended/internal/functions/Suse/Set-UnattendedYastPackage.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 108 |
```powershell
function Export-UnattendedYastFile
{
param (
[Parameter(Mandatory = $true)]
[string]$Path
)
$script:un.Save($Path)
}
``` | /content/code_sandbox/AutomatedLabUnattended/internal/functions/Suse/Export-UnattendedYastFile.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 40 |
```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
foreach ($file in Get-ChildItem -Path "$PSScriptRoot/internal/functions" -Filter *.ps1 -Recurse) {
. $file.FullName
}
foreach ($file in Get-ChildItem -Path "$PSScriptRoot/functions" -Filter *.ps1 -Recurse) {
. $file.FullName
}
foreach ($file in Get-ChildItem -Path "$PSScriptRoot/internal/scripts... | /content/code_sandbox/AutomatedLab.Recipe/AutomatedLab.Recipe.psm1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 108 |
```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
foreach ($file in Get-ChildItem -Path "$PSScriptRoot/internal/functions" -Filter *.ps1 -Recurse) {
. $file.FullName
}
foreach ($file in Get-ChildItem -Path "$PSScriptRoot/functions" -Filter *.ps1 -Recurse) {
. $file.FullName
}
foreach ($file in Get-ChildItem -Path "$PSScriptRoot/internal/scripts... | /content/code_sandbox/AutomatedLabCore/AutomatedLabCore.psm1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 108 |
```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 |
```xml
<?xml version="1.0" encoding="utf-8" ?>
<Configuration>
<ViewDefinitions>
<View>
<Name>AutomatedLab.ValidationMessage</Name>
<ViewSelectedBy>
<TypeName>AutomatedLab.ValidationMessage</TypeName>
</ViewSelectedBy>
<TableControl>
<AutoSize />
<TableHeaders>
... | /content/code_sandbox/AutomatedLabCore/AutomatedLabCore.format.ps1xml | xml | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 2,262 |
```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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.