Transfer a text file from one server to another server

  • Is there any way to transfer a text file from one server to another server using powershellscript.
    Please help .

  • Namrish - Sunday, February 24, 2019 7:24 AM

    Is there any way to transfer a text file from one server to another server using powershellscript.
    Please help .

    Powershell will not do this, but you can use it for utilizing any file sharing/transport protocols.
    😎

    Can you tell us more about the problem, the question sounds like you've chosen the tool before understanding the problem😉

  • powershell is like any other windows command line tool 
    a simple .ps1 script with the following will do the copy
    copy source destination
    or
    copy-item source destination
    or
    robocopy source destination

    but as Eirikur mentioned what is what you trying to accomplish?
    problems you are going to find is if server is blocked (firewall), server has no share available to the source server, permissions can't be granted to a "foreign" user and a few other possible ones.
    but these issues you are going to get regardless of the tool you use to copy the files.

  • We have ALWAYSON configurtion between primary and secondary. The backup is native SQL backup, FULL, Differential and TLOG.When it is active on primary the backups runs on primary when it fails over to secondary the backup runs on secondary.
    The report is scheduled only in primary which is currently running only checks the backup job history on Primary box therefore it fails to report any backup which takes place on Secondary upon failover..so we are looking for a way to get the backuphistory of secondary server in primary server itself.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply