I am working on running powershell code from within XY and having it spit back data. Here is something i came up with.
Code: Select all
$cmd = """powershell.exe"" -ExecutionPolicy Bypass -Command ""mkdir c:\temp -ErrorAction SilentlyContinue;((ipconfig /all | Select-String IPv4) -replace ' IPv4 Address. . . . . . . . . . . : ','') -replace '\(Preferred\) ','' | Out-File C:\temp\IP.txt""";
run $cmd,,1;
echo readfile("C:\temp\IP.txt")