Skip to content
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

Using pywinrm unable to mount samba share using command "net use" #390

Open
MohitBis opened this issue Aug 21, 2024 · 0 comments
Open

Using pywinrm unable to mount samba share using command "net use" #390

MohitBis opened this issue Aug 21, 2024 · 0 comments

Comments

@MohitBis
Copy link

I have running below command using pywinrm
cmd = f'cmd /c net use {drive}: \\{smb_server}\{share} {smb_user_password} /user:.{smb_user_name}'
result = self.session.run_cmd(cmd)

Output is "The Command completed successfully"

But when i am using the share detail it is showing Unavailable

net use

New connections will be remembered.

Status Local Remote Network


Unavailable M: \10.0.67.250\share1 Microsoft Windows Network
The command completed successfully.

Same mount command working as expected when running manually

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant