VMware Cloud Community
snowmizer
Enthusiast
Enthusiast

vcbMounter gives "Unexpected extra arguments encountered" error

I have written a powershell script that I am using to run my VCB backups from my VCB Proxy. The script takes three parameters (Host, Restart Flag, Restart VM). The script runs fine when I run it from my PowerGUI editor. I setup a Windows scheduled task that passes the following command:

powershell -command "& '<script location>\myscript.ps1' <Host> <Restart Flag> <Restart VM>" > Backup_result.log

If I open a command prompt and enter this command it runs fine. If I use my scheduled task the backup fails and I get the message "Error: Unexpected extra arguments encountered". If I right-click on the scheduled task and run the task it works fine.

My vcbmounter command looks like this:

vcbmounter.exe -h <host> -u <username> -p <password> -a name:<vm name> -r <Backup file goes here> -t fullvm -m san

I tried the command with and without the "-m san" option. Both yield the same results.

Has anyone ever seen this issue or can you give me an idea on what I can try?

Thanks.

Reply
0 Kudos
1 Reply
kent_
Contributor
Contributor

I have rediscovered this problem. I probably have a powershell problem. What was the answer?

Reply
0 Kudos