Monday, June 29, 2015

Windows Live Writer & Blogger

Just installed Windows Live Writer on Windows 8.1 which turned out to be more effort than I wanted because googling for Live Writer takes you to an old installer. You actually need to download Windows Essentials.

Details covered here: http://www.hanselman.com/blog/DownloadWindowsLiveWriter2012.aspx

The next challenge was getting Writer connected to my Blogger account. It tells me the username and password are incorrect, even though I know they are not. Turns out that google are now blocking the old authentication mechanism being used by Writer. You can either re-enable that mechanism via your Google profile page, or, even better, enable 2 factor authentication and generate an app password for Writer.

Writer on Windows 8.1 also defaulted to a very small 6pt font. Simple enough to switch it to something bigger via the toolbar.

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

Switches

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

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

Elevating

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.

Start-Process

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 “http://google.co.uk”

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.