diff --git a/scripts/GetLibraryShare.ps1 b/scripts/GetLibraryShare.ps1 new file mode 100644 index 0000000..7af3e72 --- /dev/null +++ b/scripts/GetLibraryShare.ps1 @@ -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' $_ +}