Skip to content

Commit

Permalink
Add getlibraryshare script
Browse files Browse the repository at this point in the history
  • Loading branch information
Willem Monsuwe committed Jun 28, 2024
1 parent c8ab934 commit 0662d68
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions scripts/GetLibraryShare.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
param()
try {
$ls = Get-SCLibraryShare | Where-Object { -not $_.IsViewOnly -and -not $_.MarkedForDeletion } | Select -First 1
if (-not $ls) {
throw "no library share found"
}
return @{ Result = "$($ls.Path)" } | convertto-json
} catch {
ErrorToJson 'Get LibraryShare' $_
}

0 comments on commit 0662d68

Please sign in to comment.