Skip to content
Menu
The Lonely Administrator
  • PowerShell Tips & Tricks
  • Books & Training
  • Essential PowerShell Learning Resources
  • Privacy Policy
  • About Me
The Lonely Administrator

GUI vs CLI

Posted on January 4, 2010

I often talk about using PowerShell GUIs vs the console experience. There is certainly a place for a GUI, but sometimes you need the raw power that comes with a console session. Here’s an example.

Manage and Report Active Directory, Exchange and Microsoft 365 with
ManageEngine ADManager Plus - Download Free Trial

Exclusive offer on ADManager Plus for US and UK regions. Claim now!

Not to long ago I saw a post in the PowerShell forum at ScriptingAnswers.com. The problem was the admin wanted to set the maximum recipient count for a subset of mailboxes in Exchange 2007. Using the graphical Exchange System Manager, you can easily set a limit for each user. However, there is no provision for doing this for multiple users. However, this is a very easy task using the PowerShell console. You simply get the mailboxes you want to change and pass them to the Set-MailBox cmdlet to configure the recipient limit. You can use whatever filter or query mechanism you want, as along as you pass mailbox objects to Set-Mailbox.

Here’s a simple approach that  does it by database.

PS C:\> get-mailbox –database “mail01\First Storage Group\Restricted” | set-mailbox –recipientlimits 10

That’s all there is too it! Not a complicated script, just a one line PowerShell expression. It doesn’t matter if there are 10 or 1000 mailboxes. It simply gets done.

The lesson I hope you take from this is to learn the basic cmdlets you need to accomplish your job, even if there is a GUI. Know how to get cmdlet help and manipulate the pipeline and you can accomplish a lot of work without a lot of effort.


Behind the PowerShell Pipeline

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on Mastodon (Opens in new window) Mastodon
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to print (Opens in new window) Print
  • Click to email a link to a friend (Opens in new window) Email

Like this:

Like Loading...

Related

reports

Powered by Buttondown.

Join me on Mastodon

The PowerShell Practice Primer
Learn PowerShell in a Month of Lunches Fourth edition


Get More PowerShell Books

Other Online Content

github



PluralSightAuthor

Active Directory ADSI Automation Backup Books CIM CLI conferences console Friday Fun FridayFun Function functions Get-WMIObject GitHub hashtable HTML Hyper-V Iron Scripter ISE Measure-Object module modules MrRoboto new-object objects Out-Gridview Pipeline PowerShell PowerShell ISE Profile prompt Registry Regular Expressions remoting SAPIEN ScriptBlock Scripting Techmentor Training VBScript WMI WPF Write-Host xml

©2025 The Lonely Administrator | Powered by SuperbThemes!
%d