Archive for the 'Scripting' Category

Article: An Administrator’s First Look at PowerShell in Communications Server “14″

Windows PowerShell support officially debuts in Communications Server “14″. Through the CS Management Shell, you can perform all your CS infrastructure management tasks and carry out user administration at the command line or package them into scripts to automate common routines.

Communications Server

My latest Simple-Talk article entitled “An Administrator’s First Look at PowerShell in Communications Server 14” is designed to help you quickly get up to speed with this exciting technology. After a brief history of WMI and PowerShell, you will understand how to optimize search for help to learn (even) more about the various cmdlets and their applications. Subsequently, you will be looking at the new CS “14″ scopes, configuration settings and policies, and how to efficiently conduct administrative tasks by utilizing smart filtering techniques aim at your target objects, before ending with a look at some of the management essentials to better prepare yourself for deploying CS Management Shell in “14″. Have fun!

( this article was written based on the CS “14″ beta milestone bits )

Technorati tags: PowerShell, LCS/OCS/CS14, Communications Server 14

No Comments »

A Free Notepad Alternative

Free for personal, non-commercial and educational use, PrimalPad is an advanced editor with built-in color-coding, multiple tab/window, auto row (line) numbering, bookmarking and multi-level undo/redo support, to name a few. This single, no-installation-required executable is available in 32- and 64- bit versions and supports authoring scripts in PowerShell, VBScript, JScript and plain old text files. Check it out yourself to see how it can make your life as an IT Administrator (or developer) easier and less error prone in writing that script!

Technorati tags: PowerShell, Community/User Groups

No Comments »

CS “14″ System Requirements (Server Roles)

Looking at the excitement around Communications Server “14″, one of the most common question that an IT Professional or administrator should always ask about is the system requirements. Whether in a test, proof-of-concept (POC), migration/co-existence or production environment, a successful roll-out and trouble-free operations require thorough considerations of all aspects of the CS “14″ specifications.

Communications Server

In this blog post, you will find a summary that you can adopt as a guide to the recommended requirements. Microsoft noted that the enterprise configuration is tested to be capable of supporting up to 10′000 user pool with ten Front-End and one SQL Back-End physical servers running all CS “14″ modalities. Naturally your mileage may vary depending on your unique environment.

Unless otherwise stated, the suggested configurations are applicable to all CS “14″ roles (Front/Back-End, Edge, Monitoring, Archiving, etc.). They are based on official information released during Tech.Ed NA 2010 (New Orleans) and are subject to change.

Hardware Requirements

  • Intel/AMD CPU 8-core x64 (dual quad-ore) 2.00GHz+
  • 12 GB+ (Front-End), 32 GB+ RAM Memory (Back-End)
  • 72GB+ size, 10K+ RPM hard disk storage (multiple spindles preferred)
  • 2 network adapters, 1 Gbps+ (with 1 NIC dedicated for CS “14″)

Software Requirements

Apart from those that are shipped in the Windows platform, CS “14″ will prompt you to install the necessary setup prerequisites for the selected server roles/services if they are missing (marked with *):

  • x64 editions of Windows Server 2008 R2 or Windows Server 2008 SP2 (Standard, Enterprise, Data Center Editions)
  • Windows PowerShell v2.0 RTM
  • .NET Framework 3.5 SP1
  • selected IIS modules e.g. IIS logging*
  • IIS Rewrite Module 2.0 (redistributable)*
  • Visual C++ 2008 (redistributable)*
  • Message Queuing (MSMQ)*

Back-End Database

The Standard Edition of CS “14″ comes with SQL 2008 Express Edition and is automatically installed as an integral part of the server role. For the Enterprise Edition, the back-end requirements are listed here. As of this writing, no announcement has been made for the support of SQL Server 2008 R2.

  • Microsoft SQL Server 2008 SP1 or SQL Server 2005 SP3
  • x86 or x64 editions of SQL Server (64 bits recommended)
  • SQL 2005 Back Compatibility Mode*

Active Directory Environment

The Forest and Domain Functional Levels can be one of the following listed. Note that Read-only Domain Controllers (RODC) are supported and no specific Windows Server 2008 R2 features are used by CS “14″.

  • Windows Server 2003
  • Windows Server 2008
  • Windows Server 2008 R2

On top of the pre-requisites for software requirements, the “Active Directory Domain Controller Tools” feature and CS “14″ PowerShell Provider are required if the AD Schema Prep step were to be performed remotely on a member server.

Technorati tags: LCS/OCS/CS14, Communications Server 14

No Comments »

CS “14″ PowerShell: The Mystery of Get-CsUser and Get-CsAdUser

While preparing for my new article(s) on Communications Server “14″ PowerShell, I had to run some tests using the new CS Management Shell. Specifically, I was looking for AD users that have not yet been enabled in CS.

The CsEnabled property is present in both the Get-CsUser and Get-CsAdUser cmdlets so I started off with the latter:

PS C:\> Get-CsAdUser -Filter {CsEnabled -eq $False} | ft
SamAcco Sid SidHist Passwor UserAcc UserPri Primary Id AltSecu Assista
untName ory dLastSe ountCon ncipalN GroupId rityIde nt
t trol ame ntities
——- — ——- ——- ——- ——- ——- — ——- ——-
Admi… S-1-… {} …ount 513 CN=A… {}
Guest S-1-… {} …word 514 CN=G… {}
krbtgt S-1-… {} …ount 513 CN=k… {}

So far so good. When I switch over to use Get-CsUser, it returned no results:

PS C:\> Get-CsUser -Filter {CsEnabled -eq $False} | ft
WARNING: No result found.

Curious as to why this turns out to be the case, I changed the filter to $true:

PS C:\> Get-CsUser -Filter {CsEnabled -eq $true} | ft
SamAcco UserPri FirstNa LastNam Windows Sid LineSer Origina AudioVi IPPBXSo

untName ncipalN me e EmailAd verURI torSid deoDisa ftPhone ame dress bled Routing Enabled
——- ——- ——- ——- ——- — ——- ——- ——- ——-
fchan fcha… Freddy Chan S-1-… False False
wmue… wmue… Wendy Mueller S-1-… False False
wfou… wfou… wave four… S-1-… False False

As expected, CS-enabled users showed up in the query. The same set of results was returned with Get-CsAdUser.

Although both cmdlets are designed to work with user accounts, Get-CsADUser is the sole one that will return all aspects of an AD account information regardless of whether an account is Cs-enabled or not. In contrast, Get-CsUser deals explicitly with accounts that are *already* Cs-enabled.

The reason behind this is that attributes specific to CS are added to an account when it is Cs-enabled. The CsEnabled is one property that allows Get-CsUser to correctly determine the CS status (configured using Set-CsUser or Enable-CsUser). Through Disable-CsUser, the Cs-related attributes are permanently deleted while keeping everything else known about the AD account. This effectively means that the account is no longer enabled for CS. In order to maintain these CS specific information, you should use the Disconnect-CsUser.

Besides the CsEnabled property, the following is a list of overlapping attributes that are present in both Get-CsUser and Get-CsAdUser:

CsEnabled
DisplayName
Identity
SamAccountName
SipAddress
TenantId
UserPrincipalName

So the conclusion is - use the right cmdlet with care!

See “Properties Returned By Get-CsUser and Get-CsAdUser” for more information on this subject (where I had the pleasure to work with Greg from the CS PowerShell team to investigate this).

Technorati tags: PowerShell, LCS/OCS/CS14, Community/User Groups, Communications Server 14

No Comments »

Update: Swiss IT Pro User Group Event: Tue 6 Jul 10

Due to an unforeseen event, Marc thepowershellguy.com will not be able to moderate the PowerShell Script Club session as part of the Swiss IT Pro User Group every 1st Tuesday monthly event.

Same time, same place (Tue 6 Jul 10 from 1815 hrs UTC+2) in its place, I shall be delivering a presentation on the following topic. The other session on Communications Server “14″ First Look will go on as planned.

PowerShell Script Club – Introduction to PowerShell Remoting

Windows remoting is a new feature in Windows PowerShell and widely deployed in many Microsoft enterprise applications from Exchange 2010 to the new Communications Server “14”. What is actually the fuss about? What do I need to start using this advanced feature? This presentation will walk you through with a basic introduction to this essential topic.

The entire team and community looks forward to seeing you in person!

Technorati tags: PowerShellLCS/OCS/CS14, Community/User Groups, Communications Server 14

No Comments »

Swiss IT Pro User Group Event: Tue 6 Jul 10 - Communications Server “14″ First Look and PowerShell Script Club

The Swiss IT Pro User Group’s next every first Tuesday monthly evening event will take place as usual in Zurich on 6 July 2010. We shall have a first look at Communications Server “14″ and the PowerShell Script Club by our very own resident MVPs!

A brief abstract of the breakout sessions is outlined here:
PowerShell

Script Clubs are like a hands on lab with no set topic or teacher. You bring an idea for a script, and ask your fellow PowerShell users for help getting the script written …

Communications Server 14

The full feature set of Communications Server “14″ was officially disclosed at the recent TechEd North America 2010 conference in New Orleans. Come hear about the exciting changes in areas of functionality, deployment, management, virtualization and PowerShell support, among others …

Free registration and more information here. See you there!

Technorati tags: PowerShellLCS/OCS/CS14, Community/User Groups, Communications Server 14

No Comments »

Communications Server 14 PowerShell Blog

Windows PowerShellNew in Communications Server 14 is the ability to manage, administer and automate the Unified Communications infrastructure with the CS PowerShell Management Console.

In earlier implementations of OCS 2007 RTM and R2, administration using PowerShell can be achieved by calling into the WMI repository via the Get-WmiObject cmdlet. This can target local and remote machines.

Communications Server 14

With CS 14, the WMI model is no longer available. Instead, you can now use native cmdlets exposed via the CS 14 PowerShell Module (not PSSnapin). In fact, the CS 14 management interface and Communications Server Control Panel (CSCSP) are all built to run on PowerShell*.

To help you get up-to-speed, the all new Communications Server 14 Powershell Blog is now open for business. To quote - “this blog is going to be your one-stop shop for all things Communications Server 14 PowerShell”. Go check it out today!

PS: I am typing away at the just concluded “WSV401: Advanced Automation Using Windows PowerShell 2.0″ breakout session at Auditorium B (New Orleans Morial Convention Center).

* see UI-to-PowerShell Mapping

Technorati tags: LCS/OCS, OCS 2007 R2, TechEd, PowerShell

1 Comment »

Swiss IT Pro User Group Event Tue 1 Jun 2010 - PowerShell Script Club (Zurich)

Reminder - Windows PowerShell PowerShell Script Club next Tuesday 1 Jun 2010 in Zurich. This is moderated by our very own PowerShell MVP. Bring your questions and/or answers to share with your fellow IT Pro peers!

Registration for this free event and more information here. If you are interested and are located outside of Zurich (anywhere in the world), please tell us anyway by posting a comment with your real email address*. With enough interest, we may extend this with Live Meeting and make it a regular event :-)

* will be kept private

Technorati tags: PowerShell, Community/User Group, Events

No Comments »

PowerShell and OCS 2007

TechNet Next Hop (Unified Communications)A topic very close to heart is Windows PowerShell. With its interactive shell and scripting capabilities, you can administer OCS 2007 / R2, Exchange 2003 as well as perform typical Active Directory tasks (pre-Windows Server 2008 R2).

Although these platforms did not come with any native PowerShell support or management console like that in Exchange 2007/2010, it is still possible to manage them using the built-in Get-WMIObject. This is true since PowerShell v1.0 and virtually any product with WMI repository is supported. This particular cmdlet is one of the very few that can be deployed to remotely administer a system with exciting enhancements introduced in v2.0.

From TechNet Edge video, TechEd/TechDays events, user group meetings, blog posts to technical articles, I have covered this and related topics in varying degrees and depth for some time now (see here for more). Recently, a feature article in TechNet Next Hop was posted.

Entitled “Ten Steps to PowerShell Scripting with Office Communications Server 2007 R2“, the article walks through the basics of setting up PowerShell to the use of Get-WMIObject and the functions delivered in OCS-r2.ps1 (OCS-All.ps1) as part of the OCS 2007 R2 Resource Kit. The author also provided a number of useful functions that work with LDAP queries and the OCS back-end SQL databases to soliciting and validating user information.

IT Pros looking to deploy Windows PowerShell should consider using this article as a guide to manage OCS 2007 in their Active Directory environments.

Technorati tags: LCS/OCS, OCS 2007 R2, PowerShell

No Comments »

Swiss IT Pro User Group Event May/Jun 2010 - PowerShell Script Club

PowerShell Mark your calendars for the next Swiss IT Pro User Group events. Taking place on the first Tuesday of every month in Zurich, you are invited to join the PowerShell Script Club on 4 May and 1 Jun 2010. This is moderated by our very own PowerShell MVP.

Registration for this free event and more information here.

Technorati tags: Windows 7, Windows Server 2008 R2, PowerShell, Community/User Group, Events

No Comments »

Next »