Powershell Script Help

Need some help getting this script to work. can someone help. I am trying to create a script that moves log files to another location and only keeps 60 days worth. please see script I started but having issue getting to work..

$TODAY=GET-DATE
GET-CHILDITEM C:\test\*.LOG | Where { $_.LastWriteTime.AddDays(31) -lt $TODAY } | MOVE-ITEM C:\Logfiles\Archive
GET-CHILDITEM F:\test\*.LOG | Where { $_.LastWriteTime.AddDays(31) -lt $TODAY } | MOVE-ITEM C:\Logfiles\Archive
GET-CHILDITEM E:\test\*.LOG | Where { $_.LastWriteTime.AddDays(31) -lt $TODAY } | MOVE-ITEM C:\Logfiles\Archive

try this

mv `find $log_dir -maxdepth 1 -mtime +60 -name \*LOG -type f | tr "\n" " "`  $destination

Thanks for this help. I am new to scripting. So, will this accomplish what the three lines of script I provided? And, can you help with what in your script I need to edit?

I am trying to moved files and archive from three c, e and F drive which log files reside. Then move them to one location folder on another server which I have setup as compressed.

Going to create a schduled task once I get this script right. Appreciate the help, really.

What Shell is this?
It looks like Microsoft Windows Power Shell to me. If it is, you may get more joy on the Microsoft site.

yes its windows powershell 2010

This site is http://www.unix.com and you are in the unix and Linux forums.

thx..

Moved to the Windows subforum.

ls c:\test\*.LOG, f:\test\*.LOG, e:\test\*.LOG | ?{ $_.LastWriteTime -lt (get-date).AddDays(-$keep) } | mv -Dest C:\Logfiles\Archive 

Hello,

microsoft's robocopy will do the trick.

Regards