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
AESでktpass | |
ktpass -princ HTTP/[email protected] -mapuser http-somehost -crypto AES256-SHA1 -ptype KRB5_NT_SRV_HST +rndPass -out somehost.keytab | |
RC4でktpassして2008 DCに対してkinitするとき | |
[libdefaults] | |
default_tkt_enctypes = rc4-hmac | |
default_tgs_enctypes = rc4-hmac | |
kinit(v5): Key table entry not found while getting initial credentials |
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.Office.Interop.Word") | out-null | |
$word = new-object Microsoft.Office.Interop.Word.ApplicationClass | |
$word.Visible = $true | |
foreach($arg in $args) | |
{ | |
foreach($doc in (Get-Item $arg)) | |
{ | |
$fn_doc = $doc.FullName | |
$word_doc = $word.Documents.Open($fn_doc, $false, $false) |
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("System.Windows.Forms") | out-null | |
[System.Windows.Forms.Application]::SetSuspendState([System.Windows.Forms.PowerState]::Suspend, $false, $false); |
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 |
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
[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
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
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
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"); |