Home
%3CLINGO-SUB%20id%3D%22lingo-sub-819360%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20CDN%20%E2%80%93%20Standard%20Microsoft%3A%20Rules%20Engine%20for%20http%20to%20https%20redirection%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-819360%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%2C%20This%20document%20has%20helped%20me%20a%20lot.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%2C%20is%20there%20a%20way%20to%20remove%20the%20policy%20that%20has%20been%20attached.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-855071%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20CDN%20%E2%80%93%20Standard%20Microsoft%3A%20Rules%20Engine%20for%20http%20to%20https%20redirection%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-855071%22%20slang%3D%22en-US%22%3E%3CP%3EHello!%26nbsp%3B%20We%20keep%20getting%20the%20following%20error%20when%20trying%20to%20run%20the%20Set-AzCdnEndpoint%20cmdlet%20for%20a%20Standard%20Microsoft%20CDN%20Profile.%26nbsp%3B%20Tested%20on%20Az.Cdn%201.3.0%2C%201.3.3%2C%20and%20current%20Cloud%20Shell.%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3ESet-AzCdnEndpoint%20%3A%20Operation%20returned%20an%20invalid%20status%20code%20'BadRequest'%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWith%20the%20following%20in%20the%20400%20response%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%22message%22%3A%20%22A%20type%20named%20'Microsoft.Azure.Cdn.Models.DeliveryRuleUrlRedirectActionParameters'%20could%20not%20be%20resolved%20by%20the%20model.%20When%20a%20model%20is%20available%2C%20each%20type%20name%20must%20resolve%20to%20a%20valid%20type.%22%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAre%20you%20able%20to%20reproduce%20this%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-858411%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20CDN%20%E2%80%93%20Standard%20Microsoft%3A%20Rules%20Engine%20for%20http%20to%20https%20redirection%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-858411%22%20slang%3D%22en-US%22%3ESame%20as%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F408726%22%20target%3D%22_blank%22%3E%40jcrosbyrwb%3C%2FA%3E%20here.%20BadRequest%20on%20Set-AzCdnEndpoint%20with%20As.Cdn%201.3.1%20Any%20help%20about%20this%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-858466%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20CDN%20%E2%80%93%20Standard%20Microsoft%3A%20Rules%20Engine%20for%20http%20to%20https%20redirection%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-858466%22%20slang%3D%22en-US%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F408726%22%20target%3D%22_blank%22%3E%40jcrosbyrwb%3C%2FA%3E%20%26amp%3B%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F410162%22%20target%3D%22_blank%22%3E%40technetColmar%3C%2FA%3E%20%2C%3C%2FP%3E%0A%3CP%3EI'm%20able%20to%20reproduce%20this%20error%2C%20seems%20like%20something%20has%20changed%2C%20I'm%20checking%20more%20on%20this%20internally%2C%20will%20post%20further%20updates%20on%20this.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-872121%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20CDN%20%E2%80%93%20Standard%20Microsoft%3A%20Rules%20Engine%20for%20http%20to%20https%20redirection%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-872121%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F410162%22%20target%3D%22_blank%22%3E%40technetColmar%3C%2FA%3E%20%26amp%3B%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F408726%22%20target%3D%22_blank%22%3E%40jcrosbyrwb%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%0A%3CP%3EThere%20was%20a%20fix%20planned%20to%20release%20for%20this%20issue%20in%20next%202-3%20weeks%2C%20you%20can%20expect%20this%20to%20work%20by%20then.%20I'll%20update%20this%20thread%20once%20the%20fix%20is%20deployed%20for%20it.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-872237%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20CDN%20%E2%80%93%20Standard%20Microsoft%3A%20Rules%20Engine%20for%20http%20to%20https%20redirection%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-872237%22%20slang%3D%22en-US%22%3E%3CP%3EThank%20you%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F380788%22%20target%3D%22_blank%22%3E%40Braja%3C%2FA%3E!%26nbsp%3B%20We're%20holding%20up%20a%20production%20rollout%20of%20a%20site%2C%20so%20this%20fix%20will%20be%20much%20appreciated.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-898176%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20CDN%20%E2%80%93%20Standard%20Microsoft%3A%20Rules%20Engine%20for%20http%20to%20https%20redirection%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-898176%22%20slang%3D%22en-US%22%3E%3CP%3EThis%20seems%20to%20have%20been%20resolved%20now.%20I%20just%20completed%20the%20steps%20without%20error%20today.%20However%2C%20this%20then%20resulted%20in%20an%20infinite%20redirect%20as%20it%20seemed%20to%20be%20matching%20HTTPS%20as%20well%20as%20HTTP.%20Given%20that%20the%20rule%20only%20matches%20GET%20verbs%20and%20ignores%20the%20scheme%2C%20I%20guess%20this%20was%20to%20be%20expected.%20I%20tried%20to%20guess%20how%20to%20add%20another%20condition%3A%3C%2FP%3E%3CPRE%3E%24protocolCondition%20%3D%20New-AzCdnDeliveryRuleCondition%20-MatchVariable%20'RequestScheme'%20-Operator%20Equal%20-MatchValue%20%22HTTP%22%0A%24ep.DeliveryPolicy%5B0%5D.Rules%5B0%5D.Conditions.Add(%24protocolCondition)%3C%2FPRE%3E%3CP%3EHowever%2C%20after%20saving%20the%20endpoint%20there%20seemed%20to%20be%20no%20change%20in%20behaviour.%20Unfortunately%20then%20trying%20this%3A%3C%2FP%3E%3CPRE%3E%24ep.DeliveryPolicy%20%3D%20%24null%0ASet-AzCdnEndpoint%20-CdnEndpoint%20%24ep%3C%2FPRE%3E%3CP%3E...did%20not%20remove%20the%20policy.%20When%20retrieving%20the%20endpoint%20again%20and%20inspecting%20it%2C%20the%20policy%20is%20still%20present%20with%20all%20the%20same%20conditions%20and%20rules.%20I%20think%20Set-AzCdnEndpoint%20decided%20that%20as%20I%20wasn't%20providing%20a%20DeliveryPolicy%20I%20must%20not%20be%20wanting%20to%20alter%20the%20current%20state.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20following%20mechanism%20did%20clear%20out%20the%20policy%20and%20at%20least%20remove%20the%20infinite%20redirect%20problem%20(though%20no%20solution%20for%20HTTP%20%3D%26gt%3B%20HTTPS%20redirect)%3A%3C%2FP%3E%3CPRE%3E%24ep.DeliveryPolicy.Rules.Clear()%0ASet-AzCdnEndpoint%20-CdnEndpoint%20%24ep%3C%2FPRE%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F380788%22%20target%3D%22_blank%22%3E%40Braja%3C%2FA%3E%26nbsp%3Bit%20would%20be%20enormously%20useful%20if%20you%20could%20indicate%20the%20correct%20syntax%20for%20matching%20only%20HTTP%20requests%20in%20the%20conditions.%20Thanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-898639%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20CDN%20%E2%80%93%20Standard%20Microsoft%3A%20Rules%20Engine%20for%20http%20to%20https%20redirection%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-898639%22%20slang%3D%22en-US%22%3E%3CP%3EOkay%2C%20so%20trying%20this%20again%20it%20seems%20that%20if%20I%20use%26nbsp%3B%3CEM%3Eonly%26nbsp%3B%3C%2FEM%3Ethe%20%22RequestScheme%22%20condition%20mentioned%20in%20my%20last%20comment%2C%20and%20not%20the%20%22GET%22%20condition%2C%20it%20works.%20It%20is%20also%20possible%20that%20when%20I%20tried%20to%20have%20both%20conditions%20in%20the%20rule%20yesterday%20I%20did%20not%20leave%20enough%20time%20for%20the%20policy%20to%20propagate%20before%20testing%20it.%20This%20time%20my%20successful%20tests%20were%20half%20an%20hour%20after%20applying%20the%20policy.%20Immediate%20testing%20had%20still%20shown%20that%20it%20didn't%20work.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-916717%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20CDN%20%E2%80%93%20Standard%20Microsoft%3A%20Rules%20Engine%20for%20http%20to%20https%20redirection%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-916717%22%20slang%3D%22en-US%22%3E%3CP%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3EHello%20everyone%2C%3CBR%20%2F%3ESorry%20for%20the%20delayed%20response%20as%20i%20was%20away%20from%20work%20for%20sometime.%3CBR%20%2F%3E%26nbsp%3B%3CBR%20%2F%3EChecked%20the%20updates%20here%20internally%20and%20understood%20that%20the%20fix%20had%20been%20pushed%20and%20the%20http%20to%20https%20redirection%20rule%20shall%20work%2C%20however%20you%20need%20to%20use%20the%20%22RequestScheme%22%20rule%20condition%20instead%20of%20%22RequestMethod%22%20as%20suggested%20by%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F421651%22%20target%3D%22_blank%22%3E%40Josh_Gallagher%3C%2FA%3E%20in%20his%20comments%20above.%20Thanks%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F421651%22%20target%3D%22_blank%22%3E%40Josh_Gallagher%3C%2FA%3E%20for%20sharing%20details.%3CBR%20%2F%3E%26nbsp%3B%3CBR%20%2F%3EAs%20indicated%20in%20this%20article%2C%20this%20feature%20is%20still%20in%20preview%20as%20such%2C%20it%20may%20be%20subject%20to%20frequent%20changes%2C%20and%20may%20not%20be%20suitable%20for%20production%20deployments%20yet.%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-919690%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20CDN%20%E2%80%93%20Standard%20Microsoft%3A%20Rules%20Engine%20for%20http%20to%20https%20redirection%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-919690%22%20slang%3D%22en-US%22%3E%3CP%3EThank%20you%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F421651%22%20target%3D%22_blank%22%3E%40Josh_Gallagher%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20confirm%20%22RequestScheme%22%20works%2C%20although%20I%20had%20to%20wait%20a%20few%20hours%20before%20seeing%20a%20consistent%20redirect%20on%20every%20device%20and%20browser.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-960932%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20CDN%20%E2%80%93%20Standard%20Microsoft%3A%20Rules%20Engine%20for%20http%20to%20https%20redirection%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-960932%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F380788%22%20target%3D%22_blank%22%3E%40Braja%3C%2FA%3E%26nbsp%3BCan%20you%20update%20the%20top%20example%20so%20that%20it%20works%20when%20people%20come%20across%20it%20without%20them%20having%20to%20read%20through%20the%20entire%20comment%20history%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-961025%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20CDN%20%E2%80%93%20Standard%20Microsoft%3A%20Rules%20Engine%20for%20http%20to%20https%20redirection%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-961025%22%20slang%3D%22en-US%22%3E%3CP%3EUsing%20this%20logic%2C%20I%20am%20still%20receiving%20%22BadRequest%22%20on%20a%20standard_microsoft%20cdn%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CDIV%3E%3CBR%20%2F%3E%3CDIV%3E%3CSPAN%3E%24RuleCondition%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%3D%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3ENew-AzCdnDeliveryRuleCondition%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E-%3C%2FSPAN%3E%3CSPAN%3EMatchVariable%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E'RequestScheme'%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E-%3C%2FSPAN%3E%3CSPAN%3EOperator%26nbsp%3BEqual%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E-%3C%2FSPAN%3E%3CSPAN%3EMatchValue%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22HTTP%22%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%24RuleAction%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%3D%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3ENew-AzCdnDeliveryRuleAction%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E-%3C%2FSPAN%3E%3CSPAN%3ERedirectType%26nbsp%3BMoved%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E-%3C%2FSPAN%3E%3CSPAN%3EDestinationProtocol%26nbsp%3BHttps%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%24Rule%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%3D%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3ENew-AzCdnDeliveryRule%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E-%3C%2FSPAN%3E%3CSPAN%3EOrder%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E1%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E-%3C%2FSPAN%3E%3CSPAN%3ECondition%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%24RuleCondition%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E-%3C%2FSPAN%3E%3CSPAN%3EAction%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%24RuleAction%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%24policy%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%3D%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3ENew-AzCdnDeliveryPolicy%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E-%3C%2FSPAN%3E%3CSPAN%3EDescription%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22RedirectPolicy%22%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E-%3C%2FSPAN%3E%3CSPAN%3ERule%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%24Rule%3C%2FSPAN%3E%3C%2FDIV%3E%3CBR%20%2F%3E%3CDIV%3E%3CSPAN%3E%24ep%3C%2FSPAN%3E%3CSPAN%3E.DeliveryPolicy%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%3D%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%24policy%3C%2FSPAN%3E%3C%2FDIV%3E%3CBR%20%2F%3E%3CDIV%3E%3CSPAN%3ESet-AzCdnEndpoint%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E-%3C%2FSPAN%3E%3CSPAN%3ECdnEndpoint%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%24ep%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-828683%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20CDN%20%E2%80%93%20Standard%20Microsoft%3A%20Rules%20Engine%20for%20http%20to%20https%20redirection%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-828683%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F397182%22%20target%3D%22_blank%22%3E%40varadasandeep%3C%2FA%3Eyou're%20welcome.%3C%2FP%3E%0A%3CP%3E%3CUPDATING%20the%3D%22%22%20answer%3D%22%22%20as%3D%22%22%20per%3D%22%22%20the%3D%22%22%20latest%3D%22%22%20release%3D%22%22%3E%3C%2FUPDATING%3E%3C%2FP%3E%0A%3CP%3ETo%20remove%20the%20policy%20from%20an%20endpoint%2C%20you%20can%20do%20a%20Get-AzCdnEndpoint%20to%20retrieve%20endpoint%20data.%20Once%20you%20get%20the%20endpoint%20data%2C%20make%20a%20call%20to%20clear%20the%20delivery%20policy%20rules%2C%20then%20do%20Set-AzCdnEndpoint%20with%20the%20updated%20endpoint%20data.%3C%2FP%3E%0A%3CP%3EE.g.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3E%23get%20the%20CDN%20endpoint%20reference%20%3C%2FFONT%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3E%3CSPAN%20style%3D%22display%3A%20inline%20!important%3B%20float%3A%20none%3B%20background-color%3A%20%23ffffff%3B%20color%3A%20%23333333%3B%20font-family%3A%20'SegoeUI'%2C'Lato'%2C'Helvetica%20Neue'%2CHelvetica%2CArial%2Csans-serif%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3E%24ep%20%3D%20Get-AzCdnEndpoint%20-ProfileName%20%22%3CCDN%20profile%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2F%22%20name%3D%22%22%3E%22%20-EndpointName%20%22%3CCDN%20endpoint%3D%22%22%20name%3D%22%22%3E%22%20-ResourceGroupName%20%22%3CRESOURCE%20group%3D%22%22%20name%3D%22%22%3E%22%3C%2FRESOURCE%3E%3C%2FCDN%3E%3C%2FCDN%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3C%2FFONT%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3E%23clear%20the%20Rules%20of%20CDN%20endpoint%3CBR%20%2F%3E%24ep.DeliveryPolicy.Rules.Clear()%3CBR%20%2F%3ESet-AzCdnEndpoint%20-CdnEndpoint%20%24ep%3C%2FFONT%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-961393%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20CDN%20%E2%80%93%20Standard%20Microsoft%3A%20Rules%20Engine%20for%20http%20to%20https%20redirection%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-961393%22%20slang%3D%22en-US%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F435178%22%20target%3D%22_blank%22%3E%40erikoleary%3C%2FA%3E%20%2C%3C%2FP%3E%0A%3CP%3EThank%20you%20for%20the%20heads%20up%2C%20I%20have%20now%20updated%20the%20PS%20scripts%20details%20with%20the%20working%20one.%26nbsp%3B%3C%2FP%3E%0A%3CP%3ERegarding%20the%20%22%3CSPAN%20style%3D%22display%3A%20inline%20!important%3B%20float%3A%20none%3B%20background-color%3A%20%23f8f8f8%3B%20color%3A%20%23333333%3B%20font-family%3A%20'SegoeUI'%2C'Lato'%2C'Helvetica%20Neue'%2CHelvetica%2CArial%2Csans-serif%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3EBadRequest%3C%2FSPAN%3E%22%20error%20that%20you're%20receiving%2C%20I%20notice%20that%20you%20missed%20to%20provide%20a%20name%20while%20creating%20a%20CDNDeliveryRule.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPlease%20provide%20a%20name%20like%20follows%20(also%20mentioned%20in%20this%20article's%20PS%20scripts)%20and%20try%20again%2C%3C%2FP%3E%0A%3CP%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoeui%26amp%3Bquot%3B%2C%26amp%3Bquot%3Blato%26amp%3Bquot%3B%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Carial%2Csans-serif%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3E%24Rule%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoeui%26amp%3Bquot%3B%2C%26amp%3Bquot%3Blato%26amp%3Bquot%3B%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Carial%2Csans-serif%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoeui%26amp%3Bquot%3B%2C%26amp%3Bquot%3Blato%26amp%3Bquot%3B%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Carial%2Csans-serif%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoeui%26amp%3Bquot%3B%2C%26amp%3Bquot%3Blato%26amp%3Bquot%3B%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Carial%2Csans-serif%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoeui%26amp%3Bquot%3B%2C%26amp%3Bquot%3Blato%26amp%3Bquot%3B%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Carial%2Csans-serif%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3ENew-AzCdnDeliveryRule%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoeui%26amp%3Bquot%3B%2C%26amp%3Bquot%3Blato%26amp%3Bquot%3B%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Carial%2Csans-serif%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3E%26nbsp%3B%3CSTRONG%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3E-Name%20%22rule2%22%3C%2FFONT%3E%20%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoeui%26amp%3Bquot%3B%2C%26amp%3Bquot%3Blato%26amp%3Bquot%3B%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Carial%2Csans-serif%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3E-%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoeui%26amp%3Bquot%3B%2C%26amp%3Bquot%3Blato%26amp%3Bquot%3B%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Carial%2Csans-serif%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3EOrder%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoeui%26amp%3Bquot%3B%2C%26amp%3Bquot%3Blato%26amp%3Bquot%3B%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Carial%2Csans-serif%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3E1%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoeui%26amp%3Bquot%3B%2C%26amp%3Bquot%3Blato%26amp%3Bquot%3B%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Carial%2Csans-serif%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoeui%26amp%3Bquot%3B%2C%26amp%3Bquot%3Blato%26amp%3Bquot%3B%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Carial%2Csans-serif%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3E-%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoeui%26amp%3Bquot%3B%2C%26amp%3Bquot%3Blato%26amp%3Bquot%3B%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Carial%2Csans-serif%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3ECondition%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoeui%26amp%3Bquot%3B%2C%26amp%3Bquot%3Blato%26amp%3Bquot%3B%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Carial%2Csans-serif%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3E%24RuleCondition%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoeui%26amp%3Bquot%3B%2C%26amp%3Bquot%3Blato%26amp%3Bquot%3B%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Carial%2Csans-serif%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoeui%26amp%3Bquot%3B%2C%26amp%3Bquot%3Blato%26amp%3Bquot%3B%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Carial%2Csans-serif%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3E-%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoeui%26amp%3Bquot%3B%2C%26amp%3Bquot%3Blato%26amp%3Bquot%3B%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Carial%2Csans-serif%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3EAction%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoeui%26amp%3Bquot%3B%2C%26amp%3Bquot%3Blato%26amp%3Bquot%3B%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Carial%2Csans-serif%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3E%24RuleAction%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-962334%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20CDN%20%E2%80%93%20Standard%20Microsoft%3A%20Rules%20Engine%20for%20http%20to%20https%20redirection%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-962334%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F380788%22%20target%3D%22_blank%22%3E%40Braja%3C%2FA%3E%26nbsp%3Bi%20tried%20it%20all%20different%20ways%2C%20always%20badrequest%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-962380%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20CDN%20%E2%80%93%20Standard%20Microsoft%3A%20Rules%20Engine%20for%20http%20to%20https%20redirection%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-962380%22%20slang%3D%22en-US%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F435178%22%20target%3D%22_blank%22%3E%40erikoleary%3C%2FA%3E%20%2C%3C%2FP%3E%0A%3CP%3EI%20tried%20this%20operation%20today%20and%20it's%20working%20fine%20for%20me%20and%20works%20for%20others%20too.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHave%20you%20installed%20the%20latest%20%3CSPAN%20style%3D%22display%3A%20inline%20!important%3B%20float%3A%20none%3B%20background-color%3A%20%23ffffff%3B%20color%3A%20%23333333%3B%20font-family%3A%20'SegoeUI'%2C'Lato'%2C'Helvetica%20Neue'%2CHelvetica%2CArial%2Csans-serif%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3E%20Az.Cdn%20PS%20module%3F%20If%20yes%2C%20then%20it%20seems%20this%20%3C%2FSPAN%3Eneeds%20some%20isolation%20to%20find%20out%20why%20this%20is%20failing%20%3CSPAN%20style%3D%22display%3A%20inline%20!important%3B%20float%3A%20none%3B%20background-color%3A%20%23ffffff%3B%20color%3A%20%23333333%3B%20cursor%3A%20text%3B%20font-family%3A%20inherit%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20line-height%3A%201.7142%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3E%20in%20your%20case%3C%2FSPAN%3E%2C%20it%20would%20be%20better%20if%20you%20can%20open%20an%20Azure%20support%20request%20to%20engage%20the%20CDN%20support%20team.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-964835%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20CDN%20%E2%80%93%20Standard%20Microsoft%3A%20Rules%20Engine%20for%20http%20to%20https%20redirection%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-964835%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F380788%22%20target%3D%22_blank%22%3E%40Braja%3C%2FA%3E%26nbsp%3BThis%20also%20does%20not%20work%20for%20me%2C%20I%20can%20get%20to%20the%20point%20of%20setting%20the%20AzCdnEndpoint%2C%20but%20each%20time%2C%20I%20get%3C%2FP%3E%3CP%3E%26nbsp%3B%20%22Set-AzCdnEndpoint%20%3A%20Operation%20returned%20an%20invalid%20status%20code%20'BadRequest'%22%3C%2FP%3E%3CP%3EThe%20Az.Cdn%20PS%20module%20is%20at%201.3.1%2C%20so%20this%20is%20not%20the%20issue.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1000859%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20CDN%20%E2%80%93%20Standard%20Microsoft%3A%20Rules%20Engine%20for%20http%20to%20https%20redirection%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1000859%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F380788%22%20target%3D%22_blank%22%3E%40Braja%3C%2FA%3E%26nbsp%3Bdoes%20the%20rules%20engine%20support%20wild%20cards%2Fregex%3F%20I%20am%20trying%20to%20redirect%20request%20to%20a%20specific%20container%20in%20my%20storage%20account%20if%20the%20URL%20contains%20a%20specific%20string%20pattern%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1001355%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20CDN%20%E2%80%93%20Standard%20Microsoft%3A%20Rules%20Engine%20for%20http%20to%20https%20redirection%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1001355%22%20slang%3D%22en-US%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F436029%22%20target%3D%22_blank%22%3E%40deeksy%3C%2FA%3E%20%26amp%3B%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F435178%22%20target%3D%22_blank%22%3E%40erikoleary%3C%2FA%3E%20%2C%3C%2FP%3E%0A%3CP%3ERecently%2C%20this%20http%20to%20https%20feature%20made%20available%20on%20Azure%20Portal%20to%20enable%20for%20a%20CDN%20endpoint.%20You%20can%20use%20%22Rules%20Engine%22%20blade%20to%20make%20the%20change%20via%20Azure%20Portal%20in%20case%20it's%20failing%20from%20PS%20for%20some%20reason.%3C%2FP%3E%0A%3CP%3EPlease%20find%20the%20guidelines%20to%20do%20the%20same%20from%20Azure%20Portal%20here%20%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fcdn%2Fcdn-standard-rules-engine%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EEnforce%20https%20using%20Azure%20CDN%20Standard%20Rules%20Engine%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1001366%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20CDN%20%E2%80%93%20Standard%20Microsoft%3A%20Rules%20Engine%20for%20http%20to%20https%20redirection%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1001366%22%20slang%3D%22en-US%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F454734%22%20target%3D%22_blank%22%3E%40koushikraman%3C%2FA%3E%20%2C%3C%2FP%3E%0A%3CP%3EPlease%20find%20the%20reference%20article%20which%20will%20help%20you%20guide%20through%20wildcard%20support%20details%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fcdn%2Fcdn-standard-rules-engine-reference%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fcdn%2Fcdn-standard-rules-engine-reference%3C%2FFONT%3E%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAlso%2C%20please%20find%20the%20following%20article%20for%20more%20details%3A%3C%2FP%3E%0A%3CP%3E1.%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fcdn%2Fcdn-standard-rules-engine-match-conditions%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fcdn%2Fcdn-standard-rules-engine-match-conditions%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E2.%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fcdn%2Fcdn-standard-rules-engine-actions%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fcdn%2Fcdn-standard-rules-engine-actions%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAlso%2C%20i%20have%20updated%20these%20links%20in%20this%20article%20to%20make%20everyone%20aware%20of%20it.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-797076%22%20slang%3D%22en-US%22%3EAzure%20CDN%20%E2%80%93%20Standard%20Microsoft%3A%20Rules%20Engine%20for%20http%20to%20https%20redirection%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-797076%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSTRONG%3E%3CU%3EUse%20Case%3A%3C%2FU%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EWhile%20we%20have%20rules%20engine%20features%20for%20premium%20Verizon%20CDN%20endpoint%2C%20recently%20we%20have%20introduced%20rules%20engine%20feature%20for%20Microsoft%20CDN.%20While%20I%20am%20writing%20this%20blog%2C%20it%E2%80%99s%20in%20%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fen-in%2Fupdates%2Frules-engine-for-azure-content-delivery-network-is-now-in-preview%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Epreview%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3EThis%20blog%20explains%20how%20you%20can%20utilize%20this%20Rules%20engine%20feature%20in%20Microsoft%20Standard%20Azure%20CDN%20to%20redirect%20your%20request%20URL%20from%20http%20to%20https%20using%20PowerShell.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EUpdate%3A%20This%20feature%20is%20now%20available%20to%20enable%20on%20the%20Azure%20Portal%20as%20well%2C%20Please%20find%20the%20following%20guidelines%20to%20do%20the%20same%20from%20Azure%20Portal%3A%26nbsp%3B%3CA%20style%3D%22background-color%3A%20transparent%3B%20box-sizing%3A%20border-box%3B%20color%3A%20%23146cac%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoeui%26amp%3Bquot%3B%2C%26amp%3Bquot%3Blato%26amp%3Bquot%3B%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Carial%2Csans-serif%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20outline-color%3A%20invert%3B%20outline-style%3A%20none%3B%20outline-width%3A%200px%3B%20text-align%3A%20left%3B%20text-decoration%3A%20underline%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fcdn%2Fcdn-standard-rules-engine%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EEnforce%20https%20using%20Azure%20CDN%20Standard%20Rules%20Engine%3C%2FA%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CU%3EPre-requisites%3A%3C%2FU%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EI%20assume%20that%20you%20already%20have%20an%20Azure%20CDN%20created%20with%20Microsoft%20Standard%20profile.%20If%20you%20don%E2%80%99t%20have%20one%20created%20already%2C%20follow%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fcdn%2Fcdn-create-new-endpoint%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ethis%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3EEnsure%20you%20have%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fmodule%2Faz.cdn%2F%3Fview%3Dazps-2.5.0%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CSTRONG%3EAz.Cdn%3C%2FSTRONG%3E%3C%2FA%3Emodule%20installed%20on%20your%20machine.%20To%20check%20if%20the%20Az.CDN%20is%20installed%20or%20not%2C%20you%20can%20do%20the%20following%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EOpen%20PowerShell%20as%20%3CSTRONG%3EAdministrator%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3ERun%20command%20%3CSTRONG%3EImport-Module%20Az.Cdn%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSTRONG%3E%26nbsp%3B%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EIf%20the%20above%20command%20doesn%E2%80%99t%20throw%20any%20error%2C%20you%20have%20the%20Az.Cdn%20PowerShell%20module%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%20style%3D%22padding-left%3A%2030px%3B%22%3Einstalled%20and%20the%20module%20is%20successfully%20imported%20in%20the%20current%20session.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22padding-left%3A%2030px%3B%22%3EThe%20following%20error%20while%20running%20%3CSTRONG%3EImport-Module%3C%2FSTRONG%3Ecommand%20means%20that%20you%20don%E2%80%99t%20have%20the%20Az.Cdn%20module%20installed%20yet.%20To%20install%20you%20have%20to%20run%20%3CSTRONG%3EInstall-Module%20-Name%20Az.Cdn%20-force%3C%2FSTRONG%3Ecommand.%3C%2FP%3E%0A%3CP%20style%3D%22padding-left%3A%2030px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F126370i2FB8401B1E60753B%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22first.jpg%22%20title%3D%22first.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22padding-left%3A%2030px%3B%22%3EIf%20you%20see%20the%20below%20error%20while%20running%20the%20install%20command%20then%20you%20need%20to%20run%20%3CSTRONG%3EInstall-Module%20-Name%20Az.Cdn%20-AllowClobber%20-Scope%20CurrentUser%20%3C%2FSTRONG%3Ecommand%20to%20install%20it.%3C%2FP%3E%0A%3CP%20style%3D%22padding-left%3A%2030px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20950px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F126371iCDBE3E98CE2BE192%2Fimage-dimensions%2F950x152%3Fv%3D1.0%22%20width%3D%22950%22%20height%3D%22152%22%20alt%3D%222.jpg%22%20title%3D%222.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3ENow%20to%20check%20if%20the%20Az.Cdn%20module%20is%20installed%20successfully%2C%20you%20can%20try%20importing%20the%20module%20using%20the%20command%3A%20%3CSTRONG%3EImport-Module%20Az.Cdn%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22padding-left%3A%2030px%3B%22%3EYou%20may%20be%20prompted%20to%20confirm%20so%20that%20it%20can%20import%20this%20module%20for%20the%20first%20time.%3C%2FP%3E%0A%3CP%20style%3D%22padding-left%3A%2030px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F126372i72C4A250B80EE7CD%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%223.jpg%22%20title%3D%223.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorclipboard_image_3%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CUL%3E%0A%3CLI%3EYou%20can%20also%20run%20%3CSTRONG%3EGet-Module%3C%2FSTRONG%3Ecommand%20to%20confirm%20if%20it%E2%80%99s%20imported%20successfully%20in%20your%20PowerShell%20session%20and%20what%20version%20it%E2%80%99s%20currently%20using%3A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22padding-left%3A%2030px%3B%22%3EPS%20command%3A%20%3CSTRONG%3EGet-Module%20Az.Cdn%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%20style%3D%22padding-left%3A%2030px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F126373iAA6FF199E197B9A4%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%224.jpg%22%20title%3D%224.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorclipboard_image_4%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%20style%3D%22padding-left%3A%2030px%3B%22%3EMake%20sure%20you%20use%20the%20latest%20version%20of%20Az.Cdn%20i.e.%201.3.0%20so%20that%20you%20can%20use%20the%20new%20cmdlet%20which%20are%20released%20for%20setting%20the%20rules%20engine%20for%20a%20CDN%20endpoint.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CU%3ESteps%3A%3C%2FU%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EEnsure%20that%20the%20above%20pre-requisites%20are%20followed%20before%20proceeding%20with%20the%20following%20steps.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ELaunch%20a%20new%20PowerShell%20session%20and%20run%20the%20following%20cmdlets%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%23To%20connect%20to%20Azure%20account%3C%2FP%3E%0A%3CP%3EConnect-AzAccount%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%23set%20the%20rule%20condition%20when%20the%20action%20will%20be%20performed%20%7C%20Updated%20the%20below%20command%20with%20latest%20details%3C%2FP%3E%0A%3CP%3E%24RuleCondition%20%3D%20%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3ENew-AzCdnDeliveryRuleCondition%20-MatchVariable%20'RequestScheme'%20-Operator%20Equal%20-MatchValue%20%22HTTP%22%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%23Set%20the%20action%20what%20it%20should%20to%20once%20the%20condition%20is%20met%2C%20here%20we%20are%20doing%20http%20to%20https%20redirection%3C%2FP%3E%0A%3CP%3E%24RuleAction%20%3D%20New-AzCdnDeliveryRuleAction%20-RedirectType%20Moved%20-DestinationProtocol%20Https%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%23Set%20the%20Rule%20with%20condition%20and%20action%20we%20just%20created%20above%3C%2FP%3E%0A%3CP%3E%24Rule%20%3D%20New-AzCdnDeliveryRule%20-Name%20%22rule1%22%20-Order%201%20-Condition%20%24RuleCondition%20-Action%20%24RuleAction%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%23Set%20the%20Azuer%20CDN%20delivery%20policy%20with%20the%20rule%3C%2FP%3E%0A%3CP%3E%24policy%20%3D%20New-AzCdnDeliveryPolicy%20-Description%20%22RedirectPolicy%22%20-Rule%20%24Rule%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%23get%20the%20CDN%20endpoint%20reference%3C%2FP%3E%0A%3CP%3E%23please%20replace%20the%20below%20parameters%20as%20per%20the%20CDN%20endpoint%20details%3C%2FP%3E%0A%3CP%3E%24ep%20%3D%20Get-AzCdnEndpoint%20-ProfileName%20%22%3CCDN%20profile%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2F%22%20name%3D%22%22%3E%22%20-EndpointName%20%22%3CCDN%20endpoint%3D%22%22%20name%3D%22%22%3E%22%20-ResourceGroupName%20%22%3CRESOURCE%20group%3D%22%22%20name%3D%22%22%3E%22%3C%2FRESOURCE%3E%3C%2FCDN%3E%3C%2FCDN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%23Assign%20the%20delivery%20policy%20to%20the%20CDN%20endpoint%20variable%3C%2FP%3E%0A%3CP%3E%24ep.DeliveryPolicy%20%3D%20%24policy%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%23Now%20call%20the%20set%20CDN%20endpoint%20to%20save%20the%20changes%20on%20the%20CDN%20endpoint%3C%2FP%3E%0A%3CP%3ESet-AzCdnEndpoint%20-CdnEndpoint%20%24ep%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHope%20this%20helps.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EUpdating%20the%20reference%20articles%20for%20more%20details%20on%20CDN%20standard%20rules%20engine%20feature%3A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoeui%26amp%3Bquot%3B%2C%26amp%3Bquot%3Blato%26amp%3Bquot%3B%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Carial%2Csans-serif%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%3B%22%3E1.%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fcdn%2Fcdn-standard-rules-engine-reference%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fcdn%2Fcdn-standard-rules-engine-reference%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoeui%26amp%3Bquot%3B%2C%26amp%3Bquot%3Blato%26amp%3Bquot%3B%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Carial%2Csans-serif%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%3B%22%3E2.%20%3CA%20style%3D%22background-color%3A%20transparent%3B%20box-sizing%3A%20border-box%3B%20color%3A%20%23146cac%3B%20text-decoration%3A%20underline%3B%22%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fcdn%2Fcdn-standard-rules-engine-match-conditions%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fcdn%2Fcdn-standard-rules-engine-match-conditions%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoeui%26amp%3Bquot%3B%2C%26amp%3Bquot%3Blato%26amp%3Bquot%3B%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Carial%2Csans-serif%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%3B%22%3E3.%20%3CA%20style%3D%22background-color%3A%20transparent%3B%20box-sizing%3A%20border-box%3B%20color%3A%20%23146cac%3B%20text-decoration%3A%20underline%3B%22%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fcdn%2Fcdn-standard-rules-engine-actions%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fcdn%2Fcdn-standard-rules-engine-actions%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-797076%22%20slang%3D%22en-US%22%3E%3CP%3EConfigure%26nbsp%3B%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3ERules%20Engine%20for%20http%20to%20https%20redirection%3C%2FFONT%3Efor%20Microsoft%20Standard%20CDN%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-797076%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20CDN%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20CDN%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

Use Case:

While we have rules engine features for premium Verizon CDN endpoint, recently we have introduced rules engine feature for Microsoft CDN. While I am writing this blog, it’s in preview.

This blog explains how you can utilize this Rules engine feature in Microsoft Standard Azure CDN to redirect your request URL from http to https using PowerShell.

 

Update: This feature is now available to enable on the Azure Portal as well, Please find the following guidelines to do the same from Azure Portal: Enforce https using Azure CDN Standard Rules Engine

 

Pre-requisites:

I assume that you already have an Azure CDN created with Microsoft Standard profile. If you don’t have one created already, follow this.

Ensure you have the Az.Cdn module installed on your machine. To check if the Az.CDN is installed or not, you can do the following,

 

  • Open PowerShell as Administrator

 

  • Run command Import-Module Az.Cdn

 

  • If the above command doesn’t throw any error, you have the Az.Cdn PowerShell module

installed and the module is successfully imported in the current session.

 

The following error while running Import-Module command means that you don’t have the Az.Cdn module installed yet. To install you have to run Install-Module -Name Az.Cdn -force command.

first.jpg

 

If you see the below error while running the install command then you need to run Install-Module -Name Az.Cdn -AllowClobber -Scope CurrentUser command to install it.

2.jpg

 

  • Now to check if the Az.Cdn module is installed successfully, you can try importing the module using the command: Import-Module Az.Cdn

 

You may be prompted to confirm so that it can import this module for the first time.

3.jpg

 
  • You can also run Get-Module command to confirm if it’s imported successfully in your PowerShell session and what version it’s currently using:

 

PS command: Get-Module Az.Cdn

4.jpg

 

Make sure you use the latest version of Az.Cdn i.e. 1.3.0 so that you can use the new cmdlet which are released for setting the rules engine for a CDN endpoint.

 

Steps:

Ensure that the above pre-requisites are followed before proceeding with the following steps.

 

Launch a new PowerShell session and run the following cmdlets:

 

#To connect to Azure account

Connect-AzAccount

 

#set the rule condition when the action will be performed | Updated the below command with latest details

$RuleCondition = New-AzCdnDeliveryRuleCondition -MatchVariable 'RequestScheme' -Operator Equal -MatchValue "HTTP"

 

#Set the action what it should to once the condition is met, here we are doing http to https redirection

$RuleAction = New-AzCdnDeliveryRuleAction -RedirectType Moved -DestinationProtocol Https

 

#Set the Rule with condition and action we just created above

$Rule = New-AzCdnDeliveryRule -Name "rule1" -Order 1 -Condition $RuleCondition -Action $RuleAction

 

#Set the Azuer CDN delivery policy with the rule

$policy = New-AzCdnDeliveryPolicy -Description "RedirectPolicy" -Rule $Rule

 

#get the CDN endpoint reference

#please replace the below parameters as per the CDN endpoint details

$ep = Get-AzCdnEndpoint -ProfileName "<CDN Profile Name>" -EndpointName "<CDN Endpoint Name>" -ResourceGroupName "<Resource Group Name>"

 

#Assign the delivery policy to the CDN endpoint variable

$ep.DeliveryPolicy = $policy

 

#Now call the set CDN endpoint to save the changes on the CDN endpoint

Set-AzCdnEndpoint -CdnEndpoint $ep

 

Hope this helps.

 

Updating the reference articles for more details on CDN standard rules engine feature:

1. https://docs.microsoft.com/en-us/azure/cdn/cdn-standard-rules-engine-reference 

2. https://docs.microsoft.com/en-us/azure/cdn/cdn-standard-rules-engine-match-conditions 

3. https://docs.microsoft.com/en-us/azure/cdn/cdn-standard-rules-engine-actions 

20 Comments

Thanks, This document has helped me a lot.

 

But, is there a way to remove the policy that has been attached.

Microsoft

@varadasandeep you're welcome.

<Updating the answer as per the latest release>

To remove the policy from an endpoint, you can do a Get-AzCdnEndpoint to retrieve endpoint data. Once you get the endpoint data, make a call to clear the delivery policy rules, then do Set-AzCdnEndpoint with the updated endpoint data.

E.g.

 

#get the CDN endpoint reference
$ep = Get-AzCdnEndpoint -ProfileName "<CDN Profile Name>" -EndpointName "<CDN Endpoint Name>" -ResourceGroupName "<Resource Group Name>"
#clear the Rules of CDN endpoint
$ep.DeliveryPolicy.Rules.Clear()
Set-AzCdnEndpoint -CdnEndpoint $ep
Regular Visitor

Hello!  We keep getting the following error when trying to run the Set-AzCdnEndpoint cmdlet for a Standard Microsoft CDN Profile.  Tested on Az.Cdn 1.3.0, 1.3.3, and current Cloud Shell.

Set-AzCdnEndpoint : Operation returned an invalid status code 'BadRequest'

 

With the following in the 400 response:

"message": "A type named 'Microsoft.Azure.Cdn.Models.DeliveryRuleUrlRedirectActionParameters' could not be resolved by the model. When a model is available, each type name must resolve to a valid type."

 

Are you able to reproduce this?

 

Frequent Visitor
Same as @jcrosbyrwb here. BadRequest on Set-AzCdnEndpoint with As.Cdn 1.3.1 Any help about this?
Microsoft

Hello @jcrosbyrwb & @technetColmar ,

I'm able to reproduce this error, seems like something has changed, I'm checking more on this internally, will post further updates on this.

Microsoft

Hello @technetColmar & @jcrosbyrwb ,

There was a fix planned to release for this issue in next 2-3 weeks, you can expect this to work by then. I'll update this thread once the fix is deployed for it.

Regular Visitor

Thank you @Braja!  We're holding up a production rollout of a site, so this fix will be much appreciated.

Occasional Visitor

This seems to have been resolved now. I just completed the steps without error today. However, this then resulted in an infinite redirect as it seemed to be matching HTTPS as well as HTTP. Given that the rule only matches GET verbs and ignores the scheme, I guess this was to be expected. I tried to guess how to add another condition:

$protocolCondition = New-AzCdnDeliveryRuleCondition -MatchVariable 'RequestScheme' -Operator Equal -MatchValue "HTTP"
$ep.DeliveryPolicy[0].Rules[0].Conditions.Add($protocolCondition)

However, after saving the endpoint there seemed to be no change in behaviour. Unfortunately then trying this:

$ep.DeliveryPolicy = $null
Set-AzCdnEndpoint -CdnEndpoint $ep

...did not remove the policy. When retrieving the endpoint again and inspecting it, the policy is still present with all the same conditions and rules. I think Set-AzCdnEndpoint decided that as I wasn't providing a DeliveryPolicy I must not be wanting to alter the current state.

 

The following mechanism did clear out the policy and at least remove the infinite redirect problem (though no solution for HTTP => HTTPS redirect):

$ep.DeliveryPolicy.Rules.Clear()
Set-AzCdnEndpoint -CdnEndpoint $ep

@Braja it would be enormously useful if you could indicate the correct syntax for matching only HTTP requests in the conditions. Thanks!

Occasional Visitor

Okay, so trying this again it seems that if I use only the "RequestScheme" condition mentioned in my last comment, and not the "GET" condition, it works. It is also possible that when I tried to have both conditions in the rule yesterday I did not leave enough time for the policy to propagate before testing it. This time my successful tests were half an hour after applying the policy. Immediate testing had still shown that it didn't work.

Microsoft

Hello everyone,
Sorry for the delayed response as i was away from work for sometime.
 
Checked the updates here internally and understood that the fix had been pushed and the http to https redirection rule shall work, however you need to use the "RequestScheme" rule condition instead of "RequestMethod" as suggested by @Josh_Gallagher in his comments above. Thanks @Josh_Gallagher for sharing details.
 
As indicated in this article, this feature is still in preview as such, it may be subject to frequent changes, and may not be suitable for production deployments yet.

Frequent Visitor

Thank you @Josh_Gallagher 

 

I confirm "RequestScheme" works, although I had to wait a few hours before seeing a consistent redirect on every device and browser.

Occasional Visitor

@Braja Can you update the top example so that it works when people come across it without them having to read through the entire comment history?

 

Occasional Visitor

Using this logic, I am still receiving "BadRequest" on a standard_microsoft cdn

 


$RuleCondition = New-AzCdnDeliveryRuleCondition -MatchVariable 'RequestScheme' -Operator Equal -MatchValue "HTTP"
$RuleAction    = New-AzCdnDeliveryRuleAction -RedirectType Moved -DestinationProtocol Https
$Rule          = New-AzCdnDeliveryRule -Order 1 -Condition $RuleCondition -Action $RuleAction
$policy        = New-AzCdnDeliveryPolicy -Description "RedirectPolicy" -Rule $Rule

$ep.DeliveryPolicy = $policy

Set-AzCdnEndpoint -CdnEndpoint $ep
Microsoft

Hello @erikoleary ,

Thank you for the heads up, I have now updated the PS scripts details with the working one. 

Regarding the "BadRequest" error that you're receiving, I notice that you missed to provide a name while creating a CDNDeliveryRule.

 

Please provide a name like follows (also mentioned in this article's PS scripts) and try again,

$Rule          = New-AzCdnDeliveryRule -Name "rule2" -Order 1 -Condition $RuleCondition -Action $RuleAction

Occasional Visitor

@Braja i tried it all different ways, always badrequest

Microsoft

Hello @erikoleary ,

I tried this operation today and it's working fine for me and works for others too.

 

Have you installed the latest Az.Cdn PS module? If yes, then it seems this needs some isolation to find out why this is failing in your case, it would be better if you can open an Azure support request to engage the CDN support team.

Occasional Visitor

@Braja This also does not work for me, I can get to the point of setting the AzCdnEndpoint, but each time, I get

  "Set-AzCdnEndpoint : Operation returned an invalid status code 'BadRequest'"

The Az.Cdn PS module is at 1.3.1, so this is not the issue.

Occasional Visitor

@Braja does the rules engine support wild cards/regex? I am trying to redirect request to a specific container in my storage account if the URL contains a specific string pattern

Microsoft

Hello @deeksy@erikoleary ,

Recently, this http to https feature made available on Azure Portal to enable for a CDN endpoint. You can use "Rules Engine" blade to make the change via Azure Portal in case it's failing from PS for some reason.

Please find the guidelines to do the same from Azure Portal here : Enforce https using Azure CDN Standard Rules Engine

Microsoft

Hello @koushikraman ,

Please find the reference article which will help you guide through wildcard support details: https://docs.microsoft.com/en-us/azure/cdn/cdn-standard-rules-engine-reference 

Also, please find the following article for more details:

1. https://docs.microsoft.com/en-us/azure/cdn/cdn-standard-rules-engine-match-conditions 

2. https://docs.microsoft.com/en-us/azure/cdn/cdn-standard-rules-engine-actions 

 

Also, i have updated these links in this article to make everyone aware of it.