Fix for DNS/DHCP update credentials
This commit is contained in:
Родитель
25cfb564f3
Коммит
6c34f00fc8
|
@ -5,7 +5,19 @@
|
|||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "PowerShell: Interactive Session",
|
||||
"name": "PowerShell Attach Interactive Session Runspace",
|
||||
"type": "PowerShell",
|
||||
"request": "attach",
|
||||
"processId": "current"
|
||||
},
|
||||
{
|
||||
"name": "PowerShell Attach to Host Process",
|
||||
"type": "PowerShell",
|
||||
"request": "attach",
|
||||
"runspaceId": 1
|
||||
},
|
||||
{
|
||||
"name": "PowerShell Interactive Session",
|
||||
"type": "PowerShell",
|
||||
"request": "launch",
|
||||
"cwd": ""
|
||||
|
|
|
@ -17,7 +17,7 @@ Function Get-AzureStackHCILabConfig {
|
|||
# This is the filepath to the ISO that will be used to deploy the lab VMs
|
||||
#ServerISO = 'C:\Datastore\19507.1000.191028-1403.rs_prerelease_SERVER_VOL_x64FRE_en-us.iso'
|
||||
|
||||
BaseVHDX = 'C:\datastore\CustomVHD\BaseDisk_19540_server_serverdatacenter_en-us_vl'
|
||||
BaseVHDX = 'C:\DataStore\CustomVHD\RS_PRERELEASE_19531.1000.191204-1324_server_en-us_vl_Full.vhdx'
|
||||
|
||||
# This is the name of the internal switch to attach VMs to. This uses DHCP to assign VMs IPs and uses NAT to avoid taking over your network...
|
||||
# If the specified switch doesn't exist an Internal switch will be created AzureStackHCILab-Guid.
|
||||
|
@ -1021,6 +1021,12 @@ Function Initialize-AzureStackHCILabOrchestration {
|
|||
|
||||
Set-DnsServerPrimaryZone -Name "$($LabConfig.DomainName)" -DynamicUpdate "NonsecureAndSecure"
|
||||
|
||||
#Note: Using the $using:VMCred does not work here. Need to create the credential on the remote machine.
|
||||
$pass = ConvertTo-SecureString $($thisLabConfig.AdminPassword) -AsPlainText -Force
|
||||
$VMCred = New-Object System.Management.Automation.PSCredential ("$($thisLabConfig.DomainNetbiosName)\$($thisLabConfig.DomainAdminName)", $pass)
|
||||
|
||||
Set-DhcpServerDnsCredential -ComputerName AzStackHCIDC01 -Credential $VMCred
|
||||
|
||||
$thisLabConfig.VMs.Where{ $_.Role -ne 'Domain Controller'} | ForEach-Object {
|
||||
$thisVM = "$($thisLabConfig.Prefix)$($_.VMName)"
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче