File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -22,12 +22,12 @@ protected override void ExecuteCmdlet()
2222 var pnpContext = Connection . PnPContext ;
2323 if ( Scope == FeatureScope . Web )
2424 {
25- pnpContext . Web . EnsureProperties ( w => w . Features ) ;
25+ pnpContext . Web . LoadAsync ( w => w . Features ) . GetAwaiter ( ) . GetResult ( ) ;
2626 pnpContext . Web . Features . Disable ( Identity ) ;
2727 }
2828 else
2929 {
30- pnpContext . Site . EnsureProperties ( s => s . Features ) ;
30+ pnpContext . Site . LoadAsync ( s => s . Features ) . GetAwaiter ( ) . GetResult ( ) ;
3131 pnpContext . Site . Features . Disable ( Identity ) ;
3232 }
3333 }
Original file line number Diff line number Diff line change @@ -22,13 +22,15 @@ protected override void ExecuteCmdlet()
2222 var pnpContext = Connection . PnPContext ;
2323 if ( Scope == FeatureScope . Web )
2424 {
25- pnpContext . Web . EnsureProperties ( w => w . Features ) ;
26- pnpContext . Web . Features . Enable ( Identity ) ;
25+ pnpContext . Web . LoadAsync ( w => w . Features ) . GetAwaiter ( ) . GetResult ( ) ;
26+ // pnpContext.Web.EnsureProperties(w => w.Features);
27+ pnpContext . Web . Features . EnableAsync ( Identity ) . GetAwaiter ( ) . GetResult ( ) ;
2728 }
2829 else
2930 {
30- pnpContext . Site . EnsureProperties ( s => s . Features ) ;
31- pnpContext . Site . Features . Enable ( Identity ) ;
31+ pnpContext . Site . LoadAsync ( s => s . Features ) . GetAwaiter ( ) . GetResult ( ) ;
32+ // pnpContext.Site.EnsureProperties(s => s.Features);
33+ pnpContext . Site . Features . EnableAsync ( Identity ) . GetAwaiter ( ) . GetResult ( ) ;
3234 }
3335 }
3436 }
You can’t perform that action at this time.
0 commit comments