Let me start by saying I'm not new to Powershell, but I am new to custom functions.
So I have created a custom function (with a single cmd-let) to handle logging to our db. It works like a charm. Let's call it write-myfunction.
At first, It worked when I ran it in ISE but then wouldn't work on the scheduler. I fixed that by adding the hosted folder with the PSM1 to my PATH powershell variables. Boom. Now it works on scheduler. Great. Wonderful. Moving on.
Problem NOW is that we're running SSIS (Same GA User) and having SSIS call the powershell script, it doesn't seem to be finding my psm1. I get "write-myfunction isn't a valid name of a cmd-let blahblah"
Worth Noting: I have my function folder hosted on our network share in a place with totally open permissions (I have it backing up on the daily and alarms, so I'll get alarm bells if something in that folder changes)
Questions!
- Is keeping a central repository of custom modules on some other server a smart move? Should I just deploy a copy of that folder into c:\program files\powershell to every computer instead via GP?
- What am I missing on this SSIS thing? I figure if I run as an AD GA account, it should have access to the folder with the script, and the fact that the SSIS package is running on the local system that I edited the PATH variables to encompass my hosted modules folder right? So.. like.. what do?
*edit
Here is where I was able to fix the first issue:

And here's me confirming I can GCI to the hosted files in a powershell window
