Invoke-PSUScript fails when using custom role - PSU version 5.5.1
Try adding script reader as a nested role to your custom roles.
Unable to create Secret Variables in One-Way Git Sync using Api
I figured out a suitable workaround for my app. I modified it to add a line to the variables.ps1 for my new variable. Once the new variable can be seen in PSU, it sends a PUT method to the variables api which updates it our SQL database. Mission accomplished.
Unable to create Secret Variables in One-Way Git Sync using Api
Product: PowerShell Universal
Version: 4.5.5I created an app to create secret variables using Api calls in our lab, which doesn’t have one-way gitsync on, and it’s working great. Here is a snippet of the pertinent code:
Invoke-RestMethod http://localhost:5000/api/v1/signin -Method POST -Body ( @{ username=$Secret:XXXXXX.UserName password=$Secret:XXXXXX.GetNetworkCredential().Password} | ConvertTo-Json ) -SessionVariable SessionVar -ContentType ‘application/json’
$Body = @{
name = $Eventdata.SecretStringName
type = ‘System.String’
value = $Eventdata.SecretStringValue
vault = ‘Database’
}
Invoke-RestMethod -Uri http://localhost:5000/api/v1/variable -Method POST -ContentType ‘application/json’ -Body ($Body | ConvertTo-Json) -WebSession $SessionVar
When I try running the same app on our server with one-way git sync enabled I am getting an error: “The remote server returned an error: (400) Bad Request.”
It appears it is not possible to create variables in a One-Way Git Sync environment even via Api? Unless I’m missing something? What would be the Ironman Software recommended best way to create new secret variables in a one-way sync environment?
Unable to Render in Tables and Datagrids
Product: PowerShell Universal
Version: 4.0.2I am unable to use the render parameter in datagrids and tables. No matter what I try to render. It can be -render { new-udtypography “Hello World” } and it will generate the same error. I’ve tried both the sample tables found in docs.powershellunviersal.com but the same errors persist.
“Self referencing loop detected for property ‘parent’ with type ‘System.Management.Automation.Language.CommandAst’. Path ‘[0].content[0].columns[3].render.ast.endBlock.statements[0].pipelineElements[0].commandElements[0]’.”
This is within a udstepper.
The same script is working on another server with the same verison of PSU installed 4.0.2.
If I remove the render paramenter, the table and datagrids load fine.
Any help would be appreciated.
Regards,
Stumped