标题:
[问题求助]
Powershell怎样远程复制文件和创建共享文件夹?
[打印本页]
作者:
暗杀奥巴马丶
时间:
2014-4-29 17:36
标题:
Powershell怎样远程复制文件和创建共享文件夹?
1.copy file from machine A to machine B
2.create a shared folder on the Remote machine.
作者:
PowerShell
时间:
2014-4-30 09:21
1 用enter-session 进入服务器a,然后copy-item d:\xxx\* \\服务器b的ip\共享名\yyy 即可。
2 用New-SmbShare,参见
http://technet.microsoft.com/lib ... e-8a56-862891c37939
(v=wps.630).aspx
3 get-command * -Module smbshare
------返回------
Block-SmbShareAccess SmbShare
Close-SmbOpenFile SmbShare
Close-SmbSession SmbShare
Disable-SmbDelegation SmbShare
Enable-SmbDelegation SmbShare
Get-SmbBandwidthLimit SmbShare
Get-SmbClientConfiguration SmbShare
Get-SmbClientNetworkInterface SmbShare
Get-SmbConnection SmbShare
Get-SmbDelegation SmbShare
Get-SmbMapping SmbShare
Get-SmbMultichannelConnection SmbShare
Get-SmbMultichannelConstraint SmbShare
Get-SmbOpenFile SmbShare
Get-SmbServerConfiguration SmbShare
Get-SmbServerNetworkInterface SmbShare
Get-SmbSession SmbShare
Get-SmbShare SmbShare
Get-SmbShareAccess SmbShare
Grant-SmbShareAccess SmbShare
New-SmbMapping SmbShare
New-SmbMultichannelConstraint SmbShare
New-SmbShare SmbShare
Remove-SmbBandwidthLimit SmbShare
Remove-SmbMapping SmbShare
Remove-SmbMultichannelConstraint SmbShare
Remove-SmbShare SmbShare
Revoke-SmbShareAccess SmbShare
Set-SmbBandwidthLimit SmbShare
Set-SmbClientConfiguration SmbShare
Set-SmbPathAcl SmbShare
Set-SmbServerConfiguration SmbShare
Set-SmbShare SmbShare
Unblock-SmbShareAccess SmbShare
Update-SmbMultichannelConnection SmbShare
这些命令是其他脚本语言不可能有的。有也不如这个全,全也不如这个方便,毕竟powershell主打win系统管理
欢迎光临 批处理之家 (http://www.bathome.net/)
Powered by Discuz! 7.2