Copy a file to remote computers

Welcome Forums General PowerShell Q&A Copy a file to remote computers

Viewing 1 reply thread
  • Author
    • #272074
      Topics: 1
      Replies: 0
      Points: 11
      Rank: Member


      I am trying to copy a file to 180 computers in the network. I am using admin powershell prompt to execute the following code.

      When I tried with single computer name in the C:\scripts\OBSVDIs.txt file, it worked. Not sure what is making difference when I use all 180 computers list in the file.

      Any suggestion is greatly appreciated.


      • This topic was modified 2 weeks ago by kvprasoon. Reason: Code formatting
    • #272092
      Senior Moderator
      Topics: 9
      Replies: 1420
      Points: 5,280
      Helping Hand
      Rank: Community MVP

      Make sure there are no leading or trailing spaces in the text file, its always good to trim $computer.trim() when reading computer names from a txt file.

Viewing 1 reply thread
  • You must be logged in to reply to this topic.