package winrm

import (
	

	
)

// Powershell wraps a PowerShell script
// and prepares it for execution by the winrm client
func ( string) string {
	// Disable unnecessary progress bars which considered as stderr.
	 = "$ProgressPreference = 'SilentlyContinue';" + 

	// Encode string to UTF16-LE
	 := unicode.UTF16(unicode.LittleEndian, unicode.IgnoreBOM).NewEncoder()
	,  := .String()
	if  != nil {
		return ""
	}

	// Finally make it base64 encoded which is required for powershell.
	 = base64.StdEncoding.EncodeToString([]byte())

	// Specify powershell.exe to run encoded command
	return "powershell.exe -EncodedCommand " + 
}