powershell - 'Connect-MsolService' is not recognized as the name of a cmdlet -


        pscommand commandtorun = new pscommand();         commandtorun.addcommand("connect-msolservice");         commandtorun.addparameter("credential", new pscredential(msolusername, msolpassword));          powershell.streams.clearstreams();         powershell.commands = commandtorun;         powershell.invoke(); 

i trying run above code in visual studio , getting following error : the term 'connect-msolservice' not recognized name of cmdlet, function, script file, or operable program. check spelling of name, or if path included, verify path correct , try again. able connect msol service microsoft azure active directory module windows powershell. please help.

following worked me:

  1. uninstall installed ‘microsoft online service sign-in assistant’ , ‘windows azure active directory module windows powershell’.
  2. install 64-bit versions of ‘microsoft online service sign-in assistant’ , ‘windows azure active directory module windows powershell’. https://littletalk.wordpress.com/2013/09/23/install-and-configure-the-office-365-powershell-cmdlets/

if following error in order install windows azure active directory module windows powershell, must have microsoft online services sign-in assistant version 7.0 or greater installed on computer, install microsoft online services sign-in assistant professionals beta: http://www.microsoft.com/en-us/download/details.aspx?id=39267

  1. copy folders called msonline , msonline extended source

c:\windows\system32\windowspowershell\v1.0\modules\

to folder

c:\windows\syswow64\windowspowershell\v1.0\modules\

https://stackoverflow.com/a/16018733/5810078.

(but have copied possible files

c:\windows\system32\windowspowershell\v1.0\

to

c:\windows\syswow64\windowspowershell\v1.0\

(for copying need alter security permissions of folder))


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -