1 Star 0 Fork 51

sunguilou / project_10215868

forked from chuanjiao10 / kasini3000 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
k_copyto_g.ps1 850 Bytes
一键复制 编辑 原始数据 按行查看 历史
chuanjiao10 提交于 2019-12-12 16:52 . 更新大部分代码
#建议保存编码为:bom头 + utf8
param
(
[String]$目的ip地址,
$端口,
[String]$LiteralPath,
[String]$Path,
[String]$Destination,
[Switch]$Recurse
)
if ( ($IsWindows -eq $True) -or ($PSVersionTable.psversion.major -lt 6) ) #win
{
& 'c:\ProgramData\kasini3000\0k_source.ps1'
}
if ($IsLinux -eq $True)
{
& '/etc/kasini3000/0k_source.ps1'
}
Write-Verbose '开始在 被控机组 复制'
if ($global:当前被控机_组 -eq $null)
{
Write-Error "${global:当前被控机_组} 为空"
exit 1
}
foreach ($当前被控机3 in $global:当前被控机_组)
{
$global:当前被控机_ip = $当前被控机3
& 'k_copyto_ip.ps1' -目的ip地址 $global:当前被控机_ip.ip -端口 $端口 -LiteralPath $LiteralPath -Path $Path -Destination $Destination -Recurse $Recurse
}
Write-Verbose '结束在 被控机组 复制'
exit 0
PowerShell
1
https://gitee.com/sunguilou/kasini3000.git
git@gitee.com:sunguilou/kasini3000.git
sunguilou
kasini3000
project_10215868
master

搜索帮助