Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Import-Module Keep Prompting for Credentials!

$
0
0

Hello,

I'm trying to establish "Implict Remoting" session and exported all of the imported cmdlets into a module. But when I first execute any command, it asking me to enter password when it's trying to establish a implicit-remoting session regardless of -Credential parameter.

Import-Module -Name "MyModules" -Credential $Creds

Import-Module : A parameter cannot be found that matches parameter name 'Credential'.

Due to this, I'm unable to fully automate the script that I'm developing. Is there anyway to pass credentials when "Import-Module" trying to establish Implicit Remoting session?

Any further help/guidance would be greatly appreciated. Thank you!

UPDATE

When I first execute Import-Module command:

Creating a new session for implicit remoting of "Get-Mailbox" command...

When I click "Cancel" button twise at Password Prompt window:

WARNING: Commands available in the newly opened remote session are different than when the

implicitremoting module was created. Consider recreating the module using Export-PSSession cmdlet.







Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>