I trying to run my custom PowerShell cmdlets from another custom cmdlets. The strange thing is that I can run my custom cmdlets manually from the Windows Powershell and it works, but when I try to trigger the same custom cmdlets it fails.

Run-Demo code:
It's basically like this the Run-Demo: I know it missing the parameter, but 'never the less' it should find the cmdlets in PowerShell.
Command cmd = new Command("Run-ContentInventory");
Runspace runSpace = RunspaceFactory.CreateRunspace();
runSpace.Open();
Pipeline pipeline = runSpace.CreatePipeline();
pipeline.Commands.Add(cmd);
Collection<PSObject> output;
output = pipeline.Invoke();
foreach (PSObject psObject in output)
{
Console.WriteLine(psObject);
}
Thanks for any help!