Powershell 및 Gmail을 사용하여 이메일을 보내는 방법을 알아보시겠습니까? 이 자습서에서는 Powershell을 사용하여 Windows를 실행하는 컴퓨터에서 명령줄을 사용하여 전자 메일 알림을 보내는 방법을 보여 드리겠습니다.
• Windows 2012 R2
• Windows 2016
• Windows 2019
• Windows 10
장비 목록
다음 섹션에서는 이 자습서를 만드는 데 사용되는 장비 목록을 제공합니다.
아마존 어소시에이트로서, 나는 적격 구매에서 적립.
관련 자습서-PowerShell
이 페이지에서는 PowerShell과 관련된 자습서 목록에 빠르게 액세스할 수 있습니다.
튜토리얼 – Gmail 통합
먼저 Gmail 계정이 외부 프로그램에서 연결을 받을 수 있도록 설정해야 합니다.
브라우저를 열고 Gmail 계정에 액세스합니다.
이 예제에서는 브라우저에 다음 URL을 입력했습니다.
로그인 화면에서 Gmail 사용자 이름과 비밀번호를 입력합니다.

로그인 한 후 다음 URL에 액세스해야 합니다.
• https://myaccount.google.com/signinoptions/two-step-verification
이 계정에서 두 단계 확인을 사용하도록 설정합니다.
두 단계 확인을 활성화한 후 다음 URL에 액세스해야 합니다.
• https://security.google.com/settings/security/apppasswords
응용 프로그램 암호를 만듭니다.
Gmail 응용 프로그램 및 장치 유형: 기타 를 선택합니다.

예제에서 POWERSHELL 장치이름을 지정했습니다.
생성 버튼을 클릭하고 무작위로 생성된 암호를 기록합니다.

그런 다음 다음 URL에 액세스해야 합니다.
• https://accounts.google.com/DisplayUnlockCaptcha
Google 계정에 대한 외부 액세스를 활성화하려면 계속 버튼을 클릭합니다.

Gmail 통합에 필요한 단계를 완료했습니다.
Gmail 통합은 다음과 같은 오류를 해결합니다.
또한 이 오류를 해결합니다.
Gmail 통합을 완료했습니다.
튜토리얼 파워 쉘 – Gmail을 사용하여 이메일을 보내기
Powershell 명령줄을 사용하여 Gmail을 사용하여 전자 메일을 보냅니다.
Gmail 계정 자격 증명을 입력합니다.

테스트가 성공하면 전송된 메시지가 표시됩니다.

Powershell을 사용하여 첨부 파일이 있는 전자 메일을 보냅니다.
Powershell을 사용하여 Gmail 및 저장된 자격 증명을 사용하여 전자 메일을 보냅니다.
Powershell을 사용하여 Gmail 및 자격 증명을 사용하여 전자 메일을 보냅니다.
축! PowerShell을 사용하여 Gmail을 사용하여 이메일을 보낼 수 있습니다.