header
header Register : : Login header
header
divider
menuleft
menuright
submenu
left
Random Cmdlets
Disable-AntispamUpdates
Use the Disable-AntispamUpdates cmdlet to prevent the retrieval of anti-spam updates for the Microsoft Forefront Security for Exchange Server anti-spam update service on a computer that has the Edge Transport server role or the Hub Transport server role installed.


Set-CASMailbox
The Set-CASMailbox cmdlet sets client access-related attributes for Microsoft Exchange ActiveSync, Microsoft Office Outlook Web Access, Post Office Protocol version 3 (POP3), and Internet Message Access Protocol version 4rev1 (IMAP4) for a specified user.


Set-Contact
Use the Set-Contact cmdlet to modify the settings of an existing contact.


Get-RoutingGroupConnector
Use the Get-RoutingGroupConnector cmdlet to view the configuration details of the routing group connectors in an Exchange organization that is running Microsoft Exchange Server 2007.


Send-Trap
The Send-Trap cmdlet is used to sends SNMP traps to a remote address.


ConvertFrom-SecureString
Converts a secure string into an encrypted standard string.


Get-SenderFilterConfig
Use the Get-SenderFilterConfig cmdlet to view the configuration information for the Sender Filter configuration for the computer on which the command is run.


Out-Host
Sends output to the command line.


New-UMMailboxPolicy
The New-UMMailboxPolicy cmdlet creates a new Unified Messaging (UM) mailbox policy.


Set-ExecutionPolicy
Changes the user preference for the execution policy of the shell.


  
Latest Scripts from PoshCode.org

Exch07 Quota Report
Power Shell 1 script used to grab mailbox stats for a Exchange 2007 server. It saves the information into a .csv file by changing the $OUTFILE variable. The script is pretty basic but it's a simple way of having a history of how people use their inbox space. There is no method for managing the saved files. I just make it a point to delete them when I run my months end maintenance.

Out-DataTable
Creates a DataTable for an object, based on script by Marc van Orsouw

Modified WOL impl.
This function can send WOL packages. Note that this a modified version of code already floating online. You need to specify the Mac address as a string. Optionally use -Ports (0,1000) to specify the udp ports. (use -verbose to show which pacakges are being send).

Invoke-SqlCmd2
Modeled after SQL Server 2008 Invoke-Sqlcmd, but fixes bug in QueryTimeout.

EchoTest.cmd
A DOS cmd script to show how your arguments look to "native" console apps

Set account password
This script will allow you to set the password for an account on a local or remote machine/s. A report is then generated when done along with an error log. Scripts accepts pipeling input for the computer/s. If any errors are encountered, a log will be generated as well.

Enable/Disable FusionLog
http://georgemauer.net/blog/enabledisable-fusionlog-powershell-script/ Enabling/disabling your Fusion Log every time you need to figure out why assembly binding has gone wrong is a hassle. So here you go.

Start-Presentation
My current (WPF 4 compatible) PowerBoots-based Presentation Module. *REQUIRES* "PresentationFrame.xaml":http://poshcode.org/get/2104 and, of course, "PowerBoots":http://boots.codeplex.com This isn't really ready to be shared, but I always tell people if you wait until after you have time to clean it up, you'll never share it -- so since I'm unlikely to actually finish cleaning this up any time soon -- here it is. "See the screenshots for an example":http://HuddledMasses.org/images/PowerBoots/PowerBoots%2dPresentation.png

PresentationFrame.xaml
A required file for my "PowerShell Presentation module":http://poshcode.org/2105

Get-RemoteRegistry
A script to do a query on a remote registry key or value. Because the Registry provider inexplicably doesn't support it.
  
 

April 5th, 2010,

The 2010 Scripting Games are coming...

2010 Scripting Games

 Fire up your scripting editor and get ready to write some PowerShell!

Check out the Study Guide and register for the games!

-Steven Murawski
Co-Community Director

Community News
iPowerShell V2 Now Available

Sapien just released iPowerShell V2, which is now available in the Apple app store.  What is iPowerShell?

From Ferdinand Rios -

PowerShell In Practice

From Marco Shaw -

Check out http://www.manning.com/siddaway

Get the ebook or printed edition (not available yet), and use the discount code "marcoshell40" when checking out and get 40% off the regular...

Thomas Lee Joins PoshComm Directors

PowerShellCommunity.Org is happy to announce that Thomas Lee, Powershell MVP and noted trainer, is joining our ranks as a Community Director. 

Thomas is also responsible for a good many of the PowerShell...

Looking to get started with Modules?

Check out the PowerShellPack from James Brundage, which contains modules for making GUI's, add-ons for the ISE(Integrated Script Editor), system tools, and...

PowerShell Virtual Launch Party

PowerShell V2 Virtual Launch Party!

Jeffrey Snover, Hal Rottenberg and Jonathan Walz (hosts of the PowerScripting Podcast) hosted a PowerShell V2 Virtual Launch Party on Thursday, Oct 22nd, 9:30 PM EDT (GMT-4). 

More details...

  
Recent Blog Entries
Jan 3

Written by: Karl Prosser
1/3/2009 7:14 PM

PowerShell CTP3 ISE - Integrated Scripting environment has inherited many ideas and features from PowerShell analyzer including multiple runspaces,editors, a smaller immediate input area and output pane, however it doesn’t have the output visualizers of PSA nor the super fast RTS like execution control of PSA.

However Microsoft in their wisdom has made ISE rather extensible through the $PSISE variable, and many people already have added some very cool functionality to ISE through these.

When I first demo’d what was then MSH analyzer to Microsoft back in the first few months of 2006, the feature that seemed to stand out the most to the team was the ability to select an area of code and just run that. Thankfully that level of execution control is now in ISE as F6, but I wanted more, so i’m going to share with you a script that build a few months ago to add a couple of features.

F7 run the current physical line.

this basically will run the line where the caret current is at.

Real Time Strategy like control.. CTRL 1 , CTRL 2 etc

This here allows you to use comments to create regions, then EXECUTE those regions with a simple hotkey. I use this extensively. Often i am working on building a function, so I edit the function, press Ctrl 1 to apply the function, then if that was successful, press Ctrl 2 , then maybe Ctrl 3 to run some tests to make sure my changes to the function are what i am expecting.

This gives me a great AGILITY , putting what Jeffery Snover calls the Admin Development Model , but which is really REPL(Repeat Evaluate, Print , Loop ) rediscovered, on agile steroids.

function invoke-caretline
{
invoke-expression $([Regex]::Split($psISE.CurrentOpenedFile.Editor.text,"`r`n" )[$psISE.CurrentOpenedFile.Editor.caretline-1])
}
$psISE.CustomMenu.Submenus.Add("Run single line", {invoke-caretline} ,  'f7')
function invoke-region([int] $num)
{
$ed = $psISE.CurrentOpenedFile.Editor
$lines = [Regex]::Split($ed.text,"`r`n" )
$foundfirst = -1$foundlast = -1for($count = 0;$count -le $lines.length-1;$count++)
 {
   if ($lines[$count].startswith("#region") -and $lines[$count].contains("@$num")) 
   { $foundfirst = $count;break}     
 }
 if($foundfirst -gt -1)
 {
 for ($count = $foundfirst; $count -le $lines.length-1;$count++)
    {    
    if ($lines[$count].startswith("#endregion") )
   { $foundlast = $count;break}     
    }
    
 if ($foundlast -gt -1)
   {
     $torun = ""
     $lines[$foundfirst..$foundlast] | % { $torun+=$_ + "`r`n"}
     invoke-expression $torun
   }
 }
 
}
 $psISE.CustomMenu.Submenus.Add("run region 1", {invoke-region 1 },  'ctrl+1') 
 $psISE.CustomMenu.Submenus.Add("run region 2", {invoke-region 2 },  'ctrl+2') 
 $psISE.CustomMenu.Submenus.Add("run region 3", {invoke-region 3 },  'ctrl+3') 
 $psISE.CustomMenu.Submenus.Add("run region 4", {invoke-region 4 },  'ctrl+4') 
 $psISE.CustomMenu.Submenus.Add("run region 5", {invoke-region 5 },  'ctrl+5') 

Script @ PoshCode: View Script | Download

Sometime I'll wrap all this up into a module, and add other PowerShell Analyzer-like functionality such as running the current PARAGRAPH. So often in an earlier PSA, and in SQL Query Analyzer, i’m highlighting again and again the SAME paragraph query and running it over and over again. Being able to just run the current paragraph saves that time.

Karl Prosser

http://www.karlprosser.com/coder

Tags:

Your name:
Title:
Comment:
Add Comment    Cancel  
  

We have a new sponsor!  Introducting Pragma Systems.  See the home page for details.

right
   
footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 footer
footer