Afternoon,
I'm looking for some inspiration how best to achieve my goal if it is possible. I have created a module and within it assigned a version number, during the start of the module it does an Invoke-WebRequest and gets the content of the file which is also the latest version. If the numbers match then its the latest version. If they don't then the user needs to download the latest version and overwrite the file.
I was wondering what would be the best way to achieve this? DSC? or call another script to download the file? I'm more than happy to write something I just need to know what path I should take?
Mike
Download file to update profile.ps1
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Re: Download file to update profile.ps1
Place the module on a network share and just copy the new version over the old version when necessary. The users will always have the latest copy.
No need for a script. Just add a copy command to your project that is executed each time you deploy the project or deploy directly to the module share. You will need to sign the module. Modules should always be signed.
No need for a script. Just add a copy command to your project that is executed each time you deploy the project or deploy directly to the module share. You will need to sign the module. Modules should always be signed.
Re: Download file to update profile.ps1
Deploy it as a package to an internal nuget repo!
Trust me, it's easier than it sounds.
Use the Register-PSRepository, Publish-Module, Install-Module, & Update Module cmdlets.
Register-PSRepository -Name "Internal" -SourceLocation "\\fileserver\modules" -PublishLocation "\\fileserver\modules" -InstallationPolicy Trusted
Trust me, it's easier than it sounds.
Use the Register-PSRepository, Publish-Module, Install-Module, & Update Module cmdlets.
Register-PSRepository -Name "Internal" -SourceLocation "\\fileserver\modules" -PublishLocation "\\fileserver\modules" -InstallationPolicy Trusted