Monday, August 10, 2015

PowerShell Tip : Set Desktop Application Vertically or Horizontally using PowerShell.

 

In the previous blog post we have seen , that how can we minimise all desktop applications using PowerShell.

While exploring the Shell.Application , I have found two another cool methods, One is to Tile all open application Horizontally and  and another  is to tile all open windows application Vertically.

In the below code we are doing the same, creating a new COM Object using New-Object cmdlet and adding the Shell.Application com object to $a variable.

After creating $a variable, now try to run the TileHorizontally() and TileVertically()  methods and see the magic,

$a = New-Object -ComObject  Shell.Application

$a.TileHorizontally()

$a.TileVertically()

04-08-2015 15-12-34

04-08-2015 15-46-59

I am hoping that you will enjoy it.

Aman Dhally Manya Kaur

Regards.
Aman Dhally
If you like, you can follow me on Twitter and Facebook. You can also check my “You Tube channel for PowerShell video tutorials. You can download all of my scripts from “Microsoft TechNet Gallery”.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.