我是新用户,无法使用PowerShell连接到office 365 [英] I am a new user and can't connect to office 365 with powershell

查看:174
本文介绍了我是新用户,无法使用PowerShell连接到office 365的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用连接登录Office 365,但不知何故已经加载了另一个模块? 

I am trying log into office 365 with the connect but somehow have another module loaded? 

connect-msolservice

connect-msolservice:'connect-msolservice'命令在模块'MSOnlineExtended'中找到,但模块为
无法加载。有关详细信息,请运行'Import-Module MSOnlineExtended'。
$
在行:1 char:1

+ connect-msolservice

+ ~~ ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          :ObjectNotFound:(connect-msolservice:String)[],CommandNotFoundException

    + FullyQualifiedErrorId:CouldNotAutoloadMatchingModule



PS C:\ WINDOWS \ system32>导入模块MSOnlineExtended

导入模块:无法加载文件或程序集'file:/// C:\ WINDOWS \ system32 \ WindowsPowerShell \v1.0 \Modules \ MSOnlineExt

end\Microsoft.Online.Administration.Automation.PSModule.Resources.dll'或其中一个依赖项。系统不能在$
找到指定的文件。

在行:1字符:1

+导入模块MSOnlineExtended

connect-msolservice
connect-msolservice : The 'connect-msolservice' command was found in the module 'MSOnlineExtended', but the module
could not be loaded. For more information, run 'Import-Module MSOnlineExtended'.
At line:1 char:1
+ connect-msolservice
+ ~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (connect-msolservice:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CouldNotAutoloadMatchingModule

PS C:\WINDOWS\system32> Import-Module MSOnlineExtended
Import-Module : Could not load file or assembly 'file:///C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\MSOnlineExt
ended\Microsoft.Online.Administration.Automation.PSModule.Resources.dll' or one of its dependencies. The system cannot
find the file specified.
At line:1 char:1
+ Import-Module MSOnlineExtended

PS C:\ WINDOWS \ system32> $ PSVersionTable



姓名                           价值

----                            -----
$
PSVersion                      5.1.17134.590

PSEdition                     桌面

PSCompatibleVersions            {1.0,2.0,3.0,4.0 ...}

BuildVersion                    10.0.17134.590

CLRVersion                      4.0.30319.42000
$
WSManStackVersion              3.0

PSRemotingProtocolVersion      2.3

SerializationVersion            1.1.0.1

PS C:\WINDOWS\system32> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.17134.590
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.17134.590
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

我是新手,只想运行一些命令。 帮助?

I am new to this and just want to run some commands.  Help?

推荐答案

你想做什么这是从Visual Studio代码中?如果是,请检查
此主题否则尝试从Powershell ISE中运行相同的内容机器。如果有效,请告诉我们。 
Are you trying to do this from within Visual studio code ? If yes please check this thread else try to run the same from within the Powershell ISE from the machine. Let us know in case that works. 


这篇关于我是新用户,无法使用PowerShell连接到office 365的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆