Dificult in Create Script

This topic contains 1 reply, has 2 voices, and was last updated by  random commandline 1 year, 4 months ago.

  • Author
  • #62527


    Good morning.

    I need a script where today I have a server 2012 that works as a file server, on this server I have a Public folder, where I need to move everything as folders with modification greater than 60 days to a certain mass on an external server that also this server.

    can you help me?


  • #62554

    random commandline
    Get-ChildItem \\source\folder\ -Recurse | 
    Where-Object {$_.LastWriteTime -gt (Get-Date).AddDays(-60)} |
    Move-Item -Destination \\destination\folder\

You must be logged in to reply to this topic.