使用Windows Server 2012 R2。 目标是设置服务器的IPv4地址。 正如DSC在下面的详细消息中正确指出的那样,Expected [ip是] 192.168.0.203,[while] actual [ip is] 192.168.0.205 以下错误消息: Start-DscConfiguration -Path .\BasicServer -Verbose -Wait -Force VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''methodName' = SendConfigurationApply,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' = root/Microsoft/Windows/DesiredStateConfiguration'. VERBOSE: An LCM method call arrived from computer ComputerName with user sid S-1-5-21-139086020-2308268882-217435134-1104. VERBOSE: [ComputerName]: LCM: [ Start Set ] VERBOSE: […]
我有一个运行以下DSC的Powershell DSC扩展部分的ARM模板: Configuration Name { Node MachineName { #IIS Role WindowsFeature IIS { Name = “Web-Server” Ensure = “Present” } #IIS GUI WindowsFeature WebServerManagementConsole { Name = "Web-Mgmt-Console" Ensure = "Present" } } } 这运行良好,如预期。 如果我尝试更改任何东西(例如,添加一个新的WindowsFeature或更改一个确保选项“缺席”),则会出现问题。 这些更改不会反映在服务器上。 是否有一个标志或选项可以使ARM将DSC更改推送到服务器?
我正在运行DSC ConfigurationMode设置为"ApplyAndAutoCorrect"它工作正常,因为它正在解决15分钟,这是默认的任何问题。 发生纠正时,我希望以任何方式得到通知。 只有ConfigurationMode其他选项是"ApplyOnly"和"ApplyAndMonitor" ,最后一个报告日志变化。 有没有办法让我知道更正发生的通知。 如果没有,是"ApplyAndAutoCorrect"选项存储更正在一些文件,我可以看到的变化进行更正的信息。
在目前的WMF5版本中,我尝试使用Invoke-DSCResource来调用DSC资源,如下所示: $destinationPath="$env:SystemDrive\DirectAccess.txt" $fileContents="This file is create by Invoke-DscResource" $result = Invoke-DscResource -Name File -Method Test -Property @{ DestinationPath=$destinationPath Contents=$fileContents } -Verbose $result | fl * 但是,我要求为“文件”资源的模块名称。 执行Get-DscResource文件列出了dsc资源,但“模块”属性为空。 我怎样才能找出哪个模块传递Invoke-DscResource? “文件”资源真正在哪里(在哪个模块中)?
我试图设置TFS发布pipe理部署到IIS服务器设置为共享configuration。 但是,部署实际运行时,出现以下错误: ##[debug]System.Exception: Filename: \\?\UNC\storage\webfarm\config\applicationHost.config Error: Cannot write configuration file due to insufficient permissions ##[error]Filename: \\?\UNC\storage\webfarm\config\applicationHost.config ##[error]Error: Cannot write configuration file due to insufficient permissions 用于运行DSC脚本的用户具有修改applicationhost.config的权限。 这是一个红鲱鱼错误,还是我们错过了什么? 更新:我已经testing了将共享configuration移动到Windows服务器共享,以确保它不是一个SAN问题,但是,导致了一个不同的错误: Cannot commit configuration changes because the file has changed on disk 如果其他脚本尝试同时执行某些操作,我以前遇到过这个问题,但是我已经将configuration切换到了创build应用程序的最低限度。 唯一一次能够实现它的是打破共享configuration并返回本地。 这是不理想的,因为我们在农场configuration中运行。
目前我们正尝试使用PowerShell DSC(WMF5.0)和xWebAdminstration(v1.15)模块来设置应用程序池。 到目前为止,我们已经设法使用https://msdn.microsoft.com/en-us/powershell/dsc/pullserver中的指令成功地使客户机节点和服务器一起工作。 使用下面的脚本客户端节点安装IIS成功,但应用程序池没有被创build,这是问题所在。 Configuration MyWebsite { Import-DscResource -ModuleName xWebAdministration Node Webserver { WindowsFeature IIS { Ensure="Present" Name="Web-Server" } WindowsFeature Mgmt-Tools { Ensure = "Present" Name = "Web-Mgmt-Tools" } WindowsFeature Mgmt-Console { Ensure = "Present" Name = "Web-Mgmt-Console" } WindowsFeature Mgmt-Service { Ensure = "Present" Name = "Web-Mgmt-Service" } $secpasswd = ConvertTo-SecureString "PlainTextPassword" -AsPlainText -Force […]
我正尝试使用cChoco模块在Windows Server 2016虚拟机(SKU: 2016-Datacenter )上使用Azure自动化DSCconfiguration几个软件包。 一些软件包(例如vcredist2008 , vcredist2010 ) 巧克力(从DSC调用)成功安装它们 巧克力(从CustomScriptExtension调用)成功安装它们 巧克力(从交互式命令提示符调用)成功安装它们 其他软件包(例如mssqlserver2014express和mssqlservermanagementstudio2014express ) 巧克力(来自DSC) 未能安装它们 直接原因似乎是由C:\Windows\TEMP\chocolatey\chocolatey\MsSqlServerManagementStudio2014Express\SQLManagementStudio\setup.exe错误消息“ 系统找不到指定的文件 ” C:\Windows\TEMP\chocolatey\chocolatey\MsSqlServerManagementStudio2014Express\SQLManagementStudio\setup.exe ; 巧克力(从CustomScriptExtension调用) 未能安装它们 再次,直接原因似乎是通过错误消息“ 系统找不到指定的文件”指示与上面相同的文件; 巧克力(从交互式命令提示符调用) 安装成功 最后一个动作暗示了DSC与交互式会话与DSC(或CustomScriptExtension)的环境之间的区别,但错误信息本身并没有明确指出直接的原因。 题: 这些与MSSQL Express相关的软件包(不是所有的软件包)失败的原因究竟是什么? 有什么办法(例如参数,configuration设置)来启用这些软件包的安装? 细节: 对于CustomScriptExtension(失败)和交互式命令提示符(成功),我使用以下调用(从PowerShell脚本): choco install -y mssqlservermanagementstudio2014express 对于Azure自动化DSC,我在configuration文件(摘录)中执行以下任务: cChocoPackageInstaller installVCRedist201WithChoco { Name = 'vcredist2010' Ensure = 'Present' DependsOn = '[cChocoInstaller]installChoco' } cChocoPackageInstaller installmssqlservermanagementstudio2014express { […]
在使用DSC扩展在Azure门户中validation新VM时, value for the template parameter 'modulesUrl' at line '11' and column '20' is not provided的原因value for the template parameter 'modulesUrl' at line '11' and column '20' is not provided任何提示。 知道一些潜在的模板有错误是没有帮助的。 DSCconfiguration剥离到最低testing版本是 configuration WebServer { Node localhost { WindowsFeature IIS { Ensure = 'Present' Name = 'Web-Server' } WindowsFeature DotNet { Ensure = 'Present' Name […]
joinWindows机器到Azure DSC自动化时遇到困难。 我收到以下错误: 服务器https:// azureserver / accounts / XXXXXXXXXXXXXXXXXXXX注册Dsc代理失败。 潜在的错误是:试图用AgentId注册Dsc Agent XXXXXXXXXXXXXXXXXXXXXX与服务器https:// azureserver / accounts / XXXXXXXXXXXXXXXXXXXX /节点(AgentId ='XXXXXXXXXXXXXXXXXXXXXX')返回意外的响应代码 未经授权。 。 + CategoryInfo:InvalidResult:(root / Microsoft / … gurationManager:String)[],CimException + FullyQualifiedErrorId:RegisterDscAgentUnsuccessful,Microsoft.PowerShell.DesiredStateConfiguration.Commands.RegisterDscAgentCommand + PS计算机名称:AZURE-TEST 这是我的mofconfiguration 参数( [参数(强制性= $真)] [string] $ RegistrationUrl, [参数(强制性= $真)] [string] $ RegistrationKey, [参数(强制性= $真)] [的String []] $计算机名, [Int] $ RefreshFrequencyMins = 30, [Int] […]
遵循networking上的例子,为第一个DSC脚本build立一个工作示例并不困难。 但是,我需要find一种方法来列出脚本所做的更改,而不是实际上“做到这一点”。 我遇到的挑战是我要testing的脚本包含一些发布pipe理特定的variables,这些variables在发布过程中被填充。 喜欢这个: # Copy website bits to configured deployment path File CopyDeploymentBits { Ensure = "Present" Type = "Directory" Recurse = $true SourcePath = $applicationPath DestinationPath = $($Node.DeploymentPath) } 是否有可能通过正常的发布path执行脚本,只需执行“testing”部分,并获得什么是好/不好的日志,不应用任何更改? 谢谢!