Skip to content

Instantly share code, notes, and snippets.

@brianbunke
Last active March 19, 2021 00:58
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brianbunke/03e90f28181b373d1df686429163711a to your computer and use it in GitHub Desktop.
Save brianbunke/03e90f28181b373d1df686429163711a to your computer and use it in GitHub Desktop.
Using "Update-ScriptFileInfo" properly in January 2017
$Splatting = @{
Path = "$env:USERPROFILE\Desktop\Your-Script.ps1"
Version = '1.0.0' # http://semver.org ;)
# GUID will randomly auto-generate for new scripts
# Only specify GUID if you're going to overwrite existing properties on an updated script version
Author = 'YourPSGalleryUsername'
Description = 'Explain your script to prospective users, preferably in one sentence.'
# CompanyName
# Copyright
Tags = @('super','awesome','radical')
# RequiredModules = 'Pester','AzureRM' # or any module name published on the PS Gallery
# ExternalModuleDependencies = 'qwerty' # any module name not published on the PS Gallery
# RequiredScripts = 'asdf' # any script published on the PS Gallery
# ExternalScriptDependencies = 'jkl' # you get the idea
# ProjectURI = 'https://YourGitHubProject'
# LicenseURI = 'https://YourGitHubProject/LICENSE'
# IconURI
# ReleaseNotes # http://info.sapien.com/index.php/scripting/scripting-modules/get-release-notes
Force = $true
}
Update-ScriptFileInfo @Splatting
@NovaViper
Copy link

I tried something like this but I keep on getting an error like this. I'm not sure why it keeps on going to that temp folder.. but whenver I run Test-ScriptFileInfo, everything comes out correctly

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