Importing Secret Variables (with script)

It looks like we have an issue with the cmdlet but you can call the REST API directly to create secrets in PSU.

Invoke-RestMethod http://localhost:5000/api/v1/variable -METHOD Post -Body (@{
   name = "Secret"
   type = "PSCredential"
   userName = "Adam"
   password = "Password"
   vault = "BuiltInLocalVault"
} | ConvertTo-Json) -Headers @{ Authorization = "Bearer $AppToken" } -ContentType 'application/json'