Archive for powershell

06.04.09

Moving Public Folders

Posted in OS, win2003, powershell at 11:01 am by webmaster

I have come accross the need to move public folder content from one machine to another (This is not a SBS environment.)

There are generally two ways in the Exchange 2007 era you can do this.  If both machines are in the same forest you can use Powershell.  If the machines are not in the same forest (not connected - migration scenerio) you can use Outlook.

Powershell

MoveAllReplicas.ps1 -Server -NewServer

How to Move Public Folder Content from one Public Folder Database to Another Public Folder Database

 

Outlook Method

  1. Use an account on Office Outlook 2003 or 2007 client computer that has administrative rights to log on to a mailbox on the Exchange Server 2007.
  2. In Outlook, on the File menu, click Import And Export. If the menu item is not available, hover your pointer over the chevrons at the bottom of the menu, and then click Import and Export.
  3. Click Export To File, and then click Next.
  4. Click Personal Folder File (.pst) , and then click Next. Click the public folder, check the option “Include Subfolders” and then click Next.
  5. Click the Browse button, and then select the location to save the .pst file.
  6. In the File Name box, type a descriptive file name for the .pst file, and then click OK.
  7. Click Finish.
  8. Log off the Outlook client.
  9. From the Outlook client, use an account that has administrative rights to log on to a mailbox that is homed on the Exchange 2003 computer.
  10. In Outlook, on the File menu, click “Data File Management”
  11. Click Add button, choose “Office Outlook Personal Folder File (.pst)” and click Ok
  12. On the open window, navigate to the PST we just exported.
  13. Choose it and click OK
  14. Then, check the added folder in Outlook.
  15. Drag the folders from the Personal Folders folder to All Public Folders in the Outlook folder list.

07.03.07

Powershell for the IT Professional

Posted in powershell at 11:41 am by webmaster

Powershell is a new scripting language for Windows that is very powerful.  It provides many of the benefits that UNIX provided years ago including things *real* support for regular expressions.  What follows is a short kickstart to get you up and running in powershell.

  1. Download and install powershell
  2. Start –> All Programs –> Windows Powershell
  3. Use the following following commands to see what Powershell can do (Format Verb-Noun)
    1. Get-Help
    2. dir | get-member | more
    3. Get-Service | get-member
  4.  Use powershell do run all your favorite dos/batch and vbscript scripts and commands.
    1. netstat -an | find “ESTABLISHED” should now be
    2. netstat -an | find `”ESTABLISHED`” (Escape the double quote with a backtick) Or you can use the Powershell version
    3. netstat.exe -an | select-string “ESTABLISHED”
  5. Navigate to the following site and run through all the examples there:
    1. http://www.computerperformance.co.uk/powershell/index.htm
  6. Readup on .Net framework.  Since Powershell is based on .Net Framework knowing it will certainly help you get around in Powershell
    1. http://en.wikipedia.org:80/wiki/.NET_Framework Summary
    2. http://msdn2.microsoft.com/en-us/library/aa388745.aspx Programming interface
    3. http://msdn2.microsoft.com:80/en-us/library/zw4w595w(vs.71).aspx Technet .Net Framework overview