Skip to content
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

Pipe Output from Get-AWSService to Install-AWSToolsModule for ease of use #325

Closed
2 tasks
ccharland opened this issue Jun 12, 2023 · 3 comments
Closed
2 tasks
Labels
feature-request A feature should be added or improved. module/powershell-cmdlets p2 This is a standard priority issue queued

Comments

@ccharland
Copy link

Describe the feature

I want to pipe the output from Get-AWSService directly to Install-AWSToolsModule

As of version 4.1.350, this is the output:

PS C:\Program Files\PowerShell\Modules> Get-AWSService -Service EFS | Install-AWSToolsModule -Scope AllUsers
Exception: The Name parameter must contain only AWS.Tools modules.`

Converting the output from Get-AWSService is ugly but works.

PS C:\Program Files\PowerShell\Modules> Get-AWSService -Service EFS |Select-Object @{Name="Name";Expression={$_.ModuleName}} |Install-AWSToolsModule -Scope AllUsers

Confirm
Are you sure you want to perform this action?
Performing the operation "Install-AWSToolsModule" on target "AWS Tools version 4.1.350.0".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): a
Installing module AWS.Tools.ElasticFileSystem version 4.1.350.0
PS C:\Program Files\PowerShell\Modules>

Use Case

I discovered the Get-AWSService cmdlet when I reviewed this page

It's logical that you should be able to pipe the output of Get-AWSService to Install-AWSToolsModule or Install-Module, given the description on the page.

Proposed Solution

Change the output of Get-AWSService from a PsCustomObject to a named object type, such as used by other AWS PowerShell modules.

PS C:\Program Files\PowerShell\Modules> (Get-AWSService)[0].GetType()

IsPublic IsSerial Name                                     BaseType
-------- -------- ----                                     --------
True     False    PSCustomObject                           System.Object

PS C:\Program Files\PowerShell\Modules> (Get-S3Bucket)[0].GetType()

IsPublic IsSerial Name                                     BaseType
-------- -------- ----                                     --------
True     False    S3Bucket                                 System.Object

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

AWS Tools for PowerShell version used

ModuleType Version    PreRelease Name   
---------- -------    ---------- ----                
Binary     4.1.350               AWS.Tools.Common
Script     1.0.2.4               AWS.Tools.Installer    

PowerShell version used

Name                           Value
----                           -----
PSVersion                      7.3.4
PSEdition                      Core
GitCommitId                    7.3.4
OS                             Microsoft Windows 10.0.17763
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Operating System and version

Windows Server 2019 (AWS Workspace)

@ccharland ccharland added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jun 12, 2023
@ashishdhingra ashishdhingra added module/powershell-cmdlets needs-review and removed needs-triage This issue or PR still needs to be triaged. labels Jun 13, 2023
@ashishdhingra
Copy link
Contributor

Needs review with the team.

@normj normj added p2 This is a standard priority issue and removed needs-review labels Jun 16, 2023
@afroz429
Copy link
Contributor

afroz429 commented Jan 3, 2024

Thanks for creating the feature request. The latest version of AWS.Tools.Installer module (1.0.2.5) supports installing tools modules by piping the output of Get-AWSService to Install-AWSToolsModule. e.g Get-AWSService -Service EFS | Install-AWSToolsModule

@afroz429 afroz429 closed this as completed Jan 3, 2024
Copy link

github-actions bot commented Jan 3, 2024

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

aws-sdk-dotnet-automation pushed a commit that referenced this issue Jun 25, 2024
Remove integ test for service OpsWorks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. module/powershell-cmdlets p2 This is a standard priority issue queued
Projects
None yet
Development

No branches or pull requests

4 participants