資格取得のストラテジー マイクロソフト認定ソリューション アソシエイト (MCSA) 会社のインフラ系技術者の昇進必須条件として、MCSA Windows Server 2012 が追加された。 MCSA Win Srv 2012日本語版試験は、2012年11月上旬にリリース予定。 私が勉強できる…
netsh advfirewall set allprofile state on netsh advfirewall set allprofile state offOn Active Directory deployed environment, you should disable "All Profile"(It's including Domain, Public and Private profile) to allow all connection.
SQL Server 2008 R2クラスタをインストールすると、エラー発生。 クラスター リソース 'SQL Server Agent' をオンラインにできませんでした。エラー: グループまたはリソースは要求した操作を実行するのに適切な状態ではありません。 (HRESULT からの例外: 0…
SSD(SAMSUNG SSD 830 256GB)を移設。 移設前:デスクトップPCでUSB→SATA変換アダプタ接続、初期化 移設後:Dell E4300のドライブベイに入れてSATAで接続コンピューターの管理→ディスクの管理、でディスクは見えているが、ドライブ文字が割り当てられていない…
You can run "SQL Server Maintenance Plan" with DTExec.exe.When you create maintenance plan, the "Job" is created in SQL Server by SQL Server Management Studio automatically.The "Job" has the "Step", the "Step" has command line property. Yo…
I had encounted error when installing SQL Server Management Studio with SQL Server 2008 R2 Developer on domain controller. It may be a issue of Windows Installer Component. I had to do this steps to complete installation. msiexec /unreg ms…
ネットワークアダプタのプロパティで、IPv6を無効にしても、6to4などのトンネルインターフェースは有効なまま。 ホスト自体はIPv6のアドレスを持ったままになってしまう。 実害はほとんどないと思うが、IPv6のアドレスを管理するのが面倒、ということもある…
This command get get windows services properties with TSV. DisplayName Name Status(Stopped or Running) StartMode(Auto, Manual or Disabled) StartName(Service Account) Get-Service | sort-object DisplayName |ForEach-Object -Process{$Filter="N…
Get-Service | sort-object DisplayName |ForEach-Object -Process{$Filter="Name='$($_.Name)'";$Service=(Get-WmiObject Win32_Service -filter $Filter);$("$($Service.DisplayName)`t$($Service.Name)`t$($_.Status)`t$($Service.StartMode)`t$($Service…
トンネルインターフェースを選択的に有効化・無効化する場合は、下記のコマンドを実行。 IPv6をまるっと無効化する場合は、こちらを参照 # Disable netsh interface ipv6 isatap set state disablednetsh interface ipv6 6to4 set state disablednetsh inter…
コマンド単発実行 schtasks /query /s サーバ名 /tn タスク名 Powershellでプロパティ取得、schtasksを呼び出すお手軽バージョン。 $Task = (schtasks /query /s サーバ名 /tn "タスク名" /v /fo csv | ConvertFrom-Csv) $Task.前回の結果 0 $Task.状態 準備…
どんなエラーが発生しているか確認するため、イベントID1つにつき1件だけピックアップ。 Get-WinEvent -Path 'D:\work\hoge1.evtx','D:\work\hoge2.evtx' | where {$_.Level -eq 2} | Sort-Object -Unique ID | fl
$Cred = Get-Credential -Credential 'domain\TaskUser'Invoke-Command -ComputerName ServerName -Credential $Cred -ScriptBlock { `Get-ExecutionPolicy -List; `$Ret = Read-Host -Prompt '実行ポリシーを変更します(Hit Any Key)'; `Set-ExecutionPolic…
複数のサーバに、メンテナンス画面用サイトを構成するためのセットアップスクリプト。 #----------#新規作成robocopy \\SourceRepositoryServer\C$\SourceDirectory \\WebServer\C$\Sites\Maintenance /S /E /R:0 /W:0Invoke-Command -ComputerName $Compute…
ロードバランサーに、Dynamics CRMのサーバをぶら下げる。 ロードバランサーからのノード死活監視は、http://hoge.local/Tenant/main.asp にアクセスさせて、HTTP 401エラーを読ませることにした。 このときのHTTP Request/Responseをtelnetで見てみる。 tel…
実行結果を正常=True、エラー=Falseで取得する場合 $Ret = Invoke-Command -ComputerName RemoteComputer -ScriptBlock { hostname ; $? } 実行結果を、ExitCode(任意の数字)で取得する場合 $Ret = Invoke-Command -ComputerName RemoteComputer -ScriptBl…
Import-Module -Name failoverclusters $clusterGroup = Get-ClusterGroup -Cluster ClusterName -Name ClusterGroupName if($clusterGroup.ownerNode -eq 'PrimaryNode') { Write-Host 'Cluster is healthy, move cluster group' Move-ClusterGroup -Cluste…
#Run Registerd Task $TaskService = New-Object -ComObject Schedule.Service $TaskService.Connect('ServerName') $RootFolder = $TaskService.GetFolder('\') $Task=$RootFolder.GetTask('TaskName') $Task.Run(1) #wait for task termination do { write…
仕事でWindows PowerShellを使ったサーバ管理系スクリプトをいろいろ作成している。 実務で自分が使ったテクノロジーとテクニックを再利用するため、blogに書き残すことにした。