PowerShell update script for Oxide
I wrote a simple Powershell script to help anyone running a server keep their uMod/Oxide version up to date with every server restart - just copy this as a .PS1 into \Rust\ and call the Powershell script as part of your server startup batch.

It should operate correctly for most people with no changes but I make no guarantees lol

https://pastebin.com/rV0F8Dbe

# Download latest uMod for Rust
Write-Host Determining latest uMod release . . .
$tag = (Invoke-WebRequest https://umod.org/games/rust.json | ConvertFrom-Json)[0].latest_release_version
if (Test-Path -Path temp\uMod$tag.zip) {
	Write-Host uMod $tag is already up to date.
} else {
	Remove-Item .\temp\*.zip -Force
	Write-Host Downloading uMod $tag . . .
	Invoke-WebRequest https://umod.org/games/rust/download -Out .\temp\uMod$tag.zip
	Write-Host Extracting uMod $tag . . .
	Expand-Archive -DestinationPath . .\temp\uMod$tag.zip -Force
}
Looks good, but keep in mind that we are moving away from GitHub, using our CDN primarily with the uMod release.
In that case, for scripts like this, please make sure the current build# is easily accessible in a similar way to this in the future :)
Updated first post with new links

Hi,

How do I get the folder to extract to “E:\Server\rustds” as it keeps putting the RustDedicated_Data folder in “E:\Server”

Thanks

bp2oGN4jFLDfImq.png GenSriracha

Hi,

How do I get the folder to extract to “E:\Server\rustds” as it keeps putting the RustDedicated_Data folder in “E:\Server”

Thanks

Simply place the ps script in the same direction as rust dedicated, in your case it would be “E:\Server\rustds” 

Very useful script, thanks!

Hello. and tnk for the script. But i have this strange :

Invoke-WebRequest : The response content cannot be parsed because the Internet Explorer engine is not available, or
Internet Explorer's first-launch configuration is not complete. Specify the UseBasicParsing parameter and try again.
At E:\Servers\@RUST\oxide_updater.ps1:3 char:9
+ $tag = (Invoke-WebRequest https://umod.org/games/rust.json | ConvertF ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotImplemented: (:) [Invoke-WebRequest], NotSupportedException
+ FullyQualifiedErrorId : WebCmdletIEDomNotSupportedException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

and yes, my InternetExplorer is sighn in and i made the initial settings ...