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 Wait-LWLabJob
{
Param
(
[Parameter(Mandatory, ParameterSetName = 'ByJob')]
[AllowNull()]
[AllowEmptyCollection()]
[System.Management.Automation.Job[]]$Job,
[Parameter(Mandatory, ParameterSetName = 'ByName')]
[string[]]$Name,
[Valid... | /content/code_sandbox/AutomatedLabWorker/functions/Core/Wait-LWLabJob.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 667 |
```powershell
function Uninstall-LWAzureWindowsFeature
{
[cmdletBinding()]
param (
[Parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[AutomatedLab.Machine[]]$Machine,
[Parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[string[]]$FeatureName,
[switch]$Incl... | /content/code_sandbox/AutomatedLabWorker/functions/Core/Uninstall-LWAzureWindowsFeature.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 700 |
```powershell
function Install-LWAzureWindowsFeature
{
[cmdletBinding()]
param (
[Parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[AutomatedLab.Machine[]]$Machine,
[Parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[string[]]$FeatureName,
[switch]$Includ... | /content/code_sandbox/AutomatedLabWorker/functions/Core/Install-LWAzureWindowsFeature.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 758 |
```powershell
function Install-LWHypervWindowsFeature
{
[cmdletBinding()]
param (
[Parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[AutomatedLab.Machine[]]$Machine,
[Parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[string[]]$FeatureName,
[switch]$Inclu... | /content/code_sandbox/AutomatedLabWorker/functions/Core/Install-LWHypervWindowsFeature.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 791 |
```powershell
function Invoke-LWCommand
{
param (
[Parameter(Mandatory)]
[string[]]$ComputerName,
[Parameter(Mandatory)]
[System.Management.Automation.Runspaces.PSSession[]]$Session,
[string]$ActivityName,
[Parameter(Mandatory, ParameterSetName = 'FileContentDepend... | /content/code_sandbox/AutomatedLabWorker/functions/Core/Invoke-LWCommand.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 2,549 |
```powershell
function Get-LWAzureWindowsFeature
{
[cmdletBinding()]
param (
[Parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[AutomatedLab.Machine[]]$Machine,
[Parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[string[]]$FeatureName,
[switch]$UseLocalCr... | /content/code_sandbox/AutomatedLabWorker/functions/Core/Get-LWAzureWindowsFeature.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,035 |
```powershell
function Set-LWAzureDnsServer
{
param
(
[Parameter(Mandatory)]
[AutomatedLab.VirtualNetwork[]]
$VirtualNetwork,
[switch]
$PassThru
)
Test-LabHostConnected -Throw -Quiet
Write-LogFunctionEntry
foreach ($network in $VirtualNetwork)
{
... | /content/code_sandbox/AutomatedLabWorker/functions/AzureWorkerNetwork/Set-LWAzureDnsServer.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 314 |
```powershell
function Get-LWHypervWindowsFeature
{
[cmdletBinding()]
param (
[Parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[AutomatedLab.Machine[]]$Machine,
[Parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[string[]]$FeatureName,
[switch]$UseLocalC... | /content/code_sandbox/AutomatedLabWorker/functions/Core/Get-LWHypervWindowsFeature.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,045 |
```powershell
function Add-LWAzureLoadBalancedPort
{
param
(
[Parameter(Mandatory)]
[uint16]
$Port,
[Parameter(Mandatory)]
[uint16]
$DestinationPort,
[Parameter(Mandatory)]
[string]
$ComputerName
)
Test-LabHostConnected -Throw -Q... | /content/code_sandbox/AutomatedLabWorker/functions/AzureWorkerNetwork/Add-LWAzureLoadBalancedPort.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 694 |
```powershell
function Get-LabAzureLoadBalancedPort
{
param
(
[Parameter()]
[uint16]
$Port,
[uint16]
$DestinationPort,
[Parameter(Mandatory)]
[string]
$ComputerName
)
$lab = Get-Lab -ErrorAction SilentlyContinue
if (-not $lab)
{... | /content/code_sandbox/AutomatedLabWorker/functions/AzureWorkerNetwork/Get-LabAzureLoadBalancedPort.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 354 |
```powershell
function Get-LWAzureNetworkSwitch
{
param
(
[Parameter(Mandatory)]
[AutomatedLab.VirtualNetwork[]]
$virtualNetwork
)
Test-LabHostConnected -Throw -Quiet
$lab = Get-Lab
$jobs = @()
foreach ($network in $VirtualNetwork)
{
Write-PSFMessage -M... | /content/code_sandbox/AutomatedLabWorker/functions/AzureWorkerNetwork/Get-LWAzureNetworkSwitch.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 159 |
```powershell
Function Test-IpInSameSameNetwork
{
param
(
[AutomatedLab.IPNetwork]$Ip1,
[AutomatedLab.IPNetwork]$Ip2
)
$ip1Decimal = $Ip1.SerializationNetworkAddress
$ip2Decimal = $Ip2.SerializationNetworkAddress
$ip1Total = $Ip1.Total
$ip2Total = $Ip2.Total
if (($ip1Decimal -ge $ip2... | /content/code_sandbox/AutomatedLabWorker/functions/Internals/Test-IpInSameSameNetwork.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 183 |
```powershell
function Get-LWAzureLoadBalancedPort
{
param
(
[Parameter()]
[uint16]
$Port,
[Parameter()]
[uint16]
$DestinationPort,
[Parameter(Mandatory)]
[string]
$ComputerName
)
Test-LabHostConnected -Throw -Quiet
$lab = G... | /content/code_sandbox/AutomatedLabWorker/functions/AzureWorkerNetwork/Get-LWAzureLoadBalancedPort.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 430 |
```powershell
function Save-LWHypervVM
{
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseCompatibleCmdlets", "", Justification="Not relevant on Linux")]
param (
[Parameter(Mandatory)]
[string[]]$ComputerName
)
$runspaceScript = {
param
(
[string]$Nam... | /content/code_sandbox/AutomatedLabWorker/functions/VirtualMachines/Save-LWHypervVM.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 235 |
```powershell
function Restore-LWHypervVMSnapshot
{
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseCompatibleCmdlets", "", Justification="Not relevant on Linux")]
[Cmdletbinding()]
Param (
[Parameter(Mandatory)]
[string[]]$ComputerName,
[Parameter(Mandatory)]
[stri... | /content/code_sandbox/AutomatedLabWorker/functions/VirtualMachines/Restore-LWHypervVMSnapshot.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 792 |
```powershell
function Get-LWHypervVM
{
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseCompatibleCmdlets", "", Justification = "Not relevant on Linux")]
[CmdletBinding()]
Param
(
[Parameter()]
[string[]]
$Name,
[Parameter()]
[bool]
$DisableClust... | /content/code_sandbox/AutomatedLabWorker/functions/VirtualMachines/Get-LWHypervVM.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 464 |
```powershell
function Mount-LWIsoImage
{
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseCompatibleCmdlets", "", Justification="Not relevant on Linux")]
param(
[Parameter(Mandatory, Position = 0)]
[string[]]$ComputerName,
[Parameter(Mandatory, Position = 1)]
[string]$I... | /content/code_sandbox/AutomatedLabWorker/functions/VirtualMachines/Mount-LWIsoImage.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 860 |
```powershell
function Dismount-LWIsoImage
{
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseCompatibleCmdlets", "", Justification="Not relevant on Linux")]
param(
[Parameter(Mandatory, Position = 0)]
[string[]]$ComputerName
)
$machines = Get-LabVM -ComputerName $ComputerName
... | /content/code_sandbox/AutomatedLabWorker/functions/VirtualMachines/Dismount-LWIsoImage.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 214 |
```powershell
function Remove-LWHypervVMSnapshot
{
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseCompatibleCmdlets", "", Justification="Not relevant on Linux")]
[Cmdletbinding()]
Param (
[Parameter(Mandatory, ParameterSetName = 'BySnapshotName')]
[Parameter(Mandatory, ParameterSet... | /content/code_sandbox/AutomatedLabWorker/functions/VirtualMachines/Remove-LWHypervVMSnapshot.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 415 |
```powershell
function Get-LWHypervVMSnapshot
{
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseCompatibleCmdlets", "", Justification="Not relevant on Linux")]
[Cmdletbinding()]
Param
(
[string[]]$VMName,
[string]$Name
)
Write-LogFunctionEntry
(Hyper-V\Get-VMSnaps... | /content/code_sandbox/AutomatedLabWorker/functions/VirtualMachines/Get-LWHypervVMSnapshot.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 120 |
```powershell
function Set-LWHypervVMDescription
{
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseCompatibleCmdlets", "", Justification="Not relevant on Linux")]
[CmdletBinding()]
param (
[Parameter(Mandatory)]
[hashtable]$Hashtable,
[Parameter(Mandatory)]
[string]... | /content/code_sandbox/AutomatedLabWorker/functions/VirtualMachines/Set-LWHypervVMDescription.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 177 |
```powershell
function Start-LWHypervVM
{
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseCompatibleCmdlets", "", Justification="Not relevant on Linux")]
param (
[Parameter(Mandatory)]
[string[]]$ComputerName,
[int]$DelayBetweenComputers = 0,
[int]$PreDelaySeconds = 0,... | /content/code_sandbox/AutomatedLabWorker/functions/VirtualMachines/Start-LWHypervVM.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 525 |
```powershell
function Get-LWHypervVMStatus
{
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseCompatibleCmdlets", "", Justification="Not relevant on Linux")]
param (
[Parameter(Mandatory)]
[string[]]$ComputerName
)
Write-LogFunctionEntry
$result = @{ }
$vms = Get-LWHyp... | /content/code_sandbox/AutomatedLabWorker/functions/VirtualMachines/Get-LWHypervVMStatus.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 252 |
```powershell
function New-LWHypervVmConnectSettingsFile
{
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseCompatibleCmdlets", "", Justification="Not relevant on Linux")]
[Cmdletbinding(PositionalBinding = $false)]
#In the parameter block, 'HelpMessageResourceId' is misused to store the type that i... | /content/code_sandbox/AutomatedLabWorker/functions/VirtualMachines/New-LWHypervVmConnectSettingsFile.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 934 |
```powershell
function Get-LWHypervVMDescription
{
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseCompatibleCmdlets", "", Justification="Not relevant on Linux")]
[CmdletBinding()]
param (
[Parameter(Mandatory)]
[string]$ComputerName
)
Write-LogFunctionEntry
$noteP... | /content/code_sandbox/AutomatedLabWorker/functions/VirtualMachines/Get-LWHypervVMDescription.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 483 |
```powershell
function Repair-LWHypervNetworkConfig
{
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseCompatibleCmdlets", "", Justification="Not relevant on Linux")]
[CmdletBinding()]
param(
[Parameter(Mandatory)]
[string]$ComputerName
)
Write-LogFunctionEntry
$machine... | /content/code_sandbox/AutomatedLabWorker/functions/VirtualMachines/Repair-LWHypervNetworkConfig.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,034 |
```powershell
function New-LWHypervVM
{
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseCompatibleCmdlets", "", Justification="Not relevant on Linux")]
[Cmdletbinding()]
Param (
[Parameter(Mandatory)]
[AutomatedLab.Machine]$Machine
)
$PSBoundParameters.Add('ProgressIndicato... | /content/code_sandbox/AutomatedLabWorker/functions/VirtualMachines/New-LWHypervVM.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 11,497 |
```powershell
function Wait-LWHypervVMRestart
{
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseCompatibleCmdlets", "", Justification="Not relevant on Linux")]
param (
[Parameter(Mandatory)]
[string[]]$ComputerName,
[double]$TimeoutInMinutes = 15,
[ValidateRange(1, 300... | /content/code_sandbox/AutomatedLabWorker/functions/VirtualMachines/Wait-LWHypervVMRestart.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,537 |
```powershell
function Remove-LWHypervVM
{
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseCompatibleCmdlets", "", Justification="Not relevant on Linux")]
Param (
[Parameter(Mandatory)]
[string]$Name
)
Write-LogFunctionEntry
$vm = Get-LWHypervVM -Name $Name -ErrorAction Si... | /content/code_sandbox/AutomatedLabWorker/functions/VirtualMachines/Remove-LWHypervVM.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 462 |
```powershell
function Stop-LWHypervVM
{
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseCompatibleCmdlets", "", Justification="Not relevant on Linux")]
param (
[Parameter(Mandatory)]
[string[]]$ComputerName,
[double]$TimeoutInMinutes,
[int]$ProgressIndicator,
... | /content/code_sandbox/AutomatedLabWorker/functions/VirtualMachines/Stop-LWHypervVM.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 889 |
```powershell
function Enable-LWHypervVMRemoting
{
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseCompatibleCmdlets", "", Justification="Not relevant on Linux")]
param(
[Parameter(Mandatory, Position = 0)]
[string[]]$ComputerName
)
$machines = Get-LabVM -ComputerName $Computer... | /content/code_sandbox/AutomatedLabWorker/functions/VirtualMachines/Enable-LWHypervVMRemoting.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 393 |
```powershell
function Checkpoint-LWHypervVM
{
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseCompatibleCmdlets", "", Justification="Not relevant on Linux")]
[Cmdletbinding()]
Param (
[Parameter(Mandatory)]
[string[]]$ComputerName,
[Parameter(Mandatory)]
[string]$S... | /content/code_sandbox/AutomatedLabWorker/functions/VirtualMachines/Checkpoint-LWHypervVM.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 739 |
```powershell
function Remove-LWHypervVmConnectSettingsFile
{
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseCompatibleCmdlets", "", Justification="Not relevant on Linux")]
[Cmdletbinding()]
param (
[Parameter(Mandatory)]
[string]$ComputerName
)
Write-LogFunctionEntry
... | /content/code_sandbox/AutomatedLabWorker/functions/VirtualMachines/Remove-LWHypervVmConnectSettingsFile.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 164 |
```powershell
function Get-LWVMWareNetworkSwitch
{
param (
[Parameter(Mandatory)]
[AutomatedLab.VirtualNetwork[]]$VirtualNetwork
)
Write-LogFunctionEntry
foreach ($network in $VirtualNetwork)
{
$network = Get-VDPortgroup -Name $network.Name
if (-not $network)
... | /content/code_sandbox/AutomatedLabWorker/functions/VMWareWorkerNetwork/Get-LWVMWareNetworkSwitch.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 105 |
```powershell
function Get-LWHypervNetworkSwitchDescription
{
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseCompatibleCmdlets", "", Justification="Not relevant on Linux")]
[CmdletBinding()]
param (
[Parameter(Mandatory)]
[string]$NetworkSwitchName
)
Write-LogFunctionEntry... | /content/code_sandbox/AutomatedLabWorker/functions/Network/Get-LWHypervNetworkSwitchDescription.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 297 |
```powershell
function Set-LWHypervNetworkSwitchDescription
{
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseCompatibleCmdlets", "", Justification="Not relevant on Linux")]
[CmdletBinding()]
param (
[Parameter(Mandatory)]
[hashtable]$Hashtable,
[Parameter(Mandatory)]
... | /content/code_sandbox/AutomatedLabWorker/functions/Network/Set-LWHypervNetworkSwitchDescription.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 182 |
```powershell
function Remove-LWNetworkSwitch
{
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseCompatibleCmdlets", "", Justification="Not relevant on Linux")]
param (
[Parameter(Mandatory)]
[string]$Name
)
Write-LogFunctionEntry
if (-not (Get-VMSwitch -Name $Name -ErrorAc... | /content/code_sandbox/AutomatedLabWorker/functions/Network/Remove-LWNetworkSwitch.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 304 |
```powershell
function Test-SimpleNullComparsion
{
[CmdletBinding()]
[OutputType([Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic.DiagnosticRecord[]])]
param (
[Parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[System.Management.Automation.Language.ScriptBlockAst]
$Scri... | /content/code_sandbox/scriptanalyzer/ALCustomRules.psm1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 739 |
```powershell
@{
#Severity = @('Error', 'Warning')
'ExcludeRules' = @(
'PSUseDeclaredVarsMoreThanAssignments',
'PSAvoidGlobalVars',
'PSAvoidUsingUsernameAndPasswordParams',
'PSAvoidUsingWMICmdlet',
'PSAvoidUsingPlainTextForPassword',
'PSAvoidUsingEmptyCatchB... | /content/code_sandbox/scriptanalyzer/AutomatedLabRules.psd1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 327 |
```powershell
function New-LWHypervNetworkSwitch
{
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseCompatibleCmdlets", "", Justification="Not relevant on Linux")]
param (
[Parameter(Mandatory)]
[AutomatedLab.VirtualNetwork[]]$VirtualNetwork,
[switch]$PassThru
)
Write-L... | /content/code_sandbox/AutomatedLabWorker/functions/Network/New-LWHypervNetworkSwitch.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 1,541 |
```powershell
@{
RootModule = 'HostsFile.psm1'
ModuleVersion = '1.0.0'
CompatiblePSEditions = 'Core', 'Desktop'
GUID = '8dc3dd5c-5ae8-4198-a8f2-2157ab6b725c'
Author = 'Raimund Andree, Per Pedersen'
CompanyName = 'AutomatedL... | /content/code_sandbox/HostsFile/HostsFile.psd1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 246 |
```powershell
function Clear-HostFile
{
[CmdletBinding()]
param
(
[Parameter(Mandatory)]
[string]$Section
)
$hostContent, $hostEntries = Get-HostFile
$startMark = ("#$Section - start").ToLower()
$endMark = ("#$Section - end").ToLower()
$startPosition = $hostContent.In... | /content/code_sandbox/HostsFile/functions/Core/Clear-HostFile.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 202 |
```powershell
function Remove-HostEntry
{
[CmdletBinding()]
param (
[Parameter(Mandatory, ParameterSetName = 'ByIpAddress')]
[System.Net.IPAddress]$IpAddress,
[Parameter(Mandatory, ParameterSetName = 'ByHostName')]
$HostName,
[Parameter(Mandatory, ParameterSetName = 'By... | /content/code_sandbox/HostsFile/functions/Core/Remove-HostEntry.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 462 |
```powershell
function Get-HostFile
{
[CmdletBinding()]
param
(
[switch]$SuppressOutput,
[string]$Section
)
$hostContent = New-Object -TypeName System.Collections.ArrayList
$hostEntries = New-Object -TypeName System.Collections.ArrayList
Write-PSFMessage "Opening file '$sc... | /content/code_sandbox/HostsFile/functions/Core/Get-HostFile.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 614 |
```powershell
function Add-HostEntry
{
[CmdletBinding()]
param (
[Parameter(Mandatory, ParameterSetName = 'ByString')]
[System.Net.IPAddress]$IpAddress,
[Parameter(Mandatory, ParameterSetName = 'ByString')]
$HostName,
[Parameter(Mandatory, ParameterSetName = 'ByHostEntr... | /content/code_sandbox/HostsFile/functions/Core/Add-HostEntry.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 362 |
```powershell
function Get-HostEntry
{
[CmdletBinding()]
param (
[Parameter(ParameterSetName = 'ByHostName')]
[ValidateNotNullOrEmpty()][string]$HostName,
[Parameter(ParameterSetName = 'ByIpAddress')]
[ValidateNotNullOrEmpty()]
[System.Net.IPAddress]$IpAddress,
... | /content/code_sandbox/HostsFile/functions/Core/Get-HostEntry.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 282 |
```powershell
$script:hostFilePath = if ($PSEdition -eq 'Desktop' -or $IsWindows)
{
"$($env:SystemRoot)\System32\drivers\etc\hosts"
}
elseif ($PSEdition -eq 'Core' -and $IsLinux)
{
'/etc/hosts'
}
$type = @'
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threa... | /content/code_sandbox/HostsFile/internal/scripts/Initialize.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 362 |
```powershell
@{
RootModule = 'AutomatedLabUnattended.psm1'
ModuleVersion = '1.0.0'
CompatiblePSEditions = 'Core', 'Desktop'
GUID = 'b20c8df3-3f74-4537-a40b-b53186084dd5'
Author = 'Raimund Andree, Per Pedersen'
CompanyName ... | /content/code_sandbox/AutomatedLabUnattended/AutomatedLabUnattended.psd1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 405 |
```powershell
function Set-UnattendedProductKey
{
[CmdletBinding(DefaultParameterSetName = 'Windows')]
param (
[Parameter(ParameterSetName = 'Windows', Mandatory = $true)]
[Parameter(ParameterSetName = 'Kickstart', Mandatory = $true)]
[Parameter(ParameterSetName = 'Yast', Mandatory = $tr... | /content/code_sandbox/AutomatedLabUnattended/functions/Set-UnattendedProductKey.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 248 |
```powershell
function Set-UnattendedAutoLogon
{
[CmdletBinding(DefaultParameterSetName = 'Windows')]
param (
[Parameter(ParameterSetName = 'Windows', Mandatory = $true)]
[Parameter(ParameterSetName = 'Kickstart', Mandatory = $true)]
[Parameter(ParameterSetName = 'Yast', Mandatory = $tru... | /content/code_sandbox/AutomatedLabUnattended/functions/Set-UnattendedAutoLogon.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 379 |
```powershell
function Set-UnattendedComputerName
{
[CmdletBinding(DefaultParameterSetName = 'Windows')]
param (
[Parameter(ParameterSetName = 'Windows', Mandatory = $true)]
[Parameter(ParameterSetName = 'Kickstart', Mandatory = $true)]
[Parameter(ParameterSetName = 'Yast', Mandatory = $... | /content/code_sandbox/AutomatedLabUnattended/functions/Set-UnattendedComputerName.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 248 |
```powershell
function Set-UnattendedPackage
{
[CmdletBinding(DefaultParameterSetName = 'Windows')]
param (
[Parameter(ParameterSetName = 'Windows', Mandatory = $true)]
[Parameter(ParameterSetName = 'Kickstart', Mandatory = $true)]
[Parameter(ParameterSetName = 'Yast', Mandatory = $true)... | /content/code_sandbox/AutomatedLabUnattended/functions/Set-UnattendedPackage.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 247 |
```powershell
function Import-UnattendedFile
{
[CmdletBinding()]
param (
[Parameter(Mandatory = $true)]
[string]$Path
)
$script:un = [xml](Get-Content -Path $Path)
$script:ns = @{ un = 'urn:schemas-microsoft-com:unattend' }
$Script:wcmNamespaceUrl = 'path_to_url
}
``` | /content/code_sandbox/AutomatedLabUnattended/functions/Import-UnattendedFile.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 86 |
```powershell
function Add-UnattendedNetworkAdapter
{
[CmdletBinding(DefaultParameterSetName = 'Windows')]
param (
[Parameter(ParameterSetName='Windows')]
[Parameter(ParameterSetName='Kickstart')]
[Parameter(ParameterSetName='Yast')]
[Parameter(ParameterSetName='CloudInit')]
... | /content/code_sandbox/AutomatedLabUnattended/functions/Add-UnattendedNetworkAdapter.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 672 |
```powershell
function Add-UnattendedRenameNetworkAdapters
{
[CmdletBinding(DefaultParameterSetName = 'Windows')]
param
(
[Parameter(ParameterSetName='Kickstart')]
[switch]
$IsKickstart,
[Parameter(ParameterSetName='Yast')]
[switch]
$IsAutoYast,
[Parame... | /content/code_sandbox/AutomatedLabUnattended/functions/Add-UnattendedRenameNetworkAdapters.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 164 |
```powershell
function Set-UnattendedWorkgroup
{
[CmdletBinding(DefaultParameterSetName = 'Windows')]
param (
[Parameter(ParameterSetName = 'Windows', Mandatory = $true)]
[Parameter(ParameterSetName = 'Kickstart', Mandatory = $true)]
[Parameter(ParameterSetName = 'Yast', Mandatory = $tru... | /content/code_sandbox/AutomatedLabUnattended/functions/Set-UnattendedWorkgroup.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 248 |
```powershell
function Set-UnattendedDomain
{
[CmdletBinding(DefaultParameterSetName = 'Windows')]
param (
[Parameter(ParameterSetName = 'Windows', Mandatory = $true)]
[Parameter(ParameterSetName = 'Kickstart', Mandatory = $true)]
[Parameter(ParameterSetName = 'Yast', Mandatory = $true)]
[Parameter(ParameterS... | /content/code_sandbox/AutomatedLabUnattended/functions/Set-UnattendedDomain.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 409 |
```powershell
function Import-UnattendedContent
{
[CmdletBinding(DefaultParameterSetName = 'Windows')]
param (
[Parameter(ParameterSetName = 'Windows', Mandatory = $true)]
[Parameter(ParameterSetName = 'Kickstart', Mandatory = $true)]
[Parameter(ParameterSetName = 'Yast', Mandatory = $tr... | /content/code_sandbox/AutomatedLabUnattended/functions/Import-UnattendedContent.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 214 |
```powershell
function Set-UnattendedFirewallState
{
[CmdletBinding(DefaultParameterSetName = 'Windows')]
param (
[Parameter(ParameterSetName = 'Windows', Mandatory = $true)]
[Parameter(ParameterSetName = 'Kickstart', Mandatory = $true)]
[Parameter(ParameterSetName = 'Yast', Mandatory = ... | /content/code_sandbox/AutomatedLabUnattended/functions/Set-UnattendedFirewallState.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 248 |
```powershell
function Add-UnattendedSynchronousCommand
{
[CmdletBinding(DefaultParameterSetName = 'Windows')]
param (
[Parameter(ParameterSetName='Windows', Mandatory = $true)]
[Parameter(ParameterSetName='Kickstart', Mandatory = $true)]
[Parameter(ParameterSetName='Yast', Mandatory = $tru... | /content/code_sandbox/AutomatedLabUnattended/functions/Add-UnattendedSynchronousCommand.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 304 |
```powershell
function Set-UnattendedAdministratorName
{
[CmdletBinding(DefaultParameterSetName = 'Windows')]
param (
[Parameter(ParameterSetName = 'Windows', Mandatory = $true)]
[Parameter(ParameterSetName = 'Kickstart', Mandatory = $true)]
[Parameter(ParameterSetName = 'Yast', Mandator... | /content/code_sandbox/AutomatedLabUnattended/functions/Set-UnattendedAdministratorName.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 247 |
```powershell
function Export-UnattendedFile
{
[CmdletBinding(DefaultParameterSetName = 'Windows')]
param (
[Parameter(ParameterSetName='Windows', Mandatory = $true)]
[Parameter(ParameterSetName='Kickstart', Mandatory = $true)]
[Parameter(ParameterSetName='Yast', Mandatory = $true)]
... | /content/code_sandbox/AutomatedLabUnattended/functions/Export-UnattendedFile.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 238 |
```powershell
function Set-UnattendedLocalIntranetSites
{
[CmdletBinding(DefaultParameterSetName = 'Windows')]
param (
[Parameter(ParameterSetName = 'Windows', Mandatory = $true)]
[Parameter(ParameterSetName = 'Kickstart', Mandatory = $true)]
[Parameter(ParameterSetName = 'Yast', Mandatory = $... | /content/code_sandbox/AutomatedLabUnattended/functions/Set-UnattendedLocalIntranetSites.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 246 |
```powershell
function Set-UnattendedUserLocale
{
[CmdletBinding(DefaultParameterSetName = 'Windows')]
param (
[Parameter(ParameterSetName = 'Windows', Mandatory = $true)]
[Parameter(ParameterSetName = 'Kickstart', Mandatory = $true)]
[Parameter(ParameterSetName = 'Yast', Mandatory = $tr... | /content/code_sandbox/AutomatedLabUnattended/functions/Set-UnattendedUserLocale.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 248 |
```powershell
function Set-UnattendedTimeZone
{
[CmdletBinding(DefaultParameterSetName = 'Windows')]
param
(
[Parameter(ParameterSetName = 'Windows', Mandatory = $true)]
[Parameter(ParameterSetName = 'Kickstart', Mandatory = $true)]
[Parameter(ParameterSetName = 'Yast', Mandatory = $... | /content/code_sandbox/AutomatedLabUnattended/functions/Set-UnattendedTimeZone.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 248 |
```powershell
function Get-UnattendedContent
{
[CmdletBinding()]
param ()
return $script:un
}
``` | /content/code_sandbox/AutomatedLabUnattended/functions/Get-UnattendedContent.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 23 |
```powershell
function Set-UnattendedIpSettings
{
[CmdletBinding(DefaultParameterSetName = 'Windows')]
param (
[Parameter(ParameterSetName = 'Windows')]
[Parameter(ParameterSetName = 'Kickstart')]
[Parameter(ParameterSetName = 'Yast')]
[Parameter(ParameterSetName = 'CloudInit')]
... | /content/code_sandbox/AutomatedLabUnattended/functions/Set-UnattendedIpSettings.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 367 |
```powershell
function Set-UnattendedAdministratorPassword
{
[CmdletBinding(DefaultParameterSetName = 'Windows')]
param (
[Parameter(ParameterSetName = 'Windows', Mandatory = $true)]
[Parameter(ParameterSetName = 'Kickstart', Mandatory = $true)]
[Parameter(ParameterSetName = 'Yast', Mandatory = $true)]
[Param... | /content/code_sandbox/AutomatedLabUnattended/functions/Set-UnattendedAdministratorPassword.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 258 |
```powershell
function Set-UnattendedCloudInitTimeZone
{
[CmdletBinding()]
param
(
[Parameter(Mandatory = $true)]
[string]$TimeZone
)
$tzInfo = Get-TimeZone -Id $TimeZone -ErrorAction SilentlyContinue
if (-not $tzInfo) { Get-TimeZone }
Write-PSFMessage -Message ('Since non-st... | /content/code_sandbox/AutomatedLabUnattended/internal/functions/CloudInit/Set-UnattendedCloudInitTimeZone.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 237 |
```powershell
function Set-UnattendedCloudInitLocalIntranetSites
{
[CmdletBinding()]
param (
[Parameter(Mandatory = $true)]
[string[]]$Values
)
Write-PSFMessage -Message 'No local intranet sites for CloudInit/Ubuntu'
}
``` | /content/code_sandbox/AutomatedLabUnattended/internal/functions/CloudInit/Set-UnattendedCloudInitLocalIntranetSites.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 63 |
```powershell
function Add-UnattendedCloudInitNetworkAdapter
{
param (
[string]$InterfaceName,
[AutomatedLab.IPNetwork[]]$IpAddresses,
[AutomatedLab.IPAddress[]]$Gateways,
[AutomatedLab.IPAddress[]]$DnsServers
)
$macAddress = ($Interfacename -replace '-', ':').ToLower()
... | /content/code_sandbox/AutomatedLabUnattended/internal/functions/CloudInit/Add-UnattendedCloudInitNetworkAdapter.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 526 |
```powershell
function Set-UnattendedCloudInitAdministratorName
{
param
(
[Parameter(Mandatory = $true)]
[string]
$Name
)
$Script:un.identity.username = $Name
}
``` | /content/code_sandbox/AutomatedLabUnattended/internal/functions/CloudInit/Set-UnattendedCloudInitAdministratorName.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 47 |
```powershell
function Set-UnattendedAntiMalware
{
[CmdletBinding(DefaultParameterSetName = 'Windows')]
param (
[Parameter(ParameterSetName = 'Windows', Mandatory = $true)]
[Parameter(ParameterSetName = 'Kickstart', Mandatory = $true)]
[Parameter(ParameterSetName = 'Yast', Mandatory = $t... | /content/code_sandbox/AutomatedLabUnattended/functions/Set-UnattendedAntiMalware.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 248 |
```powershell
function Import-UnattendedCloudInitContent
{
[CmdletBinding()]
param (
[Parameter(Mandatory = $true)]
[string[]]
$Content
)
$script:un = $Content -join "`r`n" | ConvertFrom-Yaml
}
``` | /content/code_sandbox/AutomatedLabUnattended/internal/functions/CloudInit/Import-UnattendedCloudInitContent.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 61 |
```powershell
function Set-UnattendedCloudInitIpSettings
{
[CmdletBinding()]
param (
[string]$IpAddress,
[string]$Gateway,
[String[]]$DnsServers,
[string]$DnsDomain
)
$ifName = 'en0'
$script:un.network.network.ethernets[$ifName] = @{
match = @{
... | /content/code_sandbox/AutomatedLabUnattended/internal/functions/CloudInit/Set-UnattendedCloudInitIpSettings.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 297 |
```powershell
function Set-UnattendedCloudInitUserLocale
{
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/CloudInit/Set-UnattendedCloudInitUserLocale.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 125 |
```powershell
function Set-UnattendedCloudInitPackage
{
[CmdletBinding()]
param (
[Parameter(Mandatory = $true)]
[string[]]$Package
)
foreach ($pack in $Package)
{
if ($pack -in $script:un.packages) { continue }
$script:un.packages += $pack
}
}
``` | /content/code_sandbox/AutomatedLabUnattended/internal/functions/CloudInit/Set-UnattendedCloudInitPackage.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 77 |
```powershell
function Export-UnattendedCloudInitFile
{
[CmdletBinding()]
param (
[Parameter(Mandatory = $true)]
[string]$Path
)
$script:un | ConvertTo-Yaml | Set-Content -Path $Path -Force
}
``` | /content/code_sandbox/AutomatedLabUnattended/internal/functions/CloudInit/Export-UnattendedCloudInitFile.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 58 |
```powershell
function Set-UnattendedCloudInitAutoLogon
{
[CmdletBinding()]
param (
[Parameter(Mandatory = $true)]
[string]$DomainName,
[Parameter(Mandatory = $true)]
[string]$Username,
[Parameter(Mandatory = $true)]
[string]$Password
)
Write-PSFMessage -Message "Auto-logon not implemented yet... | /content/code_sandbox/AutomatedLabUnattended/internal/functions/CloudInit/Set-UnattendedCloudInitAutoLogon.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 94 |
```powershell
function Set-UnattendedCloudInitFirewallState
{
[CmdletBinding()]
param (
[Parameter(Mandatory = $true)]
[boolean]$State
)
$script:un['late-commands'] += 'ufw enable'
$script:un['late-commands'] += 'ufw allow 22'
}
``` | /content/code_sandbox/AutomatedLabUnattended/internal/functions/CloudInit/Set-UnattendedCloudInitFirewallState.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 74 |
```powershell
function Set-UnattendedCloudInitComputerName
{
param
(
[Parameter(Mandatory = $true)]
[string]
$ComputerName
)
$Script:un.identity.hostname = $ComputerName
}
``` | /content/code_sandbox/AutomatedLabUnattended/internal/functions/CloudInit/Set-UnattendedCloudInitComputerName.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 49 |
```powershell
function Add-UnattendedCloudInitSynchronousCommand
{
[CmdletBinding()]
param (
[Parameter(Mandatory)]
[string]$Command,
[Parameter(Mandatory)]
[string]$Description
)
$script:un['late-commands'] += $Command
}
``` | /content/code_sandbox/AutomatedLabUnattended/internal/functions/CloudInit/Add-UnattendedCloudInitSynchronousCommand.ps1 | powershell | 2016-08-23T00:08:15 | 2024-08-16T12:01:05 | AutomatedLab | AutomatedLab/AutomatedLab | 1,988 | 62 |
```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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.