This file contains hidden or 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
#!/bin/sh | |
dir_backup_dst=/path/to/backup/`hostname` | |
timestamp=`date +%Y%m%d%H` | |
myname=`basename $0` | |
pid=$$ | |
( |
This file contains hidden or 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
$sh = New-Object -ComObject Shell.Application | |
$nc = $sh.NameSpace(3).Items() | ? { $_.Name -eq "ネットワーク接続" } | |
$lan = $nc.GetFolder.Items() | ? { $_.Name -eq "ローカル エリア接続" } | |
$disable = $lan.Verbs() | ? { $_.Name -eq "無効にする(&B)" } | |
if($disable) | |
{ | |
write-host "disabling." | |
$disable.DoIt() | |
} |
This file contains hidden or 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
param([switch]$nomail) | |
trap [Exception] { | |
$t = $error[0].ToString().Trim() + "`n" + $error[0].InvocationInfo.PositionMessage.Trim() | |
[Diagnostics.EventLog]::WriteEntry("report_wsus", $t, "Error", 1) | |
} | |
[reflection.assembly]::LoadWithPartialName("Microsoft.UpdateServices.Administration") | out-null | |
$update_server = [Microsoft.UpdateServices.Administration.AdminProxy]::GetUpdateServer() | |
$update_server.PreferredCulture ="ja" |
This file contains hidden or 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
var Registry = function () { | |
this.initialize.apply(this, arguments); | |
}; | |
Registry.prototype = { | |
initialize: function(computer) { | |
var locator = new ActiveXObject("WbemScripting.SWbemLocator"); | |
var server = locator.ConnectServer(computer, "root\\default"); | |
this.stdregprov = server.Get("StdRegProv"); |
This file contains hidden or 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
param([switch]$nomail) | |
trap [Exception] { | |
$t = $error[0].ToString().Trim() + "`n" + $error[0].InvocationInfo.PositionMessage.Trim() | |
[Diagnostics.EventLog]::WriteEntry("approve_update", $t, "Error", 1) | |
} | |
[reflection.assembly]::LoadWithPartialName("Microsoft.UpdateServices.Administration") | out-null | |
$update_server = [Microsoft.UpdateServices.Administration.AdminProxy]::GetUpdateServer() | |
$update_server.PreferredCulture ="ja" |
This file contains hidden or 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 JAVA_HOME=C:\Program Files\Java\jdk1.6.0_15 | |
set OMEGAT_HOME=c:\Program Files\OmegaT | |
cmd /c c:\path\to\ant\bin\ant.bat | |
pause |
This file contains hidden or 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
[reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo") | out-null | |
$server = new-object Microsoft.SqlServer.Management.Smo.Server("プリンシパルサーバ") | |
$db = $server.Databases["mirrortest"] | |
$db.ChangeMirroringState([Microsoft.SqlServer.Management.Smo.MirroringOption]::Failover) |
This file contains hidden or 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
$dns = gwmi -Class MicrosoftDNS_server -Namespace Root\MicrosoftDNS -ComputerName DCコンピュータ名 | |
$rrs = gwmi -Class MicrosoftDNS_ResourceRecord -Namespace Root\MicrosoftDNS -ComputerName DCコンピュータ名 |
This file contains hidden or 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
#!/bin/sh | |
myname=`basename $0` | |
pid=$$ | |
( | |
echo "fetch repos." 1>&2 | |
cd /path/to/redmine/rails_root | |
env LANG=ja_JP.UTF-8 ruby script/runner "Repository.fetch_changesets" -e production |
OlderNewer