Azure ARM 模板 - DSC(新模式)不是 运行 脚本并且不返回错误?
Azure ARM Templates - DSC (new schema) not running scripts and not returning an error?
我刚刚转换了一个 ARM 模板(DC 部署)以使用较新的 2016 DSC 架构。我以为我已经正确格式化了我的 JSON,当我部署模板时它成功配置,快乐的日子!然而事实并非如此,虽然模板部署成功但 DSC 配置文件未 运行,但 DSC 扩展已安装。配置文件保存在 Azure blob 上,在旧架构中,我使用 URL 和 SAS 令牌的参数构建了 URL。新模式将所有这些拆分开来,我认为问题在于 SAS 令牌未添加到 URL。
有关信息,配置文件提供 ADDS 功能并设置林。
作为测试,我从 blob 存储中删除了配置文件并再次 运行 模板,它再次正确配置....它似乎跳过了完整的配置部分...很奇怪.
这是 DSC 扩展代码段,任何人都可以发现任何拼写错误或错误放置的括号吗?我已经盯着这个看了大约 5 个小时,所以对我来说这只是一大片模糊。
"resources": [
{
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(variables('dc2name'), '/CreateADBDC')]",
"apiVersion": "2019-03-01",
"location": "[resourceGroup().location]",
"dependsOn": [
"[resourceId('Microsoft.Compute/virtualMachines', variables('dc2name'))]",
"[resourceId('Microsoft.Compute/virtualMachines/extensions', variables('dc1name'), 'CreateADForest')]"
],
"properties": {
"publisher": "Microsoft.Powershell",
"type": "DSC",
"typeHandlerVersion": "2.77",
"autoUpgradeMinorVersion": true,
"settings": {
"WMFVersion": "latest",
"configuraton": {
"url": "[concat(parameters('Artifacts Location'), '/dsc/CreateADBDC.zip')]",
"script": "CreateADBDC.ps1",
"function": "CreateADBDC"
},
"configurationArguments": {
"DomainName": "[parameters('Domain Name')]",
"DNSServer": "[variables('dc1ipaddress')]"
}
},
"protectedSettings": {
"configurationArguments": {
"adminCreds": {
"UserName": "[parameters('Administrator User')]",
"Password": "[parameters('Administrator Password')]"
}
},
"configurationUrlSasToken": "[parameters('Artifacts Location SAS Token')]"
}
}
}
]
下面是 deployment_operations 输出,(我已经删除了敏感信息)。我不明白的是 "Request" 部分与 "Response" 部分之间的区别,"protectedsettings" 中似乎缺少任何内容,这正常吗?
"request": {
"content": {
"location": "uksouth",
"properties": {
"publisher": "Microsoft.Powershell",
"type": "DSC",
"typeHandlerVersion": "2.77",
"autoUpgradeMinorVersion": true,
"settings": {
"WMFVersion": "latest",
"configuraton": {
"url": "https://xxxxx.blob.core.windows.net/dsc/CreateADBDC.zip",
"script": "CreateADBDC.ps1",
"function": "CreateADBDC"
},
"configurationArguments": {
"DomainName": "domain.co.uk",
"DNSServer": "10.x.x.250"
}
},
"protectedSettings": {
"configurationArguments": {
"adminCreds": {
"UserName": "admin",
"Password": "password"
}
},
"configurationUrlSasToken": "stuffhere"
}
}
}
},
"response": {
"content": {
"properties": {
"autoUpgradeMinorVersion": true,
"settings": {
"WMFVersion": "latest",
"configuraton": {
"url": "https://xxxxxx.blob.core.windows.net/dsc/CreateADBDC.zip",
"script": "CreateADBDC.ps1",
"function": "CreateADBDC"
},
"configurationArguments": {
"DomainName": "domain.co.uk",
"DNSServer": "10.x.x.250"
}
},
"provisioningState": "Succeeded",
"instanceView": {
"name": "CreateADBDC",
"type": "Microsoft.Powershell.DSC",
"typeHandlerVersion": "2.77.0.0",
"substatuses": [
{
"code": "ComponentStatus/DscConfigurationLog/succeeded",
"level": "Info",
"displayStatus": "Provisioning succeeded",
"message": ""
},
{
"code": "ComponentStatus/DscExtensionLog/succeeded",
"level": "Info",
"displayStatus": "Provisioning succeeded",
"message": "[2019-03-14 20:06:49Z] Getting handler execution status HKLM:\SOFTWARE\Microsoft\Azure\DSC\2.77.0.0\Status ..
},
{
"code": "ComponentStatus/Metadata/succeeded",
"level": "Info",
"displayStatus": "Provisioning succeeded",
"message": "VMUUId=5CE28735-xxxx-xxxx-xxxx-53AA96F3A520;AgentId=BAFCAC0D-xxxx-xxxx-xxxx-0022480775AE;"
}
],
"statuses": [
{
"code": "ProvisioningState/succeeded",
"level": "Info",
"displayStatus": "Provisioning succeeded",
"message": "PowerShell DSC has been enabled.",
"time": "2019-03-14T20:07:03+00:00"
}
]
},
"publisher": "Microsoft.Powershell",
"type": "DSC",
"typeHandlerVersion": "2.77"
},
"type": "Microsoft.Compute/virtualMachines/extensions",
"location": "uksouth",
"id": "/subscriptions/xxxxx/resourceGroups/RG/providers/Microsoft.Compute/virtualMachines/DC2/extensions/CreateADBDC",
"name": "CreateADBDC"
}
}
}
},
更新:
搜索 DSC 扩展日志我看到这个错误:
[ERROR] occurred while invoking events for telemetry The property 'Configuration'
cannot be found on this object. Verify that the property exists.
日志再往下一点:
A DSC configuration was not provided. PowerShell DSC has been enabled on the VM, will exit now.
这就解释了为什么它不是 运行 脚本,而是配置 属性 在模板中......现在非常困惑!
更新 2
DSC 执行的 PowerShell 命令
configuration CreateADBDC {
Param (
# Get deployment details
[Parameter(Mandatory)]
[String]$DNSServer,
[Parameter(Mandatory)]
[String]$DomainName,
# Credentials
[Parameter(Mandatory)]
[System.Management.Automation.PSCredential]$Admincreds,
[Int]$RetryCount = 500,
[Int]$RetryIntervalSec = 3
)
Import-DscResource -ModuleName PSDesiredStateConfiguration, xStorage, xNetworking, xActiveDirectory, xPendingReboot
$Interface = Get-NetAdapter | Where-Object { $_.Name -Like "Ethernet*" } | Select-Object -First 1
[System.Management.Automation.PSCredential]$DomainCreds = New-Object System.Management.Automation.PSCredential ("${DomainName}$($Admincreds.UserName)", $Admincreds.Password)
$features = @("AD-Domain-Services", "RSAT-ADDS-Tools", "RSAT-AD-AdminCenter")
Node localhost {
LocalConfigurationManager {
RebootNodeIfNeeded = $true
}
xWaitforDisk Disk2 {
DiskNumber = 2
RetryIntervalSec = $RetryIntervalSec
RetryCount = $RetryCount
}
xDisk ADDataDisk {
DiskNumber = 2
DriveLetter = "F"
DependsOn = "[xWaitForDisk]Disk2"
}
WindowsFeatureSet Prereqs {
Name = $features
Ensure = "Present"
IncludeAllSubFeature = $true
}
xDnsServerAddress DnsServerAddress {
Address = $DNSServer
InterfaceAlias = $Interface.Name
AddressFamily = "IPv4"
DependsOn = "[WindowsFeatureSet]Prereqs"
}
xWaitForADDomain DscForestWait {
DomainName = $DomainName
DomainUserCredential = $DomainCreds
RetryCount = $RetryCount
RetryIntervalSec = $RetryIntervalSec
}
xADDomainController BDC {
DomainName = $DomainName
DomainAdministratorCredential = $DomainCreds
SafemodeAdministratorPassword = $DomainCreds
DatabasePath = "F:\NTDS"
LogPath = "F:\NTDS"
SysvolPath = "F:\SYSVOL"
DependsOn = "[xWaitForADDomain]DscForestWait"
}
xPendingReboot RebootAfterPromotion {
Name = "RebootAfterDCPromotion"
DependsOn = "[xADDomainController]BDC"
}
}
}
更新 3
完整的 DSC 日志:
VERBOSE: [2019-03-15 09:54:33Z] Extension request for sequence number 0 attempting to create lock.0 mutex
VERBOSE: [2019-03-15 09:54:33Z] Attempting to grab mutex DscExtensionHandler_Lock for sequence number 0
VERBOSE: [2019-03-15 09:54:33Z] Acquired lock for extension instance for sequence number 0
VERBOSE: [2019-03-15 09:54:33Z] Attempting to acquire extension lock
VERBOSE: [2019-03-15 09:54:33Z] Attempting to grab mutex DscExtensionHandler_Lock
VERBOSE: [2019-03-15 09:54:33Z] Acquired lock for extension
VERBOSE: [2019-03-15 09:54:33Z] lock does not exist: begin processing
VERBOSE: [2019-03-15 09:54:33Z] Starting DSC Extension ...
VERBOSE: [2019-03-15 09:54:33Z] Getting handler execution status HKLM:\SOFTWARE\Microsoft\Azure\DSC.77.0.0\Status
...
VERBOSE: [2019-03-15 09:54:33Z] Updating execution status (HKLM:\SOFTWARE\Microsoft\Azure\DSC.77.0.0\Status)
VERBOSE: [2019-03-15 09:54:33Z] Transitioning to DataValidation state ...
VERBOSE: [2019-03-15 09:54:33Z] Settings handler status to 'transitioning'
(C:\Packages\Plugins\Microsoft.Powershell.DSC.77.0.0\Status[=16=].status)
VERBOSE: [2019-03-15 09:54:33Z] Retrieving system information ...
VERBOSE: [2019-03-15 09:54:37Z] OS Version : 10.0
VERBOSE: [2019-03-15 09:54:37Z] Server OS : True
VERBOSE: [2019-03-15 09:54:37Z] 64-bit OS : True
VERBOSE: [2019-03-15 09:54:37Z] PS Version : 5.1.17763.316
VERBOSE: [2019-03-15 09:54:37Z] Validating user provided settings for the DSC Extension Handler ...
VERBOSE: [2019-03-15 09:54:37Z] Reading handler settings from
C:\Packages\Plugins\Microsoft.Powershell.DSC.77.0.0\RuntimeSettings[=16=].settings
VERBOSE: [2019-03-15 09:54:37Z] Found protected settings on Azure VM. Decrypting.
VERBOSE: [2019-03-15 09:54:40Z] Updating user preference for Data Collection ......
VERBOSE: [2019-03-15 09:54:40Z] Get DSC Extension Handler install status ...
VERBOSE: [2019-03-15 09:54:40Z] Status: NotInstalled
VERBOSE: [2019-03-15 09:54:40Z] Updating execution status (HKLM:\SOFTWARE\Microsoft\Azure\DSC.77.0.0\Status)
VERBOSE: [2019-03-15 09:54:40Z] Transitioning to DownloadHotfixes state ...
VERBOSE: [2019-03-15 09:54:40Z] Getting handler execution status HKLM:\SOFTWARE\Microsoft\Azure\DSC.77.0.0\Status
...
VERBOSE: [2019-03-15 09:54:40Z] Settings handler status to 'transitioning'
(C:\Packages\Plugins\Microsoft.Powershell.DSC.77.0.0\Status[=16=].status)
VERBOSE: [2019-03-15 09:54:40Z] Downloading wmf hotfixes (if any) required for the DSC Extension install ...
VERBOSE: [2019-03-15 09:54:42Z] Retrieving WMF download information (WMF_5.1-Windows_10.0-x64)...
VERBOSE: [2019-03-15 09:54:42Z] Updating execution status (HKLM:\SOFTWARE\Microsoft\Azure\DSC.77.0.0\Status)
VERBOSE: [2019-03-15 09:54:42Z] Transitioning to InstallExtension state ...
VERBOSE: [2019-03-15 09:54:42Z] Getting handler execution status HKLM:\SOFTWARE\Microsoft\Azure\DSC.77.0.0\Status
...
VERBOSE: [2019-03-15 09:54:42Z] Settings handler status to 'transitioning'
(C:\Packages\Plugins\Microsoft.Powershell.DSC.77.0.0\Status[=16=].status)
VERBOSE: [2019-03-15 09:54:43Z] DSC Extension Install Status: NotInstalled
VERBOSE: [2019-03-15 09:54:43Z] Installing the DSC Extension...
VERBOSE: [2019-03-15 09:54:43Z] Setting install status to 'InProgress'
(HKLM:\SOFTWARE\Microsoft\Azure\DSC.77.0.0\InstallStatus)
VERBOSE: [2019-03-15 09:54:43Z] Settings handler status to 'transitioning'
(C:\Packages\Plugins\Microsoft.Powershell.DSC.77.0.0\Status[=16=].status)
VERBOSE: [2019-03-15 09:54:43Z] Test if WMF 5PP is installed on the machine ...
VERBOSE: [2019-03-15 09:54:45Z] Retrieving WMF download information (WMF_5.0PP-Windows_10.0-x64)...
VERBOSE: [2019-03-15 09:54:48Z] Retrieving WMF download information (WMF_5.1-Windows_10.0-x64)...
VERBOSE: [2019-03-15 09:54:48Z] Enabling WINRM listeners...
VERBOSE: [2019-03-15 09:54:50Z] Configured LocalAccountTokenFilterPolicy to grant administrative rights remotely to
local users.
VERBOSE: [2019-03-15 09:54:51Z] The DSC Extension was installed successfully
VERBOSE: [2019-03-15 09:54:51Z] Setting install status to 'Installed'
(HKLM:\SOFTWARE\Microsoft\Azure\DSC.77.0.0\InstallStatus)
VERBOSE: [2019-03-15 09:54:51Z] Initializing handler metadata ...
VERBOSE: [2019-03-15 09:54:53Z] AgentID is 6111F68C-4708-11E9-ACF3-000D3AXX0539 ...
VERBOSE: [2019-03-15 09:54:53Z] VMUUId is D077C845-7564-47F4-B76B-C9FAXXEA7A61 ...
VERBOSE: [2019-03-15 09:54:53Z] Azure Resource ID is ...
VERBOSE: [2019-03-15 09:54:53Z] Loading VM agent telemetry assemblies ...
VERBOSE: [2019-03-15 09:54:54Z] [ERROR] occurred while invoking events for telemetry The property 'Configuration'
cannot be found on this object. Verify that the property exists.
VERBOSE: [2019-03-15 09:54:54Z] Updating execution status (HKLM:\SOFTWARE\Microsoft\Azure\DSC.77.0.0\Status)
VERBOSE: [2019-03-15 09:54:54Z] Transitioning to ProcessConfiguration state ...
VERBOSE: [2019-03-15 09:54:54Z] Getting handler execution status HKLM:\SOFTWARE\Microsoft\Azure\DSC.77.0.0\Status
...
VERBOSE: [2019-03-15 09:54:54Z] A DSC configuration was not provided. PowerShell DSC has been enabled on the VM, will
exit now.
VERBOSE: [2019-03-15 09:54:54Z] Settings handler status to 'success'
(C:\Packages\Plugins\Microsoft.Powershell.DSC.77.0.0\Status[=16=].status)
VERBOSE: [2019-03-15 09:54:54Z] Updating execution status (HKLM:\SOFTWARE\Microsoft\Azure\DSC.77.0.0\Status)
VERBOSE: [2019-03-15 09:54:54Z] Transitioning to Completed state ...
VERBOSE: [2019-03-15 09:54:54Z] Releasing SameSeq mutex
VERBOSE: [2019-03-15 09:54:54Z] Releasing mutex DscExtensionHandler_Lock
在这种情况下,错误是由于模板中的拼写错误:configuraon,而不是配置
我刚刚转换了一个 ARM 模板(DC 部署)以使用较新的 2016 DSC 架构。我以为我已经正确格式化了我的 JSON,当我部署模板时它成功配置,快乐的日子!然而事实并非如此,虽然模板部署成功但 DSC 配置文件未 运行,但 DSC 扩展已安装。配置文件保存在 Azure blob 上,在旧架构中,我使用 URL 和 SAS 令牌的参数构建了 URL。新模式将所有这些拆分开来,我认为问题在于 SAS 令牌未添加到 URL。
有关信息,配置文件提供 ADDS 功能并设置林。
作为测试,我从 blob 存储中删除了配置文件并再次 运行 模板,它再次正确配置....它似乎跳过了完整的配置部分...很奇怪.
这是 DSC 扩展代码段,任何人都可以发现任何拼写错误或错误放置的括号吗?我已经盯着这个看了大约 5 个小时,所以对我来说这只是一大片模糊。
"resources": [
{
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(variables('dc2name'), '/CreateADBDC')]",
"apiVersion": "2019-03-01",
"location": "[resourceGroup().location]",
"dependsOn": [
"[resourceId('Microsoft.Compute/virtualMachines', variables('dc2name'))]",
"[resourceId('Microsoft.Compute/virtualMachines/extensions', variables('dc1name'), 'CreateADForest')]"
],
"properties": {
"publisher": "Microsoft.Powershell",
"type": "DSC",
"typeHandlerVersion": "2.77",
"autoUpgradeMinorVersion": true,
"settings": {
"WMFVersion": "latest",
"configuraton": {
"url": "[concat(parameters('Artifacts Location'), '/dsc/CreateADBDC.zip')]",
"script": "CreateADBDC.ps1",
"function": "CreateADBDC"
},
"configurationArguments": {
"DomainName": "[parameters('Domain Name')]",
"DNSServer": "[variables('dc1ipaddress')]"
}
},
"protectedSettings": {
"configurationArguments": {
"adminCreds": {
"UserName": "[parameters('Administrator User')]",
"Password": "[parameters('Administrator Password')]"
}
},
"configurationUrlSasToken": "[parameters('Artifacts Location SAS Token')]"
}
}
}
]
下面是 deployment_operations 输出,(我已经删除了敏感信息)。我不明白的是 "Request" 部分与 "Response" 部分之间的区别,"protectedsettings" 中似乎缺少任何内容,这正常吗?
"request": {
"content": {
"location": "uksouth",
"properties": {
"publisher": "Microsoft.Powershell",
"type": "DSC",
"typeHandlerVersion": "2.77",
"autoUpgradeMinorVersion": true,
"settings": {
"WMFVersion": "latest",
"configuraton": {
"url": "https://xxxxx.blob.core.windows.net/dsc/CreateADBDC.zip",
"script": "CreateADBDC.ps1",
"function": "CreateADBDC"
},
"configurationArguments": {
"DomainName": "domain.co.uk",
"DNSServer": "10.x.x.250"
}
},
"protectedSettings": {
"configurationArguments": {
"adminCreds": {
"UserName": "admin",
"Password": "password"
}
},
"configurationUrlSasToken": "stuffhere"
}
}
}
},
"response": {
"content": {
"properties": {
"autoUpgradeMinorVersion": true,
"settings": {
"WMFVersion": "latest",
"configuraton": {
"url": "https://xxxxxx.blob.core.windows.net/dsc/CreateADBDC.zip",
"script": "CreateADBDC.ps1",
"function": "CreateADBDC"
},
"configurationArguments": {
"DomainName": "domain.co.uk",
"DNSServer": "10.x.x.250"
}
},
"provisioningState": "Succeeded",
"instanceView": {
"name": "CreateADBDC",
"type": "Microsoft.Powershell.DSC",
"typeHandlerVersion": "2.77.0.0",
"substatuses": [
{
"code": "ComponentStatus/DscConfigurationLog/succeeded",
"level": "Info",
"displayStatus": "Provisioning succeeded",
"message": ""
},
{
"code": "ComponentStatus/DscExtensionLog/succeeded",
"level": "Info",
"displayStatus": "Provisioning succeeded",
"message": "[2019-03-14 20:06:49Z] Getting handler execution status HKLM:\SOFTWARE\Microsoft\Azure\DSC\2.77.0.0\Status ..
},
{
"code": "ComponentStatus/Metadata/succeeded",
"level": "Info",
"displayStatus": "Provisioning succeeded",
"message": "VMUUId=5CE28735-xxxx-xxxx-xxxx-53AA96F3A520;AgentId=BAFCAC0D-xxxx-xxxx-xxxx-0022480775AE;"
}
],
"statuses": [
{
"code": "ProvisioningState/succeeded",
"level": "Info",
"displayStatus": "Provisioning succeeded",
"message": "PowerShell DSC has been enabled.",
"time": "2019-03-14T20:07:03+00:00"
}
]
},
"publisher": "Microsoft.Powershell",
"type": "DSC",
"typeHandlerVersion": "2.77"
},
"type": "Microsoft.Compute/virtualMachines/extensions",
"location": "uksouth",
"id": "/subscriptions/xxxxx/resourceGroups/RG/providers/Microsoft.Compute/virtualMachines/DC2/extensions/CreateADBDC",
"name": "CreateADBDC"
}
}
}
},
更新:
搜索 DSC 扩展日志我看到这个错误:
[ERROR] occurred while invoking events for telemetry The property 'Configuration'
cannot be found on this object. Verify that the property exists.
日志再往下一点:
A DSC configuration was not provided. PowerShell DSC has been enabled on the VM, will exit now.
这就解释了为什么它不是 运行 脚本,而是配置 属性 在模板中......现在非常困惑!
更新 2
DSC 执行的 PowerShell 命令
configuration CreateADBDC {
Param (
# Get deployment details
[Parameter(Mandatory)]
[String]$DNSServer,
[Parameter(Mandatory)]
[String]$DomainName,
# Credentials
[Parameter(Mandatory)]
[System.Management.Automation.PSCredential]$Admincreds,
[Int]$RetryCount = 500,
[Int]$RetryIntervalSec = 3
)
Import-DscResource -ModuleName PSDesiredStateConfiguration, xStorage, xNetworking, xActiveDirectory, xPendingReboot
$Interface = Get-NetAdapter | Where-Object { $_.Name -Like "Ethernet*" } | Select-Object -First 1
[System.Management.Automation.PSCredential]$DomainCreds = New-Object System.Management.Automation.PSCredential ("${DomainName}$($Admincreds.UserName)", $Admincreds.Password)
$features = @("AD-Domain-Services", "RSAT-ADDS-Tools", "RSAT-AD-AdminCenter")
Node localhost {
LocalConfigurationManager {
RebootNodeIfNeeded = $true
}
xWaitforDisk Disk2 {
DiskNumber = 2
RetryIntervalSec = $RetryIntervalSec
RetryCount = $RetryCount
}
xDisk ADDataDisk {
DiskNumber = 2
DriveLetter = "F"
DependsOn = "[xWaitForDisk]Disk2"
}
WindowsFeatureSet Prereqs {
Name = $features
Ensure = "Present"
IncludeAllSubFeature = $true
}
xDnsServerAddress DnsServerAddress {
Address = $DNSServer
InterfaceAlias = $Interface.Name
AddressFamily = "IPv4"
DependsOn = "[WindowsFeatureSet]Prereqs"
}
xWaitForADDomain DscForestWait {
DomainName = $DomainName
DomainUserCredential = $DomainCreds
RetryCount = $RetryCount
RetryIntervalSec = $RetryIntervalSec
}
xADDomainController BDC {
DomainName = $DomainName
DomainAdministratorCredential = $DomainCreds
SafemodeAdministratorPassword = $DomainCreds
DatabasePath = "F:\NTDS"
LogPath = "F:\NTDS"
SysvolPath = "F:\SYSVOL"
DependsOn = "[xWaitForADDomain]DscForestWait"
}
xPendingReboot RebootAfterPromotion {
Name = "RebootAfterDCPromotion"
DependsOn = "[xADDomainController]BDC"
}
}
}
更新 3
完整的 DSC 日志:
VERBOSE: [2019-03-15 09:54:33Z] Extension request for sequence number 0 attempting to create lock.0 mutex
VERBOSE: [2019-03-15 09:54:33Z] Attempting to grab mutex DscExtensionHandler_Lock for sequence number 0
VERBOSE: [2019-03-15 09:54:33Z] Acquired lock for extension instance for sequence number 0
VERBOSE: [2019-03-15 09:54:33Z] Attempting to acquire extension lock
VERBOSE: [2019-03-15 09:54:33Z] Attempting to grab mutex DscExtensionHandler_Lock
VERBOSE: [2019-03-15 09:54:33Z] Acquired lock for extension
VERBOSE: [2019-03-15 09:54:33Z] lock does not exist: begin processing
VERBOSE: [2019-03-15 09:54:33Z] Starting DSC Extension ...
VERBOSE: [2019-03-15 09:54:33Z] Getting handler execution status HKLM:\SOFTWARE\Microsoft\Azure\DSC.77.0.0\Status
...
VERBOSE: [2019-03-15 09:54:33Z] Updating execution status (HKLM:\SOFTWARE\Microsoft\Azure\DSC.77.0.0\Status)
VERBOSE: [2019-03-15 09:54:33Z] Transitioning to DataValidation state ...
VERBOSE: [2019-03-15 09:54:33Z] Settings handler status to 'transitioning'
(C:\Packages\Plugins\Microsoft.Powershell.DSC.77.0.0\Status[=16=].status)
VERBOSE: [2019-03-15 09:54:33Z] Retrieving system information ...
VERBOSE: [2019-03-15 09:54:37Z] OS Version : 10.0
VERBOSE: [2019-03-15 09:54:37Z] Server OS : True
VERBOSE: [2019-03-15 09:54:37Z] 64-bit OS : True
VERBOSE: [2019-03-15 09:54:37Z] PS Version : 5.1.17763.316
VERBOSE: [2019-03-15 09:54:37Z] Validating user provided settings for the DSC Extension Handler ...
VERBOSE: [2019-03-15 09:54:37Z] Reading handler settings from
C:\Packages\Plugins\Microsoft.Powershell.DSC.77.0.0\RuntimeSettings[=16=].settings
VERBOSE: [2019-03-15 09:54:37Z] Found protected settings on Azure VM. Decrypting.
VERBOSE: [2019-03-15 09:54:40Z] Updating user preference for Data Collection ......
VERBOSE: [2019-03-15 09:54:40Z] Get DSC Extension Handler install status ...
VERBOSE: [2019-03-15 09:54:40Z] Status: NotInstalled
VERBOSE: [2019-03-15 09:54:40Z] Updating execution status (HKLM:\SOFTWARE\Microsoft\Azure\DSC.77.0.0\Status)
VERBOSE: [2019-03-15 09:54:40Z] Transitioning to DownloadHotfixes state ...
VERBOSE: [2019-03-15 09:54:40Z] Getting handler execution status HKLM:\SOFTWARE\Microsoft\Azure\DSC.77.0.0\Status
...
VERBOSE: [2019-03-15 09:54:40Z] Settings handler status to 'transitioning'
(C:\Packages\Plugins\Microsoft.Powershell.DSC.77.0.0\Status[=16=].status)
VERBOSE: [2019-03-15 09:54:40Z] Downloading wmf hotfixes (if any) required for the DSC Extension install ...
VERBOSE: [2019-03-15 09:54:42Z] Retrieving WMF download information (WMF_5.1-Windows_10.0-x64)...
VERBOSE: [2019-03-15 09:54:42Z] Updating execution status (HKLM:\SOFTWARE\Microsoft\Azure\DSC.77.0.0\Status)
VERBOSE: [2019-03-15 09:54:42Z] Transitioning to InstallExtension state ...
VERBOSE: [2019-03-15 09:54:42Z] Getting handler execution status HKLM:\SOFTWARE\Microsoft\Azure\DSC.77.0.0\Status
...
VERBOSE: [2019-03-15 09:54:42Z] Settings handler status to 'transitioning'
(C:\Packages\Plugins\Microsoft.Powershell.DSC.77.0.0\Status[=16=].status)
VERBOSE: [2019-03-15 09:54:43Z] DSC Extension Install Status: NotInstalled
VERBOSE: [2019-03-15 09:54:43Z] Installing the DSC Extension...
VERBOSE: [2019-03-15 09:54:43Z] Setting install status to 'InProgress'
(HKLM:\SOFTWARE\Microsoft\Azure\DSC.77.0.0\InstallStatus)
VERBOSE: [2019-03-15 09:54:43Z] Settings handler status to 'transitioning'
(C:\Packages\Plugins\Microsoft.Powershell.DSC.77.0.0\Status[=16=].status)
VERBOSE: [2019-03-15 09:54:43Z] Test if WMF 5PP is installed on the machine ...
VERBOSE: [2019-03-15 09:54:45Z] Retrieving WMF download information (WMF_5.0PP-Windows_10.0-x64)...
VERBOSE: [2019-03-15 09:54:48Z] Retrieving WMF download information (WMF_5.1-Windows_10.0-x64)...
VERBOSE: [2019-03-15 09:54:48Z] Enabling WINRM listeners...
VERBOSE: [2019-03-15 09:54:50Z] Configured LocalAccountTokenFilterPolicy to grant administrative rights remotely to
local users.
VERBOSE: [2019-03-15 09:54:51Z] The DSC Extension was installed successfully
VERBOSE: [2019-03-15 09:54:51Z] Setting install status to 'Installed'
(HKLM:\SOFTWARE\Microsoft\Azure\DSC.77.0.0\InstallStatus)
VERBOSE: [2019-03-15 09:54:51Z] Initializing handler metadata ...
VERBOSE: [2019-03-15 09:54:53Z] AgentID is 6111F68C-4708-11E9-ACF3-000D3AXX0539 ...
VERBOSE: [2019-03-15 09:54:53Z] VMUUId is D077C845-7564-47F4-B76B-C9FAXXEA7A61 ...
VERBOSE: [2019-03-15 09:54:53Z] Azure Resource ID is ...
VERBOSE: [2019-03-15 09:54:53Z] Loading VM agent telemetry assemblies ...
VERBOSE: [2019-03-15 09:54:54Z] [ERROR] occurred while invoking events for telemetry The property 'Configuration'
cannot be found on this object. Verify that the property exists.
VERBOSE: [2019-03-15 09:54:54Z] Updating execution status (HKLM:\SOFTWARE\Microsoft\Azure\DSC.77.0.0\Status)
VERBOSE: [2019-03-15 09:54:54Z] Transitioning to ProcessConfiguration state ...
VERBOSE: [2019-03-15 09:54:54Z] Getting handler execution status HKLM:\SOFTWARE\Microsoft\Azure\DSC.77.0.0\Status
...
VERBOSE: [2019-03-15 09:54:54Z] A DSC configuration was not provided. PowerShell DSC has been enabled on the VM, will
exit now.
VERBOSE: [2019-03-15 09:54:54Z] Settings handler status to 'success'
(C:\Packages\Plugins\Microsoft.Powershell.DSC.77.0.0\Status[=16=].status)
VERBOSE: [2019-03-15 09:54:54Z] Updating execution status (HKLM:\SOFTWARE\Microsoft\Azure\DSC.77.0.0\Status)
VERBOSE: [2019-03-15 09:54:54Z] Transitioning to Completed state ...
VERBOSE: [2019-03-15 09:54:54Z] Releasing SameSeq mutex
VERBOSE: [2019-03-15 09:54:54Z] Releasing mutex DscExtensionHandler_Lock
在这种情况下,错误是由于模板中的拼写错误:configuraon,而不是配置