- Aug
- 2,799
- 144
Further to my post Use CURL to send/receive commands from a PowerShell 5.1 process
Here is a working example of sending/receiving commands/output from PowerShell 5.1 using TCC v36.
Here is a working example of sending/receiving commands/output from PowerShell 5.1 using TCC v36.
Code:
U:\>curl -s -X POST -d "$fso = New-Object -ComObject Scripting.FileSystemObject" http://127.0.0.1:8080/
U:\>curl -s -X POST -d "$fso | Get-Member" http://127.0.0.1:8080/
TypeName: System.__ComObject#{2a0b9d10-4b87-11d3-a97a-00104b365c9f}
Name MemberType Definition
---- ---------- ----------
BuildPath Method string BuildPath (string, string)
CopyFile Method void CopyFile (string, string, bool)
CopyFolder Method void CopyFolder (string, string, bool)
CreateFolder Method IFolder CreateFolder (string)
CreateTextFile Method ITextStream CreateTextFile (string, bool, bool)
DeleteFile Method void DeleteFile (string, bool)
DeleteFolder Method void DeleteFolder (string, bool)
DriveExists Method bool DriveExists (string)
FileExists Method bool FileExists (string)
FolderExists Method bool FolderExists (string)
GetAbsolutePathName Method string GetAbsolutePathName (string)
GetBaseName Method string GetBaseName (string)
GetDrive Method IDrive GetDrive (string)
GetDriveName Method string GetDriveName (string)
GetExtensionName Method string GetExtensionName (string)
GetFile Method IFile GetFile (string)
GetFileName Method string GetFileName (string)
GetFileVersion Method string GetFileVersion (string)
GetFolder Method IFolder GetFolder (string)
GetParentFolderName Method string GetParentFolderName (string)
GetSpecialFolder Method IFolder GetSpecialFolder (SpecialFolderConst)
GetStandardStream Method ITextStream GetStandardStream (StandardStreamTypes, bool)
GetTempName Method string GetTempName ()
MoveFile Method void MoveFile (string, string)
MoveFolder Method void MoveFolder (string, string)
OpenTextFile Method ITextStream OpenTextFile (string, IOMode, bool, Tristate)
Drives Property IDriveCollection Drives () {get}