The WS-Management service cannot process the request. Cannot find the Microsoft.PowerShell session configuration in the WSMan: drive on the…

After updating to Ps 4.0, I found some windows hosts are encountering the following errors when I run Invoke-Command to check the powershell version. See Fig-1.

Connecting to remote server X.X.X.X failed with the following error message : The WS-Management service cannot process the request. Cannot find the Microsoft.PowerShell session configuration in the WSMan: drive on the X.X.X.X computer.

Powershell WS-Management service Error
Figure-1: Failed to connect to remote host

Continue reading “The WS-Management service cannot process the request. Cannot find the Microsoft.PowerShell session configuration in the WSMan: drive on the…”

Powershell Recursive Functions: How to List Folder/File Sizes to multiple levels

Being away from my blogging a while, for the scripting of the migration of 400 ftp users to new server, Today, I finalized a script that will list folders/file sizes recursively that I started writing a few days ago. We can also use TreeSize Free to graphically list folder sizes. Here in powershell, I’m going to show you the use of recursive functions to list folders sizes as being added from child directories sizes. Combined with Powershell remoting, you can use this script to remotely query users’ profile sizes on remote computers. Continue reading “Powershell Recursive Functions: How to List Folder/File Sizes to multiple levels”