[파워쉘]curl이용하여 smtp발송
# Script/Powershell2025. 5. 23. 17:57[파워쉘]curl이용하여 smtp발송

선행Set-ExecutionPolicy RemoteSigned -Scope CurrentUser sendmail.ps1curl.exe --url "smtp://[smtp호스트명]:[포트 예25]" ` --mail-from "[발송자메일주소]" ` --mail-rcpt "[수신자메일주소]" ` --user "[발송자메일주소]:[패스워드]" ` -T mail.txt 반드시 curl.exe 입력!!!mail.txtFrom: [발송자메일주소]To: [수신자메일주소]Subject: curl SMTP testThis is a test email sent via curl on Windows.

[파워쉘]IIS 웹사이트 중지 시작
# Script/Powershell2022. 7. 20. 18:28[파워쉘]IIS 웹사이트 중지 시작

중지 Stop-IISSite -Name "Default Web Site" https://docs.microsoft.com/en-us/powershell/module/iisadministration/stop-iissite?view=windowsserver2022-ps Stop-IISSite (IISAdministration) Use this topic to help manage Windows and Windows Server technologies with Windows PowerShell. docs.microsoft.com 시작 Start-IISSite -Name "Default Web Site" https://docs.microsoft.com/en-us/powershell/module/iisadmini..

[파워쉘]install-module error
# Script/Powershell2022. 4. 26. 15:53[파워쉘]install-module error

에러내용 PS C:\Users\Administrator> install-module powershellget -force 계속하려면 NuGet 공급자가 필요합니다. NuGet 기반 리포지토리를 조작하려면 PowerShellGet에 NuGet 공급자 버전 '2.8.5.201' 이상이 필요합니다. 'C:\Program Files\PackageManagement\ProviderAssemblies' 또는 'C:\Users\Administrator\AppData\Local\PackageManagement\ProviderAssemblies'에서 NuGet 공급자를 사용할 수 있어야 합니다. 또한 'Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -For..

[파워쉘]base64 디코딩
# Script/Powershell2022. 1. 18. 14:08[파워쉘]base64 디코딩

certutil -decode test-encode test-decode

[파워쉘]확장자 일괄변경
# Script/Powershell2021. 7. 9. 18:03[파워쉘]확장자 일괄변경

Get-ChildItem *.txt | Rename-Item -NewName {“$($_.BaseName).docx”} Get-ChildItem *.txt | Rename-Item -NewName { $_.name -Replace ‘\.txt’,’.docx’ } Get-ChildItem *.txt | foreach {rename-item -path $_ -newname “$($_.basename).docx”} 특정 경로에 파일확장자가 .txt인 파일들을 .docx로 변경해야할 경우 위 3가지 방법 중에 1개로 하면 됨. 첫번째 추천!

image