We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent acb3c7f commit 3536fe4Copy full SHA for 3536fe4
Modules/CIPPCore/Public/New-CIPPOneDriveShortCut.ps1
@@ -14,7 +14,8 @@ function New-CIPPOneDriveShortCut {
14
$SiteInfo = New-GraphGetRequest -uri 'https://graph.microsoft.com/beta/sites/' -tenantid $TenantFilter -asapp $true | Where-Object -Property weburl -EQ $url
15
$ListItemUniqueId = (New-GraphGetRequest -uri "https://graph.microsoft.com/beta/sites/$($siteInfo.id)/drive?`$select=SharepointIds" -tenantid $TenantFilter -asapp $true).SharePointIds
16
$body = [PSCustomObject]@{
17
- name = "$($SiteInfo.displayName)"
+ #remove any item from the name that is not allowed in a file name
18
+ name = $SiteInfo.displayName -replace '[^a-zA-Z0-9\.\-]', ''
19
remoteItem = @{
20
sharepointIds = @{
21
listId = $($ListItemUniqueId.listid)
0 commit comments