PowerShell Web Access – PSWA. Not well known function in Windows 2012.

PSWA is a great new function in Windows 2012. It allows you to remotely connect with PS session to machines in your environment from various devices.

Installing of it is really easy, step by step instructions can be found under:

http://blogs.technet.com/b/canitpro/archive/2013/11/14/step-by-step-deploy-powershell-web-access.aspx

We still need to configure WinRM just exactly as we use to do it for New-PSsession connection.

So on each host where firewall is running we would need to run “winrm quickconfig” command.

After installing PSWA, console would be accessible under PSWA directory, so the URIL would look like:

https://host_name/PSWA

Under that link you should be able to see:

PSWA_1

You are also to authenticate on a host with other credentials than on the gateway. After logging in we will finally see the console 🙂

PSWA_2

Great thing is, we can do with that website same we do with OWA – publish it for external world, so I would be able to do some scripting even having access only to my mobile!:

Screenshot_2015-01-26-09-06-12

[SOLVED] Could not load file or assembly ‘System.Windows.Browser, Version=2.0.5.0…

Couple of days ago I’ve decided to get to know more with Lync 2013 SDK.

The purpose is to use it for monitoring, anyway, I was trying to install that on one of my servers, so I have installed .NET 4.5 and Lync SDK as well as Visual Sudio 2012. I was using http://blogs.technet.com/b/csps/archive/2011/05/05/sendim.aspx as a guide.

I have even remembered about registering DLL with regsvr32 Microsoft.Lync.Model.DLL

After successful installation I was all happy to send my first IM message with Powershell.

How deep was my sadness when I received message saying that:

Could not load file or assembly ‘System.Windows.Browser, Version=2.0.5.0…

So my first thought was about the error I was receiving during registering of the DLL:

The module “.\Microsoft.Lync.Model.dll” was loaded but the entry-point DLLRegistetrServer was not found.

regsvr32_MicrosoftLyncModelDll

But if believing the message, despite of the error, DLL library has been loaded.

I thought it was the case of Windows Server 2012 I was using for that, so I have tried the same on 2008 – same situation.

And the last thought came to my mind in the evening that day…

Definitely that error message was not in relation to only Lync SDK but to some standard .NET classes, I realized there was one message when installing Visual Studio 2012:

VisualStudio2012_IE10

…..

zoidberg1

So the message was only telling about “working in the best way” with IE10. But still, worth trying.

After upgrading the IE to version 10 I was able to successfully import Lync Model module to Powershell session:

importmodule_lyncModelDll

And of course was able to send my first IM in Lync over my beloved Powershell!!!