This topic contains 3 replies, has 2 voices, and was last updated by
July 11, 2019 at 12:56 pm #165328ParticipantTopics: 1Replies: 1Points: 37Rank: Member
We have installed a new Windows server and Move-Item is not functioning. I believe the issue to be firewall related and would like to know what Protocols and TCP ports Move-Item uses.
July 11, 2019 at 2:36 pm #165343ParticipantTopics: 1Replies: 50Points: 268Rank: Contributor
When you say its not working...are you getting an error message? What's the code you're executing. Depending on how you write it can use SMB or the WinRM ports.
This link will show you to use WinRM (ala invoke-command) to copy files.
July 15, 2019 at 4:54 pm #166063ParticipantTopics: 1Replies: 1Points: 37Rank: Member
I was going to try this without "Plowing Corn", but seeing your question, here goes:
The Error message returned is: "move-item : The specified network name is no longer available."
Get same error with Copy-Item also. Our corporate security group tells me that they have port: SMB/CIFS TCP port 445 Open point to point.
The source server is physical Windows Server 2016. The Destination is a Hitachi HNAS unit with this specific share presented as Both: NFS and SMB.
What is really Odd is that using: Windows File Explorer on the Source server, I can access the Destination share. I can store, retrieve, and delete files.
So I believe our internal Firewall has SMB open. Evidently Move-Item Must be using a different protocol. I will read the post/blog link that you sent me. Thanks for that. Any additional thoughts?
Missed your Question on what code I'm Running. For debugging purposes I have this down to a simple command entered from in a PowerShell window as follows. Only the company specific information has been changed for this posting:
PS C:\Users\mylog> move-item -Path F:\LOCAL-SOURCE\admin\Test_Move_File.txt -Destination \\DEST-SERVER\data01_storage\OCA\MyMyMy.csv -Force
Also I've read the Blog post that you sent. Don't think that will help as the Destination is a NAS box and not a Windows Server.
July 16, 2019 at 9:34 pm #166322ParticipantTopics: 1Replies: 50Points: 268Rank: Contributor
That is odd, I don't have any experience moving files to a straight NAS, so for now I'm going to ignore that.
Does the path exist up to the file?
Copy-item(and move-item) doesn't like to create folders if you're only copying a file.
you could try:
new-item \\DEST-SERVER\data01_storage\OCA\MyMyMy.csv -Force
That will create a 0 byte file BUT it will create the directory structure. Then try to copy/move the file to the destination
You must be logged in to reply to this topic.