Adding Registry key new Value with long path RRS feed

  • Question

  • Hi All I am trying to add a new registry key which contains a very long value. I can create the registry key :

    New-Item "HKLM:SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\"

    I am trying to add the following value but struggling with syntax - can anyone please help !

    New-ItemProperty "HKLM:SOFTWARE\Policies\Microsoft\Windows\SrpV2\Exe\11759873-1713-4c87-b95b-925c887337a5" -Name "value" -Value ("<FilePublisherRule Id="11759873-1713-4c87-b95b-925c887337a5" Name="MICROSOFT DYNAMICS 365 COMMERCE, from O=MICROSOFT CORPORATION, L=REDMOND, S=WASHINGTON, C=US" Description="" UserOrGroupSid="S-1-1-0" Action="Allow"><Conditions><FilePublisherCondition PublisherName="O=MICROSOFT CORPORATION, L=REDMOND, S=WASHINGTON, C=US" ProductName="MICROSOFT DYNAMICS 365 COMMERCE" BinaryName="*"><BinaryVersionRange LowSection="*" HighSection="*"/></FilePublisherCondition></Conditions></FilePublisherRule>") -PropertyType "String"


    Thursday, July 23, 2020 6:33 AM

All replies