Friday, May 1, 2015

#63 : Open Control Panel Items with Powershell

I don't see any purpose of opening control panel items. I expect you may need if you are something interactive which requires users to set something.

To open the Folder Options:
Show-ControlPanelItem -Name "Folder Options"


To open Internet Options: 
Show-ControlPanelItem -Name "Internet Options"


To open Firewall Settings:
Show-ControlPanelItem -Name "Windows Firewall"


There could be many such items in your control panel which differ from one computer to another. If you want to know the list of control panel items, use the below command :

Get-ControlPanelItem

This will take at least few seconds to get the results. You can play as much these controls.

I would suggest not to use the graphical controls if you are running any automated script which runs with scheduled task or SQL Server job. This may call the program in memory for so long. Such programs can be killed from Task manager or Powershell if started accidentally.

Hope you liked this article! We will see a new article tomorrow.
 

2 comments:

#112: How to handle xml document in Powershell?

 In PowerShell, you can handle XML data using various cmdlets and methods provided by the .NET Framework. Here's a basic guide on how to...