New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UNC/CIFS Share paths not working in linux version? #6629
Comments
Think this is known issue posted sometime ago. I think it was posted as an issue with the New-PSDrive cmdlet no able to work with CIFS settings or something. |
I wasn't able to find that issue or i would have posted there. your welcome to combine the issues. I have a PowerShell script I tried running on the Linux version that pointed didn't save the file into the network share like it suppose. |
I'm looking for it because I mention it long time ago. I'm using CIFS shared folders outside of PowerShell. |
Well! I guess I never did post nor comment about it. This feature could be useful if you can use the New-PSDrive to connect to an existing Shared folder. |
Well! Circling back to this issue. I notice this issue has been open since 2016 from the original issue which has been closed without resolution. (#1409) Any idea now that we are reaching RC status? This should have been fixed by now. |
So, why not allowing the following: (At least for "smbfs")
:) |
I tried using |
I'm currently trying to make our existing PowerShell 5 scripts compatible with PowerShell Core/6 and have ran into this issue on Mac. Windows PowerShell Core is able to connect to UNC (Samba) paths, but Mac PowerShell Core 6.2 cannot. It appears this issue has either been forgotten or is just not a priority. Has there been any work done to make this work? |
@SteveL-MSFT I pinged Chris Bergmeister in slack to see if this might be something that would be resolved in PS 7. He suggested I ping you on this issue to ask. My team is looking to leverage PS 7 on linux to migrate our PS 5.1 code and build servers over to PS 7 running on Linux. This is one of the issues I've ran into hindering us from migrating off of PS 5.1. |
It makes sense. I've used smbclient on linux machines before. |
My team uses PowerShell on Windows to help manage our CI tasks. We are experimenting with it on Linux now with PS7. Not being able to use New-PsDrive on Linux to access a smb path sucks. Relatedly we noticed Restart-Computer doesn't work on Linux either. Is there an easy way to determine the PowerShell commands that work on Linux or the limitations of the commands on different operating systems? I'm looking at the help documentation for New-PSDrive and Restart-Computer. Neither of these commands mention this necessary information. Conceivable one could guess Restart-Computer won't work on Linux by reading the Notes section of the documentation... |
smbclient seems like a suitable workaround if you need to perform simple file transfers. What about cmdlets like Use smb (server) to mount those paths ahead of time? |
It may be possible to enable this by calling out to smbclient but would require that command to be installed. |
So the year has passed without any implementation |
Just ran into this now as well. I have been using Powershell Core 7 as a way to get my scripts to run cross-platform, so this is a bit of a snag. :( |
To bad this isnt implemented.. needed this for copying some file from a share in linux and to some work with it. now i need more tooling |
On top of it being very unfortunate that this ability doesn't exist for the mac and linux versions, but there is nary a mention of this in the documentation for New-PSDrive. We were moving forward with an implementation that used powershell on Linux and one of our use cases is mounting temporary windows shares. Imagine my surprise that it doesn't think any of our shares exist. |
And now we're yet another year later. No mention of a fix, and nothing in the documentation to say it doesn't work for non-windows platforms. |
what's the point of bringing powershell to linux if you can't even use literally the most common task for system administrators to do inside of a org. Even if it is a supper janky and very slow method of copying files, it would be great. having nothing is a joke. |
OK i figured out a way to copy items from the powershell 7.2 linux to a windows smb share but it's hacky. Better than no option at all.
basically we are piping a command line argument string into bash. This is not the intended way of normally doing things since new-psdrive is off the table, but at least we can get some milage. I think the default behavior to map a drive in linux should do a synthetic mapping of the /mnt drive, just so system administrators don't need to research for hours to come up with a solution. |
Any updates? |
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you. |
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you. |
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you. |
This issue has been marked as "No Activity" as there has been no activity for 6 months. It has been closed for housekeeping purposes. |
Steps to reproduce
Expected behavior
Actual behavior
its not connecting to the UNC/CIFS share on the linux version of powershell
Environment data
My CentOS 7 box does have the cifs-util installed to perform a mount -t cifs installed andIi can mount locally but looking to see if we can just open the connection to the share without having to mount anything.
The text was updated successfully, but these errors were encountered: