I want to get all scripts in a folder.
$Folder = Get-PSUFolder -Integrated -id 1
Get-PSUScript -Integrated -Folder $Folder
The “Script” above returns nothing
The Get-PSUFolder above returns a single object of type PowerShellUniversal.Folder
The Folder contains a single script.
I couldnt find any docs or example of its use, its expects a “folder” object, but doesn error if you feed it anything else.
(Snippet of the script properties)
"FullPath": "ESRI_GIS\\ESRI-GIS-Servers-To-Groups.ps1",
"RequiredPowerShellVersion": null,
"Environment": "Integrated",
"ErrorAction": 1,
"InformationAction": 0,
"Verbose": false,
"Debug": false,
"CommitNotes": null,
"DisableManualInvocation": false,
"MaxHistory": 100,
"ConcurrentJobs": 100,
"Credential": null,
"AccessControls": 31,
"RetryLimit": 0,
"Anonymous": false,
"DiscardPipeline": false,
"LongDescription": null,
"Links": [],
"Examples": null,
"DefaultParameterSet": null,
"LoadProfile": false,
"WorkingDirectory": null,
"ParameterSets": [],
"Folder": "ESRI_GIS",
"OldFolder": "ESRI_GIS",
"ReadOnly": false
Edit, also the -name property of Get-PSUFolder doesnt seem to work either.