I answer my own questions))
there are differences in writing the script field for bash
I you have variable
$script = "echo adm_gz:$passwdnew | chpasswd"
In this case i use variable $passwdnew and working fine
please note, the body of the script in double ". I's very impotant
and dont use new line in body, you keep error
another case
$script = @'
useradd adm_gz -g 0 -ou 0
'@
i use @' '@ in this case and it's work fine too