I'm trying to create a function that will need 5 string variables passed to it. Those variables will be used for various cmdlets inside of the function. I seem to be misunderstanding how to pass those to the function. I've been going over the following articles and still am not quite getting it right:
http://technet.microsoft.com/en-us/library/hh847829.aspx
http://technet.microsoft.com/en-us/library/hh847806.aspx
http://technet.microsoft.com/en-us/library/hh847743.aspx
Basically, I want to schedule a task in taskscheduler to run a powershell script and pass the following variables to it:
$DPMServerName
$ProtectionGroupName
$RestoreSourceMachine
$RestoreDestinationMachine
$RestoreDestinationPath
These variables would be used inside the function for various dpm cmdlet's.
Can I get a simple sample from someone that uses 5 separate external text string to be passed as 5 separate internal variables to a function?