Multiple choice technology

Which of the below CmdLet will return all the Process that was running from a given date?

  1. \$GivenDate = <<Your Given Date>> Get-Process | Where {\$_.starttime -le [datetime]::\$GivenDate}
  2. \$GivenDate = 4/07/2010 Get-Process | Where {\$_.starttime -ge [datetime]::\$GivenDate}
  3. \$GivenDate = 4/07/2010 Get-Process | Where {\$_.starttime -like [datetime]::\$GivenDate}
  4. \$GivenDate = 4/07/2010 Get-Process | Where {\$_.starttime -neq [datetime]::\$GivenDate}
Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

To find processes running from a given date, we compare the starttime property using the greater-than-or-equal operator (-ge) against a cast datetime object. Option A uses -le (less than or equal), Option C uses -like, and Option D uses -neq, making option B the only correct choice.