Powershell DSC error – No matching MSFT_DNSClientServerAddress objects found by CIM query for instances of the ROOT/StandardCimv2/MSFT_DNSClientServerAddress class on the CIM server

Powershell DSC error – No matching MSFT_DNSClientServerAddress objects found by CIM query for instances of the ROOT/StandardCimv2/MSFT_DNSClientServerAddress class on the CIM server   Background –  I was trying to deploy azure dsc extension to add ADDS role on new azure vm using ARM template (extension resource under compute resource). Extension – active-directory-new-domain-ha-2-dc and AD Error –  { “status”: “Failed”, “error”: […]

Continue Reading

Powershell DSC error – Cannot bind argument to parameter ‘ResourceKey’ because it is an empty string.

Powershell DSC error – Cannot bind argument to parameter ‘ResourceKey’ because it is an empty string.   Background –  I was trying to deploy azure dsc extension to add ADDS role on new azure vm using ARM template (extension resource under compute resource).   Error –  code”: “ResourceDeploymentFailure”, “message”: “The resource operation completed with terminal […]

Continue Reading

invoke-webrequest The request was aborted: Could not create SSL/TLS secure channel

invoke-webrequest The request was aborted: Could not create SSL/TLS secure channel Error –  invoke-webrequest The request was aborted: Could not create SSL/TLS secure channel Solution –  By default powershell uses TLS 1.0 the site security requires TLS 1.2, use Net.ServicePointManager to define TSL 1.2 [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 Invoke-WebRequest -Uri https://www.yubico.com/

Continue Reading

Azure https trigger powershell functions is showing disabled – (disabled) functionName

Azure https trigger powershell functions is showing disabled – (disabled) functionName Solution – : The disabled metadata property is in function.json which is suppose to determines whether a function is enabled or disabled.  to enable the azure function you need to mobify the value in function.json under the disabled function Below are simple steps to do so :- From […]

Continue Reading

Error – To allow this website to provide information personalized for you, will you allow it to put a small file (called a cookie) on your computer?

Error – To allow this website to provide information personalized for you, will youallow it to put a small file (called a cookie) on your computer?” Problem -> Whenever we use powershell  “Invoke-WebRequest” command to access website with cookies then its gives warning as below: powershell> Invoke-WebRequest http://microsoft.com Warning: “To Allow this website to provide information personalized for […]

Continue Reading

powershell script to create self signed certificate

powershell script to create self signed certificate Problem -> Sometime while performing any application test or configuring test environment it is difficult to buy certificate so better option is to use self sigh certificate. There are multiple ways to generate self sign certificate, Prior to PowerShell 4.0, you needed to download MakeCert.exe or another utility to […]

Continue Reading

How to delete all resources from Azure resource group with specific tag

Powershell  to delete all resources from Azure resource group with specific tag Problem ->  If we want to cleanup all resource for cost saving and if the all resources have some tag set then we can remove all resources automatically using powershell Solution 1 – delete all resources with specific tag across subscription $tagname = […]

Continue Reading