분류 전체보기
-
이벤트뷰어 백업IT 2019. 6. 18. 18:14
@echo off net use \\ip\Backup\log\Eventlog /user:id pw #set "date=%YYYY%%MM%%DD%" set "target=\\ip\Backup\log\Eventlog" wmic nteventlog where filename='Application' backupeventlog "%target%\Application-%ComputerName%_%date%.evt" wmic nteventlog where filename='Security' backupeventlog "%target%\Security-%ComputerName%_%date%.evt" wmic nteventlog where filename='System' backupeventlog "%target%\S..
-
nagios notiIT 2019. 4. 30. 10:54
#출처 https://github.com/obaarne/Nagios2Slack/blob/master/slack_host_notify.sh #!/usr/bin/env bash # Edit your Slack hook URL and footer icon URL SLACK_URL=https://hooks.slack.com/services/XXXXXXXXX/XXXXXXXXX/XXXXXXXXXXXXXXXXXXXXXXXX FOOTER_ICON=http://env.baarnes.com/Nagios.png # Host Notification command example : # define command { # command_name slack-host # command_line /usr/lib64/nagios/plug..
-
쉘스크립트 리스트IT 2019. 4. 16. 15:34
리스트 이름.txt 리스트 MDB명.txt 리스트 user.txt 아래 명령어에 txt 안에 있는 리스트명 넣고 싶을때 Connect-Mailbox -Identity "이름" -Database "MDB" -User "mb14" --------- #!/bin/bash cat 리스트 이름.txt| while read line do echo ""Connect-Mailbox -Identity "\"$line"\" done >> a1 cat MDB명.txt | while read line2 do echo ""-Database "\"$line2"\" done >> a2 cat user.txt | while read line3 do echo ""-User "\"$line3"\" done >> a3 root@dev p..
-
Microsoft.PowerShell.Commands.Internal.Format.ListViewHeaderInfo카테고리 없음 2019. 3. 20. 15:07
csv에서 Microsoft.PowerShell.Commands.Internal.Format.ListViewHeaderInfo 발생 파워쉘Get-WinEvent -FilterHashtable @{Logname='Microsoft-Windows-TerminalServices-LocalSessionManager/Operational'; id=25} -MaxEvents 1| Format-List -Property * | Export-Csv c:\test.csv -NoTypeInformation # csv에서 Microsoft.PowerShell.Commands.Internal.Format.ListViewHeaderInfo #아래와 같이 하면 에러메시지가 발생되지 않는다.Get-WinEvent -FilterHa..
-
이벤트 뷰어 25카테고리 없음 2019. 3. 19. 16:16
특정 이벤트 뷰어를 보고 싶다.Get-WinEvent -FilterHashtable @{Logname='Microsoft-Windows-TerminalServices-LocalSessionManager/Operational'; id=25} -MaxEvents 1| Format-List -Property * Get-EventLog -LogName Security -Newest 1 -InstanceId 4625 | Select MachineName,Message,TimeWritten,TimeGenerated | Format-List *