39 Star 222 Fork 51

chuanjiao10 / kasini3000

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
kct.ps1 1.73 KB
Copy Edit Raw Blame History
#建议保存编码为: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

Search