powershell

package
v1.1.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoesVirtualMachineExist added in v1.1.1

func DoesVirtualMachineExist(vmName string) (bool, error)

func DoesVirtualMachineSnapshotExist added in v1.1.1

func DoesVirtualMachineSnapshotExist(vmName string, snapshotName string) (bool, error)

func GetHostAvailableMemory

func GetHostAvailableMemory() float64

func GetHostName

func GetHostName(ip string) (string, error)

func GetVirtualMachineGeneration added in v1.1.1

func GetVirtualMachineGeneration(vmName string) (uint, error)

func HasVirtualMachineVirtualizationExtensions

func HasVirtualMachineVirtualizationExtensions() (bool, error)

func IsCurrentUserAnAdministrator

func IsCurrentUserAnAdministrator() (bool, error)

func IsFalse added in v1.1.2

func IsFalse(s string) bool

func IsPowershellAvailable

func IsPowershellAvailable() (bool, string, error)

func IsTrue added in v1.1.2

func IsTrue(s string) bool

func IsVirtualMachineOn added in v1.1.1

func IsVirtualMachineOn(vmName string) (bool, 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