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
https://dmitrysotnikov.files.wordpress.com/2011/09/scripts-tec-2011-jeffrey-snover-proxy-functions.pdf

PowerShell Tip: To write a Proxy Function
https://social.technet.microsoft.com/wiki/contents/articles/25075.powershell-tip-to-write-a-proxy-function.aspx

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

https://gallery.technet.microsoft.com/scriptcenter/New-ProxyCommand-a-simple-9735745e

The PowerShell Blacksmith Part 7: Proxy Functions
https://mcpmag.com/articles/2013/11/05/blacksmith-part-7.aspx

Thanks postanote!

That should solve my first issue.