Skip to content

Blog says Install-PSResource has a -DestinationPath parameter in 3.0.11 but it does not #473

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 tasks done
craiglandis opened this issue Aug 18, 2021 · 3 comments
Closed
3 tasks done
Labels
Area-Install Issue-Bug Something isn't working Resolution-Answered Successfully answered the question

Comments

@craiglandis
Copy link

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues.

Steps to reproduce

From the the Features section of the 3.0.11 blog post -

https://devblogs.microsoft.com/powershell/powershellget-3-0-preview-11-release/

"Install-PSResource has a -DestinationPath parameter which allows the user to specify the target directory instead of one based on the -Scope parameter (default Scope is CurrentUser). Note that in this release “x86” paths, and Linux paths are not yet supported. Expect to see this support in future releases."

But I don't see it. Maybe that blurb was intended to be under the "Features to Expect in Coming Preview Releases" instead of "Features"? Because "Features to Expect in Coming Preview Releases" mentions "Publish-PSResource will include a -DestinationPath parameter to publish a resource to a particular file path", so it seems curious that Publish-PSResource would get -DestinationPath in a different release than Install-PSResource gets -DestinationPath.

PS C:\> (Get-Command -Name Install-PSResource -FullyQualifiedModule @{ModuleName='PowerShellGet';ModuleVersion='3.0.11'}).Parameters.Keys | Sort-Object
AcceptLicense
Confirm
Credential
Debug
ErrorAction
ErrorVariable
InformationAction
InformationVariable
Name
OutBuffer
OutVariable
PipelineVariable
Prerelease
Quiet
Reinstall
Repository
Scope
TrustRepository
Verbose
Version
WarningAction
WarningVariable
WhatIf

Expected behavior

Unclear if Install-PSResource was supposed to get -DestinationPath in 3.0.11 as the blog says, or in a later release.

Actual behavior

Install-PSResource has no -DestinationPath parameter

Error details

No response

Environment data

Including env for 7.1.3 but it repros the same in 5.1, 7.1.3 and 7.2.0-preview.8

PS C:\> Get-Module PowerShellGet

ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Binary     3.0.11     beta       PowerShellGet                       {Find-PSResource, Get-InstalledPSResource, Get-PSResourceRepository, Install-PSResource…}

PS C:\> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.1.3
PSEdition                      Core
GitCommitId                    7.1.3
OS                             Microsoft Windows 10.0.19043
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

@anamnavi
Copy link
Member

anamnavi commented Aug 19, 2021

Hi @craiglandis thanks for bringing this to our attention, we'll update the blogpost accordingly. We are not going to include the -DestinationPath parameter for Install-PSResource, but will implement a -IncludeXML and -Path parameter for Save-PSResource and this will essentially install to a specified path.

@craiglandis
Copy link
Author

Hi @craiglandis thanks for bringing this to our attention, we'll update the blogpost accordingly. We are not going to include the -DestinationPath parameter for Install-PSResource, but will implement a -IncludeXML and -Path parameter for Save-PSResource and this will essentially install to a specified path.

Will cloud drives (for example OneDrive) be supported PSModulePath locations? And will that future Save-PSResource -IncludeXml/-Path support let us install modules in OneDrive?

For example, I'd love to include something like C:\OneDrive\Modules in my PSModulePath so that any module I install on one of my machines is automatically installed in my other machines because they would all have C:\OneDrive\Modules in their PSModulePath. Currently module management across multiple machines is a pain - you have to manually install/uninstall modules on each machine to keep a consistent set of modules across them all.

@alerickson alerickson added Area-Install Issue-Bug Something isn't working and removed Needs-Triage labels Aug 24, 2021
@SydneyhSmith
Copy link
Collaborator

SydneyhSmith commented Oct 19, 2021

Yep @craiglandis OneDrive is a scenario we plan to support. Going to close this issue as we are tracking the work in Save-PSResource https://github.com/PowerShell/PowerShellGet/issues/470

@SydneyhSmith SydneyhSmith added the Resolution-Answered Successfully answered the question label Oct 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Install Issue-Bug Something isn't working Resolution-Answered Successfully answered the question
Projects
None yet
Development

No branches or pull requests

4 participants