PowerShellGet을 사용하여 PowerShell 스크립트 검색, 설치 및 관리PowerShell Script Discovery, Install and Management with PowerShellGet

WMF 5.0 RTM 릴리스에서는 PowerShell 스크립트 공유 기능이 PowerShellGet에 추가되었습니다.PowerShell Script sharing feature got added to the PowerShellGet in the WMF 5.0 RTM release. PowerShell 스크립트를 지원하기 위해 다음과 같은 새 cmdlet이 PowerShell 모듈에 추가됩니다.The following new cmdlets are added to the PowerShellGet module for supporting the PowerShell Scripts.

PS C:\\windows\\system32> Get-Command \*script\* -Module PowerShellGet | Sort-Object -Property Noun, Verb
CommandType Name Version Source
----------- ---- ------- ------
Function Get-InstalledScript 1.0.0.1 PowerShellGet
Function Find-Script 1.0.0.1 PowerShellGet
Function Install-Script 1.0.0.1 PowerShellGet
Function Publish-Script 1.0.0.1 PowerShellGet
Function Save-Script 1.0.0.1 PowerShellGet
Function Uninstall-Script 1.0.0.1 PowerShellGet
Function Update-Script 1.0.0.1 PowerShellGet
Function New-ScriptFileInfo 1.0.0.1 PowerShellGet
Function Test-ScriptFileInfo 1.0.0.1 PowerShellGet
Function Update-ScriptFileInfo 1.0.0.1 PowerShellGet
-   **Find-Script** cmdlet lets you to discover the script files with different search criteria like name, tag, filter, command name, version range, exact version, all versions, including its dependencies and from specific or all registered repositories.
-   **Save-Script** cmdlet lets you to review the script file by saving it to a specified location.
-   **Install-Script** cmdlet lets you to install a specific script file along with its dependencies to the specified scope. By default, scripts are installed to the AllUsers scope.
-   **Update-Script** cmdlet lets you to do in-place update of the script files which were installed using Install-Script cmdlet.
-   **Get-InstalledScript** cmdlet lets you to get the list of script files which were installed using Install-Script cmdlet.
-   **Uninstall-Script** cmdlet lets you to uninstall the installed script files.
-   **Publish-Script** cmdlet lets you to publish your script file with valid metadata like Version, Guid, Author, and Description, etc.
-   **New-ScriptFileInfo** cmdlet lets you to create a new script file with metadata like Version, Guid, Author, and Description, etc.
-   **Update-ScriptFileInfo** cmdlet lets you to update the existing script file metadata.
-   **Test-ScriptFileInfo** cmdlet lets you to validate and get the script file metadata.

스크립트 공유 Cmdlet의 구문:Syntax of script sharing Cmdlets:

**New-ScriptFileInfo** \[-Path\] <string> -Description <string> \[-Version <version>\] \[-Author <string>\] \[-Guid <guid>\] \[-CompanyName <string>\] \[-Copyright <string>\] \[-RequiredModules <Object\[\]>\] \[-ExternalModuleDependencies <string\[\]>\] \[-RequiredScripts <string\[\]>\] \[-ExternalScriptDependencies <string\[\]>\] \[-Tags <string\[\]>\] \[-ProjectUri <uri>\] \[-LicenseUri <uri>\] \[-IconUri <uri>\] \[-ReleaseNotes <string\[\]>\] \[-PassThru\] \[-Force\] \[-WhatIf\] \[-Confirm\] \[<CommonParameters>\]

**Test-ScriptFileInfo** \[-Path\] <string> \[<CommonParameters>\]

**Test-ScriptFileInfo** -LiteralPath <string> \[<CommonParameters>\]

**Update-ScriptFileInfo** \[-Path\] <string> \[-Version <version>\] \[-Author <string>\] \[-Guid <guid>\] \[-Description <string>\] \[-CompanyName <string>\] \[-Copyright <string>\] \[-RequiredModules <Object\[\]>\] \[-ExternalModuleDependencies <string\[\]>\] \[-RequiredScripts <string\[\]>\] \[-ExternalScriptDependencies <string\[\]>\] \[-Tags <string\[\]>\] \[-ProjectUri <uri>\] \[-LicenseUri <uri>\] \[-IconUri <uri>\] \[-ReleaseNotes <string\[\]>\] \[-PassThru\] \[-Force\] \[-WhatIf\] \[-Confirm\] \[<CommonParameters>\]

**Update-ScriptFileInfo** \[-LiteralPath\] <string> \[-Version <version>\] \[-Author <string>\] \[-Guid <guid>\] \[-Description <string>\] \[-CompanyName <string>\] \[-Copyright <string>\] \[-RequiredModules <Object\[\]>\] \[-ExternalModuleDependencies <string\[\]>\] \[-RequiredScripts <string\[\]>\] \[-ExternalScriptDependencies <string\[\]>\] \[-Tags <string\[\]>\] \[-ProjectUri <uri>\] \[-LicenseUri <uri>\] \[-IconUri <uri>\] \[-ReleaseNotes <string\[\]>\] \[-PassThru\] \[-Force\] \[-WhatIf\] \[-Confirm\] \[<CommonParameters>\]

**Find-Script** \[\[-Name\] <string\[\]>\] \[-MinimumVersion <version>\] \[-MaximumVersion <version>\] \[-RequiredVersion <version>\] \[-AllVersions\] \[-IncludeDependencies\] \[-Filter <string>\] \[-Tag <string\[\]>\] \[-Includes <string\[\]>\] \[-Command <string\[\]>\] \[-Repository <string\[\]>\] \[<CommonParameters>\]

**Install-Script** \[-Name\] <string\[\]> \[-MinimumVersion <version>\] \[-MaximumVersion <version>\] \[-RequiredVersion <version>\] \[-Repository <string\[\]>\] \[-Scope <string>\] \[-Force\] \[-WhatIf\] \[-Confirm\] \[<CommonParameters>\]

**Install-Script** \[-InputObject\] <psobject\[\]> \[-Scope <string>\] \[-Force\] \[-WhatIf\] \[-Confirm\] \[<CommonParameters>\]

**Update-Script** \[\[-Name\] <string\[\]>\] \[-RequiredVersion <version>\] \[-MaximumVersion <version>\] \[-Force\] \[-WhatIf\] \[-Confirm\] \[<CommonParameters>\]

**Get-InstalledScript** \[\[-Name\] <string\[\]>\] \[-MinimumVersion <version>\] \[-RequiredVersion <version>\] \[-MaximumVersion <version>\] \[<CommonParameters>\]

**Uninstall-Script** \[-Name\] <string\[\]> \[-MinimumVersion <version>\] \[-RequiredVersion <version>\] \[-MaximumVersion <version>\] \[-Force\] \[-WhatIf\] \[-Confirm\] \[<CommonParameters>\]

**Uninstall-Script** \[-InputObject\] <psobject\[\]> \[-Force\] \[-WhatIf\] \[-Confirm\] \[<CommonParameters>\]

**Save-Script** \[-Name\] <string\[\]> -Path <string> \[-MinimumVersion <version>\] \[-MaximumVersion <version>\] \[-RequiredVersion <version>\] \[-Repository <string\[\]>\] \[-Force\] \[-WhatIf\] \[-Confirm\] \[<CommonParameters>\]

**Save-Script** \[-Name\] <string\[\]> -LiteralPath <string> \[-MinimumVersion <version>\] \[-MaximumVersion <version>\] \[-RequiredVersion <version>\] \[-Repository <string\[\]>\] \[-Force\] \[-WhatIf\] \[-Confirm\] \[<CommonParameters>\]

**Save-Script** \[-InputObject\] <psobject\[\]> -LiteralPath <string> \[-Force\] \[-WhatIf\] \[-Confirm\] \[<CommonParameters>\]

**Save-Script** \[-InputObject\] <psobject\[\]> -Path <string> \[-Force\] \[-WhatIf\] \[-Confirm\] \[<CommonParameters>\]

**Publish-Script** -Path <string> \[-NuGetApiKey <string>\] \[-Repository <string>\] \[-WhatIf\] \[-Confirm\] \[<CommonParameters>\]

**Publish-Script** -LiteralPath <string> \[-NuGetApiKey <string>\] \[-Repository <string>\] \[-WhatIf\] \[-Confirm\] \[<CommonParameters>\]