Link to home
Start Free TrialLog in
Avatar of compdigit44
compdigit44

asked on

PowerCLI 5 SnapShot Creation

I'm trying to write a powershell script to take a snapshot of select Vm's daily using Task Scheduler. For the name of the snapshot I would like the name to include the date. So I craeted a variable to looked something like this:

$Snapshotname ="Daily Snapsho (get-date)" the only this the vaible does is echo the word get-date.

What am i doing wrong..
ASKER CERTIFIED SOLUTION
Avatar of Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of compdigit44
compdigit44

ASKER

so any time you need to call a cmdlet inside of a new variable you need to use he + sign and have the cmdlet in () correct?