powershell

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoesVirtualMachineExist

func DoesVirtualMachineExist(vmName string) (bool, error)

func DoesVirtualMachineSnapshotExist

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

func GetHostAvailableMemory

func GetHostAvailableMemory() float64

func GetHostName

func GetHostName(ip string) (string, error)

func GetVirtualMachineGeneration

func GetVirtualMachineGeneration(vmName string) (uint, error)

func HasVirtualMachineVirtualizationExtensions

func HasVirtualMachineVirtualizationExtensions() (bool, error)

func IsCurrentUserAnAdministrator

func IsCurrentUserAnAdministrator() (bool, error)

func IsFalse

func IsFalse(s string) bool

func IsPowershellAvailable

func IsPowershellAvailable() (bool, string, error)

func IsTrue

func IsTrue(s string) bool

func IsVirtualMachineOn

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

Jump to

Keyboard shortcuts

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