powershell script to copy .ldif file to other server


i need a script to go to specific folder on local server, for exemple c:\temp  and copy the *.ldif file to remote server like this  \\server\share\test.

after the copy, i need to delete the *.ldif filer from local server.

Who is Participating?
Raheman M. AbdulSenior Infrastructure Support Analyst & Systems DeveloperCommented:
save the following lines in a file with .ps1 extention

copy c:\temp\*.ldif   \\server\share\test -Recurse
del c:\temp\*.ldif 

Open in new window

Then run the script.
cawasakiAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.