MCPcopy Create free account
hub / github.com/Splinter0/RelayBox / RunCommandPowershell

Function RunCommandPowershell

pkg/system/executil/exec.go:22–33  ·  view source on GitHub ↗
(cmdStr string)

Source from the content-addressed store, hash-verified

20}
21
22func RunCommandPowershell(cmdStr string) error {
23 cmd := exec.Command(
24 "powershell",
25 "-NoProfile",
26 "-NonInteractive",
27 "-Command",
28 cmdStr,
29 )
30 cmd.Stdout = os.Stdout
31 cmd.Stderr = os.Stderr
32 return cmd.Run()
33}
34
35func RunCommandPowershellWithOutput(cmdStr string) (string, error) {
36 cmd := exec.Command(

Callers 15

StartMethod · 0.92
StopMethod · 0.92
resetMSSQLToTCPMethod · 0.92
rebindMSSQLMethod · 0.92
setDefaultMSSQLMethod · 0.92
createSMBFirewallRuleMethod · 0.92
removeSMBFirewallRuleMethod · 0.92
StartMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected