search
Categories
Sponsors
VirtualMetric Hyper-V Monitoring, Hyper-V Reporting
Archive
Blogroll

Badges
MCSE
Community

Cozumpark Bilisim Portali
LoadWithPartialName alternative on PowerShell
Posted in Windows Powershell | No Comment | 2,395 views | 27/05/2015 18:00

As you know, LoadWithPartialName is now deprecated. So you need to change your codes.

You should use Add-Type instead of LoadWithPartialName. This is example alternative for that:

Add-Type -Path "C:\Windows\System32\inetsrv\Microsoft.Web.Administration.dll"

That will load DLL into PowerShell session. So you have to specify full path now.

Then you can use it like:

New-Object Microsoft.Web.Administration.ServerManager

Now you can start exploring IIS using with Add-Type :)



Leave a Reply