Carpe Diem: Flaphead@Home

seize the day
Welcome to Carpe Diem: Flaphead@Home Sign in | Join | Help
in Search

Browse by Tags

All Tags » PowerShell
Showing page 1 of 2 (105 total posts)
  • #Powershell and Send-MailMessage cmdlet

    #Exchange2010 - Found this and it’s damm handy and what's cool is that its a Windows Powershell v2 thing and you don't need Exchange :-| Source: http://www.howexchangeworks.com/2009/11/send-emails-easily-using-powershell-v2.html  -and- Source: http://technet.microsoft.com/en-us/library/dd347693.aspx The Send-MailMessage cmdlet sends an ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on December 9, 2009
  • #Exchange 2010 Training Day 5

    #Exchange2010 … Last day … Check it link for more details around RBAC and role assignments .. http://technet.microsoft.com/en-us/library/dd298183(EXCHG.140).aspx I love this cmdlet: Get-ManagementRoleAssignment –role “Mailbox Search” –GetEffectiveusers | FL Name, RoleAssigneeName, EffectiveuserName, AssignmentChain As for certs you need to ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on December 4, 2009
  • #Exchange 2010 Training Day 1

    #Exchange2010 … For the guys on the training here. The storage stuff is from a webcast by Matt Gossage on the 3th July 2009. its not bad and you can get a pdf of the slides too http://tinyurl.com/yhf538b Also check this out for a e2010 installation .. http://tinyurl.com/ygamm7e Forrester report on Exchange 2010 .. ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on November 30, 2009
  • #Powershell Script to install #Exchange 2010 pre-requisites for Windows Server 2008 R2

    Funky Source: http://www.bhargavs.com/index.php/powershell/2009/11/script-to-install-exchange-2010-pre-requisites-for-windows-server-2008-r2/   Even though installing pre-requisites on Windows Server 2008 R2 is simple and straight forward as described here, it makes it even faster if you were to use a script to do so. MVP Anderson ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on November 27, 2009
  • #PowerShell v2 is out for Windows Vista, 2003 and 2008

    I was sleeping again .. but well done Christopher ;-) Source: http://chrisbeams.wordpress.com/2009/11/09/powershell-v2-out/ –and- http://support.microsoft.com/default.aspx/kb/968929 The Windows Management Framework includes: Windows Remote Management (WinRM) v2.0 Windows PowerShell v2.0 Background Intelligent Transfer Service (BITS) ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on November 9, 2009
  • Get-MsxServerPLUS.ps1 v1.24

    It’s been a while, but I have updated Get-MsxServerPLUS.ps1 aka Get-ExchangeServerPLUS.ps1.  I changed the name as it was annoying me as it was conflicting with get-exchangeserver.  Other updates are: v1.20 10 November 2008    : Changed the script name so it is different from the standard exchange commands. Added Event ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on July 13, 2009
  • Exchange 2007: List Activesync users

    Okay do you know you can run Get-CASMailbox -Filter {HasActiveSyncDevicePartnership -eq $true} to get a list of users that have an Activesync partnership. Now if you combine this with Get-ActivesyncDeviceStatistics you can get more details too.  Check it out: Get-CASMailbox -Filter {HasActiveSyncDevicePartnership -eq $true} | foreach ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on May 21, 2009
  • Powershell Cmdlets for SCOM 2007 R2 (beta)

    PsSnapin is called: Microsoft.EnterpriseManagement.OperationsManager.Client get-help * | where {$_.pssnapin -like "*Enter*"} | sort name | select name,synopsis | ft –auto Name Synopis Add-ConnectorToTier Configures an ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on May 12, 2009
  • Inherited OU Rights

    Needed to check an OU structure to see if they have the good old “Include inheritable permissions from this object’s parent” checked. So knocked this up: $RootOU = [ADSI]”LDAP://<DC>:389/Full DN of OU” $ChildOUs = $RootOU.psbase.Children ForEach ($xOU in $ChildOUs){ Write-Host $xOU.distinguishedName -Foregroundcolor Red ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on May 7, 2009
  • Set an Existing Users password using Powershell

    Was asked how to set an existing users password and here is how You need the FULL dn of the user (usually some like cn=user,ou=ou,dc=domain etc, etc) $xuser = [ADSI]"LDAP://<DC Name>:389/<Full DN of user>" $xuser.psbase.Invoke("SetPassword","Password2")
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on May 6, 2009
  • Clone NTFS Permissions

    I have done this before when moving log file locations in Exchange and it’s well cool and make life very easy! Source: http://powershell.com/cs/blogs/tips/archive/2009/03/24/clone-ntfs-permissions.aspx NTFS access permissions can be complex and tricky. To quickly assign NTFS permissions to a new folder, you can simply clone permissions from ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on April 21, 2009
  • Use PowerShell To Auto-Update Your Sysinternals

    how cool is this! http://devcentral.f5.com/weblogs/Joe/archive/2009/04/17/use-powershell-to-auto-update-your-sysinternals.aspx
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on April 21, 2009
  • Exchange 2010 Beta1: Powershell CmdLets

    Just a dump for my reference .. Snapin is called “Microsoft.Exchange.Management.PowerShell.E2010” get-help * | select name,pssnapin | where {$_.pssnapin -like "*exchange*"}  | sort name Add-ADPermission Add-AvailabilityAddressSpace Add-ContentFilterPhrase Add-DatabaseAvailabilityGroupServer ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on April 17, 2009
  • Export non expiry password accounts

    I’m doing requests now ;-) This script will dump a list of user accounts that have “Password never expires” checked $CurrentDomain = [System.DirectoryServices.ActiveDirectory.Domain]::getcurrentdomain() $Forest = $CurrentDomain.Forest.ToString() $Forest = "dc=" + $Forest ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on April 17, 2009
  • Exchange 2007 Cmdlets

    Just a couple from today Test the service health for ALL of your E2k7 servers: Get-ExchangeServer | foreach{$_.name;Test-ServiceHealth} Start non running E2k7 services: Test-ServiceHealth | foreach{$x=$_;$x.ServicesNotRunning | start-service} I posted first to my twitter account: http://twitter.com/flaphead
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on March 26, 2009
  • targetAddress (updated)

    This is is quite a cool property of an object ... The TargetAddress property specifies the delivery address to which e-mail for this recipient should be sent.  So if you have played with the Quest Migration Tools you will know that this magic property is what they use to control where email is sent.  Anyway, I want to see how easy it is ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on March 11, 2009
  • Exchange 2007 Mailbox Growth

    So I was asked is there a way to see how your mailboxes grow (You know who you are!)  .. an interesting challenge for this time of the morning, but hey. Here we go, this script uses Get-Mailbox and the does a fudge to get the date only part from the whencreated attribute and creates and array with the name,database and date.  It then ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on January 15, 2009
  • Update-ConfigFiles.ps1

    So inlight of RU5 I thought I would share this with you.  So we know the issue with the .net framework and the Certicate Revokation List. This script updates the Exchange 2007 .config files inline with 944752: Exchange Server 2007 managed code services do not start after you install an update rollup for Exchange Server 2007 It will add the ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on November 24, 2008
  • Update Rollup 5 for Exchange Server 2007 Service Pack 1 (KB953467)

    The whole universe knows by now that RU5 for Exchange 2007 SP1 has hit the streets. You can download it here: http://www.microsoft.com/downloads/details.aspx?FamilyID=652ed33a-11a1-459c-8ffe-90b9cbfe7903&DisplayLang=en Ninob over at the Exchange team blog says that it will be out via Microsoft Update in the next few weeks.  He also ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on November 24, 2008
  • Send-Mail.ps1 v3.2 [7 November 2008]

    v3.0 6 August 2008     : Removed the GUI form the original scriptv3.1 22 August 2008 : Updated to ''autofind'' a hub server if -server is not specifiedv3.2 7 November 2008 : Some minor tweeks. Added event logging.Added Error Event loggingThis script uses .net (System.Net.Mail.MailMessage) to send an ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on November 19, 2008
  • get-hotfix.ps1 v1.5 [7 November 2008]

    Okay I have updates as follows: v1.0 27 October 2008 : A Script is bornv1.1 28 October 2008 : Add ability to expose Server Modelv1.2 31 october 2008 : Added email and commandline v1.3 4 November 2008 : Added option to check recent changesv1.4   6 November 2008 : Days commandline ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on November 19, 2008
  • CAS vdir restore using PowerShell

    Wow is all I have to say, this is a damm excellent article and script .. check it out: http://technet.microsoft.com/en-us/library/bb124359.aspx Basically, it's a script that will recreate your owa virtual directories from a previous xml export! ..I just added a comment .. to create the export run:Get-ClientAccessServer | Get-OwaVirtualDirectory ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on November 18, 2008
  • Get-MailboxStatistics with TotalItemSize in MB to a CSV file

    Just ignore this, I wanted to store this code snippet somewhere and this was the best place.  But if you are interested this will create a csv file from Get-MailboxStatistics, but with the TotalItemSize in MB ''DisplayName,TotalItemSize(MB),ItemCount,StorageLimitSize,Database,LegacyDN'' | out-file GMS.csv; get-mailbox -resultsize unlimited | ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on November 14, 2008
  • Powershell and where

    Another thing I wanted to share.  If you want to say Get-MailboxServer but only want a subset of server you could try this: Get-MailboxServer | Where {$_.Name -LIKE ''*Serv01'' -OR $_.Name -LIKE ''Ex*NYC*''} Enjoy
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on November 14, 2008
  • Scheduling a Powershell Command

    Just wanted to share this with you all. So I have a number of scripts that I schedule to run either every 10 min, once a day or once a week.  It's simple really, I create .cmd file that I then use the task scheduler or schtasks to create.  Inside the .cmd file I have this: powershell c:\ps\Test-ExchangeServers.ps1 -localhost -testsmtp ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on November 14, 2008
  • Exchange Powershell and Whatif

    So I have been creating a few scripts to automate the configuration of exchange, and wanted to use the -WhatIf switch so you can see what would or would not change. -WhatIf [<SwitchParameter>]The WhatIf parameter instructs the command to simulate the actions that it would take on the object. By using the WhatIf parameter, you can vi ew what ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on November 14, 2008
  • Get-Hotfixes.ps1 v1.4 [7 November 2008]

    This script uses Get-ExchangeServer to generate a list of  servers and will enumerate the Exchange Patch information and list the windows updates installed on the server.  This update changes the way the server list is generated and added the ability to check cluster nodes COMMANDLINE OPTIONS-EMAIL .......... Send an Email-Localhost ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on November 7, 2008
  • schtasks

    I mentioned this before as a way to script adding tasks to a server.  So I came across an issue the other day, where I ran it once, but then it failed on the second time: ERROR: Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. Disconnect all previous connections to the ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on November 7, 2008
  • Get-AllQueuesGUI.ps1 v1.5 [24 October 2008]

    A while back I posted this , but to have something more ''in your face'' I put a GUI around it, and this is the latest version. The script enumerates all messaging queue and displays it in a GUI. The GUI then refreshes every 10 seconds.THE GUI has four tabs: QueueDisplay the current queue MessageDisplays messages in the queue Top 5 Q’sThis ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on October 31, 2008
  • get-hotfix.ps1

    I needed to get a quick list of the hotfixes installed on my Exchange 2007 servers. So I “knocked” this up ..  enjoy
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on October 27, 2008
  • TechNet Webcast: 24 Hours of Exchange Server 2007 (Part 08 of 24): Introduction to Windows PowerShell (Level 200)

    At last I think I have cracked it so I can download these TechNet Webcasts as a video podcast to my Zune!Will post more as I get round to it, but here is the first one! .. Enjoy .. the RSS is: ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on October 22, 2008
  • Setting Exchange mailbox size limits on a group

    WHAT! I hear you say, you can't do that! .. Very true, but you can automate it ;-) using the wonders of Powershell Exchange 200x First you will need to use adsiedit.msc and get the groups distinguishedName.  Once you have that, using an account that has access to over the users AD objects you run this code: $mygroup = ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on October 20, 2008
  • Get-ExchangeADChanges.ps1

    So I  needed a way to check what has changed in the Exchange Configuration container … basically if something stopped worked ;-) So I came up with this.  I run it once a week, and it checks for changes in the last 7 days. It has one command line option and that is –email to email the results ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on October 8, 2008
  • Exchange 2007 SP1 Powershell Commands

    This is kinda interesting .. honest .. Did you know there are 394 Powershell command with Exchange 2007 SP1.  But thats not intersting, the table below is!  So the AD and Server build boys said … no mate, you can’t have local admin rights to your exchange server?  Kewl I said you guys can manage it then, as with out it we can’t do ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on September 24, 2008
  • Enable-ServiceEmailChannel

    Everyday is indeed a School Day and I had never come across this command util today!  The .NET service channel is introduced in Microsoft Exchange Server 2007 Service Pack 1 (SP1). This channel enables Exchange Server 2007 to store information that it will later forward to applications or devices that are not permanently connected to the ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on September 24, 2008
  • Get a list of scheduled tasks running on your exchange servers

    This is a handy little check.  If you want to see what scheduled tasks are running on your Exchange 2007 servers try this: Get-ExchangeServer | foreach-object{$srv=$_.Name.ToString(); write-host ''`n`n$srv''; schtasks /s \\$srv /query} Enjoy
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on September 15, 2008
  • Add a user to the local administrators group

    How cool is this ;-) $srv=hostname;([ADSI]''WinNT://$srv/Administrators,group'').Add(''WinNT://<Domain>/<Account>'')   
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on August 28, 2008
  • Findout who is logged on to a server

    Has a problem today where I couldn't RDP to an Exchange 2007 server ... so knocked this up ;-)  Get-ExchangeServer | foreach-Object {write-host $_.name; quser /server:$_}
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on August 27, 2008
  • Exchange 2007 Mailbox Server Role Storage Requirements Calculator

    I am sure you all know there is a new Storage Calculator out in the wild not, ver 15.6 I have downloaded and read the article and found a need to pass this script on to you all.  Basically about half way down is a link to Collectlogs VBS script Come on! a VBS .. must be able to do that in PowerShell ;-) .. Well you sure can, and here is ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on August 26, 2008
  • Exchange 2007: Offline Address Book

    So been automating some global configuration in Exchange 2007 today and wanted to share this.  I need to enable web distribution of the oab and couldn't find the Powershell ''check box''.  But cracked it.  You need to just populate the VirtualDirectories entry and it ''checks'' the Enable Web-bases distribution. The cheat was ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on August 20, 2008
  • Get-AllQueuesGUI.ps1 v1.4

    Update to this script too, basically a change from using Get-ExchangeServer in places to Get-TransportServer.  Also add a size column to the message tab. It will also log data to c:\ps\logs\<datefolder> Let me know what you think ;-)  
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on August 7, 2008
  • Get-AllQueues.ps1

    So another script .. This is actually a one liner but this is an easy wrapper.  The one liner is: Get-TransportServer | Get-Queue
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on August 7, 2008
  • Dump-Help.ps1 v1.0

    Recreation of an old script.  Basically this will run get-help for all commands and output it to c:\ps\help .. I like it ;-) ######################################################################################### $AppName = ''Dump-Help.ps1'' $AppVer  = ''v1.0 [7 August 2008]'' #v1.0 6 August 2008 : A script is Born # #This script ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on August 7, 2008
  • Get-ExchangeServerPLUS.ps1 v1.14

    Damm, has this script grown up recently. In a nut shell, this is the daddy of all scripts and gathers chunks of information from the Exchange Organisation and each Exchange Server by using a mixture of WMI, .Net and Exchange 2007 Powershell commands. The script can be run for just one server, by appending an server name to the command or with no ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on July 30, 2008
  • How to disable the "Sent by Microsoft Exchange Server 2007" branding sentence in an Exchange Server 2007 DSN message

    So Anderson posted this, and my initial thought was huh?  The KB didn't really explain either, so it was time for a test.  So the KB will allow you to remove the circled text below: And it's a nice simple PowerShell Command: Set-TransportConfig WritingBrandingInDSNEnabled $false But you do need to have Exchange 2007 SP1 with RU3
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on July 23, 2008
  • Exchange 2003 and Windows Powershell

    I just have to share this with you, as I was quite impressed by how quick I knocked this script up.  Basically I wanted to see how much email was queued up on my Exchange 2003 servers.  I had a feeling that a WMI object existed so I ran scriptomatic on a server a behold under root\MicrosoftExchangeV2 was Exchange_SMTPQueue. So the rest ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on July 3, 2008
  • Powershell Warnings

    Do you know how sometimes you write a script and the output looks lovely, but for some stupid reason a yellow warning message ruins it. Well my school day learning from today is that you can turn them off! So lets say I run this [PS] C:\PS>get-mailboxdatabase -server ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on June 3, 2008
  • Version 5 of the Mailbox Size Gui Script for Exchange 2007

    The king of exchange powershell scripting .. so here is v5 of the awesome mailbox size gui script by Glen.  This time he has added mailbox growth history.  Check it out and download it! http://gsexdev.blogspot.com/2008/05/version-5-of-mailbox-size-gui-script.html
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on June 2, 2008
  • get-PerfCounters.ps1

    I wrote this a while back, and just blew the dust off it. Meet get-PerfCounters.ps1  Basically you feed the script a csv file that has ''ServerName'' on the first line the first. The script will then loop the servers and get the following perf counters System\System Up TimeMemory\% Committed Bytes In UseMemory\Committed BytesMemory\Commit ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on May 23, 2008
  • Exchange Management Shell: TFM (eBook)

    Off the back of Eileen's post, I just couldn't resist a new ebook. So Exchange Management Shell: TFM is a 386 page secured! PDF document, with the last 8 being adverts for Sapien Press!.  The secured bit is a a major pain in the butt as you can't copy from the PDF doc.  So a PDF ebook, that has code snippets becomes kind like a paper ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on May 22, 2008
  • Windows PowerShell Scriptomatic

    ooh ooh ooh ... nice Source: http://www.microsoft.com/downloads/details.aspx?familyid=d87daf50-e487-4b0b-995c-f36a2855016e&displaylang=en   A new utility that writes Windows PowerShell scripts that harness the power of WMI (Windows Instrumentation Management) for use in system management and administration. This tool was created by ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on May 20, 2008
  • Exchange 2007 Messaging Tracking

    This is an interesting one I found.  We set Message Tracking on out Hub Role servers so it would purge the logs after 30 days .. nice and simple.  MessageTrackingLogEnabled               : ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on April 4, 2008
  • Exchange 2007 / Outlook 2003 / Blackberry & OoO

    I saw Andy posted this (http://telnetport25.wordpress.com/2008/03/16/quick-ish-tip-exchange-2007-setting-oof-for-users-via-powershell-2/) today and wanted to share my script. It uses the same dll from Glen(EWSOofUtil.dll) to open the specified users mailbox and Enable/Disable a users Out Off Office Setting. This in theory fixes an Issue with ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on March 28, 2008
  • Get-MSXBackupStatus.ps1

    So this is a script I knocked up to make sure Exchange is being backed up.  It does it by querying the LastFullBackup attribute of an Exchange Database. It groups servers by AD site, and I have this run as a scheduled task every day.  It also send and email. As a scheduled task I created a .cmd file with the following in ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on February 6, 2008
  • Powershell Array Comparison

    I am updating my Get-ExchangeServerPlus.ps1 and I wanted to check for a hotfix in the registry.  But I wanted the ability to add more checks by adding a value to an array. So my code is enumerating the registry using WMI and I wanted to check a registry key against my array.  I was thinking about for loops and then found this .. damm ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on January 30, 2008
  • Windows PowerShell Cookbook

    In my past life I used to program dBase and Foxpro.  I am the sort of programmer that is kind of lazy, and I like looking for samples of code and then working by code around it, or using the sample to get an Idea how to do stuff. Typically I use msdn and a number of blogs as my main source of stuff.  That was until I found the Windows ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on December 17, 2007
  • Get-AllQueuesGUI.ps1 (v1.2)

    I just have to share this with you.  So for those of us who have Installed Exchange 2007 RTM, you may have noticed that the queue viewer is a bit pants. Now I have not seen Exchange 2007 Service Pack 1, so maybe this is fixed, but when I look at queues I want to see ALL the queues and not just the one server (like the Queue Viewer) A while ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on November 28, 2007
  • PowerShell and EventLogs

    So I have been ''play'' with PowerShell again today, and I have trying to work out how to write an Event to the Eventlog. Richard gave me some code to do it with vbs, but I found this while surfing (it has taken an age to find!) http://winpowershell.blogspot.com/2006_07_01_archive.html Anyway, not I have found it the world is my oyster!  So ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on November 12, 2007
  • get-allqueues.ps1 v1.0

    Can remember if I posted this or not, but I forgot who handy it is. basically if just runs get-queue, but for all you Exchange 2007 Hub Transport Servers  Ah, but what is really cool is this .. You can do ''stuff'' with the output  So you could run [PS] C:\ps>.\get-allqueues.ps1 [PS] C:\ps>.\get-allqueues.ps1 | WHERE ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on November 9, 2007
  • get-exchangeserverplus.ps1 v1.3

    So after the release of Rollup Update 5, wouldn't it be nice if you could run a simple PowerShell script to check all your exchange servers and see what Rollup they have applied  Well now you can ;-) get-exchangeserverplus.ps1 It runs get-exchangeserver and enumerates a servers registry for the installation key and lists it out.  ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on October 31, 2007
  • Exchange 2007: Setup /NewProvisionedServer

    So I have been having some fun this setup switch and wanted to share some stuff with you .... so if your Exchange 2007 organization contains many Exchange servers, it is possible that more than one person will be installing Exchange 2007. As a result, you might not want every person who will install Exchange 2007 to have the permissions assigned ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on October 22, 2007
  • Test-SystemHealth

    Okay so we all know that Test-SystemHealth is basically ExBPAcmd with a nice wrapper.What I find interesting is that when I run it, it always ''Mailbox Role Checks'' even if it's run on a CAS or Hub Transport server. Well Test-SystemHealth does have a -roles but the help file says it's Reserved for internal use. However, you can use the ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on August 6, 2007
  • DynamicDistributionGroup for all users in a particular storage group

    Sorry Evan, but just to correct you a little bit. ;-) but you need <ServerName>\<SG> in get-mailboxdatabase and –organizationalUnit in New-DynamicDistributionGroup To create a DDL for each DB in an SG get-mailboxdatabase -StorageGroup <ServerName>\<SG> | % { New-DynamicDistributionGroup ''DDG-$($_.Name)'' ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on July 10, 2007
  • WindowsPowerShell [Get-Acl / Set-Acl]

    So might have guessed with my previous transport post that now I wanted to automated the moving of the logs and database to another drive. It is nice and simple, you can create a folder on the new drive and change the paths in the EdgeTransport.exe.config and by using Set-TransportServer. BUT I discovered that some of the folders have specific ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on July 6, 2007
  • Exchange 2007 MessageTracking

    So as you may know, MessageTracking in Exchange 2007 is pants.  Out of the box you can only track a message from one server and have to manually track messages from one server until the next.  The default MessageTracking doesn't even let you do this. So, this is one I made earlier ;-) A little PowerShell Script that requires a ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on June 27, 2007
  • Exchange 2007 Message Queue

    I wanted to see what was queued up on my Hub Transport servers and the Queue viewer didn't fit the bill, but this line of code did ;-) [PS] C:\ps>Get-ExchangeServer | where {$_.ServerRole -eq ''HubTransport''} | get-queue
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on May 30, 2007
  • Exchange 2007 Update Rollups

    So as you have read I have been playing with the two Update Rollups (1, 2)and the one things that gets me is that you have no way of knowing what patches are applied on what servers. Until now ;-) So I have written some PowerShell that will get a list of all your Exchange 2007 with the exception of Edge servers.  It then uses WMI to ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on May 9, 2007
  • WebService to Find Room and Equipment Mailboxes in Exchange 2007

    Time to blow the dust off my coding shoes and give this ago!... In Exchange 2007 one of the new features is resource mailboxes out of the box you have two types of these mailboxes Room mailbox and Equipment mailbox.http://gsexdev.blogspot.com/2007/04/webservice-to-find-room-and-equipment.html
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on April 11, 2007
  • Creating an AD Shell

    Ben you are the dogs whatits. This is just an awesome post on how to 1) Make ad admin simpler and 2) How to create your own pseudo-cmdlets.http://blogs.technet.com/benp/archive/2007/04/10/creating-an-ad-shell.aspxNow tie that in with some of Dmitry’s PowerBlog and you can fully manage an AD using Windows ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on April 11, 2007
  • MMS2007: Managing Systems Using PowerShell

    If you play with Windows PowerShell the this is a MUST.  It's a PPT with some .ps scripts and it's really quite interesting. Source: http://blogs.msdn.com/powershell/archive/2007/03/28/mms2007-managing-systems-using-powershell.aspx Jeffrey presented this talk at (''SW08 Managing Systems with PowerShell'') at MMS2007 in San Diego March ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on March 30, 2007
  • Windows 2003 Service Pack 2

    Now this could be an issue that the PowerShell guys have shared .... its good to talk! Source: http://blogs.msdn.com/powershell/archive/2007/03/19/windows-server-2003-sp2-upgrade.aspx Because of the nature of the Windows Service pack (SP) releases, all the windows updates are consumed by SP upgrade. So once you upgrade to a new SP all the ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on March 27, 2007
  • WMIC

    I am playing virtual tennis with Shawn today and he scored his first point with this (the game is at 15-40) In the past I have used ScriptomaticV2 or wbemtest to test WMI or get vbscript to dump WMI data.  Shawn showed me WMIC and I am very impressed.  It's not as good as using Windows PowerShell, but it is good. So if you using a ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on March 27, 2007
  • WMI Explorer

    Yeah yeah I hear you say I can use Scriptomatic so what is new .. Well Marc aka MOW aka the PowerShell Guy has just blogged a WMI Explorer written in Windows PowerShell. How Damm cool is this!  Source: http://thepowershellguy.com/blogs/posh/archive/2007/03/22/powershell-wmi-explorer-part-1.aspx You dont get the script samples like ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on March 26, 2007
  • AD Infrastructure management with PowerShell

    If you love Windows PowerShell then you must already read Marc Blog.  BUT this is just the dogs whatits! Source: http://thepowershellguy.com/blogs/posh/archive/2007/02/09/ad-infrastructure-management-with-powershell.aspx Being able to query the AD with just a few PowerShell commands if just awesome.  Check it out and try it now .. ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on February 14, 2007
  • Exchange 2007 RTM: Get-Tip

    I blogged this before with a Beta version of Exchange 2007.  Here is a dump of Get-Tip from Exchange 2007 RTM.  It turns out that we have 76 of them! [PS] C:\ps>1..76 | foreach { get-tip $_ } Tip of the day #1:To return all scripts that are found in your path, type:Get-Command -Type ExternalScript And for a useful shortcut, assign ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on January 16, 2007
  • PowerShell Invaders

    You have to check this out, it just ROCKS! and shows the power of Windows PowerShell! Source: http://ps1.soapyfrog.com/blog/files/space_invaders.html  
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on January 4, 2007
  • Updated Tube Gadget

    I have updated my tube gadget for Windows Vista Sidebar. Check it out here: http://files.flaphead.dns2go.com/tube.gadget.zip download it and remove the .zip and double click Enjoy and let  me know if you find any bugs or have any suggestions
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on January 3, 2007
  • Windows PowerShell SendMail / MailStorm script

    Okay here it is. Yes yet another send mail powershell script, but this is different! Oh yeah, it has loads of options and yet this a GUI! yeah a GUI!  Also you can send email to members listed on a CSV file and send more than one.  I suppose its actually more like a mailstorm program So copy it down, start up powershell and run ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on January 2, 2007
  • Converting VBScript Commands to Windows PowerShell Commands

    If like me your a VBScript coder and are having a few issues with Windows PowerShell, then this should help http://www.microsoft.com/technet/scriptcenter/topics/winpsh/convert/default.mspx or go to here http://www.microsoft.com/downloads/details.aspx?familyid=264CE487-1D36-4466-BD8B-23A7F1FA967E&displaylang=en and download the 65 page ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on December 6, 2006
  • PowerGagdets and NetCmdlets

    Saw this at IT Forum in Barcelona a few weeks back.  It just rocks! Download the trial and see for yourself! http://www.powergadgets.com/ Once you have it try these: get-process | out-chart -refresh 0:0:1 get-wmiobject win32_PerfRawData_PerfOS_Memory | out-gauge Also n/software have an addin, but I have not played with it yet.  You ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on November 26, 2006
  • Exchange 2007: Move Mailbox

    Want to move all mailboxes on your server to one database? get-mailbox | Move-Mailbox -targetdatabase ''first storage group\mailbox database''
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on November 26, 2006
  • More PowerShell

    Myself and Brett played with some coding last week and I wanted to share with you what we done. Brett’s original script is to deploy an Exchange 2007 server.  It basically runs setup, installs exchange and then imports data from a number of CSVs and creates StorageGroups, Databases and address lists. So I was also thinking that it ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on November 26, 2006
  • Windows PowerShell RTM

    What a month this is turning out to be. So today Windows PowerShell RTMed and is available for download. If you script, you NEED to check this out, it ROCKS! Source: http://blogs.msdn.com/powershell/archive/2006/11/14/windows-powershell-1-0-released.aspx You can get the English version from here: ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on November 14, 2006
  • Windows PowerShell Week Magazine

    Check it out http://www.microsoft.com/downloads/details.aspx?familyid=9fb32b6c-e847-4488-a242-d76bee92a21b&displaylang=en
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on November 9, 2006
  • Introduction to the Exchange Management Shell Updated V2 25 Oct 2006

    http://www.microsoft.com/downloads/details.aspx?FamilyID=1dc0f61b-d30f-44a2-882e-12ddd4ee09d2&DisplayLang=en This download contains an introduction to key Exchange Management Shell features. Microsoft® Exchange Server 2007 introduces a new management platform called the Exchange Management Shell, based on Microsoft Windows® ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on October 26, 2006
  • Windows PowerShell TechNet Webcasts

    Looks like a weeks worth of Windows PowerShell Webcasts.  The times for the rest of the world are a bit pants - 1930 - 2100 UK time! They are only level 200, but a good place to start 6 Nov 2006 TechNet Webcast: And Now for Something Completely Different: Introducing Windows PowerShell (Level ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on October 23, 2006
  • Testing with the Ex2007 Default ReceiveConnector

    Thank you Brett, I have been having heart ache trying to work out to send emai to my test server. Check it out (http://blogs.technet.com/brettjo/archive/2006/10/13/testing-with-the-ex2007-default-receiveconnector.aspx) .. its easy really [PS] ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on October 17, 2006
  • PowerShell and Where

    This took me a while to work out, and was quite easy once I found how.  So I basically wanted to like out events from the security event where the message equalled something and the event had a pairticular id. I searched the web and found nowt (as expected) so here is my command: Get-eventlog security | where {($_.Message –ilike ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on October 3, 2006
  • Windows PowerShell Quick Reference

    Check it out now funk soul brother Source: http://www.leeholmes.com/blog/PermaLink,guid,52ee0531-c24c-4fd5-8eed-d05c6ec48ca0.aspx Lee has created a downloadble PowerShell Quick Reference Guide. Just forked out $12.99 and it looks good. 115 pages of pdf.  Not had a chance to give it a good look yet but I will
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on October 2, 2006
  • PowerShell range operator for other types

    This is quite good! check it out  Source: http://www.leeholmes.com/blog/PermaLink,guid,25ff56a2-9e8e-4778-b319-4122ad7154ea.aspx The PowerShell range operator allows you to generate lists of numbers out of more compact expressions
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on September 13, 2006
  • Getting Disk Usage Information

    Nice bit of code and uses WMI! Source: http://jtruher.spaces.live.com/Blog/cns!7143DA6E51A2628D!138.entry Some of you might know that I've spent a lot of time on UNIX systems.  One of the scripts that I used a bunch was /etc/dfspace.  If you don't know what dfspace is, it's a simple wrapper for df that provides disk usage info in ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on September 13, 2006
  • Powershell and the Registry

    Brett touched on this a while back, and I just wanted to pad things out a bit. So as brett mentioned, you can access the registry like a file system in powershell.  So start up powershell and type: PS C:\> sl HKLM: PS HKLM:\> Now you can sl, cd and chdir are all an alias for Set-Location, so you can use either.  You can see the ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on September 8, 2006
  • Exchange scripting

    Been looking for some stuff on creating public folders and stumbled across this. Source: http://h71019.www7.hp.com/ActiveAnswers/cache/70499-0-0-225-121.html?jumpid=reg_R1002_USEN It’s damm good, and has source code.  Check out the E2KWatch script in H)Part 2: Scripts for Managing Exch2K with WSH
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on September 8, 2006
  • Outputting Powershell Commands

    My buddy Brett asked me about this a few weeks ago and I never managed to get to him .. sorry buddy! So I decided to come back to everyone. After playing with powershell a bit you get an idea of the power you have.  So something that really makes it rock is the ability to pipe the output from a command to another command. So I have a few to ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on August 31, 2006
  • Creating a new mailbox using Powershell and specifying the password

    This is a good script from Ben Source: http://winzenz.blogspot.com/2006/08/creating-new-mailbox-using-powershell.html Check the blog for more details, but the script is here: $password = Read-Host ''Enter password'' -AsSecureString New-mailbox -UserPrincipalName chris@contoso.com -alias chris -database ''Storage Group 1\Mailbox Database ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on August 31, 2006
  • More mentions

    Not many people pay any attention to what I do, but it’s good when you start getting credit from people that do. I posted Exchange 2007 Powershell: Get-Tip a while back and Mr Exchange PowerShell himself picked it up … Thanks Vivek http://www.viveksharma.com/techlog/2006/08/20/blog-hiatus-or-how-to-really-enjoy-your-summer/
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on August 31, 2006
  • Exchange 2007 Powershell: Get-Tip

    You know if you start the Exchange Management Shell, it gives you a “tip”.  Well it would seem that it has 80 of them!  So I thought it would be good to list them all out You can just type get-tip in the Exchange Management Shell, but if you want a specific one type get-tip 8 and you wil get #8.  Anyway here is ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on August 17, 2006
  • Powershell 101: IF .. Else

    Okay as a beginner this took a bit of time to perfect so here goes. For some of you hardened programmers this might be a bit basic, but I had to start somewhere.  My background is cmd and vbs files with some html chucked in, so this syntax is new to me Simple IF, Else$a = ''Powershell'' IF ($a -eq ''PowerShell'') {  ''Statement is ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on August 14, 2006
  • Windows PowerShell Help Tool

    Found this and thought it worthy of sharing.  http://www.sapien.com/download.aspx?file=pshhelp You will download PowerShellHelpSetup.exe.  Once installed it will plonk itself under C:\Program Files\SAPIEN Technologies, Inc\PowerShellHelp you will find PowerShellHelp.exe Enjoy
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on August 7, 2006
  • Windows PowerShell .. Updated 8 Aug 2006

    Okay so I am joining the craze and I wanted to start with a list of resources I have discovered so far: Blog of Windows PowerShell team: http://blogs.msdn.com/powershell/ Windows PowerShell ScriptCenter:  http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx Vivek Sharma: http://www.viveksharma.com/techlog Glen's Exchange Dev ...
    Posted to Carpe Diem: Flaphead.com (Weblog) by paul on August 2, 2006
1 2 Next >
Powered by Community Server (Personal Edition), by Telligent Systems