Closed tinuwalther closed 1 month ago
Ideally / alternatively, it would be great to be able to declare the uri's somewhere 'external' as of the PsRessourceGet module / powershell prompt. I am thinking of a key registry / a Json file or something of that nature. This would really help the management side of things, in Windows managed environements, where we could potentially deploy these Uri's per GPO, on other Os's tools such as Ansible could then set for mass management.
This would be really useful; At the moment if you want all users that log in to that device to get the resource you can add a default startup script to the Default user. I'm planning on just deploying it using Intune as a Powershell script, in the script I register it as normal but then loop through all LOCALAPPDATA folders and copy the content I generate below.
Get the specific resource i want to export to all users using:
$PSResource = (Import-Clixml -Path "$env:LOCALAPPDATA\Microsoft\Windows\PowerShell\PowerShellGet\PSRepositories.xml").Item("NAMEOFRESOURCE")
$PSResource | Export-Clixml -Path .\ReadyToCopyResource.xml
Thanks! This looks similar to #84 #616
Hi @SydneyhSmith. My part is covered with the requests #84 #616, but @Stephanevg's part with saving the URL in the registry for Windows and in a file for Linux is missing. Can you still include that part?
This issue has been marked as duplicate and has not had any activity for 1 day. It will be closed for housekeeping purposes.
Summary of the new feature / enhancement
As a user of the PSResourceGet module, I would like to have the option to register the repository for all users or for the current user. Currently it is not possible to register the repository for all users and we need to implement a workaround to do this for each newly logged in user.
Workaround: Copy the "$env:LOCALAPPDATA\Microsoft\Windows\PowerShell\PowerShellGet\PSRepositories.xml" of a user to each newly logged in users AppData-Folder.
Proposed technical implementation details (optional)
It should be possible to use the Register-PSResourceRepository as in the following example: