MMI icon indicating copy to clipboard operation
MMI copied to clipboard

Failing to get all TXT records using WQL

Open dev-mega-01 opened this issue 1 year ago • 0 comments

Prerequisites

  • [X] Write a descriptive title.
  • [X] Make sure you are able to repro it on the latest version
  • [X] Search the existing issues.

Steps to reproduce

cimsession.QueryInstances("root\MicrosoftDNS", "WQL", $"SELECT * FROM MicrosoftDNS_TXTType WHERE DomainName = 'example.com'");

Failing to get all records available on specified domain however working if a single TXT record is provided.

Expected behavior

Should return all TXT records using query SELECT * FROM MicrosoftDNS_TXTType WHERE DomainName = 'example.com'"

Actual behavior

Message :	"The WS-Management service cannot process the request. The WMI provider returned an 'invalid parameter' error. "
		MessageId:	"HRESULT 0x8033811e"
		Source	"Microsoft.Management.Infrastructure"	string
		StackTrace	"   at Microsoft.Management.Infrastructure.Internal.Operations.CimSyncEnumeratorBase`1.MoveNext()\r\n   at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection) in System.Collections.Generic\\List.cs:line 713\r\n   at System.Collections.Generic.List`1.AddRange(IEnumerable`1 collection) in System.Collections.Generic\\List.cs:line 283\r\n

Error details

No response

Environment data

Microsoft.Management.Infrastructure 2.0.0 
Windows server 2016
ASP.NET Core 3.1

Version

Microsoft.Management.Infrastructure 2.0.0

Visuals

No response

dev-mega-01 avatar Apr 16 '24 13:04 dev-mega-01