For several OS X versions I've used:
/usr/bin/osascript -e mount volume "smb://yourserver" as user name "yourusername" with password “yourpassword”
This has worked great, a nice and quiet mount of the network share, if it is available of course.
Now recently I installed macOS Sierra (10.12 public beta, build 16A238m), and the script still works, however it will now suddenly always show a login dialog, pre-populated with the "yourusername" and "yourpassword" values. The user will still have to click "Connect" to mount the share.
Does anyone know if this is a "bug" in the beta version (I did report this with Apple's Feedback app), or is this expected and/or what would be the "fix" for that?
See also: AppleScript Documentation "mount volume"