package
0.0.10
Repository: https://github.com/knicknic/go-powershell.git
Documentation: pkg.go.dev

# README

#generate

to generate zpsh_host.go go generate

You will have to change modpsh_host = windows.NewLazySystemDLL("psh_host.dll") to modpsh_host = windows.NewLazyDLL("psh_host.dll")

# Functions

CreateRemoteRunspace creates a runspace in which to run powershell commands This function allows you to specify a logging callback For more details see logger.Simple.
CreateRunspace creates a runspace in which to run powershell commands This function allows you to specify a logging callback as well as a callback routine that processes commands from powershell For more details see logger.Simple and Callback holder types.
CreateRunspaceSimple creates a runspace in which to run powershell commands This function has no callback routines or logging callbacks.

# Structs

CallbackFuncPtr a simple implementation of CallbackHolder that lets you pass in a function pointer for the callback.
InvokeResults the results of an Invoke on a psCommand.
Object representing an object return from a powershell invocation Should be called on all objects returned from a powershell invocation (not callback parameters) See note on Object.Close for exceptions & more rules about Close.
Runspace corresponds to a powershell runspace.

# Interfaces

CallbackHolder callback function pointer for Send-HostCommand callbacks.
CallbackResultsWriter allows you to write values to powershell when inside Send-HostCommand.