Commit c8cfdbc1 by 浔阳陌客

2022/04/25 v2.5.3

parent 512c708e
File added
......@@ -99,6 +99,7 @@
- 2022/04/22 v2.5.0 添加人事账号管理功能
- 2022/04/23 v2.5.1 每月10号和25号提醒新人创建个人账号
- 2022/04/23 v2.5.2 添加知微运维平台的"账号管理功能"
- 2022/04/25 v2.5.3 更新powershell函数
## 四、其他说明
......
......@@ -11,7 +11,7 @@ const SymbolHostname = "-"
// AD-Control //
const Version string = "2.5.2"
const Version string = "2.5.3"
const Host_adserver string = "ADSERVER"
const Host_adserver_ip string = "192.168.0.20"
const Host_thserver string = "THSERVER"
......
......@@ -19,7 +19,7 @@ func GetEnv(e string) string {
// 获取fqdn
func GetEnvFqdn(s string) string {
if !Windows() {
if !Windows() || !Zhiweireach() {
return ""
}
cmd, err := exec.Command("whoami", "/fqdn").Output()
......@@ -198,6 +198,10 @@ func PSCommandOutputNoSplit(cmd string) (string, error) {
func PSCommand(cmd string) error {
return exec.Command("powershell", "-command", cmd).Start()
}
func PSFileOutputNoSplitRemoteSigend(file string) ([]byte, error) {
return exec.Command("powershell", "-executionPolicy", "RemoteSigned", "-File", file).CombinedOutput()
}
func PSTest_Connection(host string) (bool, error) {
if host == "" {
return false, Error_Lost_Parameter
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment