I have the attached PowerCLI script which I want to run on a regular basis to backup ESXi host configs as they may change over time and we can't rely on people remembering to take a backup of them when they do. Unfortunately when I try running it from the PowerCLI command prompt it ignores the valid arguments I'm passing to it and instead issues graphical prompts for the hostname, login credentials, etc. Am I doing something wrong in my script or do I just need to run it in a certain way? I'm fairly new to PowerCLI and Powershell so any help would be appreciated.
↧