This works at the PS command line:
$date = Get-date ; $shortdate = $date.ToShortdateString() ; 
get-messagetrackinglog -messagesubject:"NWEA password" -Start $shortdate  | 
Select sender,messagesubject | ft -auto

This does NOT work in a .CMD file (simply adds "powershell.exe -command" to the 
front):
powershell.exe -command "$date = Get-date ; $shortdate = 
$date.ToShortdateString() ; get-messagetrackinglog -messagesubject:"NWEA 
password" -Start $shortdate  | Select sender,messagesubject  | ft -auto

Error message is "The term 'get-messagetrackinglog' is not recognized as a 
cmdlet, function, operable program, or script file. Verify the term and try 
again."

Is my date string in front messing it up?
David Lum // SYSTEMS ENGINEER
NORTHWEST EVALUATION ASSOCIATION
(Desk) 971.222.1025 // (Cell) 503.267.9764


---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to [email protected]
with the body: unsubscribe exchangelist

Reply via email to