This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
On Error Resume Next | |
Const strURL = "http://www.mydns.jp/login.html" | |
Const strUser = "ユーザー名" | |
Const strPasswd = "パスワード" | |
Dim objXML | |
Dim strXMLDoc | |
Dim intRet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SET FLD=%~dp0 | |
SET TXT_DEADLOCK=DeadLock.txt | |
If not Exist %FLD% mkdir %FLD% | |
del %FLD%\%TXT_DEADLOCK% | |
bcp "SELECT * FROM sys.fn_xe_file_target_read_file('C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Log\DeadLock*.xel', 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Log\DeadLock*.xem', null, null)" queryout "%FLD%\%TXT_DEADLOCK%" -T -c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Dim mFrom | |
Dim mTo | |
Dim SmtpSvr | |
mFrom = "From@From.com" | |
mTo = "To@To.com" | |
SmtpSvr = "SmtpServer" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Net.Http; | |
using System.Net.Http.Headers; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace LineNotifyForFamily | |
{ | |
public static class LineNotify |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REM Powershellで「dir cert:\LocalMachine\My」を実行し、証明書の拇印を取得して下記に設定する。 | |
REM 新しいもの(差し替えるもの)と古いもの(差し替えられるもの)の両方の捺印が必要。 | |
set OldThumbprint="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" | |
set NewThumbprint="YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY" | |
set pfxFileName="ssl.pfx" | |
certutil -f -p パスワード -importpfx "WebHosting" "%~dp0%pfxFileName%" | |
cd %windir%\system32\inetsrv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome" /v "ExternalProtocolDialogShowAlwaysOpenCheckbox" /t "REG_DWORD" /d "1" /f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Dim updateSession, updateSearcher, update, searchResult, downloader, updatesToDownload, updatesToInstall, installer, installationResult, InputKey, i | |
If Right((LCase(WScript.FullName)),11) <> "cscript.exe" then | |
WScript.Echo "このスクリプトはCSCRIPT.EXEを使用して実行して下さい。" & _ | |
vbCRLF & "例: cscript WindowsUpdate.vbs" | |
WScript.Quit(0) | |
End if | |
WScript.Echo "------------------------------" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 期限切れ状態を取得。 | |
# 期限切れの場合は「通知」という文字列が現れるので、resultが0以外になる。 | |
$result = (cscript //Nologo C:\Windows\System32\slmgr.vbs /dli | Where-Object{$_ -Like "*通知*" }).length | |
if($result -ne 0) | |
{ | |
slmgr -rearm | |
Restart-Computer -Force | |
} | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$HostServers=@("HostSvr1","HostSvr2","HostSvr3","HostSvr4","HostSvr5") | |
foreach($HostServer in $HostServers){ | |
Get-vm -ComputerName $HostServer | Where-Object {$_.ReplicationHealth -ne "NotApplicable"} | Where-Object {$_.ReplicationHealth -ne "Normal"} | ForEach-Object{ | |
$attempts=3 | |
$sleepInSeconds=60 | |
do | |
{ | |
try |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#********************************** | |
# 監視URLを指定してください。 | |
#********************************** | |
$Urls = New-Object System.Collections.Generic.List[string] | |
$Urls.Add("https://test1.co.jp") | |
$Urls.Add("https://test2.co.jp") | |
#********************************** | |
# メールの送信情報を設定してください。 | |
#********************************** |