Roni44
1
hi
I want to run a script
provisioner "powershell" {
elevated_user = "SYSTEM"
elevated_password = ""
inline = ["C:\\Programdata\\Virtual-Desktop-Optimization-Tool-2.1.2009.1/Windows_VDOT.ps1 -Optimizations All -Verbose -AcceptEula"]
}
whit parameter but i get an error
Unexpected token ‘-Optimizations’ in expression or statement.
I am trying to figure out how to pass parameters to an inline PowerShell script myself. But the example below, should work.
provisioner “powershell” {
elevated_user = “SYSTEM”
elevated_password = “”
inline = [“C://Programdata//Virtual-Desktop-Optimization-Tool-2.1.2009.1//Windows_VDOT.ps1 -Optimizations ‘All’ -Verbose -AcceptEula”]