39 Star 222 Fork 51

chuanjiao10 / kasini3000

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
kct.ps1 1.73 KB
一键复制 编辑 原始数据 按行查看 历史
#建议保存编码为:bom头 + utf8
param
(
[Alias("ipaddress")][String]$目的ip地址,
[Alias("port")][uint16]$端口,
[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'
}
if ($env:LANG -eq 'zh_CN.UTF-8')
{
Write-Host -ForegroundColor green '卡死你3000 Copy files/folders To 被控机,简称kct。kct工作开始。'
}
else
{
Write-Host -ForegroundColor green ' "kaiiits Hotel" Copy files/folders To node begin. '
}
$script:k_commit = $false
if ($global:当前被控机_ip -ne $null)
{
& 'k_copyto_ip.ps1' -被控机ip地址 $global:当前被控机_ip.ip -端口 $端口 -LiteralPath $LiteralPath -Path $Path -Destination $Destination -Recurse $Recurse
}
else
{
if ($global:当前被控机_组 -ne $null)
{
& 'k_copyto_g.ps1' -被控机ip地址 $目的ip地址 -端口 $端口 -LiteralPath $LiteralPath -Path $Path -Destination $Destination -Recurse $Recurse
}
else
{
if ($global:当前被控机_os -ne $null)
{
& 'k_copyto_os.ps1' -被控机ip地址 $目的ip地址 -端口 $端口 -LiteralPath $LiteralPath -Path $Path -Destination $Destination -Recurse $Recurse
}
else
{
& 'k_copyto_all.ps1' -被控机ip地址 $目的ip地址 -端口 $端口 -LiteralPath $LiteralPath -Path $Path -Destination $Destination -Recurse $Recurse
}
}
}
if ($env:LANG -eq 'zh_CN.UTF-8')
{
Write-Host -ForegroundColor green '卡死你3000 Copy files/folders To 被控机,简称kct。kct工作结束。'
}
else
{
Write-Host -ForegroundColor green ' "kaiiits Hotel" Copy files/folders To node end. '
}
exit 0
PowerShell
1
https://gitee.com/chuanjiao10/kasini3000.git
git@gitee.com:chuanjiao10/kasini3000.git
chuanjiao10
kasini3000
kasini3000
master

搜索帮助