powershell

package
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2017 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHostAvailableMemory

func GetHostAvailableMemory() float64

func GetHostName

func GetHostName(ip string) (string, error)

func HasVirtualMachineVirtualizationExtensions

func HasVirtualMachineVirtualizationExtensions() (bool, error)

func IsCurrentUserAnAdministrator

func IsCurrentUserAnAdministrator() (bool, error)

func IsPowershellAvailable

func IsPowershellAvailable() (bool, string, error)

func ModuleExists

func ModuleExists(moduleName string) (bool, error)

func SetUnattendedProductKey

func SetUnattendedProductKey(path string, productKey string) error

Types

type PowerShellCmd

type PowerShellCmd struct {
	Stdout io.Writer
	Stderr io.Writer
}

func (*PowerShellCmd) Output

func (ps *PowerShellCmd) Output(fileContents string, params ...string) (string, error)

Output runs the PowerShell command and returns its standard output.

func (*PowerShellCmd) Run

func (ps *PowerShellCmd) Run(fileContents string, params ...string) error

type ScriptBuilder

type ScriptBuilder struct {
	// contains filtered or unexported fields
}

func (*ScriptBuilder) Reset

func (b *ScriptBuilder) Reset()

func (*ScriptBuilder) String

func (b *ScriptBuilder) String() string

func (*ScriptBuilder) WriteLine

func (b *ScriptBuilder) WriteLine(s string) (n int, err error)

func (*ScriptBuilder) WriteString

func (b *ScriptBuilder) WriteString(s string) (n int, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL