{"id":434,"date":"2020-06-07T07:00:02","date_gmt":"2020-06-07T07:00:02","guid":{"rendered":"http:\/\/jeedom.sigalou-domotique.fr\/generer-une-liste-des-equipes-teams-leurs-canaux-les-proprietaires-membres"},"modified":"2024-04-21T13:14:56","modified_gmt":"2024-04-21T11:14:56","slug":"generer-une-liste-des-equipes-teams-leurs-canaux-les-proprietaires-membres","status":"publish","type":"post","link":"https:\/\/www.sigalou-domotique.fr\/zh\/generer-une-liste-des-equipes-teams-leurs-canaux-les-proprietaires-membres","title":{"rendered":"\u4f7f\u7528 Power Automate \u6216 PowerShell \u751f\u6210\u56e2\u961f\u3001\u9891\u9053\u3001\u6240\u6709\u8005\u3001\u2026 \u6210\u5458\u5217\u8868"},"content":{"rendered":"<h1>\u76ee\u6807\uff1a<\/h1>\n<p>\u6211\u60f3\u751f\u6210\u8fd9\u6837\u7684\u5217\u8868\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-431\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2020\/06\/excelteams.png\" alt=\"Excelteams \u7684\" width=\"1396\" height=\"411\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2020\/06\/excelteams.png 1396w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2020\/06\/excelteams-600x177.png 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2020\/06\/excelteams-300x88.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2020\/06\/excelteams-1024x301.png 1024w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2020\/06\/excelteams-768x226.png 768w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2020\/06\/excelteams-1200x353.png 1200w\" sizes=\"auto, (max-width: 1396px) 100vw, 1396px\" \/><\/p>\n<p><!--more--><\/p>\n<h1>&nbsp;\u7b2c\u4e00\u6b21\u5c1d\u8bd5\uff0cPower Automate<\/h1>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-432\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2020\/06\/pa.png\" alt=\"PA PA\" width=\"295\" height=\"157\"><\/p>\n<p>\u6211\u5f00\u59cb\u5b9e\u65bdPower Automate\u7684\u4e00\u4ee3Excel\uff0c\u770b\u8d77\u6765\u50cf\u8fd9\u6837\uff1a<\/p>\n<table border=\"2\">\n<tbody>\n<tr>\n<td>&nbsp;<img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-433\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2020\/06\/pa2.png\" alt=\"PA2 \u7684\" width=\"668\" height=\"632\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2020\/06\/pa2.png 668w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2020\/06\/pa2-600x568.png 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2020\/06\/pa2-300x284.png 300w\" sizes=\"auto, (max-width: 668px) 100vw, 668px\" \/><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u8981\u5236\u5b9a\u6e05\u5355\uff0c\u8fd9\u53ef\u80fd\u5c31\u8db3\u591f\u4e86\uff0c\u4f46\u5728\u64b0\u5199\u672c\u6559\u7a0b\u65f6\uff0c <strong>Power Automate\u8fd8\u4e0d\u77e5\u9053<\/strong> \u63d0\u53d6\u6210\u5458\uff0c\u6240\u6709\u8005\u6216\u9891\u9053\u6216\u56e2\u961f\u662f\u5426\u662f\u79c1\u6709\u7684\u3002 \u6240\u4ee5\u5b83\u4e0d\u9002\u5408\u6211\uff0c\u6211\u5bfb\u627e\u53e6\u4e00\u4e2a\u89e3\u51b3\u65b9\u6848\u3002<\/p>\n<h1>\u7b2c\u4e8c\u6b21\u5c1d\u8bd5\uff0c\u4f7f\u7528PowerShell<\/h1>\n<p>\u56de\u5230\u5f3a\u5927\u7684\u547d\u4ee4\u884c\u5de5\u5177\u901a\u5e38\u662fIT\u4e13\u4e1a\u4eba\u5458\u7684\u53cd\u5e94\uff0c\u6211\u5e76\u4e0d\u5931\u671b\u3002 <strong>MicrosoftTeams \u6a21\u5757 \u7684 PowerShell<\/strong>.<\/p>\n<p>\u4f7f\u7528 @ info: <a href=\"http:\/\/jeedom.sigalou-domotique.fr\/jeedom\">Jeedom \u7684<\/a>, \u6211\u8bd5\u7740\u6d4b\u8bd5PowerShell\u9002\u5e94Raspbian\u3002 \u8fd9\u662f\u5c06\u5176\u5b89\u88c5\u5728\u5df2\u7ecf\u6258\u7ba1 Jeedom \u7684 Raspi3B+ \u4e0a\u3002<\/p>\n<p>\u6211\u6709\u4e24\u4e2aJeedoms\uff0c\u4e00\u4e2a\u5728prod\uff0c\u4e00\u4e2a\u5728dev\uff0c\u4e00\u4e2a\u5728\u82cf\u65af\u3002 <strong>\u62c9\u4f38 \u62c9\u4f38<\/strong> A Sub \u7684 <strong>\u5df4\u65af\u7279 \u00b7 \u5df4\u65af\u7279<\/strong>. \u5728<a href=\"https:\/\/docs.microsoft.com\/en-us\/powershell\/scripting\/install\/installing-powershell-core-on-linux?view=powershell-7#raspbian\" target=\"_blank\" rel=\"noopener noreferrer\"> \u5fae\u8f6f \u6587\u6863<\/a>, \u6307\u5b9a\u4f7f\u7528Stretch\uff0c\u5728\u5bb6\u91cc\u5b83\u540c\u65f6\u5de5\u4f5c\uff08\u5bf9\u4e8e\u6211\u6d4b\u8bd5\u7684\u5185\u5bb9\uff09\u3002<\/p>\n<h2>\u5b89\u88c5 PowerShell Core<\/h2>\n<p>\u8be2\u95ee\u60a8\u662f\u5b89\u88c532\u4f4d\u8fd8\u662f64\u4f4d\u7248\u672c\u662f\u7b2c\u4e00\u6b65\uff0c\u8bf7\u952e\u5165\uff1a<\/p>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">Uname-m \u7684<\/pre>\n\n\n\n<p>\u4efb\u4f55\u4f4e\u4e8e ARMv \u7684\u503c<strong>7<\/strong> \u572832\u4f4d\u3002<br>64 \u4f4d\u7248\u672c\u4ece AMRV \u5f00\u59cb<strong>8.<\/strong><\/p>\n<p>\u6700\u65b0\u7248\u672c\u7684 Powershell \u53ef\u4ee5\u627e\u5230&nbsp;<a href=\"https:\/\/github.com\/PowerShell\/PowerShell\">https:\/\/github.com\/PowerShell\/PowerShell<\/a> \u5bf9\u4e8e Raspbian.Version 7.1.0 \u5728\u7f16\u5199\u672c\u6559\u7a0b\u7684\u5f53\u5929\u3002<\/p>\n<p>\u5982\u679c\u5df2\u7ecf\u5b89\u88c5\u4e86\u65e7\u7248\u672c\u6216\u4ee4\u4eba\u62c5\u5fe7\u7684\u7248\u672c\uff0c\u5219\u5fc5\u987b\u5c06\u5176\u5220\u9664\uff1a<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">RM-rf ~\/powershell<\/pre>\n\n\n\n<p>\u542f\u52a8\u5b89\u88c5\uff08\u66f4\u65b0\u7248\u672c\u53f7\uff09<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"typescript\" data-enlighter-theme=\"classic\">sudo su - apt-get install '^libssl1.0.[0-9]$'libunwind8 -y wget https:\/\/github.com\/PowerShell\/PowerShell\/releases\/download\/v7.1.0\/powershell-7.1.0-linux-arm32.tar.gz mkdir ~\/powershell tar-xvf .\/powershell-7.1.0-linux-arm32.gz -C ~\/powershell sudo ~\/powershell\/pwsh-c New-ItemType SymbolicLink -Path \"\/usr\/bin\/pwsh\" -Target\"$pshome\/pwsh\uff08\u82f1\u8bed\uff1apshome\/pwsh\uff09<code class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"><\/code><\/pre>\n\n\n\n<div>\u542f\u52a8 PowerShell<\/div>\n<div>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"classic\" data-enlighter-linenumbers=\"false\">~\/powershell\/pwsh<\/pre>\n<\/div>\n\n\n\n<div>\n<div>\n<div>\u67e5\u770b\u7248\u672c<\/div>\n<div>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"powershell\">$PSVersionTable \u7684<\/pre>\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<h2>\u5728 PowerShell \u4e2d\uff0c\u5b89\u88c5 MicrosoftTeams \u6a21\u5757<\/h2>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"powershell\">\u5378\u8f7d\u6a21\u5757 - \u547d\u540d MicrosoftTeams Install-Module -Name MicrosoftTeams -AllowPrerelease Import-Module MicrosoftTeams<\/pre>\n<h2>\u5728\u547d\u4ee4\u884c\u4e0a\u505a\u7b2c\u4e00\u6b21\u6d4b\u8bd5<\/h2>\n<p>\u8981\u68c0\u67e5 MicrosoftTeams \u7684\u7248\u672c\u548c\u6b63\u786e\u5b89\u88c5\uff1a<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">Get-module | ft \u540d\u79f0\uff0c\u7248\u672c<\/pre>\n<p>\u901a\u8fc7\u68c0\u7d22\u56e2\u961f\u5217\u8868\u6765\u5c1d\u8bd5\u5b83<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\u8fde\u63a5 Microsoft \u56e2\u961f<\/pre>\n<p><em><span style=\"text-decoration: underline;\">\u6ce8\uff1a<\/span> : \u6700\u8fd1\uff0cxdg-open\u9519\u8bef\u963b\u6b62\u4e86\u8eab\u4efd\u8bc6\u522b\uff0c\u6211\u4e0d\u5f97\u4e0d\u4f7f\u7528Credential\u7684\u811a\u672c\u6765\u8bc6\u522b\u81ea\u5df1\u3002<\/em><\/p>\n<p>\u67e5\u770b MiscrosoftTeams Module \u547d\u4ee4\u5217\u8868<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">Get-command -MicrosoftTeams \u6a21\u5757<\/pre>\n<p>\u9075\u5faa\u9ec4\u8272\u6307\u793a\u6765\u8bc6\u522b\u81ea\u5df1<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">$AllTeams = Get-Team Write-Output\uff08\u82f1\u8bed\uff1aGet-Team Write-Output\uff09 $AllTeams \u8054\u76df<\/pre>\n<p class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\u56e2\u961f\u540d\u5355\u5fc5\u987b\u663e\u793a<\/p>\n<h2>\u5b89\u88c5 PSFTP<\/h2>\n<p>\u8981\u5c06Powershell\u751f\u6210\u7684\u6587\u4ef6\u53d1\u9001\u5230FTP\u670d\u52a1\u5668\uff0c\u6700\u7b80\u5355\u7684\u65b9\u6cd5\u662f\u5b89\u88c5PSFTP\uff08\u5728PowerShell\u4e2d\uff09<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">apt-get \u5b89\u88c5 PSFPT<\/pre>\n\n\n\n<h2>\u8fd0\u884c\u547d\u4ee4\u884c\u811a\u672c<\/h2>\n<p>\u542f\u52a8\u811a\u672c <a href=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2020\/12\/teams_sigalou.zip\">_sigalou \u961f<\/a>.ps1\uff0c\u4f7f\u7528\u6b64\u547d\u4ee4\uff1a<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">~\/powershell\/pwsh - \u6587\u4ef6 \"teams_sigalou.ps1\"<\/pre>\n\n\n\n<p><strong>\u4f7f\u7528 Teams \u5217\u8868\u751f\u6210 CSV<\/strong><\/p>\n<p>\u7ecf\u8fc7\u591a\u6b21\u6d4b\u8bd5\uff0c\u8fd9\u91cc\u662f\u6700\u540e\u4e00\u4e2a\u811a\u672c\uff0c\u4e0d\u8981\u72b9\u8c6b\u5730\u9002\u5e94\u5b83\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"># \u751f\u6210 Teams \u5217\u8868\u5e76\u5bfc\u51fa\u5230 CSV \u6587\u4ef6\u7684\u811a\u672c\uff0c\u7136\u540e\u7531 FTP \u53d1\u9001\u6b64\u6587\u4ef6\u4ee5\u4f9b Excel \u6587\u4ef6\u5229\u7528 # \u5bfc\u6f14\uff1a Sigalou 06\/12\/2020 Sigalou@sigalou-domotique # \u4f7f\u7528GitHub\u6216\u7535\u5b50\u90ae\u4ef6\u6765\u89e3\u51b3\u4efb\u4f55\u95ee\u9898\uff0c\u8bf7\u6c42\u6539\u8fdb\uff0c\u5e76\u6beb\u4e0d\u72b9\u8c6b\u5730\u63d0\u51fa\u6539\u8fdb\u5efa\u8bae\u3002 # \u8bf7\u79bb\u5f00\u8fd9\u4e9b\u7ebf # \u6765\u6e90\uff1a http:\/\/jeedom.sigalou-domotique.fr\/generate-a-list-teams-teams-their-channels-owners-members # https:\/\/github.com\/sigalou\/MicrosoftTeamstoCSV\u3002 # FPT \u8bc6\u522b Param([string])$\u7528\u6237\u540d\uff0c[\u5b57\u7b26\u4e32]$\u5bc6\u7801\uff0c[switch]$MFA\uff0c[int]$\u884c\u52a8 \uff09 $passwordFTP = ConvertTo-SecureString -AsPlainText \"xxxx\" -Force $credentialsFTP = New-Object System.Management.Automation.PSCredential \"xxxx_ftp\"\uff0c $passwordFTP \u5bfc\u5165\u6a21\u5757 PSFTP # \u8bc6\u522b M365 $\u7528\u6237\u540d = \"xxxxx@xxxxx.com\" $\u5bc6\u7801 = \"xxxx\" #\u8fde\u63a5\u5230 Microsoft Teams $Module=Get-Module - \u547d\u540d MicrosoftTeams -ListAvailable if\uff08$Module.count -eq 0\uff09{ Write-Host MicrosoftTeams \u6a21\u5757\u4e0d\u53ef\u7528 -ForegroundColor yellow\uff09 $\u786e\u8ba4= Read-Host \u60a8\u786e\u5b9a\u8981\u5b89\u88c5\u6a21\u5757\u5417\uff1f [Y] Yes [N] No if\uff08$\u786e\u8ba4 -match \"[yY]\"\uff09{ Install-Module MicrosoftTeams } else { Write-Host MicrosoftTeams \u6a21\u5757\u662f\u5fc5\u9700\u7684.\u8bf7\u4f7f\u7528 Install-Module MicrosoftTeams cmdlet \u5b89\u88c5\u6a21\u5757\u3002 Write-Host 'n'n'n'n'n'n'n'n'n'n'n'n'n'n'n'n'n'n'n'n'n'n'n'n'n'n'n'n'n'n'n'n'n'n'n'n'n'n -ForegroundColor \u9ec4\u8272 #\u4f7f\u7528 MFA if\uff08$mfa.IsPresent\uff09{ $Team=Connect-MicrosoftTeams #\u4f7f\u7528\u975e MFA else { #\u4e3a\u8c03\u5ea6\u76ee\u7684\u5728\u811a\u672c\u4e2d\u5b58\u50a8\u51ed\u636e\/\u5c06\u51ed\u8bc1\u4f5c\u4e3a\u53c2\u6570 if\uff08\uff08\uff09\uff09$Username -ne \" \uff09 - \u548c\uff08$\u5bc6\u7801 -ne \" \uff09 { $SecuredPassword = ConvertTo-SecureString -AsPlainText $\u5bc6\u7801 - \u90e8\u961f $\u8bc1\u4e66 = New-Object System.Management.Automation.PSCredential $\u7528\u6237\u540d\u3001$SecuredPassword \u7684 $Team=Connect-MicrosoftTeams -Credential $\u51ed\u8bc1 } \u5176\u4ed6 { $Team=Connect-MicrosoftTeams } #\u68c0\u67e5\u56e2\u961f\u8fde\u901a\u6027\u5982\u679c\uff08$Team-ne \u56e2\u961f $null\uff09{ Write-host \"nConnected to Microsoft Teams -ForegroundColor Green } \u5728\u521b\u5efa Teams \u4f1a\u8bdd\u65f6\u53d1\u751f Write-Host \u9519\u8bef\u3002 \u8bf7\u518d\u8bd5\u4e00\u6b21 -ForegroundColor Red\u51fa\u53e3 # \u4f4d \u4f4d \u4f4d $\u771f\u7684\u5728\u5c4f\u5e55\u4e0a\u6709\u4e00\u4e2a\u8c03\u8bd5\u4ee5\u8ddf\u968f\u8fd9\u4e00\u4ee3 $DEBUG=$\u5047 \u7684 $\u7ed3\u679c=\" $\u7ed3\u679c=@\uff08\uff09 $path=\".\/TeamsData.csv\" If(Test-Path) $\u8def\u5f84 { \u5220\u9664 \u9879 $\u8def\u5f84 } Write-Host Data Recovery... $\u8ba1\u6570=0 $\u56e2\u961f\uff1aGet-Team -Visibility Private $nbTeamsPrivate=$Teams.Count #$Team=Get-Team -Visibility Public -User xxxxx@xxxxxxxxxxxxxxxx.fr $\u56e2\u961f(Get-Team -Visibility Public) $nbTeams=$Teams.Count $\u53ef\u4e50 \u662f \u53ef\u4e50$nbTeams.ToString\uff08\uff09+\"-\"+$nbTeamsPrivate.ToString\uff08\uff09 $\u7ed3\u679c=@{'ColA'=$\u53ef\u4e50\uff1b'ColB'=\"Updating of the $(get-Date -format 'dd-MM-yyyy' HH:mm').ToString\uff08\uff09;} $\u7ed3\u679c= New-Object psobject -Property $\u7ed3\u679c \uff0c \u7ed3\u679c $\u7ed3\u679c | \u9009\u62e9 'ColA', 'ColB' \u03b8 Export-Csv $\u8def\u5f84 - NoTypeInformation - Append Write-Host 'nData\u5904\u7406... $Team | Sort-Object DisplayName \u03b8 foreach { $\u53cd\u5411\u7ebf=0 $\u56e2\u961f\u540d=$_.Display $\u63cf\u8ff0 :$_. \u63cf\u8ff0 $GroupID=$_.GroupId $TeamUser=Get-TeamUser -GroupId $GroupID \u7684 GroupID $TeamMemberCount=$TeamUser.Count $TeamPrefix=\" $putVirgule=0 $NameProprio=\" $AllProprios=$TeamUser | Where-Object { $\u89d2\u8272 -eq 'owner' } $TouslesProprios | foreach { if\uff09$putVirgule -eq 1 { $putVirgule=0 $NameProprio=$NameProprio+\"\uff0c\" } $NameProprio=$NameProprio+ \u7684$_.Name $PutVirgule=1 {\\displaystyle } $NameProprio=$NameProprio+ \u548c \"+\"$TeamMemberCount+\"\u6210\u5458\"\u5982\u679c\uff08$TeamMemberCount-gt 80\uff09{ $NameProprio=\" $TeamPrefix=\" {\\displaystyle } \u5982\u679c\uff08$_.Archived -eq \"true\" { $TeamPrefix=\" $NameProprio=\"[\u5b58\u6863]\" } If\uff08$\u63cf\u8ff0 -eq $\u56e2\u961f \u540d\u79f0 {$\u63cf\u8ff0=\"\"} Write-Progress -Activity\" $\u8ba1\u6570 \/$nbTeams \u56e2\u961f $\u56e2\u961f \u540d\u79f0 \" \u5982\u679c$ModeDEBUG\uff09{ Write-Host 'n$\u56e2\u961f \u540d\u79f0 ] $\u63cf\u8ff0\uff1aForegroundColor green} $count++ Get-TeamChannel -MembershipType Standard -GroupId $GroupID | foreach { $\u9891\u9053\u540d=$_.DisplayName if\uff08$Channelname -ne \"general\" { Write-Progress -Activity\uff09 $\u8ba1\u6570 \/$nbTeams \u56e2\u961f $\u56e2\u961f\u540d \/\/ $\u9891\u9053 \u540d\u79f0 #$\u63cf\u8ff0 :$_. \u63cf\u8ff0\u5982\u679c\uff08$ModeDEBUG\uff09{ Write-Host \u00d8&gt; [$\u9891\u9053 \u540d\u79f0 ] $ChannelMemberCount \u7684 $\u63cf\u8ff0 } $\u7ed3\u679c=@'ColA'=\";'ColB'=\"$Channelname;} \u5176\u4ed6 { $\u7ed3\u679c=@{'ColA'=$TeamPrefix+$\u56e2\u961f\u540d\u79f0\uff1a'ColB'=$NameProprio;} $\u7ed3\u679c= New-Object psobject -Property $\u7ed3\u679c \uff0c \u7ed3\u679c $\u7ed3\u679c | \u9009\u62e9 'ColA', 'ColB' \u03b8 Export-Csv $\u8def\u5f84 -NoTypeInformation -Append $MeterLines++ } $Channelprives=Get-TeamChannel -MembershipType Private -GroupId $GroupID \u7684 GroupID $Channelprivescount=$Canalprives.Count If\uff08$Channelprivescount -eq \"1\" { if\uff08\uff09$ModeDEBUG\uff09{ Write-Host \\&gt; +$Canalprivescount \u79c1\u4eba\u9891\u9053 $result=@'ColA'=\";'ColB'=\"+1 private channel;'COLC'=\";'ColD'=\";} $\u7ed3\u679c= New-Object psobject -Property $\u7ed3\u679c \uff0c \u7ed3\u679c $\u7ed3\u679c | \u9009\u62e9 'ColA', 'ColB' \u03b8 Export-Csv $\u8def\u5f84 -NoTypeInformation -Append $Counterlines++ } elseif\uff08$Channelprivescount -gt 1\uff09{ if\uff08\uff09$ModeDEBUG\uff09{ Write-Host \\&gt; +$\u79c1\u4eba\u8fd0\u6cb3 {\\displaystyle } $\u7ed3\u679c=@'ColA'=\";'ColB'=\"+$\u79c1\u4eba\u9891\u9053Privescount Channels\";} $\u7ed3\u679c= New-Object psobject -Property $\u7ed3\u679c \uff0c \u7ed3\u679c $\u7ed3\u679c | \u9009\u62e9 'ColA', 'ColB' \u03b8 Export-Csv $\u8def\u5f84 -NoTypeInformation -Append $MeterLines++ } \u5982\u679c\uff08$\u53cd\u6570 -eq '1'\uff09{ if\uff08\uff09$modeDEBUG\uff09{ Write-Host \\&gt; \u6dfb\u52a0\u4e00\u4e2a\u7a7a\u7684 } \u884c $result=@{'ColA'=\";'ColB'=\";} $\u7ed3\u679c= New-Object psobject -Property $\u7ed3\u679c \uff0c \u7ed3\u679c $\u7ed3\u679c | \u9009\u62e9 'ColA', 'ColB' \u03b8 Export-Csv $\u8def\u5f84 - NoTypeInformation - \u9644\u5f55 } \u5982\u679c\uff08$modeDEBUG\uff09{ Write-Host -ForegroundColor green } } Write-Progress -Activity\"n Processed Teams count\uff1a $\u6570\"n\"\u76ee\u524d\u5904\u7406\uff1a $Teamname'n Currently Processing Channel \uff1a $\u5df2\u5b8c\u6210 if\uff08(Test-Path-Path) $\u8def\u5f84\uff09-eq \"True\"\uff09{ Write-Host \"nReport available in $\u8def\u5f84 -ForegroundColor Green } \u65ad\u5f00-MicrosoftTeams # \u5c06 TeamsData.csv \u6587\u4ef6\u53d1\u9001\u5230 ftp Set-FTPConnection -Credentials $\u8bc1\u4e66 FTP -Server ftp.xxxx.org -Session FloFTP -ignoreCert -UseBinary -KeepAlive $\u4f1a\u8bdd = Get-FTPConnection -Session FloFTP Get-ChildItem \".\\TeamsData.csv\" | Add-FTPItem -Session $\u4f1a\u8bdd -Path \/Teams\/ -Overwrite      <\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>","protected":false},"excerpt":{"rendered":"<p>\u76ee\u6807\uff1a \u6211\u60f3\u751f\u6210\u8fd9\u6837\u7684\u5217\u8868\uff1a<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[14,24],"tags":[51],"class_list":["post-434","post","type-post","status-publish","format-standard","hentry","category-domotique","category-microsoft-365","tag-teams"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.sigalou-domotique.fr\/zh\/wp-json\/wp\/v2\/posts\/434","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sigalou-domotique.fr\/zh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sigalou-domotique.fr\/zh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/zh\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/zh\/wp-json\/wp\/v2\/comments?post=434"}],"version-history":[{"count":0,"href":"https:\/\/www.sigalou-domotique.fr\/zh\/wp-json\/wp\/v2\/posts\/434\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sigalou-domotique.fr\/zh\/wp-json\/wp\/v2\/media?parent=434"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/zh\/wp-json\/wp\/v2\/categories?post=434"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/zh\/wp-json\/wp\/v2\/tags?post=434"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}