Some Questions about hosting PS with PowershellSDK(core and framework-version)

So I’m trying to use Powershell inside a programm to access Items(basicly internal objects) directly from our Programm. So far I set up a new PSProvider together with a new runspace/host running inside the application.

  1. I have noticed some Provider-Cmdlets (like get-childitem) allow omitting the path argument and then it uses the Current Path. But most Cmdlets (like get-item) don't have this behaviour. If there is no path provided it prompts to input a path and throws an error if you send nothing. Is there a way to change that behavior in my custom provider so I can get the item at the current Position when using get-item without arguments?
  2. Is there a way to create remoteaccess to one of my own powershell hosts/runspaces from any default Powershellconsole?
  3. Would it be possible to access the programm without a host running inside my application? Like just compiling a Module with Cmdlets and the Provider that references classes of the programm and access the programm(if it is running). My assumption was that I would need some kind of api for that but I don't actually know.
I googled a whole lot about this but I didnt really find an answer and I didnt find it in the Docs. Thanks for your help in advance.

Have you looked into PowerShell Proxy Functions?

TEC US 2011: PowerShell Deep Dive: Jeffrey Snover – Proxy Functions

PowerShell Tip: To write a Proxy Function

New-ProxyCommand a simple way to create a PowerShell Proxy Function

Initial release: 18.June.2014 Current Version: 2.0.0 LASTEDIT: 22.June.2014Features in Version 2.0:Add or remove parameters to/from origin command Comment based help is added by default Insert sourcecode automatically into PowerShell ISE create a command with a new name

The PowerShell Blacksmith Part 7: Proxy Functions

Thanks postanote!

That should solve my first issue.