Monday, May 12, 2014

SharePoint 2013 Announcement Body vanishes

I’ve been investigating a weird issue in SharePoint 2013 today. The issue was first seen in our live news & events system which uses multiple Announcement apps and some workflows to copy announcements between business units. It looks like a reinvention of the built-in Audiences feature to me, but that’s a different issue.

I’ve also reproduced it in our Test farm and on my single-box dev farm.

The symptom is that an Announcement’s Body text vanishes from the built-in item details page. This only happens for our staff users, who have Contribute rights to the list. My admin user account has Full Control and can always see the Body text.

The other columns, such as the Title, are unaffected. The staff user can always see these. It’s just Body that vanishes. I added another multi-line text column, called Body2, and this doesn’t exhibit the behaviour: it behaves itself perfectly.

It also only reproduces on the item’s details page. The same staff user can see and edit the Body in the edit page and can see the Body if the column is added to the All Items view, for example. It still won’t show up in the item details page though.

Our Announcement app also has a custom column which is a multi-value lookup over a Custom List which contains our business unit names and site URLs. The issue only reproduces where 2 or more business units (that is, lookup values) are selected for the announcement. I can even edit the item, switching between having one or two business units in the lookup field, to make the Body text vanish and reappear.

At first I assumed it was some custom CSS hack that had gone wonky or a weird side-effect of workflow and/or draft versions, but I eliminated each of these in turn until I got to an out of the box reproduction using just an Announcement app, a custom list and a multi-value lookup column.

No idea what might be causing it. I guess I’ll work around it by hiding the Body column somehow and using my own multi-line text column instead.

Friday, April 11, 2014

Windows 8 touch screen shortcuts

I only recently spotted this when using the on-screen keyboard on my Surface RT. The top line of keys (from q to p) have little numbers, from 1 to 9 and then 0, shown in the top-left corner of the corresponding letter key, but there’s no function or control key that appears to activate the numbers.

Instead, you just hold the letter key and after moment some other keys pop up. So holding Q will pop up 1, for example. Some other keys will pop up letter variants with accents. E for example will give you 3 and é and others. The punctuation keys also support this, so holding ? gives you access to #, !, etc. –The full stop, comma and quotes keys also do this.

Before this I was using the &123 key to switch into symbols mode to pick out punctuation, but this is much quicker and more intuitive.

Monday, March 3, 2014

SharePoint Online

You can rent SharePoint 2013 direct from Microsoft, hosted in their data centres, for as little as ~£3 per user per month from SharePoint Online. Watch the quoted price though, as they like to play the old “excluding VAT” game.

I rented one of these for a month, just to try it out, and was pretty impressed. It sets itself up with a public site collection, intended to be your company website, and a private site collection, intended to be your intranet. The account admin page lets you distribute your user licenses via email.

For ~£10 per user per month you can get Office included as well, although SharePoint includes the Office Web Apps so you can do basic editing in the browser anyway.

Cancellation turned out to be a little more tricky. There’s no online cancellation – you have to deal with their 1980’s style phone system. For the UK the number was 0800 032 6417, 9:00 – 17:00 Monday -Friday. It only took a few minutes to get served, but when I did I learned that the subscription was for a year and that there is usually a cancellation fee of 25% of the remaining term, which would have worked out at around £25 in my case. I don’t recall that being highlighted during the “hurry! - buy now” process. They weren’t enforcing this though, so I didn’t get stung.

Impressed overall though and would definitely recommend the service to small businesses looking for online collaboration tools.

Wednesday, February 26, 2014

Updates? What updates?

I’m experimenting with running our standard desktop Windows 7 image as a Hyper-V guest on my laptop. The laptop has Windows 8.1 installed. This means I can do the day-to-day stuff on Windows 8.1 and just switch to the VM when I need to check the experience for the users. There’s no good reason for me to be stuck on old technology just because our environment is always way behind, especially when there’s so much goodness in Windows 8!

It went pretty smoothly. Even though the laptop host OS isn’t a member of the corporate domain it lets the traffic through OK so the guest can join the domain. I had to ask the infrastructure team to update the network switch to allow the additional MAC address. Seems like an outdated security solution, especially given that MAC address spoofing is so easy, but whatever.

The image itself then network installed into the VM (I think we use SCCM for the network installs). The image includes Office 2013 and some other bits and bobs, so after a while I’m good to go.

However, the network icon in the notification tray indicates I have no internet connection, even though I do, and can Google quite happily.

I didn’t expect this to be a problem, but it actually is as some Office stuff, such as OneNote, will not open your SkyDrive notes. Instead we get some twee message about helping me get online. Outlook won’t open SharePoint tasks from their notification emails either.

Initially I thought this might be because IPv6 is on by default, and I know our infrastructure isn’t happy with that, so I disable that on the Hyper-V virtual switch. Still no joy.

Then I wondered if it was because I left my WiFi on the host as well as the plugging in the network cable, but disabling that didn’t fix it either.

Some Googling gets me to a suggestion that this might happen because of outdated network drivers, but this is a guest VM so uses the Hyper-V drivers from Microsoft. Automatic Updates are switched on so we should be up to date.

But I forgot about the “context”. I’m using someone else’s infrastructure, and in this case it’s configured to get updates locally, but never actually gets any updates. I forget what the backstory here is. I’ve a funny feeling they had WSUS installed at some point, but then abandoned it. I manually kick off the update process and tell it to ask Microsoft. 70 important updates are ready for me to download. It does most of these, then stops for a reboot.

When it comes back, sure enough, the VM now detects its internet connection correctly.

UPDATED: Boo. Following an overnight shutdown and restart the VM is back to “no internet connection” again.

Mouseless Admin

Here’s some simple tips for driving Windows 8 from the command line, instead of the mouse.

Just search for it

Windows 7 has a built in search engine running by default. This can index your documents and emails and also Windows applications and utilities. You can usually find what you need by simply typing a keyword.

Pressing the Windows key or Start button will pop up menu with a box to type into. Windows 8 is similar: the Windows key (and Start button which was reintroduced for Windows 8.1) will open the Start screen. If you start typing it will automatically open the Search charm.

Command line

The traditional command line is still available. You can press Windows Key + R to open the Run dialog. Enter a command and hit Enter to execute it. This is great for simple single commands: see list below. If you want more interaction then you can use the Run dialog to open a command window by entering cmd, or a PowerShell window with powershell.

cmd Open a command window
powershell Open a powershell window
shutdown /s Shuts the computer down
shutdown /r Reboot
shutdown /l Logoff or signout
c:\ Opens a Windows Explorer window to the root of the C drive, for example. Works with any path.
%UserProfile% Opens a Windows Explorer window to your personal files


Most commands will take switches. In the list above I showed 3 switches that can be given to the shutdown command.

Most commands will take the /? switch which makes the command display some help. You’ll need to be in a command window to see the output.

Environment variables

The %UserProfile% command actually resolves an environment variable. In this case the variable, called UserProfile, contains the path to your personal file store area. When the Run dialog is given a path it opens it with Windows Explorer.

You can see the full list of environment variable by using the set command, but you’ll need to be in an interactive window to see the output.

Interactive commands

Here are some more commands, but these all require some interactivity to be useful.

set Displays current environment variables. Can also change them.
exit Quits the command line session and closes the window.
whoami Displays your username. Useful for verification when having permissions problems.


PowerShell is the command line’s big brother. You almost certainly want to use this in preference to the command line.


Many administrative tasks require administrator rights, which are not available by default due to the User Account Control (UAC) security feature which was introduced in Windows Vista. You almost always want to leave UAC on. To do anything that requires administrator privileges simply elevate your PowerShell window, for example.

First launch a PowerShell window as described above. This won’t be elevated by default.

Now use that PowerShell to launch an elevated PowerShell:

Start-Process PowerShell –Verb RunAs

This will open another PowerShell window, this time with admin rights. Note the title of the window starts with Administrator: to indicate this.


You can save yourself a few keystrokes by using start instead of Start-Process. start is a PowerShell alias that simply maps back to the Start-Process commandlet.

You can use Start-Process to launch other applications, for example, and even URLs, which will open in your default browser:

Start-Process “”

File paths will open Windows Explorer and we can use built-in environment variables to refer to our home folder, for example:

Start-Process c:\users
Start-Process $home

You can use get-variable to list all the current environment variables.

You can also use Start-Process to switch to another account, which is useful if you typically run as a normal user, but have a special high-rights account for doing some tasks.

Start-Process PowerShell –Credential domain\hi-rights-user
Start-Process dsac

The first command launches PowerShell as another user. It will popup a window to ask for your password then open another PowerShell window. Use that for the second command, which launches the Active Directory Administrative Centre, for example and assuming you have it installed: search for Remote Server Admin Tools (RSAT) to get it.

Tuesday, February 25, 2014

Mouseless Hyper-V VM stuff

Here is a brief collection of stuff I found useful when switching from using mouse to keyboard for launching virtual machines.

This is all on Windows 8.1, but some or all may work on earlier versions.

You can list the virtual machines using get-vm. This will produce a list which includes the VM names.

You can then use the names to start and stop the VMs using start-vm and stop-vm. They both take the VM name as the first parameter and support wildcards. stop-vm shuts down the image by default, but you can use -Save or –TurnOff switches: use get-help stop-vm for more details.

I usually use Remote Desktop to interact with VMs. You can launch this by calling the client application. The following command line will connect in full screen. Use mstsc /? to get more help.

mstsc /v:machinename /f

You can break out of the VM session by pressing Ctrl+Alt+Home. The screen may seem the same, but the focus is now back with the local host machine, not the virtual machine, so your key presses are passed to the host. You can now Alt+Tab through the other applications running on the host, including other Remote Desktop sessions, so you can use this to switch between sessions.

Monday, February 3, 2014

WIX – writing Windows installers

I’ve finally got around to looking into WIX: Windows Installer XML. WIX lets us declare the operations we need to install some software, such as creating folders & copying files, and then generates an MSI file. The Windows Installer uses that to install, uninstall & repair the installation.

You can get the toolset from the project’s website. It’s open source so nothing to pay.

There’s also a tutorial on the website, but I highly recommend buying the book (WIX: A Developer’s Guide to Windows Installer XML, linked from the site). It’s comprehensive and written in a tutorial style: you’ll have a basic installer working after chapter 1, the it leads you through various common installer tasks in a logical order, introducing concepts and detail as required.

I’ve only used it for basic file deployment and installing a Windows Service, but the book covers XML configuration files; creating web sites in IIS; creating databases and running SQL to create tables. All the fiddly stuff I never quite seem to get around to automating.

Tuesday, January 28, 2014

Web Traffic Analysis

While Google Analytics are great for traffic analysis, they show you a particular version of reality. Google tracks using javascript & attempts to track unique visits, which isn’t 100% reliable, but still gives a good idea about real world traffic through your site.

At the other extreme are your web server log files which, if switched on, will contain an entry for every URL request made to your site. This gives a more complete picture of what the server has actually been doing.

Looking at the raw logs isn’t much use, however, being just massive lists of dates, times & URLs. Something is needed to process these and provide an overview. My boss just sent me a link to an old favourite of his that I’ve not used before: Analog is a simple, free log analysis tool that understand IIS log files, for example, out of the box.

It’s simple to get going. Full instructions are in the how-tos, which are also included in the download, but you basically download, unzip & fiddle a couple of settings in a configuration file. The exe then processes the raw logs and burps out an html report file with images.

There might be more sophisticated tools available, but this one’s so easy it’s a good one to begin with.

Tuesday, January 14, 2014

Making Notes

I used to use notepad or notepad++ to take simple notes, but a few months back I converted to Microsoft OneNote. This is part of the Office suite, was included on my Surface RT and has a free store app version for Windows 8 and Windows 8 Phones. It has a simple tabs & pages interface and automatically syncs across my devices via Skydrive.

To Do

You can also mark a paragraph as being a to-do item which gives it a simple tickbox. So Onenote has also become my default to-do list tool, although I use Trello for projects. Ctrl+1 will cycle the current paragraph through the 3 states: tick box unticked; tick box ticked; no tick box.


I often grab screen shots when making notes. I don’t usually want the whole screen, just the relevant part. These will paste into Onenote OK and the desktop version will let me grab a clip via Insert > Screen Clipping, but I often need to grab a clip from a dev box which I haven’t installed Onenote onto.

The old-school route is to use the Print Screen (PrtScn) key found on a standard keyboard. This places a copy of the screen into the clipboard where it can then be pasted into something like Paint, cropped and then saved as a file. Alt+PrtScn will just grab the active window instead.

Windows 7 included a tool called Snip which fits in the middle here. It lets you grab a screen area and then copy it to the clipboard, save it to file or email it. This is ideal to take a clip from a machine without installing anything else.

It’s missing from Windows Server 2012 by default though. You can get it back by activating the feature through PowerShell, for example. Run PowerShell with Administrator rights.

Install-WindowsFeature Desktop-Experience

This required a reboot of the server afterwards in this case. You can use the following to list the features and sub-features and see which are installed:


Windows 8 seems to contain the snip tool still, at least it has on the builds I’ve seen. You can also press Windows Key + PrtScr in Windows 8 to take a screenshot and drop it directly into your Pictures > Screenshots folder as *.png files.


Something I only recently noticed is that OneNote will spot simple maths as you type it and put in the answer for you. I just happened to type the monthly cost of SharePoint Online and multiply by 12. I typed the equals sign and pressed space and OneNote filled in the answer, including the pound sign (it omitted the trailing zero though, so not quite perfect):

£7.80 * 12 = £93.6