You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to install modules from a fileshare repository with ConvertFrom-StringData in the manifest with current prelease of PSResourceGet (1.1.0 rc3), generate an error:
Install-PSResource: The command 'ConvertFrom-StringData' is not allowed in restricted language mode or a Data section.
Getting it from the PS Gallery works fine.
I will give an example using the PackageManagement module for demonstration purposes, but othe modules show the same problem, such as PlatyPS.
Expected behavior
Import-Module Microsoft.PowerShell.PSResourceGetRegister-PSResourceRepository -Name 'My-PSGallery' -Uri \\path\to\file\share -Trusted -Priority 1Save-PSResource -Name PackageManagement -Repository PSGallery -TrustRepository -AsNupkg -Path \\path\to\file\shareInstall-PSResource -Name PackageManagement -Repository My-PSGalleryThis should process just fine and make it possible to import the module to use it.
Actual behavior
Install-PSResource -Name PackageManagement -Repository My-PSGalleryWill return:```PowerShellInstall-PSResource: The command 'ConvertFrom-StringData' is not allowed in restricted language mode or a Data section.Install-PSResource: Package(s) 'PackageManagement' could not be installed from repository 'My-PSGallery'.
Name Version PreRelease ExportedCommands
-------------------------------------
Microsoft.PowerShell.PSResourceGet 1.1.0 {Compress-PSResource,Find-PSResource,Get-InstalledPSResource,Get-PSResourceRepository…}
Name Value
---------
PSVersion 7.4.6
PSEdition Core
GitCommitId 7.4.6
OS Microsoft Windows 10.0.22631
Platform Win32NT
PSCompatibleVersions {1.0,2.0,3.0,4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Visuals
No response
The text was updated successfully, but these errors were encountered:
Prerequisites
Steps to reproduce
When trying to install modules from a fileshare repository with ConvertFrom-StringData in the manifest with current prelease of PSResourceGet (1.1.0 rc3), generate an error:
Getting it from the PS Gallery works fine.
I will give an example using the PackageManagement module for demonstration purposes, but othe modules show the same problem, such as PlatyPS.
Expected behavior
Actual behavior
Environment data
Visuals
No response
The text was updated successfully, but these errors were encountered: