I'm having issues with a script i'm creating. I have a functions.ps1 file that contains a lot of useful functions i have created. Inside one of those functions I'm creating and submitting a certificate request using certutil and certreq. If i include the functions.ps1 file in a powershell session then call the functions they work fine, but if i include the functions.ps1 file within a script i get a RPC server unavailable error
"The RPC server is unavailable 0x800706ba (WIN32: 1722)"
If i try and ping the CA with certutil -ping within the function it also gives me the RPC error message.
I have the firewall turned off (testing purposes) and am including the file like this
.${DEPOT}functions.ps1
What am i missing? Thanks