IPAM DHCP integration script problems aka Microsoft.IPAM session configuration

If you try to test Microsoft IPAM feature you were probably surprised that IPAM  is not getting DHCP leases automatically. For that to work you need to download script from next links

Windows Server 2012 R2 script version 

Windows Server 2012 script version

Please read manual carefully Smile But soon after you try to run all of this,  you can get error like this in Powershell

“The WS-Management service cannot process the request. Cannot find theMicrosoft.ipam session configuration in the WSMan: drive ”

Resolve it by doing folowing action :

Reason for issue:

    Possibly the Microsoft.ipam ps session configuration is missing from the ipam server.


  • Log into the ipam server
  • Launch a powershell window with administrator privileges
  • Execute the following commands:
  • New-PSSessionConfigurationFile -Path ./ipam.pssc
  • Register-PSSessionConfiguration -Name Microsoft.ipam -Path .\ipam.pssc
  • Set-PSSessionConfiguration -name Microsoft.ipam –ShowSecurityDescriptorUI
  • Add the following groups from the local machine scope:

        IPAM Administrators

        IPAM ASM Administrators

Make sure they have full control privileges.

  • Get-PSSessionConfiguration *ipam

Now you should be able to see the Microsoft.ipam ps session configuration

Run your script Any after that you should see DHCP leases in console

Invoke-IpamDhcpLease -IpamServerName localhost -DhcpServerFqdn dhcpcluster2.contoso.com –Force


How to install Putty with PowerShell?

Lately I am very keen on learning DSC and I am using Microsoft Virtual Academy tutorial Getting Started with PowerShell Desired State Configuration (DSC). In last lesson there is Linux DSC configuration task, and application I needed to install was Putty. OK I said! Lets do it with PowerShell.

What is OneGet? It is package installer that give you ability to browse, install, update and uninstall software packages from online or local provider. It is what Linux have long time ago (APT-Get –Debian, yum – CentOS ….) I already had installed WMF 5.0 (aka PowerShell 5.0) and OneGet module . You can find all instruction and downloads on links I provided.

How it works. I stole this part from this blog just to show workflow but you can read it all if you like.



From my understanding this is how the OneGet module interact with the package manager like Chocolatey.

  1. Load OneGet module in PowerShell. OneGet is the common interface for interacting with any Package Manager (Plugins).
  2. Then use a Provider for each Package Manager that plugs into OneGet. (Providers do all of the actual work, fetching content from the repositories and doing the actual installation.)
  3. The package manager will then query its software repository to retrieve the package. In this example Chocolatey use it’s own set of Cmdlets (see below in this post)
  4. The package manager then download a configuration file OR get the URI where it will find the instruction to install the package. In the case of Chocolatey, a configuration file is downloaded from the repository and saved locally in C:\Chocolatey\lib\<APPNAME>\Tools,
  5. The Provider will then execute the configuration file and download the actual software (+ its dependencies) from a repository, and obviously install it…. silently 🙂



Lets do it. If you have all set up run this line

find-package *putty*


As you can see there is a list of all putty software packages available. we will jus simple use

install-package putty



It will install automatically putty and putty portable like software dependency. I was already installing putty so folders already existed, but first time install it will be created. So where it is. You can find all package installations under c:\chocolatey\lib by default. If you want to install software under different folder you can use –Destination parameter  in install-package command

Lets go find putty


Run it and V’oila . Putty is there