Skip to content
This repository was archived by the owner on Jun 13, 2024. It is now read-only.
This repository was archived by the owner on Jun 13, 2024. It is now read-only.

Save-Script should allow .PS1 extension #22

@SteveL-MSFT

Description

@SteveL-MSFT

From @jpsnover on September 2, 2016 18:12

PS> save-script -name get-uptime.ps1 -path . 
PackageManagement\Save-Package : No match was found for the specified search criteria and script name 'get-uptime.ps1'.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:2486 char:21
+             $null = PackageManagement\Save-Package @PSBoundParameters
+                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Microsoft.Power...ets.SavePackage:SavePackage) [Save-Package], Exception
    + FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.SavePackage


PS> save-script -name get-uptime -path . 

PS> $PSVERSIONTABLE
Name                           Value                                                                                                             
----                           -----                                                                                                             
PSVersion                      5.0.10586.494                                                                                                     
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                                           
BuildVersion                   10.0.10586.494                                                                                                    
CLRVersion                     4.0.30319.42000                                                                                                   
WSManStackVersion              3.0                                                                                                               
PSRemotingProtocolVersion      2.3                                                                                                               
SerializationVersion           1.1.0.1                                                                                                           

Copied from original issue: PowerShell/PowerShell#2170

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions