[英]How to get command output in the powershell script?
I want to wrote a little script that show me all teams in microsoft teams software.我想编写一个小脚本,向我展示 microsoft 团队软件中的所有团队。
Write-host "XXX"
Start-Sleep -Seconds 3
Connect-MicrosoftTeams;
Write-host "XXX"
Get-Team
But after the script runs "get-team" command, it show no result for that command.但是在脚本运行“get-team”命令后,它没有显示该命令的结果。 What am I doing wrong?
我究竟做错了什么? What should I do, to get the output of "Get-Team" command showing in powershell window?
我该怎么做才能获得 powershell window 中显示的“Get-Team”命令的 output?
Thanks for the help.谢谢您的帮助。
Get-Team cmdlet supports retrieving teams with particular properties/information, including all teams that a specific user belongs to, all teams that have been archived, all teams with a specific display name, or all teams in the organization. Get-Team cmdlet 支持检索具有特定属性/信息的团队,包括特定用户所属的所有团队、已归档的所有团队、具有特定显示名称的所有团队或组织中的所有团队。
Get-Team
[-User <String>]
[-Archived <Boolean>]
[-Visibility <String>]
[-DisplayName <String>]
[-MailNickName <String>]
[-NumberOfThreads <Int32>]
[<CommonParameters>]
Ref: https://docs.microsoft.com/en-us/powershell/module/teams/get-team?view=teams-ps#examples参考: https://docs.microsoft.com/en-us/powershell/module/teams/get-team?view=teams-ps#examples
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.