Trouble with RestMethod in PowerShell
I configure

# Config #######################
$server_identity = "server_SAVE" 
$server_hostname = " Rust Server " 
$server_hostname = "RUST TEST" 
$server_maxplayers = 32 
$server_seed = 1 
$server_worldsize = 1900 
$server_level = "Procedural Map"  
$server_port = 28016 
$server_tickrate = 30 
$rcon_port = 29000 
$rcon_password = "FJN5" 
$server_description = ""
$server_headerimage = "" 
$server_url = "" 
################################

# Parameters ###################
$install_folder = "D:\Rust" 
$steam_folder = "D:\Rust\steamcmd" 
$token = "" 
################################

$host.ui.RawUI.WindowTitle = "SwuStartServer"
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Write-Host "##############################################################"
Write-Host " Mise a jour Rust"
Write-Host "##############################################################"
&"$($steam_folder)\steamcmd.exe" +login anonymous +force_install_dir "$($install_folder)" +app_update 258550 +quit

Write-Host " "
Write-Host "##############################################################"
Write-Host " Mise a jour uMod"
Write-Host "##############################################################"

$base64Token = [System.Convert]::ToBase64String([char[]]$token)
$headers = @{
"Authorization" = 'Basic {0}' -f $base64Token;
"User-Agent" = "ShutdownWhenRestart";
}
$response = Invoke-RestMethod -Method Get -Uri "https://api.github.com/repositories/94599577/releases/latest" -Header $headers;
$newBuild = $response.name
$browser_download_url = $response.assets.browser_download_url

if (!(Test-Path "$($install_folder)\dl")) {
New-Item -ItemType directory -Path "$($install_folder)\dl"
}

function uModUpdate {
Write-Host "Download uMod '$($newBuild)'"
Invoke-RestMethod -Method Get -Uri $browser_download_url -OutFile "$($install_folder)\dl\Oxide.Rust-$($newBuild).zip"
Try {
Expand-Archive "$($install_folder)\dl\Oxide.Rust-$($newBuild).zip" -DestinationPath "$($install_folder)" -Force -ErrorAction Stop
} Catch {
Write-Warning "An instance of RustDedicated.exe is already run!"
Write-Warning "Please stop your server and relaunch scripts!"
Start-Sleep -s 5
Exit
}
Write-Host "Success! uMod '$($newBuild)' is up to date."
}

$zip = Get-ChildItem -Path "$($install_folder)\dl" -Filter *.zip | Where-Object {$_.Name -like "Oxide.Rust*" }
if ($zip) {
$currentVersion = $zip.BaseName.Split('-')[-1]
$currentVersionSplitted = $currentVersion.Split('.');
$newBuildSplitted = $newBuild.Split('.');

for ($i = 0; $i -le 2; $i++) {
if ($newBuildSplitted[$i] -gt $currentVersionSplitted[$i]) {
$updateNeeded = $TRUE
}
}
if ($updateNeeded) {
uModUpdate
Remove-Item -Path $zip.FullName -Force
} else {
Write-Host "uMod '$($newBuild)' is already up to date."
}
} else {
uModUpdate
}

Write-Host " "
Write-Host "##############################################################"
Write-Host " Demarrage du Serveur"
Write-Host "##############################################################"
Write-Host "Starting server '$($server_identity)' [$($server_level)] on port '$($server_port)'"
Write-Host "WebSocket RCon Started on '$($rcon_port)' with password '$($rcon_password)'"

$argList = "-batchmode +server.ip 0.0.0.0 +server.identity `"$($server_identity)`" +server.hostname `"$($server_hostname)`" +server.maxplayers $server_maxplayers +server.seed $server_seed +server.worldsize $server_worldsize +server.level `"$($server_level)`" +server.port $($server_port) +rcon.port $($rcon_port) +rcon.password `"$($rcon_password)`" +rcon.web 1 +server.description `"$($server_description)`" +server.headerimage `"$($server_headerimage)`" +server.url `"$($server_url)`" -logfile $($server_identity).log"
Start-Process -FilePath "$($install_folder)\RustDedicated.exe" -ArgumentList $argList​


BUT it gave an error

Invoke-RestMethod: Cannot convert "System.Object []" to the type "System.Uri" required by the "Uri" parameter. The specified method does not support
Xia.
D: \ Rust \ swu_startserver.ps1: 51 sign: 40
+ Invoke-RestMethod -Method Get -Uri $ browser_download_url -OutFile ...
+ ~~~~~~~~~~~~~~~~~~~~~~~
     + CategoryInfo: InvalidArgument: (:) [Invoke-RestMethod], ParameterBindingException
     + FullyQualifiedErrorId: CannotConvertArgument, Microsoft.PowerShell.Commands.InvokeRestMethodCommand

Say what I did wrong
The response is an array, not a string as the error suggests. You'd need to select which part of the array you want to use.
Wulf, I’m not good at coding, write what should I fix if it’s not difficult for you.