Compress-PSResource
Compresses a specified folder containing module or script resources into a .nupkg
file.
構文
Default (既定)
Compress-PSResource
[-Path] <String>
[-DestinationPath] <String>
[-PassThru]
[-SkipModuleManifestValidate]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
説明
This cmdlet compresses a specified folder containing module or script resources into a .nupkg
file. isolates the pack feature in the Publish-PSResource
cmdlet. This allows you to sign the
.nupkg
file before publishing it to a repository. You can publish the final .nupkg
file using
the NupkgPath parameter of Publish-PSResource
.
This command was added in v1.1.0-preview2 of Microsoft.PowerShell.PSResourceGet.
例
Example 1
This example compresses the module TestModule and saves te nupkg to the DestinationPath.
Compress-PSResource -Path C:\TestModule -DestinationPath C:\NupkgDestination
パラメーター
-Confirm
Prompts you for confirmation before running the cmdlet.
パラメーターのプロパティ
型: | SwitchParameter |
規定値: | None |
ワイルドカードのサポート: | False |
DontShow: | False |
Aliases: | cf |
パラメーター セット
(All)
配置: | Named |
必須: | False |
パイプラインからの値: | False |
プロパティ名別のパイプラインからの値: | False |
残りの引数からの値: | False |
-DestinationPath
Path to save the compressed resource.
パラメーターのプロパティ
型: | String |
規定値: | None |
ワイルドカードのサポート: | False |
DontShow: | False |
パラメーター セット
(All)
配置: | 1 |
必須: | True |
パイプラインからの値: | False |
プロパティ名別のパイプラインからの値: | False |
残りの引数からの値: | False |
-PassThru
Pass the full path of the nupkg through the pipeline.
パラメーターのプロパティ
型: | SwitchParameter |
規定値: | None |
ワイルドカードのサポート: | False |
DontShow: | False |
パラメーター セット
(All)
配置: | Named |
必須: | False |
パイプラインからの値: | False |
プロパティ名別のパイプラインからの値: | False |
残りの引数からの値: | False |
-Path
Path to the resource to be compressed.
パラメーターのプロパティ
型: | String |
規定値: | None |
ワイルドカードのサポート: | False |
DontShow: | False |
パラメーター セット
(All)
配置: | 0 |
必須: | True |
パイプラインからの値: | False |
プロパティ名別のパイプラインからの値: | False |
残りの引数からの値: | False |
-SkipModuleManifestValidate
Skips validating the module manifest before creating the .nupkg
file.
パラメーターのプロパティ
型: | SwitchParameter |
規定値: | None |
ワイルドカードのサポート: | False |
DontShow: | False |
パラメーター セット
(All)
配置: | Named |
必須: | False |
パイプラインからの値: | False |
プロパティ名別のパイプラインからの値: | False |
残りの引数からの値: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet isn't run.
パラメーターのプロパティ
型: | SwitchParameter |
規定値: | None |
ワイルドカードのサポート: | False |
DontShow: | False |
Aliases: | wi |
パラメーター セット
(All)
配置: | Named |
必須: | False |
パイプラインからの値: | False |
プロパティ名別のパイプラインからの値: | False |
残りの引数からの値: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
入力
None
出力
FileInfo
By default, this command doesn't write any output to the pipeline. When you use the PassThru
parameter, it returns a FileInfo object for the new .nupkg
file.
メモ
The module defines cmres
as an alias for Compress-PSResource
.
This cmdlet allows for publishing nuspec dependencies into ACR.