Mayyhem / SharpSCCM

A C# utility for interacting with SCCM
GNU General Public License v3.0
573 stars 86 forks source link

[BUG] An unhandled exception of type System.Reflection.TargetInvocationException #32

Closed heinekmadsen closed 1 year ago

heinekmadsen commented 1 year ago

Describe the bug In my lab environmen i'm having fun with this tool as my daily work involves alot of SCCM. when i try to get the client-push credentials using the sharpsccm invoke client-push i get the following error [!] An unhandled exception of type System.Reflection.TargetInvocationException occurred: Exception has been thrown by the target of an invocation. I use a Kali Linux to run the responder.py, and using this command for sharpsccm SharpSCCM_merged.exe invoke client-push -t 192.168.30.121

To Reproduce Steps to reproduce the behavior:

  1. Run sharpsccm.exe invoke client-push -t x.x.x.x

Expected behavior No unhandled exceptions

Screenshots image

SharpSCCM version Latest github code

Management point server specs (please complete the following information):

Client specs (please complete the following information):

Additional context Any advise is greatly appreciated

Mayyhem commented 1 year ago

Thanks for this report and the one you opened last week! I'll take a look now and see if I can reproduce the issue.

heinekmadsen commented 1 year ago

@Mayyhem sounds great... Maybe I'm just doing it wrong :) And btw great session you had with Panu and Sergey at MMS MOA :)

Mayyhem commented 1 year ago

That's awesome to hear!! Thanks for coming :) I had a blast and definitely plan on submitting more talks next time around.

I'm unable to reproduce on version 2303 using the latest code in main. Could you please run again with the --debug option and paste the results here? That should produce a bit more info about the exception.

heinekmadsen commented 1 year ago

Nice!... will definitely prioritize those sessions at next MMS MOA.

Maybe I'll need to go through my lab environment again to verify the prereqs for this to work.

Here's the output with --debug `C:\Users\xxxxxx\Desktop>SharpSCCM_merged.exe invoke client-push -t 192.168.30.121 --debug


|__ || || |/ |] |__ | | | | | v2.0.1.0 __| | | | | | _ | __| |__ |__ | | | @_Mayyhem

[+] Querying the local WMI repository for the current management point and site code [+] Connecting to \127.0.0.1\root\CCM [+] Current management point: CM01.lab.xxxxxxxx.xyz [+] Site code: LAB [+] Created "ConfigMgr Client Messaging" certificate in memory for device registration and signing/encrypting subsequent messages [+] Reusable Base64-encoded certificate:

308209D20201033082098E06092A864886F70D010701A082097F0482097B308209773082059006092A864886F70D010701A08205810482057D3082057930820575060B2A864886F70D010C0A0102A08204EE308204EA301C060A2A864886F70D010C0103300E0408D04454A98C804797020207D0048204C8BE409F147FE3D4C51A898E5D433F3D7C6DAA7FF3D972974B1FD28F3C45A5A5B1BC740C2807B3BC38078EC68E886637FFB8EDC871C3554A93EF0779C64948A17AB545B4A8793524A8E05052AACDD068E1B92B8BB296FB575E822FA1D3191CF2762D0544A710ADFF39A30DBCE0C5E41CC5875C12F3D15686331EEDF8F50B04FC7CC648AE3101C6F7A9E9297F9E6BACC845CF6B62B0AD8CCB880166F81199FC916058E6754AEC1219A30A400863C6C6EBDD523CAC42405FD42AC10431E5557ADB86567F384B0171E50C40FE8A3BC5C9ABD3406529334426C462BCC8F70338BE2266E98DCF8C00A349DC06F62888726FF920869986A8369011938EE0EB2342F2697E82813FF9E0BA68C85302E2ED3E65826BA4A10F03D2E75E30BD3D4D929D0E2479B9E3108BE6BF7CBCBDB9331B50BE4389DFE486E3C7D19F84F58B48FBA0914A7D231A8E0DD07575F52ABB63DAF71F1711232A0318D68E43535EE4628CA295646EF985CAB77210D014E47600259B64327A019238D3FC28AF3DA8B57466A9FC884F5182961D909972F6EC792F67D7A0E30D4C08993F2B90A764EEC7D1578DF74F4A464138083C42E592031B919BB765A2217AD28E0623C5F4C3BDF764E454EB3767B69A5E32657881674E203492F04EE84F91E1215BFECFD16537EC4369CF2EE94B88144C0CAD02DB93A8AC544DE3F84CBBD3292F969283F302185191687A0CDD0C568E25EC125B7C65A1F9BF82993090EF36552C9B2EE6EDC149C7B7D8C5063138E0143B6C73C49F146E1046151E9926AB1DA8CF9782CFA71F4288A51FB1D32393FEC6505D1221F9F5BD6B4EBA83D414836907780C482065D3B1427F7422B384EB96F1E23CB4409E21A0DA4A67FE6176C43E6556C25BBF35FA736F877800FBF778EA95366374DB62A14EAC0608B416CEC40E04CCF29A9115F6478AFD2F81CB2480E90D49970D40061921382CE5ED7FE95E2D99649F470443876C7DAF41E9CC09F03C8FEB1770DDB6734460C10412F28FD829F8735A65C74B64660D8E019EC502A7C937ACC25B7B87051F0AEE04AC32DB9C37A234758B01065762390E3958EB37CACD51DA9B37FE83F6E8D162CCC2B9CCFA248DD44D839A2C2EEC4271A67F00EA895099140D53281F2F4E5B9DCCAB402523DA13E66C350E4A2C1FB91DF6F52E1497A455D058BDD8153E09D464B63FA64A8F6EF3E56EEBF8CABCA3E4592F80B8F7FF48D0F65DA0018BCB3EF860990F7DEA51949799FF0D9C8C542148A55F7DCF9A43D3AE2ADD7FE58E25A9C6A0C5A3A9B556D498F66A00674B0ACA61A3267D3AA632D3798283F605696D2593DA9044273F4FC586E3D9144A3384FCB0ED8570DB66E14241F055AA0507181A47B9DE0A58E443AF28CA943FC34852DD77E004642B495BC632CA2DC4C01F83AB70337AA69905942A5B53633E1F47A4FC43AA7F0FE3349896050756503B8564B7CDF09E2B031E0C083D5E2FC7302B98E6328AE141F088CB9A37ADC67338A827A39CFE60C79D1944CF1F94086DFE478BF2B925A90468D7BE33FBDF4FB7B7F3594D627E7BFC892552E91369E3FF7EF7DDAE4683A19747CFBA4CC5303EEFB64DCFE275B5B36301710B14C6DE4290C19F4AA64C6AB99C0307EFD2D99C5971CD53D8B2A2B09A0998C205A520BD4248C383061076E0AB5C692721933F5DAE9ECEE9BBAC30752DD2B0F4C7431C9192576994C9ACBA706627A1C25AF38E5D7B2EF70A683174301306092A864886F70D0109153106040401000000305D06092B060104018237110131501E4E004D006900630072006F0073006F0066007400200053006F0066007400770061007200650020004B00650079002000530074006F0072006100670065002000500072006F00760069006400650072308203DF06092A864886F70D010706A08203D0308203CC020100308203C506092A864886F70D010701301C060A2A864886F70D010C0103300E04089E0462F2B4784F87020207D080820398A83A57EBD9BA4346A462215DC55EB96899B7BC6975021851A07C5C18C8CA0AD1DEEA6900B8C126F8AE159CE92415A17D2F78F6D7E18118F96EE5730D82215C9E009B3414C8B654E726E8F639880531DA88708ACAD38653268CFD090F3D6DAF6E2764BCD26FAB93C7E5C43BA7A560886A324B9F0001ECFC9BECCE0C2E321C2E1F89A5D47731B606B0C3BB254D976F12F2831CC0CF9D3D564748E6D687F855E68E5625E3486C0C09398B2BFD832A0A28A8B89231CF54D8CA7AD99F59278EBD90CC5D1801C4A34DB899A56F2F39E9DCFF561B87EAA0983EE64D33080CB2F8065178295E187F661D555B6BFCA3DAC3450A7258E95D006A970EAC95882CECCE2142AE1700F2380AF0A38DE13EC65556E6DF4394760F079CDFD27F8B5CAA8528B0AC694C20D2FC3500995FFA56FD8C9ADE4681DDC768B89D8F0FC6EA5D9F08E2812FF780156698B8511D1D29A2D2A1107A8FC02F4CBBE2959E31AAF7303C0F06228CAA85AEC2799E7964EBD039719178733A348AF4AB841B9BCDA6AF0FCB3792B78D5575462D4E4B0129CB559693A2231428ABFCD7CF2519F034DF22C9FDA13C9B514C631E6E9231C7ACC3AC5359E8D1926DD208927DA24F72889836FA89C31D513877E08EB027594CA971B1078C12EA1B55E3BAEA9A0707C5ABF5C578B3A52B6D4CA87132593C8B81FC33CBDAA3932ABA749D302C6248881955CA91B2EFAAD4998E57FD9169CB2CCBC6BABAA0C9238E3071D36027117B0AB1A1F67009AD570FE47419F753197CE43C6223DAB8D2A42FC5B8D50D560108BA5D92F73D876763DC4E5BD5860586CBA5DE89C17F898C302E116F57F5B5545F46A0D5C75A76BEA25B915C404CDEC916052ADD4161F4792A783B0EB4556905E3ECD81A38687E9C022B30EE9A26154AAD394B748CDE94664D76410BD3259A6B6B12899E7C404358540BE6D4669A383DC9E18046A920977A64217559D12507FE02DF11B5D8AF4420F9EA18E6D5A03BD0B907E4468757D5CF03ED34F1F0EF16C0F65CA8F4C6A17FFA6982B10836BEDC93074EC5C3FFC2030A7568ED853B0FED3267D58E209803553E08D8B5C4EBD2E6891EBDD0E3652A7CDAB9138096667512E90302F20AEF2596CFE9FA6B0FDB87F00C6F2DD93C576080A237EE1F7D9B3389AD577EBEC9D4A7641E73005C11AE9E529FA8385128B2512055B66C80F1724752C0788F32775690E9F1FBC442EBEE7601F3EB08C61341A239EC78A774D06ADDAAB7B1E576AE974D4B380DE612EC0D733ACD60DB75E07A17D8F23A86339396483D5E572E81F7C8303B301F300706052B0E03021A04142B58ACB5D1CA208AEDA51ACD930824A9D547A0A80414E8FEECBA3F3A4536BD75847D428281B9ABF85397020207D0

SharpSCCM_merged.exe Information: 0 : [DEBUG] X509CertificateProvider.ctor(): IsCsp = False IsKsp = True HasPrivateKey = True ProviderName = Microsoft Software Key Storage Provider SharpSCCM_merged.exe Information: 0 : [DEBUG] In SynchronousMessageRequest..ctor SharpSCCM_merged.exe Information: 0 : [DEBUG] Encoding: System.Text.UnicodeEncoding SharpSCCM_merged.exe Information: 0 : Certificate Purpose flags are: Signing, Encryption [+] Discovering local properties for client registration request [+] Modifying client registration request properties: FQDN: 192.168.30.121 NetBIOS name: 192.168.30.121 Site code: LAB SharpSCCM_merged.exe Information: 0 : [DEBUG] Get certificate for Encryption returned D50110394B7A4C4E42E50920B9FD35BA4286DEB6 SharpSCCM_merged.exe Information: 0 : [DEBUG] Get certificate for Signing returned D50110394B7A4C4E42E50920B9FD35BA4286DEB6 SharpSCCM_merged.exe Information: 0 : [DEBUG] Get certificate for Signing returned D50110394B7A4C4E42E50920B9FD35BA4286DEB6 SharpSCCM_merged.exe Information: 0 : [DEBUG] Get certificate for Signing returned D50110394B7A4C4E42E50920B9FD35BA4286DEB6 SharpSCCM_merged.exe Information: 0 : [DEBUG] Serialization flags for message Microsoft.ConfigurationManagement.Messaging.Messages.ClientRegistrationRequestData are: None SharpSCCM_merged.exe Information: 0 : [DEBUG] [Microsoft.ConfigurationManagement.Messaging.Framework.MessageHashAlgorithmCng IsCsp=False IsKsp=True] Signing 7336 bytes using algorithm: SHA256 SharpSCCM_merged.exe Information: 0 : [DEBUG] Serialization flags for message Microsoft.ConfigurationManagement.Messaging.Messages.ClientRegistrationRequest are: None SharpSCCM_merged.exe Information: 0 : [DEBUG] Payload bytes are being set. [+] Sending HTTP registration request to CM01.lab.xxxxxxxx.xyz:80 SharpSCCM_merged.exe Information: 0 : Validating message settings SharpSCCM_merged.exe Information: 0 : Message 'Microsoft.ConfigurationManagement.Messaging.Messages.ConfigMgrRegistrationRequest' support status: 'Supported'. Message is supported and any functionality issues should be reported as bugs. SharpSCCM_merged.exe Information: 0 : [DEBUG] Flags for message ConfigMgrRegistrationRequest are NotSigned SharpSCCM_merged.exe Information: 0 : [DEBUG] Message has a SigningSmsId, but message is explicitly set to reject signing. Not signing message. SharpSCCM_merged.exe Information: 0 : [DEBUG] Message Microsoft.ConfigurationManagement.Messaging.Messages.ConfigMgrRegistrationRequest will be signed: False SharpSCCM_merged.exe Information: 0 : [DEBUG] 0 validation exceptions were handled during validation process. SharpSCCM_merged.exe Information: 0 : Sending registration request for client 192.168.30.121 to MP CM01.lab.xxxxxxxx.xyz SharpSCCM_merged.exe Information: 0 : Sending message 'Microsoft.ConfigurationManagement.Messaging.Messages.ConfigMgrRegistrationRequest' via sender 'Microsoft.ConfigurationManagement.Messaging.Sender.Http.HttpSender'. Message type: 'Sync' SharpSCCM_merged.exe Information: 0 : Validating message settings SharpSCCM_merged.exe Information: 0 : Message 'Microsoft.ConfigurationManagement.Messaging.Messages.ConfigMgrRegistrationRequest' support status: 'Supported'. Message is supported and any functionality issues should be reported as bugs. SharpSCCM_merged.exe Information: 0 : [DEBUG] Flags for message ConfigMgrRegistrationRequest are NotSigned SharpSCCM_merged.exe Information: 0 : [DEBUG] Message has a SigningSmsId, but message is explicitly set to reject signing. Not signing message. SharpSCCM_merged.exe Information: 0 : [DEBUG] Message Microsoft.ConfigurationManagement.Messaging.Messages.ConfigMgrRegistrationRequest will be signed: False SharpSCCM_merged.exe Information: 0 : [DEBUG] 0 validation exceptions were handled during validation process. SharpSCCM_merged.exe Information: 0 : [DEBUG] Get certificate for Encryption returned D50110394B7A4C4E42E50920B9FD35BA4286DEB6 SharpSCCM_merged.exe Information: 0 : [DEBUG] Get certificate for Signing returned D50110394B7A4C4E42E50920B9FD35BA4286DEB6 SharpSCCM_merged.exe Information: 0 : [DEBUG] Get certificate for Signing returned D50110394B7A4C4E42E50920B9FD35BA4286DEB6 SharpSCCM_merged.exe Information: 0 : [DEBUG] Get certificate for Signing returned D50110394B7A4C4E42E50920B9FD35BA4286DEB6 SharpSCCM_merged.exe Information: 0 : [DEBUG] Serialization flags for message Microsoft.ConfigurationManagement.Messaging.Messages.ClientRegistrationRequestData are: None SharpSCCM_merged.exe Information: 0 : [DEBUG] [Microsoft.ConfigurationManagement.Messaging.Framework.MessageHashAlgorithmCng IsCsp=False IsKsp=True] Signing 7336 bytes using algorithm: SHA256 SharpSCCM_merged.exe Information: 0 : [DEBUG] Serialization flags for message Microsoft.ConfigurationManagement.Messaging.Messages.ClientRegistrationRequest are: None SharpSCCM_merged.exe Information: 0 : [DEBUG] Payload bytes are being set. SharpSCCM_merged.exe Information: 0 : [DEBUG] AuthenticationType is: Automatic. Credentials are: null SharpSCCM_merged.exe Information: 0 : [DEBUG] Returning /ccm_system/request VDIR SharpSCCM_merged.exe Information: 0 : [DEBUG] MessageVerb is: CCM_POST SharpSCCM_merged.exe Information: 0 : [DEBUG] ManagementPointUriPath is: /ccm_system/request SharpSCCM_merged.exe Information: 0 : [DEBUG] Using URI http://cm01.lab.xxxxxxxx.xyz/ccm_system/request SharpSCCM_merged.exe Information: 0 : [DEBUG] Message timeout is: 60000ms SharpSCCM_merged.exe Information: 0 : [DEBUG] Using CCM_POST method to send data to web server SharpSCCM_merged.exe Information: 0 : [DEBUG] Message is a standard MP message. SharpSCCM_merged.exe Information: 0 : Compressing message SharpSCCM_merged.exe Information: 0 : [DEBUG] Flags for message ConfigMgrRegistrationRequest are NotSigned SharpSCCM_merged.exe Information: 0 : [DEBUG] Message has a SigningSmsId, but message is explicitly set to reject signing. Not signing message. SharpSCCM_merged.exe Information: 0 : [DEBUG] Message Microsoft.ConfigurationManagement.Messaging.Messages.ConfigMgrRegistrationRequest will be signed: False SharpSCCM_merged.exe Information: 0 : [DEBUG] Serialization flags for message Microsoft.ConfigurationManagement.Messaging.Framework.ManagementPoint.MPMessageBodyOutgoing are: None SharpSCCM_merged.exe Information: 0 : [DEBUG] Serialization flags for message Microsoft.ConfigurationManagement.Messaging.Framework.ManagementPoint.MPHookCompressZlib are: None SharpSCCM_merged.exe Information: 0 : [DEBUG] CCM_POST: payload size 3459 SharpSCCM_merged.exe Information: 0 : HTTP response status code is: OK SharpSCCM_merged.exe Information: 0 : [DEBUG] Cloning message SharpSCCM_merged.exe Information: 0 : [DEBUG] Not cloning property Endpoint because it is a special message-specific property SharpSCCM_merged.exe Information: 0 : [DEBUG] Not cloning property ReplyEndpoint because it is a special message-specific property SharpSCCM_merged.exe Information: 0 : [DEBUG] byteStream has an 0xfffe BOM, stripping out the first two bytes. SharpSCCM_merged.exe Information: 0 : [DEBUG] MIME type is parsed as: Text SharpSCCM_merged.exe Information: 0 : [DEBUG] MIME sub-type is parsed as: plain SharpSCCM_merged.exe Information: 0 : [DEBUG] MIME type is parsed as: Application SharpSCCM_merged.exe Information: 0 : [DEBUG] MIME sub-type is parsed as: octet-stream SharpSCCM_merged.exe Information: 0 : [DEBUG] 2 MIME blobs in reply SharpSCCM_merged.exe Information: 0 : [DEBUG] Message is a Msg message, second element has the body SharpSCCM_merged.exe Warning: 0 : No certificate of type ManagementPointSigning was found. SharpSCCM_merged.exe Information: 0 : Decompressing reply message using compression method: Zlib SharpSCCM_merged.exe Information: 0 : Decompressed 137 --> 244 SharpSCCM_merged.exe Information: 0 : Successfully decompressed payload SharpSCCM_merged.exe Information: 0 : [DEBUG] Got return message (size: 244) SharpSCCM_merged.exe Information: 0 : [DEBUG] Not cloning property Endpoint because it is a special message-specific property SharpSCCM_merged.exe Information: 0 : [DEBUG] Not cloning property ReplyEndpoint because it is a special message-specific property SharpSCCM_merged.exe Information: 0 : [DEBUG] Not cloning SenderProperties because CloneSenderSettings is not specified. SharpSCCM_merged.exe Information: 0 : [DEBUG] SimpleBodyDeserialization Payload encoding: System.Text.UnicodeEncoding SharpSCCM_merged.exe Information: 0 : [DEBUG] Payload has changed, re-generating the payload string. SharpSCCM_merged.exe Error: 0 : Input stream passed to StripBom(byte[]) that does not meet criteria for BOM stripping. Returning original byte stream to caller. SharpSCCM_merged.exe Information: 0 : Got registration reply. Current registration status: Error SharpSCCM_merged.exe Error: 0 : Invalid registration state. Cannot continue. [!] An unhandled exception of type System.Reflection.TargetInvocationException occurred: Exception has been thrown by the target of an invocation. at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Delegate.DynamicInvokeImpl(Object[] args) at System.CommandLine.NamingConventionBinder.ModelBindingCommandHandler.d11.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.CommandLine.Invocation.InvocationPipeline.<>cDisplayClass4_0.<b0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.CommandLine.Builder.CommandLineBuilderExtensions.<>cDisplayClass18_0.<b0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.CommandLine.Builder.CommandLineBuilderExtensions.<>cDisplayClass13_0.<b0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.CommandLine.Builder.CommandLineBuilderExtensions.<>cDisplayClass22_0.<b0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.CommandLine.Builder.CommandLineBuilderExtensions.<>cDisplayClass20_0.<b0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<b1_0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.CommandLine.Invocation.InvocationPipeline.Invoke(IConsole console) at System.CommandLine.Parsing.ParserExtensions.Invoke(Parser parser, String[] args, IConsole console) at SharpSCCM.Program.Main(String[] args)

System.InvalidOperationException: Invalid registration state: Error. Cannot continue. at Microsoft.ConfigurationManagement.Messaging.Messages.ConfigMgrRegistrationRequestBase.RegisterClient(ConfigMgrRegistrationRequestBase baseRequestMessage, IMessageSender sender, TimeSpan timeout) at Microsoft.ConfigurationManagement.Messaging.Messages.ConfigMgrRegistrationRequestBase.RegisterClient(IMessageSender sender, TimeSpan timeout) at SharpSCCM.MgmtPointMessaging.RegisterClient(MessageCertificateX509 certificate, String target, String managementPoint, String siteCode, String authenticationType, String username, String password) at SharpSCCM.Program.<>c.

b__0_18(String managementPoint, String siteCode, Boolean asAdmin, String certificate, String clientId, String target)`

Mayyhem commented 1 year ago

I'm going to have to install technical preview and see if the issue occurs, which might take me a bit. I did a side by side comparison and it looks like the only significant difference between our outputs is this:

image

My output contains ConfigMgrRegistrationReply will be signed: False, while yours doesn't, then it fails. Not sure exactly why. You have HTTP enabled?

image

heinekmadsen commented 1 year ago

Just verified that i have the same Communication Security settings i my LAB

heinekmadsen commented 1 year ago

I see in the Configuration Manager docs that from 2211 these fixes are included https://learn.microsoft.com/en-us/mem/configmgr/hotfix/2207/15152495 which include https://learn.microsoft.com/en-us/mem/configmgr/hotfix/2207/15599094 and https://learn.microsoft.com/en-us/mem/configmgr/hotfix/2207/15498768

Could that be the reason why i cant get it to work on latest preview?

Mayyhem commented 1 year ago

I don't think so, since SharpSCCM fails before the stage where NTLM comes into play and it's working in my lab. I'm going to get Tech Preview spun up and try and live debug to figure this out.

heinekmadsen commented 1 year ago

Cool.. I'm spinning up a 2203 site and do some testing there.

heinekmadsen commented 1 year ago

@Mayyhem Well... turns out, it's working just fine with CM 2203 release, so MS must have done something in later builds :)

Mayyhem commented 1 year ago

Interesting! Thank you for testing that. And assuming that change was on purpose, good job Microsoft! 😄

I'll still check it out and see if the change is something that can be worked around or if the ability to register a client with a self-signed certificate was removed.

Mayyhem commented 1 year ago

I got Tech Preview installed from https://learn.microsoft.com/en-us/samples/azure/azure-quickstart-templates/sccm-technicalpreview/ but not encountering the same issue. Maybe it's something to do with your installation?

B301F300706052B0E03021A04140B341B1E5D49BAB4621F2FCCD806C3A274C2B0E404141219F1C657ACC9CF9D878799DD5FFB55A39C4322020207D0

[+] Discovering local properties for client registration request
[+] Modifying client registration request properties:
      FQDN: 192.168.19.19
      NetBIOS name: 192.168.19.19
      Site code: ps1
[+] Sending HTTP registration request to 10.0.0.5:80
[+] Received unique SMS client GUID for new device:

    GUID:A3EE88E6-370F-42EB-852F-D85BA0946673

[+] Discovering local properties for DDR inventory report
[+] Modifying DDR and inventory report properties
[+] Discovered PlatformID: Microsoft Windows NT Server 10.0
[+] Modified PlatformID: Microsoft Windows NT Workstation 2010.0
[+] Sending DDR from GUID:A3EE88E6-370F-42EB-852F-D85BA0946673 to MP_DdrEndpoint endpoint on 10.0.0.5:ps1 and requesting client installation on 192.168.19.19
[+] Completed execution in 00:00:16.2082910
Mayyhem commented 1 year ago

Any luck figuring this out @heinekmadsen ?

Mayyhem commented 1 year ago

@heinekmadsen I just want to bump this one more time before closing this issue. Were you able to resolve this issue?