Free Exam Vouchers

If you're MCT, checkout the latest promotion from Microsoft Learning on http://borntolearn.mslearn.net/goodstuff/p/mctchallenge.aspx . Free Exam Vouchers Offer is valid until 30.11.2014 up to 10000 vouchers distributed worldwide, and a voucher may be redeemed to take any MCP Exam !!!
For the best MCTs there are special prizes like Surface Pro 3 and XBOX One !

Also, If you want to become an MCP checkout the latest promotion from Microsoft Learning on http://borntolearn.mslearn.net/goodstuff/p/mcp.aspx . There is free exam vouchers offer for Azure Exams and Office 365 Exams. The offer is valid until 31.12.2014 up to 10000 vouchers distributed worldwide.

Don't miss the offers !
 

Windows 10 Technical Preview demos

I have uploaded short videos on YouTube about:
  • Installing Windows 10 Technical Preview on Hyper V : http://youtu.be/7HXhor5vM_U .
    This video covers:
    • download location of the Windows 10
    •  Hyper V VM provisioning and installation of the Windows 10
  • Windows 10 Technical Preview Features : http://youtu.be/hlL06fy2vU0 .
    This video covers:
    • Introduction of the "new" Start Menu (Resize, Drag and drop, Add Recycle bin to start menu, Change the size of the tiles, Turn live tile (on|off), Switch between Start Menu and Start Screen)
    • Operating System version
    • Introduction of the new experimental tab on command prompt properties, from where the opacity of the window can be changed (for example), new features for selecting text, CTRL+C, CTRL+V .
    • PowerShell version
    • Internet Explorer version
    • Virtual desktops (create, delete, switch)
    • "New" applications run in window mode

I've added some annotations during video playback, so recommended view of the videos is from desktop.
 

Windows Technical Preview

Last week Microsoft made publicly available for download technical preview version of the next generation of client, server and system center products. Official names for the server and system center are not revealed, and they are available as Windows Server Technical Preview and System Center Technical Preview, while for the client Windows 10 will be the name of the operating system.

Here are the official Microsoft download links:

Windows 10:
http://windows.microsoft.com/en-us/windows/preview-iso

Windows Server Technical Preview:
http://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-vnext-technical-preview

System Center Technical Preview:
http://www.microsoft.com/en-us/evalcenter/evaluate-system-center-vnext-technical-preview

 

Finding the currently logged on user using powershell and WMI

This is quick one for reference, here is an example how to find out currently logged on user on remote computer or local computer (administrative permission is required for querying remote computer) using PowerShell single liner:

Get-WmiObject win32_ComputerSystem -ComputerName Remote computer name or IP address | Select username
 
For finding out the currently logged on user, WMI and Win32_ComputerSystem class is used. Win32_ComputerSystem class has username property which contains the currently logged on user. For more information about Win32_ComputerSystem class please check the MSDN article http://msdn.microsoft.com/en-us/library/aa394102(v=vs.85).aspx .

My first thought was to find out the currently logged on user, but what about the users that are logged on and are switching between their profiles ? That's when the things get complicated. Anyway, here is PowerShell script which will list logged on users on remote or local machine, even if they are switching between profiles on same pc (for comp variable add the ip address or computer name of the machine, also administrative permission are required) :

$comp="computername or ip address"
Get-WmiObject win32_logonsession -ComputerName $comp -Filter "Logontype = '2' or Logontype='11' or logontype='10'" |
foreach {Get-WmiObject win32_loggedonuser -ComputerName $comp -filter "Dependent = '\\\\.\\root\\cimv2:Win32_LogonSession.LogonId=`"$($_.logonid)`"'" | select Antecedent } |
foreach { ($_.antecedent.split('"'))[1] + "\" + ($_.antecedent.split('"'))[3] } | select -unique

WMI is utilized and Win32_LogonSession and Win32_LoggedOnUser classes are used. From Win32_LogonSession I'm filtering for following logontype: Interactive, RemoteInteractive and CachedInteractive, and passing the logonid to Win32_LoggedOnUser class. From Win32_LoggedOnUser class Antecedent property is manipulated to create easy to read output.

For more info about Win32_LogonSession and Win32_LoggedOnUser classes, please check MSDN library : http://msdn.microsoft.com/en-us/library/aa394172(v=vs.85).aspx and http://msdn.microsoft.com/en-us/library/aa394189(v=vs.85).aspx .

 

How to check EMBG (Unique Master Citizen Number) using regex

In this post, I will share my implementation of how to check if some number looks like EMBG or Unique Master Citizen Number. For those of yo...