Skip to content

Instantly share code, notes, and snippets.

@lktslionel
Created January 14, 2021 11:57
Show Gist options
  • Save lktslionel/445141bf49de4371e4acebb36105ff58 to your computer and use it in GitHub Desktop.
Save lktslionel/445141bf49de4371e4acebb36105ff58 to your computer and use it in GitHub Desktop.
Powershell Script to push to the gallery

Generating powershell script

PS> New-ScriptFileInfo -Path Set-LKDefaultWorkspace.ps1 -Description "Set my default project workspace"
PS> Get-Content Set-LKDefaultWorkspace.ps1

# <#PSScriptInfo
# 
# .VERSION 1.0
# 
# .GUID a57cbae5-41ce-4bad-bed3-481303fe254d
# 
# .AUTHOR lionel_lonkaptsamba
# 
# .COMPANYNAME
# 
# .COPYRIGHT
# 
# .TAGS
# 
# .LICENSEURI
# 
# .PROJECTURI

Publlishing to the gallery

PS> Publish-Script -Path ".\MyScriptFile.PS1" -NugetAPIKey "GUID" -WhatIf -Verbose

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment