39 Star 222 Fork 51

chuanjiao10 / kasini3000

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
cdcentos.ps1 719 Bytes
一键复制 编辑 原始数据 按行查看 历史
#建议保存编码为:bom头 + utf8
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'
}
[System.Collections.ArrayList]$private:temp = @()
$centos7 = & 'cdos.ps1' -被控机os 'centos7'
$centos8 = & 'cdos.ps1' -被控机os 'centos8'
$null = $private:temp.add($centos7)
$null = $private:temp.add($centos8)
$global:当前被控机_os = $private:temp
function global:prompt
{
"`e[37m`e[44m【所有centos被控机】`e[0m" + $PWD + '> '
}
Write-Host -ForegroundColor green '提示:输入 ${global:当前被控机_os} 即可显示所有 centos被控机'
exit 0
PowerShell
1
https://gitee.com/chuanjiao10/kasini3000.git
git@gitee.com:chuanjiao10/kasini3000.git
chuanjiao10
kasini3000
kasini3000
master

搜索帮助