use new cmdlet Exec to execute shell commands where a nonzero error level means failure; add CmdletBinding() to all functions