Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
$host.version

Log into REST

Login

...

Code Block
### Load the Certificate x509
$CertPathDer = "C:\Users\plessisa\Desktop\Rest\Cert.der"
$certDer = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2($CertPath)

### Login
$BodyValue = "Username=restuser&Password=restpass"

$url = "https://134.56.226.215/rest/login"
Invoke-RestMethod -Uri $url -Certificate $certDer -Method Post -Body $BodyValue -SessionVariable ps 

Login without certificate

Code Block
### Allow self Sign Cert
add-type @"
    using System.Net;
    using System.Security.Cryptography.X509Certificates;
    
    public class IDontCarePolicy : ICertificatePolicy {
        public IDontCarePolicy() {}
        public bool CheckValidationResult(
            ServicePoint sPoint, X509Certificate cert,
            WebRequest wRequest, int certProb) {
            return true;
        }
    }
"@
[System.Net.ServicePointManager]::CertificatePolicy = new-object IDontCarePolicy
                                            
### Login
$BodyValue = "Username=restuser&Password=restpass"

$url = "https://134.56.226.215/rest/login"
Invoke-RestMethod -Uri $url -Method Post -Body $BodyValue -SessionVariable ps 

...

This operation allows installation of 

Spacevars
0company
 
Spacevars
0product2
Communication service updates on the ASM. Refer to Resource - sbaconfig.

Query
Code Block
curl.exe --cookie PHPSESSID=$PHPSESSID -k -i https://134.56.226.215/rest/sbaconfig?action=sbaupgrade -F sbaInstallFilename=@setup.msi

...