Thank you for the push in the right direction. As far as Get-Process goes it will return to me all 6 processes (if I have 6 tabs open) but only one of them has the MainWindowTitle value set. Here is the PowerShell code that I am using to script all of my information. Hopefully it will help another.
function GetWindowProcess() {
Param([Parameter(Mandatory=$true, HelpMessage="The name of the process in memory (ps-list).`n")]
[string] $processName,
[Parameter(Mandatory=$false, HelpMessage="True if you want to only affect the process with a Main Window Title (default false).`n")]
[bool] $useMainWindowTitle = $false)
if ($useMainWindowTitle) {
return (Get-Process | Where { $_.MainWindowTitle -and $_.Name -eq $processName })
}
else {
return Get-Process -Name $processName
}
}
[System.Diagnostics.Process] $proc = GetWindowProcess -processName 'opera' -useMainWindowTitle $true
Now that I have the window process I can get it's MainWindowHandle and affect it with the aforementioned SetWindowPos function. Thanks! :yes: