header
header Register : : Login header
header
divider
menuleft
menuright
submenu
left
Random Cmdlets
Connect-QADService
Connect to the ActiveRoles Server Administration Service via the ActiveRoles Server ADSI Provider, or to a certain Active Directory domain controller or a certain server running an Active Directory Lightweight Directory Services (AD LDS) instance via the regular LDAP ADSI Provider.


New-Junction
Creates NTFS directory junctions.


Remove-OutlookProvider
Use the Remove-OutlookProvider cmdlet to delete the AutoDiscoverConfig object from Active Directory.


New-RemoteDomain
Use the New-RemoteDomain cmdlet to create a managed connection for a remote domain. When you create a remote domain, you can control mail flow with more precision, apply message formatting and messaging policies, and specify acceptable character sets for messages that are sent to and received from the remote domain.


Get-JournalRule
Use the Get-JournalRule cmdlet to view the journal configuration on a computer that has the Hub Transport server role installed.


Push-Location
Pushes the current location onto the stack.


Add-IPAllowListEntry
Use the Add-IPAllowListEntry cmdlet to add an IP address or IP address range to the IP Allow list configuration information for the Connection Filter agent on a computer that has the Hub Transport server role or Edge Transport server role installed.


New-Alias
Creates a new alias.


Write-Zip
Create ZIP format archive files from pipline or parameter input.


Get-AvailabilityAddressSpace
Use the Get-AvailabilityAddressSpace cmdlet to retrieve the access method and associated credentials that are used to exchange free/busy information across forests.


  
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
Jun 17

Written by: Karl Prosser
6/17/2008 9:15 PM

So I've loved portable apps from time memorial and have valued making my own apps as portable as possible - XCOPY friendly. I've valued this over some fancy installer. But what about PowerShell? Why can't PowerShell be portable. Its the sort of tool that begs to be portable. Admins want a power tool, like powershell to be portable, to be able to be run on any computer without installing anything (changing ,even contaminating the state of the computer). Admins don't want to have to worry about installing prerequisites such as dotnet 2.0 everywhere and neither do I. I want something that can be self contained , where I can run PowerShell v1 and v2 side by side if I choose, and as a builder of PowerShell hosts, I want to be able to embed, or distribute the PowerShell runtime along with my app, just like I can with a multitude of dotnet libraries and components.

Well is this possible. Yes, I've done it. In this blog post I'll show some screenshots and a video about it, and talk about the WHAT and the WHY, and try to whelm up some passion in the community to encourage Microsoft to allow the PowerShell engine to be redistributed freely, easily , and portably. I know that many people will ask me - Can I download this, and I have to say NO - because we don't have rights from MS to redistribute PowerShell, especially outside of its official packages, but the good news is that you can make this yourself, but I'm not going to tell you HOW to until tomorrow, hoping that instead of running of to recreate your own personal PowerShell nirvana you might read the rest of my rant and join the movement for a Microsoft endorsed Portable PowerShell.

But before we proceed here is a screenshot:

servercore2

This beauty shows Server Core Enterprise - you can verify this isn't a trick but is indeed server core by the operatingsystemSKU of 14 shown in the top window. (MSDN reference. ) Server Core does not have dotnet 2.0 (a prerequisite of PowerShell) installed and we haven't applied any cool hacks or Russian reverse engineering  to get it working therefore we haven't compromised the secure state of our servercore by installing any untested potential lasting security hole on it. We purely XCOPY across our files, or we can even run it off a USB drive. Another great benefit you see here is on the same machine we are running PowerShell V1 and V2 side by side. How many of us have had to set up a whole new machine or VM just to play with V2 CTP!!!!! and how many cough*cough have installed v2 on a production machine when we should have for lack of patience in setting up a dedicated v2 test machine?

So what are the features of this technique.

  • Fully Portable
  • versions that presume dotnet 2.0s preexistence (about 3MB to 10MB)
  • Versions that don't need dotnet 2.0 at all (about 100MB)
  • Can run V1 and V2 side by side.
  • Can run on a machine with PowerShell already installed, and your portable version has its own execution-policy and other settings.
  • Can be packaged with SnapIns (so the SnapIns are portable also, no need to install or register them).
  • Can be used with a custom Host , so you can have a Portable PowerShell Plus or PowerShell Analyzer.

Here is a 3 minute video showing Portable Powershell v1 and v2 and PowerShell Analyzer running side by side on a virgin XP SP2 box that doesn't have dotnet 2.0 preinstalled.

So now you are saying, GIVE THIS TO ME NOW. Sorry but I can't but in my next blog entry within a couple of days I will tell you how you can roll your own Portable PowerShell.

Please leave a comment on this blog if you are in favor of Microsoft relaxing its redistributable rules when it comes to PowerShell. Technically PowerShell doesn't have much to stop it being Portable. Its fully dotnet, and although its installed in windows\system32 directory that is more a "political" feature , earlier betas would install elsewhere, and technically it wouldn't be hard to make it a control in VS.NET that a custom host could merge into their project and be fully portable. There are many many possible use-cases for such portable uses  (both from the perspective of admins as well as developers creating PowerShell enabled and powered applications in the growing PowerShell ecosystem). If MS can't make any changes technically to make it as easy as i suggest in V2, can they at least GIVE FULL REDISTRIBUTABLE RIGHTS FOR POWERSHELL as they do things such as the SQL server client side report viewer control in VS.NET.

All in favor say so in a comment!

And come back for more in a day or two.

Over and Out,

Karl Prosser / ShellTools.

Tags:

3 comments so far...

Re: Portable PowerShell - v1 and v2 side by side - even on Server Core.

This gonna be really cool. And it is what I really looking for. Can't wait to see your next post. Thank you!

By jadebird on   6/30/2008 9:44 AM

Re: Portable PowerShell - v1 and v2 side by side - even on Server Core.

I'm in favor of Microsoft relaxing its redistributable rules for Powershell.

By Zsoldier on   11/26/2008 9:37 AM

Re: Portable PowerShell - v1 and v2 side by side - even on Server Core.

They say they want to help thier customer be successful at doing their job well then... This would help me tremendously as all the machines I work on are suffering from lack of powershell v anything. I can't really install it either in my situation but this portable version idea just might work for me.

By simusphere on   9/13/2009 1:02 PM

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