【发布时间】:2021-02-18 06:49:41
【问题描述】:
我浏览了文档here。奇怪的是,我找不到任何提及如何使用 PowerShell 简单地连接到(not mount)SMB 共享的内容。我在 Python 中寻找相当于 this 的东西:
with smbclient.open_file(args.share, username=args.smbuser, password=args.smbpass, mode='w', encoding='utf-8-sig', newline='') as file:
file.write("stuff")
【问题讨论】:
-
@marsze 我不这么认为?文档非常稀缺-也许如果我在写出文件的示例中看到它?我认为这可能是答案的一部分,因为
New-SmbMapping是我排队的那个,但目前尚不清楚如何使用它从脚本中写入文件。
标签: powershell smb cifs