Powershell 에서 Teams 로 Webhook 을 보내면 한글이 ??로 표시되는 경우가 있다.
$Params = @{
Uri = 'https://outlook.office.com/webhook/...'
Method = 'Post'
ContentType = 'Application/Json'
#Headers = @{'accept'='application/json'}
Body = $TeamsJSON | ConvertTo-Json -Depth 5
}
# Send It
$Request = Invoke-RestMethod @Params
Json 을 UTF8 (BOM 없음) 으로 변환
$TempBody = $TeamsJSON | ConvertTo-Json -Depth 5
# Build the web request
$Params = @{
Uri = 'https://outlook.office.com/webhook/...'
Method = 'Post'
ContentType = 'Application/Json'
#Headers = @{'accept'='application/json'}
Body = [System.Text.Encoding]::UTF8.GetBytes($TempBody)
}
# Send It
$Request = Invoke-RestMethod @Params
'IT > Internet' 카테고리의 다른 글
OTP 토큰 백업과 복원 (0) | 2022.01.25 |
---|---|
OpenVPN 사용 시, Microsoft Office / Store 앱 인터넷 연결 유지 (0) | 2022.01.25 |
[AdGuard Home] Let's encrypt SSL 인증서 설정 (0) | 2021.11.05 |
[Microsoft Teams] Incoming Webhook Test (0) | 2021.09.17 |
[Firefox] 폐쇄망에서 Firefox 업데이트 알림 끄기 (4) | 2020.02.05 |