Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
AD-Control-Golang
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
陶腾飞
AD-Control-Golang
Commits
c8cfdbc1
Commit
c8cfdbc1
authored
Apr 25, 2022
by
浔阳陌客
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2022/04/25 v2.5.3
parent
512c708e
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
2 deletions
+7
-2
.DS_Store
+0
-0
README.MD
+1
-0
public/env.go
+1
-1
public/win.go
+5
-1
No files found.
.DS_Store
0 → 100644
View file @
c8cfdbc1
File added
README.MD
View file @
c8cfdbc1
...
@@ -99,6 +99,7 @@
...
@@ -99,6 +99,7 @@
-
2022/04/22 v2.5.0 添加人事账号管理功能
-
2022/04/22 v2.5.0 添加人事账号管理功能
-
2022/04/23 v2.5.1 每月10号和25号提醒新人创建个人账号
-
2022/04/23 v2.5.1 每月10号和25号提醒新人创建个人账号
-
2022/04/23 v2.5.2 添加知微运维平台的"账号管理功能"
-
2022/04/23 v2.5.2 添加知微运维平台的"账号管理功能"
-
2022/04/25 v2.5.3 更新powershell函数
## 四、其他说明
## 四、其他说明
...
...
public/env.go
View file @
c8cfdbc1
...
@@ -11,7 +11,7 @@ const SymbolHostname = "-"
...
@@ -11,7 +11,7 @@ const SymbolHostname = "-"
// AD-Control //
// AD-Control //
const
Version
string
=
"2.5.
2
"
const
Version
string
=
"2.5.
3
"
const
Host_adserver
string
=
"ADSERVER"
const
Host_adserver
string
=
"ADSERVER"
const
Host_adserver_ip
string
=
"192.168.0.20"
const
Host_adserver_ip
string
=
"192.168.0.20"
const
Host_thserver
string
=
"THSERVER"
const
Host_thserver
string
=
"THSERVER"
...
...
public/win.go
View file @
c8cfdbc1
...
@@ -19,7 +19,7 @@ func GetEnv(e string) string {
...
@@ -19,7 +19,7 @@ func GetEnv(e string) string {
// 获取fqdn
// 获取fqdn
func
GetEnvFqdn
(
s
string
)
string
{
func
GetEnvFqdn
(
s
string
)
string
{
if
!
Windows
()
{
if
!
Windows
()
||
!
Zhiweireach
()
{
return
""
return
""
}
}
cmd
,
err
:=
exec
.
Command
(
"whoami"
,
"/fqdn"
)
.
Output
()
cmd
,
err
:=
exec
.
Command
(
"whoami"
,
"/fqdn"
)
.
Output
()
...
@@ -198,6 +198,10 @@ func PSCommandOutputNoSplit(cmd string) (string, error) {
...
@@ -198,6 +198,10 @@ func PSCommandOutputNoSplit(cmd string) (string, error) {
func
PSCommand
(
cmd
string
)
error
{
func
PSCommand
(
cmd
string
)
error
{
return
exec
.
Command
(
"powershell"
,
"-command"
,
cmd
)
.
Start
()
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
)
{
func
PSTest_Connection
(
host
string
)
(
bool
,
error
)
{
if
host
==
""
{
if
host
==
""
{
return
false
,
Error_Lost_Parameter
return
false
,
Error_Lost_Parameter
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment