Skip to content

Commit 4152ddd

Browse files
committed
fix one drive shortcut name
1 parent 773b5e8 commit 4152ddd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Modules/CIPPCore/Public/New-CIPPOneDriveShortCut.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ function New-CIPPOneDriveShortCut {
1414
$SiteInfo = New-GraphGetRequest -uri 'https://graph.microsoft.com/beta/sites/' -tenantid $TenantFilter -asapp $true | Where-Object -Property weburl -EQ $url
1515
$ListItemUniqueId = (New-GraphGetRequest -uri "https://graph.microsoft.com/beta/sites/$($siteInfo.id)/drive?`$select=SharepointIds" -tenantid $TenantFilter -asapp $true).SharePointIds
1616
$body = [PSCustomObject]@{
17-
#remove any item from the name that is not allowed in a file name
18-
name = $SiteInfo.displayName -replace '[^a-zA-Z0-9\.\-]', ''
17+
name = 'Documents'
1918
remoteItem = @{
2019
sharepointIds = @{
2120
listId = $($ListItemUniqueId.listid)

0 commit comments

Comments
 (0)