NEED HELP FOR CREATE A POWERSHELL SCRIPT

Hello,

I am looking for assistance for the creation of a somewhat particular script.

I would like a script to create an incremental backup on a user data on SMB folder

I'm not asking for the solution but just a lead
thank you in advance

Parents
  • You most likely will need to look at one or more of the properties of the file in question: mode, attribute, lastwritetime.

        

        $file = get-item testfile.txt

        $file | select-object -property Fullname, Mode, Attribute, LastWriteTime

        

    Or you could use robocopy.exe and several command line switches to copy the data. Robocopy can copy only those file(s) that have changed, and will remove those that have been deleted. For instance

        robocopy SourcePath DestinationPath *.* /mir

Reply
  • You most likely will need to look at one or more of the properties of the file in question: mode, attribute, lastwritetime.

        

        $file = get-item testfile.txt

        $file | select-object -property Fullname, Mode, Attribute, LastWriteTime

        

    Or you could use robocopy.exe and several command line switches to copy the data. Robocopy can copy only those file(s) that have changed, and will remove those that have been deleted. For instance

        robocopy SourcePath DestinationPath *.* /mir

Children
No Data