parent
5064dca78a
commit
4a5513ad4b
@ -0,0 +1,23 @@
|
|||||||
|
@{
|
||||||
|
AllNodes = @(
|
||||||
|
@{
|
||||||
|
NodeName = 'CLIENT1';
|
||||||
|
Role = 'CLIENT';
|
||||||
|
InterfaceAlias = 'Ethernet';
|
||||||
|
AddressFamily = 'IPv4';
|
||||||
|
Lability_SwitchName = "Wifi-HyperV-VSwitch";
|
||||||
|
Lability_Media = 'WIN10_x64_Enterprise_EN_Eval';
|
||||||
|
Lability_ProcessorCount = 1;
|
||||||
|
Lability_StartupMemory = 2GB;
|
||||||
|
PSDscAllowPlainTextPassword = $true;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
NonNodeData = @{
|
||||||
|
Lability = @{
|
||||||
|
DSCResource = @(
|
||||||
|
@{ Name = 'xComputerManagement'; RequiredVersion = '4.1.0.0'; }
|
||||||
|
@{ Name = 'xNetworking'; RequiredVersion = '5.7.0.0'; }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
@ -0,0 +1,51 @@
|
|||||||
|
Configuration SimpleConfig {
|
||||||
|
param ()
|
||||||
|
|
||||||
|
Import-DscResource -Module PSDesiredStateConfiguration
|
||||||
|
|
||||||
|
Import-DscResource -Module xComputerManagement -ModuleVersion 4.1.0.0
|
||||||
|
Import-DscResource -Module xNetworking -ModuleVersion 5.7.0.0
|
||||||
|
|
||||||
|
# Common configuration for all nodes
|
||||||
|
node $AllNodes.Where({$_.Role -in 'CLIENT'}).NodeName {
|
||||||
|
|
||||||
|
# Configure the DSC LocalConfigurationManager (LCM)
|
||||||
|
# In general, Lability configs will use an LCM section like this
|
||||||
|
# Details for configuring the LCM can be found at
|
||||||
|
# <https://docs.microsoft.com/en-us/powershell/dsc/metaconfig>
|
||||||
|
LocalConfigurationManager {
|
||||||
|
RebootNodeIfNeeded = $true;
|
||||||
|
AllowModuleOverwrite = $true;
|
||||||
|
ConfigurationMode = 'ApplyOnly';
|
||||||
|
}
|
||||||
|
|
||||||
|
# Enable ICMP ECHO (aka ping) requests over IPv4
|
||||||
|
xFirewall 'FPS-ICMP4-ERQ-In' {
|
||||||
|
Name = 'FPS-ICMP4-ERQ-In';
|
||||||
|
DisplayName = 'File and Printer Sharing (Echo Request - ICMPv4-In)';
|
||||||
|
Description = 'Echo request messages are sent as ping requests to other nodes.';
|
||||||
|
Direction = 'Inbound';
|
||||||
|
Action = 'Allow';
|
||||||
|
Enabled = 'True';
|
||||||
|
Profile = 'Any';
|
||||||
|
}
|
||||||
|
|
||||||
|
# Enable ICMP ECHO (aka ping) requests over IPv6
|
||||||
|
xFirewall 'FPS-ICMP6-ERQ-In' {
|
||||||
|
Name = 'FPS-ICMP6-ERQ-In';
|
||||||
|
DisplayName = 'File and Printer Sharing (Echo Request - ICMPv6-In)';
|
||||||
|
Description = 'Echo request messages are sent as ping requests to other nodes.';
|
||||||
|
Direction = 'Inbound';
|
||||||
|
Action = 'Allow';
|
||||||
|
Enabled = 'True';
|
||||||
|
Profile = 'Any';
|
||||||
|
}
|
||||||
|
|
||||||
|
# Set the VM's hostname
|
||||||
|
xComputer 'Hostname' {
|
||||||
|
Name = $node.NodeName;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
[CmdletBinding()] Param()
|
||||||
|
|
||||||
|
$ErrorActionPreference = "Stop"
|
||||||
|
|
||||||
|
$configData = "$PSScriptRoot\ConfigurationData.SIMPLE.psd1"
|
||||||
|
. $PSScriptRoot\Configure.SIMPLE.ps1
|
||||||
|
& SimpleConfig -ConfigurationData $configData -OutputPath $env:LabilityConfigurationPath -Verbose
|
||||||
|
|
||||||
|
$adminPassword = Read-Host -AsSecureString -Prompt "Admin password"
|
||||||
|
$adminCred = New-Object -TypeName PSCredential -ArgumentList @("IgnoredUsername", $adminPassword)
|
||||||
|
Start-LabConfiguration -ConfigurationData $configData -Path $env:LabilityConfigurationPath -Verbose -Credential $adminCred
|
||||||
|
Start-Lab -ConfigurationData $configData -Verbose
|
Loading…
Reference in new issue