You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The commands work independently...if I use the command "New-GuacUser -DataSource mysql -Parameters $GuacParameters" to create a single user, it works fine. I start getting the error when I put the command into a foreach loop and pull in names from a text file.
Other functions, like "Add-GuacUserConnection" in a foreach loop work just fine.
The commands work independently...if I use the command "New-GuacUser -DataSource mysql -Parameters $GuacParameters" to create a single user, it works fine. I start getting the error when I put the command into a foreach loop and pull in names from a text file.
Other functions, like "Add-GuacUserConnection" in a foreach loop work just fine.
$password = "secretpassword"
$userlist=(get-content userlist.txt)
foreach ($user in $userlist) {
$GuacParameters = @{
"username"= $user
"password"= $password
"attributes"= @{
"disabled"= ""
"expired"= ""
"access-window-start"= ""
"access-window-end"= ""
"valid-from"= ""
"valid-until"= ""
"timezone"= ""
"guac-full-name"= ""
"guac-organization"= ""
"guac-organizational-role"= ""
}
}
write-host ". . . . .Adding $user to Guacamole Server"
New-GuacUser -DataSource mysql -Parameters $GuacParameters
}
The text was updated successfully, but these errors were encountered: