Not sure what flavor of Linux, but this will get you close, you'll need to create you own script and copy it to the Vm's like this
Copy-VMGuestFile-Source "C:\temp\enablSSH.sh"-Destination "/LocalDropbox/enableSSH.sh"-LocalToGuest -vm $vmname-GuestUser $VMUN-GuestPassword $VMPW |
Then execute like
Invoke-VMScript-ScriptText "/bin/bash /LocalDropbox/enableSSH.sh"-VM $vmname-GuestUser $VMUN-GuestPassword $VMPW-ErrorAction SilentlyContinue