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
Copy file name to clipboardExpand all lines: Modules/CIPPCore/Public/Standards/Invoke-CIPPStandardDefaultSharingLink.ps1
+43-13Lines changed: 43 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -7,20 +7,22 @@ function Invoke-CIPPStandardDefaultSharingLink {
7
7
.SYNOPSIS
8
8
(Label) Set Default Sharing Link Settings
9
9
.DESCRIPTION
10
-
(Helptext) Sets the default sharing link type to Internal and permission to View in SharePoint and OneDrive.
11
-
(DocsDescription) Sets the default sharing link type to Internal and permission to View in SharePoint and OneDrive.
10
+
(Helptext) Configure the SharePoint default sharing link type and permission. This setting controls both the type of sharing link created by default and the permission level assigned to those links.
11
+
(DocsDescription) Sets the default sharing link type (Direct or Internal) and permission (View) in SharePoint and OneDrive. Direct sharing means links only work for specific people, while Internal sharing means links work for anyone in the organization.
12
12
.NOTES
13
13
CAT
14
14
SharePoint Standards
15
15
TAG
16
16
ADDEDCOMPONENT
17
+
[{"type":"autoComplete","multiple":false,"creatable":false,"label":"Default Sharing Link Type","name":"standards.DefaultSharingLink.SharingLinkType","options":[{"label":"Direct - Only specific people","value":"Direct"},{"label":"Internal - Anyone in the organization","value":"Internal"}]}]
Write-LogMessage-API 'Standards'-Tenant $Tenant-Message "Successfully set default sharing link settings (Type: $DesiredSharingLinkType, Permission: View)"-Sev Info
Write-LogMessage-API 'Standards'-Tenant $Tenant-Message "Failed to set default sharing link settings. Error: $ErrorMessage"-Sev Error
64
+
$ErrorMessage=Get-CippException-Exception$_
65
+
Write-LogMessage-API 'Standards'-Tenant $Tenant-Message "Failed to set default sharing link settings. Error: $($ErrorMessage.NormalizedError)"-Sev Error-LogData $ErrorMessage
52
66
}
53
67
}
54
68
}
55
69
56
70
if ($Settings.alert-eq$true) {
57
71
if ($StateIsCorrect-eq$true) {
58
-
Write-LogMessage-API 'Standards'-Tenant $Tenant-Message 'Default sharing link settings are configured correctly'-Sev Info
72
+
Write-LogMessage-API 'Standards'-Tenant $Tenant-Message "Default sharing link settings are configured correctly (Type: $DesiredSharingLinkType, Permission: View)"-Sev Info
59
73
} else {
60
-
Write-LogMessage-API 'Standards'-Tenant $Tenant-Message 'Default sharing link settings are not configured correctly'-Sev Alert
$Message="Default sharing link settings are not configured correctly. Current: Type=$CurrentSharingType, Permission=$CurrentPermission. Expected: Type=$DesiredSharingLinkType, Permission=View"
Copy file name to clipboardExpand all lines: Modules/CIPPCore/Public/Standards/Invoke-CIPPStandardSPDirectSharing.ps1
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -32,8 +32,10 @@ function Invoke-CIPPStandardSPDirectSharing {
32
32
33
33
param($Tenant,$Settings)
34
34
35
+
Write-LogMessage-API 'Standards'-Tenant $Tenant-Message 'This standard has been deprecated in favor of the "Set Default Sharing Link Settings" standard. Please update your standards to use new standard. However this will continue to function.'-Sev Alert
Write-LogMessage-API 'Standards'-Tenant $Tenant-Message "Failed to set re-authentication with verification code restriction. Error: $ErrorMessage"-Sev Error
0 commit comments