Tag Archives: Windows 8.1

QuickTip: Determine current line number in PowerShell

When scripting it can be interesting to know which line of the script is currently being executed, to determine this we take a look at the $Myinvocation automatic variable. This variable contains the ScriptLineNumber property which can be used what the current line of the script is. We can try run the following code:

PS > $Myinvocation.ScriptlineNumber

Although the output is correct this is not the output we are looking for. In order to display the line numbers for a script or function the variable should be placed in a function. The reason for this is that it determines from which line its function has been invoke, it cannot determine that if accessed directly. The following code is :

Function Get-CurrentLine {
# Some comments

This will output the numbers 5 and 7 which correspond to the line numbers. This can be useful when implementing the Write-Debug and Write-Verbose parameters in your scripts or functions in order to establish at what position in the script you currently are.

Automatic Variables
Get-Help about_Automatic_Variables

QuickTip: Update Windows Defender definitions using Update-MPSignature

Since protecting your computer is as important as anything it might be nice to know that there is also a PowerShell cmdlet available to manually update your virus and malware definitions:


So for example if you would like your Windows Defender definitions to be updated every time a new PowerShell window is opened the following code could be added to your PowerShell profile:

Update-MPSignature -AsJob

I added in the -AsJob so the updating will take place in the background and PowerShell is immediately available to use. To add this to your current PowerShell profile you could execute the following code:

Add-Content -Path $Profile -Value "`r`nUpdate-MPSignature -AsJob`r`n"

The next time you launch PowerShell it will automatically update your definitions:



Windows 8.1 Enterprise Preview is available for download

Yesterday Microsoft released the Windows 8.1 Enterprise Preview. While the consumer edition has been available as a Preview Edition the Enterprise version has just been released.

According to Microsoft the differences between the editions are as follows:

Windows 8.1 is the basic edition for home users. It includes the core feature set that home users require but does not include key business features, such as support for the ability to join domains, process Group Policy, and so on. Windows 8.1 Pro is for small- and medium-sized businesses. It provides enhanced features that help to easily connect to company networks, access files on the go, encrypt data, and more. Last, Windows 8.1 Enterprise edition is available through Windows Software Assurance. It includes all the capabilities of Windows 8.1 Pro, plus premium features such as Windows To Go, DirectAccess, BranchCache, AppLocker, Virtual Desktop Infrastructure (VDI), and Windows 8 app deployment.

Notable features of the Enterprise version of Windows 8.1 include:

  • DirectAccess – Seamless access to company resources without the need for VPNs
  • Windows To Go – Create your own portable Windows 8.1 installation on a USB Stick
  • Start Screen Control – Gives administrators control on what is shown on the start screen

It is however important to know the Preview Edition does not have a supported upgrade path to the final edition. So this should be taken into consideration when upgrading your current workstation to Windows 8.1. If that is not a problem for you then you can use Windows 8.1 Enterprise Preview until January 2014.

What’s New in Windows 8.1
Download Windows 8.1 Enterprise Preview
Windows 8.1 Preview: Frequently Asked Questions

What is new in Windows 8.1

Together with Server 2012R2, Windows 8.1 has also been released. Some of the notable changes are as follows:

  • Workplace join – Useful for BYOD scenarios, to offer an alternative to domain join a personal device
  • Internet Explorer 11 – Faster and better IE
  • NFC Tap-to-Pair printing – Wonder how that will work with a desktop 😉
  • Boot to Desktop – A lot of people have been asking for this and it is here
  • Improvements to Desktop and Start Screen – Another good one for anyone using Windows 8 on a non-touch device

For the full list of changes, fixes and new features have a look at the Technet article which is available here:

What’s New in Windows 8.1