You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge pull request #4554 from gautamdsheth/fix/4203-allow-scripts
Fix#4203: Add -Force parameter to Add-PnPApp, Publish-PnPApp, Remove-PnPApp, and Unpublish-PnPApp to allow temporary script enabling on no-script sites
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
34
34
- Added `-AllowWebPropertyBagUpdateWhenDenyAddAndCustomizePagesIsEnabled` to `Set-PnPTenant` which allows for updating of web property bag when DenyAddAndCustomizePages is enabled [#4508](https://github.com/pnp/powershell/pull/4508)
35
35
- Added `SiteId` to the output of `Get-PnPTenantSite`[#4527](https://github.com/pnp/powershell/pull/4527)
36
36
- Added `Add-PnPFileSensitivityLabel` which allows for assigning sensitivity labels to SharePoint files [#4538](https://github.com/pnp/powershell/pull/4538)
37
-
- Added `-CanSyncHubSitePermissions` parameter to `Set-PnPSite` cmdlet to set value of allowing syncing hub site permissions to this associated site.
37
+
-`Add-PnPApp` , `Publish-PnPApp` , `Remove-PnPApp` and `Unpublish-PnPApp` now have `-Force` parameter to change the site to allow scripts to be temporarily enabled. [#4554](https://github.com/pnp/powershell/pull/4554)
38
+
- Added `-CanSyncHubSitePermissions` parameter to `Set-PnPSite` cmdlet to set value of allowing syncing hub site permissions to this associated site. [#4555](https://github.com/pnp/powershell/pull/4555)
38
39
- Added `Get-PnPProfileCardProperty`, `New-PnPProfileCardProperty` and `Remove-PnPProfileCardProperty` cmdlets to manage showing additional properties on the Microsoft 365 user profile [#4548](https://github.com/pnp/powershell/pull/4548)
39
40
- Added `Get-PnPCopilotAdminLimitedMode` and `Set-PnPCopilotAdminLimitedMode` which allows for managing the setting that controls whether Microsoft 365 Copilot in Teams Meetings users can receive responses to sentiment-related prompts [#4562](https://github.com/pnp/powershell/pull/4562)
40
41
- Added `-Contributors` and `-Managers` parameters to `New-PnPTermGroup` and `Set-PnPTermGroup` cmdlets.
@@ -64,9 +65,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
64
65
- When passing in an existing connection using `-Connection` on `Connect-PnPOnline`, the clientid from the passed in connection will be used for the new connection [#4425](https://github.com/pnp/powershell/pull/4425)
65
66
- Removed `-Confirm` parameter from `Remove-PnPUser` and `Remove-PnPAvailableSiteClassification` cmdlets. Use `-Force` instead. [#4455](https://github.com/pnp/powershell/pull/4455)
66
67
-`Get-PnPFile` now also supports passing in a full SharePoint Online URL [#4480](https://github.com/pnp/powershell/pull/4480)
68
+
-`Add-PnPApp` , `Publish-PnPApp` , `Remove-PnPApp` and `Unpublish-PnPApp` now support disabling script settings if tenant app catalog is a no-script site.
67
69
-`Send-PnPMail` now throws a warning about the retirement of the SharePoint SendEmail API.
68
70
-`Get-PnPCustomAction` now supports a completer for `-Identity` and uses the PnP Core SDK to return custom actions.
69
71
72
+
70
73
### Fixed
71
74
72
75
- Fixed issue with `Set-PnPSearchExternalSchema` cmdlet when used with the `-Wait` parameter throwing a warning [#4253](https://github.com/pnp/powershell/pull/4253)
WriteVerbose("Checking if the tenant app catalog is a no-script site");
43
+
if(ctx.Site.IsNoScriptSite())
44
+
{
45
+
if(Force||ShouldContinue("The tenant appcatalog is a no-script site. Do you want to temporarily enable scripting on it?",Properties.Resources.Confirm))
46
+
{
47
+
WriteVerbose("Temporarily enabling scripting on the tenant app catalog site");
WriteVerbose("Checking if the tenant app catalog is a no-script site");
35
+
if(ctx.Site.IsNoScriptSite())
36
+
{
37
+
if(Force||ShouldContinue("The tenant appcatalog is a no-script site. Do you want to temporarily enable scripting on it?",Properties.Resources.Confirm))
38
+
{
39
+
WriteVerbose("Temporarily enabling scripting on the tenant app catalog site");
0 commit comments