dsc
7 Topicsansible.windows.win_dsc resource SqlPermission Not found
Hi I am trying to do SQL (SQL Server 2022) Automation along with Always_ON and failover Cluster setup using Ansible on Azure VM (Windows 2019 Server) . Since SQL VM do not have internet connectivity , I tried to install below module manually by downloading respective nupkg files. PowershellGet SqlServerDsc When we are trying to configure SQL Server Permission using below Ansible task, we receive following error messages ("msg": "Resource 'SqlPermission' not found.") - name: configure SQL server permissions ansible.windows.win_dsc: resource_name: SqlPermission ServerName: 'LocalHost' InstanceName: '{{ sql_server_instance_name }}' Name: '{{ item }}' PermissionToInclude: - State: Grant Permission: - 'AlterAnyAvailabilityGroup' - 'ViewServerState' - 'AlterAnyEndPoint' - 'ConnectSql' Credential_username: '{{ mssql_username }}' Credential_password: '{{ mssql_password }}' loop: "{{ [sql_server_svc_account, sql_server_agt_svc_account] | unique }}" Error Received failed: [<hostname>.<domain_name>] (item=<domain_name>\<Serviceaccount>) => { "ansible_loop_var": "item", "changed": false, "item": "<domain_name>\\<service_account>", "msg": "Resource 'SqlPermission' not found." } [<hostname>.<domain_name>] TASK: set_alwayson_perm : configure SQL server permissions (debug)> User interrupted execution. When we execute command Get-DscResource – Name SqlPermission, It errors out. I believe I am missing on some steps or configuration while doing DSC Module SQLServerDsc Please support.936Views0likes1CommentNew-M365DSCDeltaReport is not working as expected
Hello, I'm trying to useNew-M365DSCDeltaReport to compare DSC exported configurations. But I wanted only different fields to show up in the output, so I usedNew-M365DSCDeltaReport -DriftOnly $true. Despite this I still get a full report with similar and different fields. Does anyone have an idea why this is happening?862Views0likes1CommentAzure Powershell DSC vs Ansible
Hey Guys, I just want to find out what are you using for Desired State Configuration on Azure. Do you use built in Powershell DSC or you are using Ansible with DSC enabled for Windows Machines? I am in the process of deciding which solution should the best for us. Also I would like to automate on-prem infrastructure. Which solution do you use? Regards, Wojciech21KViews0likes7CommentsPowrshell DSC for Secondary/Additional IP
Hi Everyone, I am creating a Powershell script to deploy the configuration to the remote server using Desired State Configuration ( without Pull Server) for Adding the additional/Secondary IP to the server NIC but the module which I am using (xNetworking) is written such a way that It is removing the existing IP from the target Machine and then set the new IPs , which is making the server out of network. So can anyone help me to solve this in such a way it will only add the additional IPs and not change the exiting one. P. S. it needs to be done without Pull server only pushing the configuration is required.799Views0likes0CommentsDSC error(s) deploying session hosts - Resolved
I had several issues with DSC Configuration failures , conflicts, client cannot connect to the destination specified etc. Was occurring with the Microsoft catalog and my own images. The last bit was after my firewall guys were certain it was not them. "VM has reported a failure when processing extension 'dscextension'. Error message: \\\"DSC Configuration 'AddSessionHost' completed with error(s). Following are the first few: The client cannot connect to the destination specified in the request." This is the workaround for me. Waiting on Microsoft support to weigh in see if it a bug etc. Test this in your lower environments! 🙂 Create a new VM from your disk template. I suggest you create a separate RG for workspaces. Disable IPv6 on nontunnel interfaces (except the loopback) and on IPv6 tunnel interface https://support.microsoft.com/en-us/help/929852/guidance-for-configuring-ipv6-in-windows-for-advanced-users use the fix it. Sysprep , genralize, OBE, shutdown. Convert the VHD to an Image (your mojo) $disk = Get-AzDisk -ResourceGroupName 'your-rg' -DiskName 'your-disk' $location = 'South Central US' $imageName = 'golden-image-name-ipv6-disabled' $rgName = 'your-rg' $imageConfig = New-AzImageConfig ` -Location $location $imageConfig = Set-AzImageOsDisk ` -Image $imageConfig ` -OsState Generalized ` -OsType Windows ` -ManagedDiskId $disk.Id $image = New-AzImage ` -ImageName $imageName ` -ResourceGroupName $rgName ` -Image $imageConfig Deploy new Host pool and Sessionhosts with the new image2.3KViews0likes0CommentsPreview Build 17639 "DSC-Service" Feature: required DLL missing from WinSxS
Short Version: Build 17639, both the LTSC and Semi-Annual versions, is missing the following DLL in the WinSxS folder: Microsoft.Powershell.DesiredStateConfiguration.Service.resources.dll It is normally located here: C:\Windows\WinSxS\msil_microsoft.powershel..r.managed.resources_31bf3856ad364e35_10.0.14393.0_en-us_a944edf580471efa Long Version: I'm testing build 17639 of Windows Server to try out the new SQL Server support for the local pull server feature of DSC. I was trying to use the xDscWebService resource within the xPSDesiredStateConfiguration module (version 8.1.0.0), which is the "usual" way of installing a pull server, but I manually ran "Add-WindowsFeature Dsc-Service" before running the script with the xDscWebService configuration. Mostly, I did this just to check out the files, compare versions, etc. But once I ran the script, it failed with an error: PowerShell DSC resource MSFT_xDSCWebService failed to execute Set-TargetResource functionality with error message: ERROR: C:\Windows\System32\WindowsPowerShell\v1.0\modules\PSDesiredStateConfiguration\PullServer\en\Microsoft.Powershell.DesiredStateConfiguration.Service.Resources.dll does not exist This DLL is copied from WinSxS into the path in the error above when you install the Dsc-Service feature. I then compared this to a GA version of Server 2016 (non-Core but I don't think it matters), and that file does exist in WinSxS: I did check the build 17639 system and that DLL is nowhere to be found in WinSxS, or anywhere else, on that server. I created the "en" directory as described in the error, copied the DLL over from the build 14393 server shown in the picture above into that "en" directory, and the resource was then able to create the pull server successfully. Additionally, it actually functions and writes to SQL Server as promised; bonus! This post may be light on the info, sorry, but really it's just one bug report: that DLL is missing from WinSxS and is therefore not added during the installation of the Dsc-Service feature.1.1KViews0likes0CommentsPreview Build 17639: "DSC-Service" feature missing a DLL in WinSxS
Short Version: Build 17639, both the LTSC and Semi-Annual versions, is missing the following DLL in the WinSxS folder: Microsoft.Powershell.DesiredStateConfiguration.Service.resources.dll It is normally located here: C:\Windows\WinSxS\msil_microsoft.powershel..r.managed.resources_31bf3856ad364e35_10.0.14393.0_en-us_a944edf580471efa Long Version: I'm testing build 17639 of Windows Server to try out the new SQL Server support for the local pull server feature of DSC. I was trying to use the xDscWebService resource within the xPSDesiredStateConfiguration module (version 8.1.0.0), which is the "usual" way of installing a pull server, but I manually ran "Add-WindowsFeature Dsc-Service" before running the script with the xDscWebService configuration. Mostly, I did this just to check out the files, compare versions, etc. But once I ran the script, it failed with an error: PowerShell DSC resource MSFT_xDSCWebService failed to execute Set-TargetResource functionality with error message: ERROR: C:\Windows\System32\WindowsPowerShell\v1.0\modules\PSDesiredStateConfiguration\PullServer\en\Microsoft.Powershell.DesiredStateConfiguration.Service.Resources.dll does not exist This DLL is copied from WinSxS into the path in the error above when you install the Dsc-Service feature. I then compared this to a GA version of Server 2016 (non-Core but I don't think it matters), and that file does exist in WinSxS: I did check the build 17639 system and that DLL is nowhere to be found in WinSxS, or anywhere else, on that server. I created the "en" directory as described in the error, copied the DLL over from the build 14393 server shown in the picture above into that "en" directory, and the resource was then able to create the pull server successfully. Additionally, it actually functions and writes to SQL Server as promised; bonus! This post may be light on the info, sorry, but really it's just one bug report: that DLL is missing from WinSxS and is therefore not added during the installation of the Dsc-Service feature. Edit: Sorry, had the wrong PowerShell window capture in there...1.8KViews0likes0Comments