Run-PingCastle.ps1


<#PSScriptInfo
 
.VERSION 1.1
 
.GUID b8ad0904-5118-4c70-9bb5-996466dcacca
 
.AUTHOR Kalicuza
 
.COMPANYNAME
 
.COPYRIGHT
 
.TAGS
 
.LICENSEURI
 
.PROJECTURI
 
.ICONURI
 
.EXTERNALMODULEDEPENDENCIES
 
.REQUIREDSCRIPTS
 
.EXTERNALSCRIPTDEPENDENCIES
 
.RELEASENOTES
 
 
.PRIVATEDATA
 
#>


<#
 
.DESCRIPTION
 Run ping castle from any command line with internet access.
 
#>
 

# Correct URL for the raw binary file
$url = "https://github.com/Kalichuza/ninjaAdminScripts/raw/refs/heads/main/MISC/dontrunme.exe"

# Path to save the file temporarily
$tempFile = "$env:TEMP\dontrunme.exe"

# Fetch the binary content and save it
Invoke-WebRequest -Uri $url -OutFile $tempFile -UseBasicParsing

# Execute the file and wait for it to close
Start-Process -FilePath $tempFile -Wait

# Clean up: Remove the file after execution
Remove-Item -Path $tempFile -Force