0

I am starting several powershell (version 5) windows from a batch file and would like to position them when starting them.

This is what I use to start the powershell from cmd:

start powershell -NoExit -Command "Get-Content .\MyLog.txt -tail 10 -wait | Select-String 'Search term' | timestamp"

The "start" command only gives the option to start a new window maximised or minimised (min and max).

I am looking to position my window using x and y coordinates, eg. -X 1911 -Y 12.

I have found several solution but they seem to be tailored to be run from a powershell rather than a batch file (eg. Set the position of Powershell window)

Any ideas?

Fabian
  • 35
  • 5
  • 1
    Please review the output from `START /?`. Please describe in what way this does not do what is needed. See http://stackoverflow.com/help for more information about how to ask good questions. – lit Jan 10 '22 at 20:35
  • 1
    Isn't this the same question as before: https://stackoverflow.com/questions/70646045/open-powershell-from-cmd-and-use-filter-problem-with-escaping?noredirect=1#comment124886830_70646045? – Abraham Zinala Jan 10 '22 at 20:56
  • I am curious to know what about the answer you linked did not work and why do this? @lit gave a helpful link. Reorganize your question. – dcaz Jan 10 '22 at 20:56
  • Thanks @lit - I added my inputs directly in the question, hope this is better? – Fabian Jan 11 '22 at 10:30
  • @AbrahamZinala - nope, the one you linked was about adding a filter and not to position a window. – Fabian Jan 11 '22 at 10:30

0 Answers0