Posts from 2012

SkyDrive Limits Update

Today, Microsoft released its latest revision to the Windows Live SkyDrive file hosting and sharing platform. As a result of the change, the user storage limits have been reduced from 25GB to 7GB. If you have an existing Windows Live ID, then as a loyalty reward, you can get a free upgrade to 25GB, allowing you to keep your existing storage limit.

To do this, simply login to SkyDrive at http://skydrive.live.com, login as normal and select the Upgrade banner near the top of page. Hurry though as this is being reported as a limited time offer.

Supported SQL Server Versions for System Center 2012

Following on from my post SQL Disk Space Error Installing SCAC 2012 I contacted Microsoft Premier Support to confirm the supported service pack levels for SQL Server 2008 because the release notes were very wooly as to whether Service Pack 3 was supported as well as the stated Service Pack 2.

Here is the response I recieved from them:

When I sent my request to the product group, the Group Program manager for SC 2012, replied back that those products listed are the only ones that were tested and thus fully supported.

It is entirely possible that you could run with SQL 2008 SP3 with no issues, but if a problem is encountered related to the databases we may request you relocate the database to one of the listed SQL platforms.

Until SQL Server 2008 with Service Pack 3 is recognised as tested and supported, I’d recommend that you just go with Service Pack 2 and install the latest Cumulative Update, which is currently Cumulative Update 9.

SQL Disk Space Error Installing SCAC 2012

When installing SCAC (System Center App Controller) 2012 RTM yesterday, I encountered an error at the SQL database definition step “The Specified Database has Insufficent Disk Space”.

Let it be a lesson to us all to properly review the release notes prior to installing products. http://technet.microsoft.com/en-us/library/gg696060.aspx

SCAC (System Center App Controller) supports the following SQL database servers:

SQL Server 2008 Standard and Enterprise with Service Pack 2
SQL Server 2008 R2 Standard, Enterprise and Datacenter

Suprisingly though, the release note make no mention as to whether service pack levels above those stated are supported (such as SQL Server 2008 with Service Pack 3 or SQL Server 2008 R2 with Service Pack 1). One would assume that they will support any upward versions and that the versions stated as the minimum supported, but you never know?

Typo in SCAC 2012 AppControllerSetupWizard Log

When installing SCAC (System Center App Controller) 2012, you may need to review the installation logs. These are placed in the %UserProfile%\AppData\Local\Temp\AppController\Logs path.

Reviewing the log today, I found a typo in the file. It’s not anything that’s going to effect the installation, but worth noting if you are trying to search the log files for particular keywords.

10:14:02:RemoveConceroRegistry: Removing registry key on rollbak.

This should obviously read rollback not rollbak.

HTML Webpart to Hide Quick Launch in SharePoint

I’m currently running a test lab for the purposes of development of a Version 4 Master Page and CSS Stylesheet for SharePoint 2010 to replace the legacy Version 3 UI we are using at work. Whilst developing my flash new fixed width master page and layout I wanted to be able to hide the quick launch on the homepage so that I had the full width of the layout to give the site an eye-catching look.

Using the HTML Webpart we are able to inject some inline CSS Styles which do this for us.

Add the HTML Webpart anywhere on the page that you want to hide the Quick Launch on and add the following source code to it:

<style type=”text/css”>
/* Hide Quick Launch on Homepage */
#s4-leftpanel {
display:none;
}
.s4-ca {
margin-left:0px;
}
</style>

Make sure you configure the Webpart as Modeless so that the users don’t see the title of what is essentially a blank Webpart shown in the interface, and that’s it.

Living the Dream: Exchange, SharePoint and Lync

If you happen to work for a Microsoft prodominant environment and you either are thinking about deploying the holy trinity of Exchange, SharePoint and Lync or you are interested in the integration between the services, then check out these two posts from DrRez on the TechNet Blogs. These two posts go into techincal detail about the integration between the services and how to actually setup some of them.

http://blogs.technet.com/b/drrez/archive/2011/04/26/lync-2010-exchange-2010-sharepoint-2010-and-office-2010-integration-part-1.aspx
http://blogs.technet.com/b/drrez/archive/2011/04/27/lync-2010-exchange-2010-sharepoint-2010-and-office-2010-integration-part-2.aspx

One nugget I learnt from reading it was that for Exchange to see the LDAP thumbnailPhoto attribute to allow it to publish the pictures into the Global Address List and Outlook clients is that you ust update the AD Schema to allow replication of the thumbnailPhoto attribute to Global Catalog servers.

Import Custom Phyiscal Resources in VMM 2012

This evening, I have been working to create some Physical Resource Packages in System Center VMM 2012 for a project at work. VMM by default supports the following file types and extensions for resources:

  • Answer Files (.inf .ini .xml)
  • ISO Images (.iso)
  • Script Files (.ps1 .sql)
  • Virtual Floppy Disks (.flp .vld)
  • Virtual Hard Disk (.vhd .vmdk)

The resource package I am trying to create will be used as part of an Application Profile to allow VMM to install a server-side application as part of a Service Template Deployment, however as the installation file consists of a .msi Windows Installer Package, VMM wouldn’t import it.

Looking at the pre-defined resource packages, I noticed that the Server App-V and the Web Deploy resource packages contained .msi files and they were imported okay, so what was the difference?

The difference is in the handling. VMM by default asks for a folder path where your custom resources reside after which it will import them into a library. By default, once you provide a path, VMM will import all supported objects from path. To add unsupported objects such as .exe and .msi files for Application Profiles, you must append the folder name for your source files with .cr.

This addition causes VMM to import the entire folder regardless of content. In my example, my folder name went from Microsoft_iSCSI_Software_Target to Microsoft_iSCSI_Software_Target.cr and VMM now has the package imported.

Building Active Directory Based Outlook Signatures – Update

Looking through our corporate Global Address List last night after posting my original article at http://richardjgreen.net/2012/02/24/building-active-directory-based-outlook-signatures/, I discovered a couple of special case users.

In our company, we have two users with identical names, so to differentiate between them, their names in Active Directory have been modified to include their department as a trailing item. For example:

  • Richard Green (ICT)
  • Richard Green (HR)

In the Outlook signature, it is pretty redundant having this included in the name as the department is shown on the following line, so I’ve added a new section to the script which will trim this information.

Firstly, you need to update the Dim statement at the top of the script to include a new integer.

Dim intNameLen

Once you have declared the integer, add the following section. I’ve added it between the existing country specific configuration and the phone number internationalisation sections, but so long as it gets defined before the building of the signature it will work.

If InStr(1, strName, "(") > 0 Then
    intNameLen = InStr (strName, "(")
    intNameLen = intNameLen -2
    strName = Left(strName, intNameLen)
Else
End If

First, we need to look to see if an opening bracket exists in the string using InStr. If there is a bracket present then we move into the If statement, otherwise we move into the empty Else statement and then continue through the script.

Within the If statement, first, we find the character position of the opening bracket using InStr again, but this time we push the value into the intNameLen integer variable. Next, we need to take into account that InStr will return the position of the bracket itself, but as we want to remove the space between the name and the bracket symbol we need to reduce the value of the intNameLen variable by two.

Once we’ve subtracted two from the value, we can use Left to retrieve the value of the strName variable, but only the name portion by excluding the trailing department tag, then save the name back into the strName variable.

Building Active Directory Based Outlook Signatures

One thing that many companies strive for is a consistent brand identity. There is many reasons for wanting this is anything just to appear to be a professional, unified front your customers. With email being one of the most prevalent communication forms in industry today, one of the best ways to achieve this brand identity.

Active Directory Directory Services, being the centralised gatekeeper of corporate information in a Microsoft environment, the service which feeds Exchange, SharePoint, Lync and many other services with user identity data is the ideal place to get the information needed to generate these signatures.

The key to making this work however is the dynamic automation. Any company can have their Marketing or HR department send a mail shot to the entire company asking the users to update their own signatures in Outlook, but there is always room for ‘creativity’ with this scenario; users trying to make small or subtle changes to the intended design affecting the corporate image.

Luckily, Outlook, or more specifically Word as a good Visual Basic for Applications (VBA) interface for programmatically generating documents and Active Directory Directory Services is one of the most easily and commonly accessed systems via VBScript.

The following script, broken down into chunks explained to allow you to make the script work for your own needs does exactly this.

Option Explicit
On Error Resume Next

Dim objSysInfo, strUser, objUser, strName, strJobTitle, strDepartment, _
    strCompany, strExtension, strPhoneLocal, strPhoneIntl, strMobileLocal, _
    strMobileIntl, strEmail, strCountry, strWebAddress, strPhonePrefix, _
    objWord, objDoc, objSelection, objEmailOptions, objSignatureEntries, _
    objSignatureObject

The opening section quite simply tells the Windows Script Host to only accept variables which are defined (Option Explicit). Many people omit this option from scripts for simplicity of coding, however I think that it’s lazy. Defining your variables with a Dim statement means you know that no rogue variables exist and it helps to prevent typos down the line.

The next line (On Error Resume Next) tells Script Host to continue running the script even if an error occurs. This is needed to prevent the script from generating popup alerts on client computers were the script is running, potentially confusing users. So long as you thoroughly test the script before deploying it, you can be safe in the knowledge that errors won’t happen, but better safe than sorry.

Set objSysInfo = CreateObject("ADSystemInfo")

strUser = objSysInfo.UserName
Set objUser = GetObject("LDAP://" & strUser)

Here the connection to Active Directory Directory Services is made The connection is made in the context of the logged on user and is then placed into a variable.

If Err.Number <> 0 Then
    WScript.Quit
End If

This section is vitally important in environments with laptop users. If a connection to the domain is not available and this section isn’t included then the script will continue to run, and the user will end up with a very nasty looking signature. If a domain connection cannot be established at this point then the script will exit before anything is modified in the signature, so any exiting signature will continue to take effect.

strName = objUser.fullName
strJobTitle = objUser.title
strDepartment = objUser.department
strCompany = objUser.company
strExtension = objUser.telephoneNumber
strPhoneLocal = objUser.otherTelephone
strMobileLocal = objUser.mobile
strEmail = objUser.mail
strCountry = objUser.co

This section maps the user object attributes to the script variables. Depending on how you use the various attributes in Active Directory, you may need to tweak this, or if you want to pull more information such as building or office address. The format for each attribute is objUser.attributeName. Using a tool such as ADSI Edit will allow you to view all of the attributes in the schema for the user object and their LDAP names.

Select Case strCountry
Case "United Kingdom"
    strWebAddress = "http://www.testcorp.co.uk"
    strPhonePrefix = "+44 "
Case "Ireland"
    strWebAddress = "http://www.testcorp.ie"
    strPhonePrefix = "+353 "
Case Else
    strWebAddress = "http://www.testcorp.co.uk"
    strPhonePrefix = ""
End Select

For some people, this section might not be needed so you could instead simply define the strWebAddress and strPhonePrefix variables. My test lab environment emulates a multi-national company and as such you want each users’ signature to reflect their region. The Case statements evaluate the value in the Country attribute in Active Directory and based on it set the country dialling code and the regionalised web address. Make sure you define a Case Else statement to catch any users who don’t have a Country defined.

If strPhoneLocal = "" Then
Else
    If Left(strPhoneLocal, 1) = "+" Then
        strPhoneIntl = strPhoneLocal
    Else
        strPhoneIntl = strPhonePrefix + Right(strPhoneLocal, Len(strPhoneLocal)-1)
    End If
End If

If strMobileLocal = "" Then
Else
    If Left(strMobileLocal, 1) = "+" Then
        strMobileIntl = strMobileLocal
    Else
        strMobileIntl = strPhonePrefix + Right(strMobileLocal, Len(strMobileLocal)-1)
    End If
End If

Here, the phone numbers retrieved from Active Directory are evaluated and if needed converted to international dialling format. The statements take the first character from the direct dial and mobile phone numbers and if it begins with a plus symbol then no conversion is done and the number is taken literally. If the first character is not a plus symbol, then the first number is removed and replaced with the country dialling code determined in the previous code block.

Set objWord = CreateObject("Word.Application")

Set objDoc = objWord.Documents.Add()
Set objSelection = objWord.Selection

Set objEmailOptions = objWord.EmailOptions
Set objSignatureObject = objEmailOptions.EmailSignature

Set objSignatureEntries = objSignatureObject.EmailSignatureEntries

Const wdParagraph = 4
Const wdExtend = 1
Const wdCollapseEnd = 0

objSelection.Font.Color = RGB(0,133,200)
objSelection.Font.Bold = True
objSelection.TypeText strName
objSelection.TypeText Chr(11)

objSelection.Font.Color = RGB(128,128,128)
objSelection.Font.Size = 10
objSelection.Font.Bold = False
objSelection.TypeText strJobTitle & ", " & strDepartment
objSelection.TypeText Chr(11)
objSelection.TypeText strCompany
objSelection.TypeParagraph()

objSelection.TypeText "Internal: " & strExtension

If strPhoneIntl = "" Then
Else
    objSelection.TypeText " | " & "External: " & strPhoneIntl
End If

If strMobileIntl = "" Then
Else
    objSelection.TypeText " | " & "Mobile: " & strMobileIntl
End If

objSelection.TypeText Chr(11)

objSelection.TypeText "Email: "
objDoc.Hyperlinks.Add objSelection.Range, "mailto:" & strEmail,,,strEmail
objSelection.TypeText " | " & "Web: "
objDoc.Hyperlinks.Add objSelection.Range, strWebAddress,,,strWebAddress

Here is the visual bit. The signature is built using a Word application. The script runs through the creation of the signature line by line. The phone number section is dynamic. If when the user information was retrieved from Active Directory one or more of the phone number fields were empty, then the label for that number type and also the number are omitted from the block.

Colours are all defined using RGB values. If you want to change these for your own use, simply use Word to find the colour you need, then select the Custom tab to view the RGB codes for it.

objSelection.StartOf wdParagraph, wdExtend
objSelection.Font.Color = RGB(128,128,128)
objSelection.Font.Size = 10
objSelection.Collapse wdCollapseEnd

Set objSelection = objDoc.Range()

The final and perhaps complicated thing going on here is the hyperlink generation. By default, the hyperlinks will adopt the default hyperlink style of blue text, size 11 font with an underline. Changes to this section should be heavily tested because at this point, Word begins moving the pointer caret through the document to select the hyperlinks which have been created to alter their style. Incorrectly placing the caret can result it items deleted or strangely laid out in the finished signature.

objSignatureEntries.Add "Test Corp Default", objSelection
objSignatureObject.NewMessageSignature = "Test Corp Default"
objSignatureObject.ReplyMessageSignature = "Test Corp Default"

objDoc.Saved = True
objWord.Quit

Last but not least, everything that has been done so far is saved into the document and configured in the default Outlook profile as the signature to be used for new messages and also reply messages.

If you wanted no signature to be added to replies then you could change the following line:

objSignatureObject.ReplyMessageSignature = ""

It would actually be possible to define a different signature for the reply messages if you so wished. To do this, you would need to save the new message signature and close the current Word object, then open a new Word object, define the signature and then save it to the reply message signature.