PowerShell在处理时间后提示我获取用户和密码

发布于 2025-02-01 02:57:54 字数 894 浏览 3 评论 0原文

我有这个powerShell,让我处理两个文件来处理分布列表:

  • 一个读取需要清理的分布列表并将删除文件记录到日志文件的文件。
  • 阅读一个会员文件,该文件将电子邮件添加到每个分发列表中,

成员文件只有两个字段分发列表primarysmtpaddress。 Primarysmtpaddress是邮箱的字段,它将连接到分布列表。

如果我运行脚本,它可以完成工作,但是在某个时候,经过长时间的处理,它会再次要求管理凭据。

我已经在脚本的开头有这些凭据,创建了一个持久的会话,并使用-allowclobber Switch导入会话。.

我在处理过程中遇到此错误:

处理a [email  proceeded] “ data-cfemail =” 5A2F293F28363292E1A3E3E35373B333333333474393537“> [email  pretanced] 在远程服务器上启动命令失败了以下错误消息:I/O操作由于线程退出或应用程序请求而被中止。有关更多信息,请参阅about_remote_troubleshooting帮助主题。 + categoryInfo:操作stopped :( outlook.office365.com:string)[],psremotingtransportexception +完全QualififiedErrid:JobFailure + pscomputername:outlook.office365.com

如果我放置了管理凭据,它会继续...我可能做错了什么...

I have this powershell that let me process two files to process distribution lists:

  • A file that reads the distribution lists that needs cleanup, and log the removed files to a log file.
  • Read a membership file that have the emails to be added to each distribution list

The membership file has only two fields DistributionList, PrimarySmtpAddress. PrimarySmtpAddress is the field of the mailbox that will be joined to the distribution list.

If I run my script it does the job, but at some point, after long processing, it asks again for the admin credentials.

I already have this credentials at the beginning of the script, creating a Persistent Session, and Importing the session with the -AllowClobber switch..

I'm getting this error during processing:

Processing a [email protected] en la lista [email protected]
Starting a command on the remote server failed with the following error message : The I/O operation has been aborted because of either a thread exit or an application request. For more information, see the about_Remote_Troubleshooting Help topic.
+ CategoryInfo : OperationStopped: (outlook.office365.com:String) [], PSRemotingTransportException
+ FullyQualifiedErrorId : JobFailure
+ PSComputerName : outlook.office365.com

If I put the admin credentials, it continues... What I might be doing wrong...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文