The simple code look like as below and it does work:
Dim command As New PSCommand()
command.AddScript("<Powershell command here>")
Dim powershell As Management.Automation.PowerShell = powershell.Create()
powershell.Commands = command
Dim results = powershell.Invoke()
I have explained the following in other thread which one your can choose:
Powershell via VB.NET. Which method and why?
If you provide more about the error info I might can help.
Added more Info with full example:
I have just created a very Simple C# DLL and called it from VB.NET as below:
C# DLL Code: (Consider it a 3rd party module)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Xml.Linq;
namespace CSVtoXML
{
public class Actions
{
public Actions()
{
}
public static string writeHello(string name)
{
return "Hello " + name;
}
}
}
If you want to test this 3rd party DLL in PS command window just use the following:
PS C:\2012> [Reflection.Assembly]::LoadFile("C:\2012\CSVtoXML.dll")
GAC Version Location
--- ------- --------
False v2.0.50727 C:\2012\CSVtoXML.dll
PS C:\2012> [CSVtoXML.Actions]::writeHello("Avkash")
Hello Avkash
PS C:\2012>
Now I am using the same steps by loading 3rd party module in VB.NET application as below:
Module Module1
Sub Main()
Dim PowerShell As Management.Automation.PowerShell = PowerShell.Create()
Dim PowerShellCommand As New PSCommand
PowerShellCommand.AddScript("[Reflection.Assembly]::LoadFile('C:\2012\CSVtoXML.dll')")
PowerShellCommand.AddScript("[CSVtoXML.Actions]::writeHello('Avkash')")
PowerShell.Commands = PowerShellCommand
Dim results = PowerShell.Invoke()
MsgBox(results.Item(0).ToString())
End Sub
End Module
Here is the output in debug window to prove that the code does work as expected:

PowerShellCommandResults?