<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
   <channel>
      <title>くわぞうメモ</title>
      <link>http://www.kuwazou.net/blog/</link>
      <description></description>
      <language>ja</language>
      <copyright>Copyright 2008</copyright>
      <lastBuildDate>Tue, 01 Apr 2008 22:10:09 +0900</lastBuildDate>
      <generator>http://www.sixapart.com/movabletype/?v=4.1</generator>
      <docs>http://blogs.law.harvard.edu/tech/rss</docs> 

      
      <item>
         <title>Exchange Server 2007　フォレスト間メールボックスの移動</title>
         <description><![CDATA[Exchange Server 2007のhelpで
「フォレスト間でメールボックスを移動する方法」を検索してみるのが一番よいですが、
一応書いておきます。

環境は、移行元、移行先、互いに１フォレスト１ドメイン１Exchange組織の環境です。
WIndows Server 2003 SP2 + Exchange Server 2003 SP2
　　↓
Windows Server 2008 + Exchange Server 2007 SP1


<big><strong>１．前段階としては、フォレスト間信頼が完全に構築されている必要があります</strong>。</big>

※「代わりのUPNサフィックス」が両方のフォレストに同じものが登録されていると、信頼関係はうまく結べても、実質、信頼関係が機能しなくなる場合があるのでご注意。
この場合は、重複するUPNサフィックスを削除して、また信頼関係を壊して、作り直してください。


<big><strong>２．つぎに、ADMT3.0を使用して、ユーザーオブジェクトを移行します</strong>。</big>

ちなみにWindows Server 2003と、Windows Server 2008では、
ドメインとフォレストの機能レベルに注意しながらADMT3.0を2003側にインストールします。
この実験では機能レベルは2003に統一しました。

機能レベルを2007にすると、フォレスト間の信頼関係を結んだ時点で
2003側から2007側が見えなかったりして、あまりうまくいきませんでした。

こちらも参考にしてください。
<a href="http://blogs.technet.com/junichia/archive/2008/03/15/active-directory-migration-tool-admt-windows-server-2008.aspx">ADMT v3.0 による Windows Server 2008 への移行について</a>

大雑把に言えば、１フォレスト１ドメインのような単純な環境同士であれば、
Administratorsグループにいるユーザー(Administratorも可)を、
相手先ドメインのAdministratorsグループに加えて、
これをお互いのドメインで実行して、
両方のドメイン（実質フォレスト）に管理権限のあるユーザーをつくり、
そのユーザーでADMTを実行すればよいでしょう。


<big><strong>３．$SourceCredential = Get-Credential</strong></big>

「Exchange管理シェル」で、下記のコマンドを使い、
シェル変数？　-SourceForestCredential  に
移行元のExchange組織に対して、全権のあるアカウント情報を格納しておきます。

Exchange Serverの組織の権限を色々と変更していなければ、
移行元ドメインのAdministratorで十分で大丈夫でしょう。

<pre>$SourceCredential = Get-Credential
ここで、
アカウント「IKOU-MOTO\Administrator」
「それに対するパスワード」を入力する</pre>


<big><strong>４．$TargetCredential = Get-Credential</strong></big>

-SourceForestCredential  に
移行先のExchange組織に対して、全権のあるアカウント情報を格納しておきます。
移行先ドメインに管理権限のあるAdministratorで大丈夫でしょう。

<pre>$TargetCredential = Get-Credential
ここで、
アカウント「IKOU-SAKI\Administrator」
「それに対するパスワード」を入力する</pre>


■確認

<pre> > echo $SourceCredential
IKOU-MOTO\administrator
> echo $TargetCredential = Get-Credential
IKOU-SAKI\administrator</pre>
と出力されればOK。


<big><strong>５．Move-Mailboxコマンド</strong></big>

普通はこれでメールボックスの移動ができるのですが、
コピペしながらコマンドを修正して打ち込もうとしても、
なかなかエラーが消えなくてうまくいきません。

というのは、このExchange管理シェル、
<u>コピペをすると、改行付近の文字がなくなってしまいます。</u>

だから、エラーが消えなかったら、そこの部分をじっくりみて、
文字列が崩れていないかをチェックするのがよいでしょう。

何回も修正して、エラーが出なくなったらやっと下記のように成功します。

<pre>[PS] C:\>Move-Mailbox
 -TargetDatabase "EX-2007\First Storage Group\Mailbox Database"
 -Identity kuwazou 
 -GlobalCatalog EX-2007.ikou-saki.kuwazou.net
 -SourceForestGlobalCatalog EX-2003.ikou-moto.kuwazou.net
 -NTAccountOU "OU=Users,DC=ikou-saki,DC=kuwazou,DC=net"
 -SourceForestCredential $SourceCredential
 -TargetForestCredential $TargetCedential

確認
この操作を実行しますか?

メールボックス くわぞう  を
データベース EX-2007\FirstStorage Group\Mailbox Database に移動しています。
この操作では、メールボックスの
 Active Directory構成のみが変更されます。
メールボックスのコンテンツは失われる可能性があります。
変更が完了するまでこのメールボックスにアクセスすることはできません。

[Y] はい(Y)  [A] すべて続行(A)  [N] いいえ(N)  [L] すべて無視(L)  [S] 中断(S)
[?] ヘルプ(既定値は "Y"): y</pre>

ここで、Yを押すと、メールボックスの移動（といっても、コピーである。もとはなくならない）が始まる。
画面上には、
<pre>kuwazou
　　　　メメッッセセーージジをを移移動動ししてていいまますす。。　ふぉふぉるるだだ (35/512)
　　　　[oooooo　　　　　　　　　　]</pre>
（原文ママ）というメッセージで移動中なのがわかる。
相変わらず、結構時間はかかる。

終了すると、このようなメッセージがでる。
<pre>StatusMessage : このメールボックスは移動先のデータベースに移動されました。
ReportFile : C:\Program Files\Microsoft\Exchange Server\Logging\MigrationLogs\move-Mailbox20080325-012026-2736001.xml</pre>

※上記のコマンドでは、ユーザーオブジェクトがすでにメールボックスを持っている場合には
エラーとなってしまうが、<strong>-AllowMerge</strong> オプションをつけることによって、内容をマージすることができる。
]]></description>
         <link>http://www.kuwazou.net/blog/ms_server/exchange_server/exchange_server_2007.html</link>
         <guid>http://www.kuwazou.net/blog/ms_server/exchange_server/exchange_server_2007.html</guid>
         <category>Exchange Server</category>
         <pubDate>Tue, 01 Apr 2008 22:10:09 +0900</pubDate>
      </item>
      
      <item>
         <title>ServerCoreでxmlファイルを編集するときの注意</title>
         <description><![CDATA[ServerCoreでは、notepad.exe（メモ帳）が使えるので、
これを利用して、テキストの設定ファイルを編集できますが、
<pre>>notepad.exe hoge.xml</pre>
とやってファイルを開き、編集、上書き保存をすると、
<u>文字コードがShift-JISになってしまいます。</u>

xmlファイルはUnicodeになっていなければならないので、
これでは正しいxmlファイルとして読み込まれません。

<s>なので、正しくは、
<pre>>notepad.exe <u><strong>/W</strong></u> hoge.xml</pre>
とします。</s>

Hyper-Vの設定ファイルなどを編集するときに気を付けてください。

なお、Shift-JISになってしまったxmlファイルを
ServerCore上でUnicodeに直す方法はわかりません。

ファイル共有をして、
外のマシンからTeraPad（UTF-8対応）などで開くしかないと思います。

<strong>【後日談】
notepad.exe /Wで開いても、保存のときはShift-JISになっちゃいました。
なので、無理です。</strong>
ServerCoreでも<a href="http://e-words.jp/w/SDI.html">SDI(Single Document Interface)</a>もののアプリケーションならば使用できると思う(※)ので、TeraPadなどをインストールしたほうがよいです。

TeraPadをインストールして、PATHを通します。
<pre>>setx Path "%Path%;c:\Program Files (x86)\TeraPad"</pre>
Pathは一回logoffして、次回のlogon時から有効になります。

※wgetのwindows版や、TeraTermPro(ttermpro.exe)、FFFTPなどが使用できました。
]]></description>
         <link>http://www.kuwazou.net/blog/ms_server/windows_server_2008/server_core/servercorexml.html</link>
         <guid>http://www.kuwazou.net/blog/ms_server/windows_server_2008/server_core/servercorexml.html</guid>
         <category>Server Core</category>
         <pubDate>Wed, 12 Mar 2008 22:19:57 +0900</pubDate>
      </item>
      
      <item>
         <title>環境変数の設定</title>
         <description><![CDATA[<pre>>setx Path "%Path%;c:\bin"</pre>
というようにやる。

この""(ダブルコーテーション)で必ず囲ってやる必要があるです。

<pre>path %Path%;c:\bin</pre>
だと、そのシェルだけのコマンドパスになるので注意


しかし、<u>ServerCoreでもregedit.exeは使える</u>ので、
<pre>HKEY_CURRENT_USER\Environment\Path</pre>
の値を書き換えてしまうほうが早いとは思います。
]]></description>
         <link>http://www.kuwazou.net/blog/ms_server/windows_server_2008/server_core/post_35.html</link>
         <guid>http://www.kuwazou.net/blog/ms_server/windows_server_2008/server_core/post_35.html</guid>
         <category>Server Core</category>
         <pubDate>Wed, 12 Mar 2008 21:27:41 +0900</pubDate>
      </item>
      
      <item>
         <title>Windows Updateの自動更新の設定</title>
         <description><![CDATA[これもSCregEdit.wsfを使用します。

<pre>c:\Windows\System32>cscript SCregEdit.wsf /AU [/v][値]
　　/v　　現在の自動更新の設定を表示します
　　値　　設定する値を指定します

　　オプション:
　　4 - 自動更新を有効にします
　　1 - 自動更新を無効にします</pre>

というので、
<pre>c:\Windows\System32>cscript SCregEdit.wsf /AU 4
レジストリが更新されました。</pre>
これでOK。]]></description>
         <link>http://www.kuwazou.net/blog/ms_server/windows_server_2008/server_core/windows_update.html</link>
         <guid>http://www.kuwazou.net/blog/ms_server/windows_server_2008/server_core/windows_update.html</guid>
         <category>Server Core</category>
         <pubDate>Thu, 06 Mar 2008 22:07:50 +0900</pubDate>
      </item>
      
      <item>
         <title>ServerCoreを設定するのに必要なコマンドのHELPは？</title>
         <description><![CDATA[ターミナルサービスの接続を許可するときにも使用しましたが、
scregedit.wsfというスクリプトはServerCoreの基本設定に役立ちます。

そして、ServerCoreの有用なコマンドヘルプもこのスクリプトで表示できます。

<pre>c:\Windows\System32><strong>cscript SCregEdit.wsf /cli</strong></pre>

<strong>■ライセンス認証を行うには: </strong>    
　　Cscript slmgr.vbs -ato

<strong>■ライセンス認証に KMS ボリューム ライセンスを使用するには:</strong>
　　KMS ボリューム ライセンスを構成します:
　　　　cscript slmgr.vbs -ipk [ボリューム ライセンス キー]
　　KMS ライセンスのライセンス認証を行います
　　　　cscript slmgr.vbs -ato
　　KMS DNS SRV レコードを設定します
　　　　cscript slmgr.vbs -skma [KMS FQDN]

<strong>■次のいずれかでコンピュータ名を決定します:</strong>
　　Set c
　　Ipconfig /all
　　Systeminfo.exe または Hostname.exe

<strong>■Server Core コンピュータの名前を変更します:</strong>
　　ドメインに参加している場合:
　　　Netdom renamecomputer %computername% /NewName:変更後の名前 /UserD:ドメイン ユーザー名 /PasswordD:*
　　ドメインに参加していない場合:
　　　Netdom renamecomputer %computername% /NewName:変更後の名前

<strong>■ワークグループを変更します:</strong>
　　Wmic computersystem where name="%computername%" call  joindomainorworkgroup name="[変更後のワークグループ名]"

<strong>■役割またはオプション機能をインストールします:</strong>
　　Start /w Ocsetup [パッケージ名]
　　注意: Active Directory では、応答ファイルを指定して Dcpromo を実行します。

<strong>■役割およびオプション機能のパッケージ名と現在のインストール状態を表示します:</strong>     
　　oclist

<strong>■タスク マネージャのホットキーを起動します:</strong>     
　　ctrl-shift-esc

<strong>■ターミナル サービス セッションのログオフ:</strong>     
　　Logoff

<strong>■ページ ファイル サイズを設定するには:</strong>
　　システム ページ ファイル管理を無効にします:
　　　　wmic computersystem where name="%computername%" set AutomaticManagedPagefile=False
　　ページ ファイルを構成します:
　　　　wmic pagefileset where name="C:\\pagefile.sys" set InitialSize=500,MaximumSize=1000

<strong>■タイムゾーンまたは日時の構成:</strong>     
　　control timedate.cpl

<strong>■地域と言語のオプションの構成:</strong>     
　　control intl.cpl

<strong>■管理ツールまたはエージェントを手動でインストールします:</strong>     
　　Msiexec.exe /i [msi パッケージ]

<strong>■インストールされている MSI アプリケーションの一覧を表示します:</strong>     
　　Wmic product

<strong>■msi アプリケーションのアンインストール:</strong>
　　Wmic product get name /value
　　Wmic product where name="[name]" call uninstall

<strong>■インストールされているドライバを一覧表示するには:</strong>     
　　Sc query type= driver

<strong>■一覧にないドライバをインストールします:</strong>
　　ドライバ ファイルを Server Core にコピーします
　　Pnputil -i -a [パス]\[ドライバ].inf

<strong>■ネットワーク アダプタ名を変更します:</strong>
　　netsh interface set interface name="ローカル エリア接続" newname="PrivateNetwork"

<strong>■ネットワーク アダプタを無効にします:</strong>
　　netsh interface set interface name="ローカル エリア接続 2" admin=DISABLED

<strong>■ファイルのバージョンを判別します:</strong>
　　wmic datafile where name="c:\\windows\\system32\\ntdll.dll" get version

<strong>■インストールされている修正プログラムの一覧を表示します:</strong>
　　wmic qfe list

<strong>■修正プログラムをインストールします:</strong>
　　Wusa.exe [修正プログラム名].msu /quiet

<strong>■プロキシを構成します:</strong>
　　Netsh winhttp set proxy [プロキシ名]:[ポート]

<strong>■レジストリ値を追加、削除、または照会します:</strong>
　　reg.exe add /?
　　reg.exe delete /?
　　reg.exe query /?]]></description>
         <link>http://www.kuwazou.net/blog/ms_server/windows_server_2008/server_core/servercorehelp.html</link>
         <guid>http://www.kuwazou.net/blog/ms_server/windows_server_2008/server_core/servercorehelp.html</guid>
         <category>Server Core</category>
         <pubDate>Thu, 06 Mar 2008 21:58:52 +0900</pubDate>
      </item>
      
      <item>
         <title>サーバーのライセンス認証</title>
         <description><![CDATA[基本的に、%windir%\System32にある<strong>slmgr.vbs</strong>というスクリプトを使用する。

まず、プロダクトキーを入力する。
<pre>c:\Windows\System32>cscript slmgr.vbs -ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
プロダクト キー XXXXX-XXXXX-XXXXX-XXXXX-XXXXX を正常にインストールしました。</pre>

ただし、今回はボリュームラインセンスキーでも、これだけでは完全にライセンス認証されたことにならない。
ためしに、ライセンス情報を表示させてみる。
<pre>c:\Windows\System32>cscript slmgr.vbs -dli
名前: Windows Server(R), ServerEnterpriseCore edition
説明: Windows Operating System - Windows Server(R), VOLUME_MAK_B channel
プロダクト キーの一部: XXXXX
ライセンスの状態: 最初の猶予期間
残り時間: 83880 分 (58 日))</pre>

なので、ライセンス認証を行う。
<pre>c:\Windows\System32>cscript slmgr.vbs -ato
Windows Server(R), ServerEnterpriseCore edition (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxx
xxxxx) のライセンス認証を行っています...
製品は正常にライセンス認証されました。</pre>

そして、再びライセンス認証の情報を見てみると、、、
<pre>c:\Windows\System32>cscript slmgr.vbs -dli
名前: Windows Server(R), ServerEnterpriseCore edition
説明: Windows Operating System - Windows Server(R), VOLUME_MAK_B channel
プロダクト キーの一部: 7R9Y9
ライセンスの状態: ライセンスされています</pre>]]></description>
         <link>http://www.kuwazou.net/blog/ms_server/windows_server_2008/server_core/post_34.html</link>
         <guid>http://www.kuwazou.net/blog/ms_server/windows_server_2008/server_core/post_34.html</guid>
         <category>Server Core</category>
         <pubDate>Thu, 06 Mar 2008 21:37:29 +0900</pubDate>
      </item>
      
      <item>
         <title>LVM領域の作成</title>
         <description><![CDATA[<strong>○Physical Volumeの作成</strong>
<pre># pvcreate /dev/sda3</pre>


<strong>○Volume Groupの作成</strong>
<pre># vgcreate vg /dev/sda3</pre>


<strong>○Logical Volumeの作成</strong>
<pre># /usr/sbin/lvcreate -L 7000M -n lv_home vg
# /usr/sbin/lvcreate -L 7000M -n lv_data vg
# /usr/sbin/lvcreate -L 7000M -n lv_var vg</pre>

<strong>○snapshotの作成</strong>
※snapshotは、OSインストール時や、大量ファイルコピー時には作成しないこと。
　つまり、元パーティションに2GB以上の差分が発生するときには
　snapshotが100%を超えて、破壊される恐れがある。
<pre># /usr/sbin/lvcreate  -s -L 2G -n snap_home /dev/vg/lv_home
# /usr/sbin/lvcreate  -s -L 2G -n snap_data /dev/vg/lv_data
# /usr/sbin/lvcreate  -s -L 2G -n snap_var /dev/vg/lv_var</pre>

<strong>○結果をみる</strong>
<pre># pvs
  PV         VG   Fmt  Attr PSize  PFree
  /dev/sda3  vg   lvm2 a-   29.40G 2.89G</pre>

<pre># vgs
  VG   #PV #LV #SN Attr   VSize  VFree
  vg     1   3   3 wz--n- 29.40G 2.89G</pre>
※VFreeが2.89Gあるということは、その領域をsnapshotに使えるということ。

<pre># lvs
  LV          VG   Attr   LSize Origin    Snap%  Move Log Copy%
  lv_home   vg   owi-ao 6.84G
  lv_data    vg   owi-ao 6.84G
  lv_var    vg   owi-ao 6.84G
  snap_home vg   swi-a- 2.00G lv_home   8.02
  snap_data  vg   swi-a- 2.00G lv_data    0.46
  snap_var  vg   swi-a- 2.00G lv_var   10.67</pre>]]></description>
         <link>http://www.kuwazou.net/blog/unixlinux/lvm/lvm.html</link>
         <guid>http://www.kuwazou.net/blog/unixlinux/lvm/lvm.html</guid>
         <category>LVM</category>
         <pubDate>Thu, 31 Jan 2008 02:45:23 +0900</pubDate>
      </item>
      
      <item>
         <title>snapshot</title>
         <description><![CDATA[<strong>○snapshotのとり方</strong>
lvcreate --snapshot --size=1G --name snap_data.0 /dev/vg_data/lv_home
<pre># lvcreate --snapshot --size=1G --name snap_data.0 /dev/vg_data/lv_home
  Logical volume "snap_data.0" created</pre>


<strong>○snapshotの使い方</strong>
/dev/vg_data の中にsnap_data.0があるので、
それを/mnt/snapshotにマウントする。
このmountの中はは読み取り専用なので、変更することはできない。
<pre># mount -r /dev/vg_data/snap_data.0 /mnt/snapshot</pre>


<strong>○snapshotの消し方</strong>
snapshotを消すのはlvremove
snapshot領域が埋まってしまう前に、バックアップをとり、消しておいたほうがいい。
<pre># umount /mnt/snapshot
# lvremove /dev/vg_data/snap_data.0
Do you really want to remove active logical volume "snap_data.0"? [y/n]: y
  Logical volume "snap_data.0" successfully removed</pre>


<strong>○snapshotの確認</strong>
LV snapshot status をみる。
<pre># lvdisplay
  --- Logical volume ---
  LV Name                /dev/vg_data/lv_home
  VG Name                vg_data
  LV UUID                510zjb-xOaf-gCN8-O741-veeP-7bE1-Ts3wz5
  LV Write Access        read/write
  LV snapshot status     source of
                         /dev/vg_data/snap_home.15 [active]
  LV Status              available
  # open                 1
  LV Size                9.38 GB
  Current LE             300
  Segments               1
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:0

  --- Logical volume ---
  LV Name                /dev/vg_data/lv_var
  VG Name                vg_data
  LV UUID                YdatH6-8pTI-4Xhu-7eF0-lo26-QPv2-Nw1yP1
  LV Write Access        read/write
  LV snapshot status     source of
                         /dev/vg_data/snap_var.15 [active]
  LV Status              available
  # open                 1
  LV Size                512.00 MB
  Current LE             16
  Segments               1
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:1</pre>


○snapshotがとれる空き領域の確認
VFreeのサイズを見る。
<pre># vgs
  VG      #PV #LV #SN Attr  VSize  VFree
  vg_data   1   2   2 wz--n 14.31G 3.31G</pre>
]]></description>
         <link>http://www.kuwazou.net/blog/unixlinux/lvm/snapshot.html</link>
         <guid>http://www.kuwazou.net/blog/unixlinux/lvm/snapshot.html</guid>
         <category>LVM</category>
         <pubDate>Thu, 31 Jan 2008 02:31:48 +0900</pubDate>
      </item>
      
      <item>
         <title>Diskquotaを設定する</title>
         <description><![CDATA[１．まず、LVMの構成はこのようになっているとします。
<pre># pvs
  PV         VG      Fmt  Attr PSize  PFree
  /dev/sda2  vg_data lvm2 a-   14.31G 4.44G

# vgs
  VG      #PV #LV #SN Attr  VSize  VFree
  vg_data   1   2   0 wz--n 14.31G 4.44G

# lvs
  LV      VG      Attr   LSize   Origin Snap%  Move Log Copy%
  lv_home vg_data -wi-ao   9.38G
  lv_var  vg_data -wi-ao 512.00M</pre>


２．Quotaを適用したいパーティションを、
/etc/fstabにて下記のように設定し、Rebootをします。
<pre>/dev/vg_data/lv_home    /home   ext3    defaults,usrquota,grpquota  1 2</pre>
<pre># reboot</pre>

３．次に、quotacheckコマンドで、データベースを作成します。
<pre># quotacheck -fmugv /home
quotacheck: Scanning /dev/mapper/vg_data-lv_home [/home] quotacheck: Cannot stat old user quota file: そのようなファイルやディレクトリはありません
quotacheck: Cannot stat old group quota file: そのようなファイルやディレクトリはありません
quotacheck: Cannot stat old user quota file: そのようなファイルやディレクトリはありません
quotacheck: Cannot stat old group quota file: そのようなファイルやディレクトリはありません

done

quotacheck: Checked 123 directories and 3160 files
quotacheck: Old file not found.
quotacheck: Old file not found.</pre>
aquota.groupとaquota.userができていればよい

４．そして、quotaを有効にします。
<pre># quotaon -guv -a
/dev/mapper/vg_data-lv_home [/home]: group quotas turned on
/dev/mapper/vg_data-lv_home [/home]: user quotas turned on</pre>
]]></description>
         <link>http://www.kuwazou.net/blog/unixlinux/lvm/diskquota.html</link>
         <guid>http://www.kuwazou.net/blog/unixlinux/lvm/diskquota.html</guid>
         <category>LVM</category>
         <pubDate>Thu, 31 Jan 2008 02:18:27 +0900</pubDate>
      </item>
      
      <item>
         <title>Server Core のFireWallのログ</title>
         <description><![CDATA[<strong>■FireWallのログを出力するには</strong>

たとえば、dropされたログを出力するようにするのは、

<pre>c:\>netsh firewall set logging droppedpackets=ENABLE</pre>

これで、設定を確認すると、、、

<pre>>netsh firewall show log

ログの構成:
-------------------------------------------------------------------
ファイルの場所         = C:\Windows\system32\LogFiles\Firewall\pfirewall.log
最大のファイル サイズ  = 4096 KB
<u>ドロップされたパケット = Enable</u>
接続                   = Disable</pre>

設定が変更されている。

ログを見てみると、、、

<pre>c:\>type C:\Windows\system32\LogFiles\Firewall\pfirewall.log

#Version: 1.5
#Software: Microsoft Windows Firewall
#Time Format: Local
#Fields: date time action protocol src-ip dst-ip src-port dst-port size tcpflags tcpsyn tcpack tcpwin icmptype icmpcode info path
2008-01-17 22:28:07 DROP UDP 192.168.0.254 192.168.0.255 138 138 229 - - - - - - - RECEIVE</pre>
このように出力されてます。


<strong>■現在のFireWallの状態を見る</strong>

<pre>c:\>netsh firewall show state

ファイアウォールの状態:
-------------------------------------------------------------------
プロファイル                              = STANDARD
操作モード                                = Enable
例外モード                                = Enable
マルチキャスト/ブロードキャスト応答モード = Enable
通知モード                                = Disable
グループ ポリシーのバージョン             = Windows ファイアウォール
<u>リモート管理モード                        = Disable</u>

すべてのネットワーク インターフェイスで開いているポート:
Port   Protocol  Version  Program
-------------------------------------------------------------------
すべてのネットワーク インターフェイスで開いているポートは現在ありません。</pre>


<u>この「リモート管理モード」がDisableの状態だと、
外部のPCからMMC管理ツールで接続できません</u>。


<strong>■他のマシンから管理ツールで接続できるようにFireWallを設定する</strong>

<pre>netsh advfirewall firewall set rule group="リモート管理" new enable=yes
netsh advfirewall firewall set rule group="Windows ファイアウォール リモート管理" new enable=yes
netsh advfirewall firewall set rule group="リモート ボリューム管理" new enable=yes</pre>
（まだよく理解してません）

この設定をすると、下記のような状態になって、
他のPCのWindows Vistaなどの管理ツールから
Server Coreを設定できるようになります。

<u>が、Vistaのふつうの管理ツールからでは完全には設定できません。
W2K8に入っている（別途Vista用が配布される予定のある）RSATというツールを使って接続する必要があります。</u>
別のServerCoreではないW2K8のコマンドプロンプトで、<pre>>C:\windows\system32\ServerManagerCmd.exe -install  RSAT</pre>とすると、そのW2K8からはすべての管理ツールが使えるようになります。

<pre>ファイアウォールの状態:
-------------------------------------------------------------------
プロファイル                              = STANDARD
操作モード                                = Enable
例外モード                                = Enable
マルチキャスト/ブロードキャスト応答モード = Enable
通知モード                                = Disable
グループ ポリシーのバージョン             = Windows ファイアウォール
リモート管理モード                        = Enable

すべてのネットワーク インターフェイスで開いているポート:
Port   Protocol  Version  Program
-------------------------------------------------------------------
すべてのネットワーク インターフェイスで開いているポートは現在ありません。</pre>

※参考にさせていただきました。
<a href="http://blogs.technet.com/junichia/archive/2007/11/08/windows-server-2008-server-core-mmc.aspx">【Windows Server 2008】Server Core の管理をリモートのMMCから行うための準備</a>
]]></description>
         <link>http://www.kuwazou.net/blog/ms_server/windows_server_2008/server_core/server_core_firewall.html</link>
         <guid>http://www.kuwazou.net/blog/ms_server/windows_server_2008/server_core/server_core_firewall.html</guid>
         <category>Server Core</category>
         <pubDate>Thu, 17 Jan 2008 22:17:02 +0900</pubDate>
      </item>
      
      <item>
         <title>S25R方式</title>
         <description><![CDATA[<a href="http://www.gabacho-net.jp/anti-spam/">S25R（Selective SMTP Rejection：選択的SMTP拒絶）方式の要点</a>]]></description>
         <link>http://www.kuwazou.net/blog/tcpip/mail/s25r.html</link>
         <guid>http://www.kuwazou.net/blog/tcpip/mail/s25r.html</guid>
         <category>Mail</category>
         <pubDate>Thu, 17 Jan 2008 02:57:52 +0900</pubDate>
      </item>
      
      <item>
         <title>サーバーの役割をインストールする(ocsetup.exe)</title>
         <description><![CDATA[サーバーの役割をインストールするには、<strong>ocsetup.exe</strong>を使用する。
ちなみに、<u>引数のサーバー役割名は大文字、小文字を区別する</u>。
oclist.exeを使用して正しい引数を確認すること。

使い方としては、普通に実行すると、
<pre>C:\>ocsetup.exe DHCPServerCore
C:\></pre>
このようにすぐにバックグラウンドタスクになってしまい、
いつ終了したかがよくわからなくなってしまう。
しかも、<u>並行して複数のインストールが進められるわけでもない</u>。

そこで、
<pre>C:\>start /w ocsetup DHCPSeverCore</pre>
とやると、インストールが終了まで、
コマンドの制御が帰ってこないので、終了がわかりやすい。

<u>※コマンドプロンプトのウィンドウの裏に、エラーダイアログが出現している場合もあるので注意</u>

インストールが終了したと思われたら、確認のためにoclist.exeを実行する。
<pre>C:\>oclist.exe | findstr DHCP
　　インストール済み：DHCPServerCore</pre>
と出る。

もちろん、
<pre>C:\>oclist.exe | findstr "インストール済み"
    インストール済み:DHCPServerCore
    インストール済み:DNS-Server-Core-Role
    インストール済み:FailoverCluster-Core
    インストール済み:TelnetClient</pre>
とやってもよい。


■サーバーの役割をアンインストールするには？

<pre>C:\>start /w ocsetup.exe DHCPServerCore /uninstall</pre>

再起動が必要な場合には、その旨のダイアログが出てくる。

再起動は自動的に行わせたいのなら、
<pre>C:\>start /w ocsetup.exe DHCPServerCore /uninstall /queit</pre>

再起動をさせたくないのなら、
<pre>C:\>start /w ocsetup.exe DHCPServerCore /uninstall /norestart</pre>
]]></description>
         <link>http://www.kuwazou.net/blog/ms_server/windows_server_2008/server_core/ocsetupexe.html</link>
         <guid>http://www.kuwazou.net/blog/ms_server/windows_server_2008/server_core/ocsetupexe.html</guid>
         <category>Server Core</category>
         <pubDate>Tue, 15 Jan 2008 23:40:16 +0900</pubDate>
      </item>
      
      <item>
         <title>サーバーの役割を表示する(oclist.exe)</title>
         <description><![CDATA[サーバーの役割を表示させるには、<strong>oclist.exe</strong>を使用する。

ただし、 表示量が多く、コマンドプロンプト上では表示がスクロールして流れてしまうので、
テキストファイルにリダイレクトさせるとか、
| more を使ったほうが良い。

<strong>例：moreを使う</strong>
<pre>>oclist.exe | more </pre>

<strong>例：テキストファイルにリダイレクトする。</strong>
　　(<u>メモ帳</u>でテキストファイルを開ける)
<pre>>oclist.exe > hoge.txt
>notepad.exe hoge.txt</pre>

すると下記のような表示が現れる。
「未インストール」と表示されているものは、<strong>ocsetup.exe</strong>で
インストールすることができる。

といっても、Server Coreで利用できるものは限定されていて、
IISの役割などはインストールできないのだが。

<pre>サーバーの役割またはオプションの機能をインストールまたはアンインストールするには、
一覧に表示された更新名を指定して ocsetup.exe を実行してください。

ocsetup.exe を使用した Active Directory の役割の追加または削除はサポートされていません。
この操作を実行した場合、サーバーが不安定な状態になる可能性があります。
Active Directory をインストールまたはアンインストールするには、
必ず Dcpromo を使用してください。

===========================================================================
Microsoft-Windows-ServerCore-Package
未インストール:<u>BitLocker</u>
未インストール:BitLocker-RemoteAdminTool
未インストール:ClientForNFS-Base
未インストール:DFSN-Server
未インストール:DFSR-Infrastructure-ServerEdition
未インストール:<u>DHCPServerCore</u>
未インストール:<u>DirectoryServices-ADAM-ServerCore</u>
未インストール:<u><strong>DirectoryServices-DomainController-ServerFoundation</strong></u>
未インストール:<u>DNS-Server-Core-Role</u>
未インストール:<u>FailoverCluster-Core</u>
未インストール:FRS-Infrastructure
未インストール:IIS-WebServerRole
 |    
 |- 未インストール:IIS-FTPPublishingService
 |     |    
 |     |- 未インストール:IIS-FTPServer
 |    
 |- 未インストール:IIS-WebServer
 |     |    
 |     |- 未インストール:IIS-ApplicationDevelopment
 |     |     |    
 |     |     |- 未インストール:IIS-ASP
 |     |     |- 未インストール:IIS-CGI
 |     |     |- 未インストール:IIS-ISAPIExtensions
 |     |     |     |    
 |     |     |     |- 未インストール:IIS-ASP
 |     |     |    
 |     |     |- 未インストール:IIS-ISAPIFilter
 |     |     |- 未インストール:IIS-ServerSideIncludes
 |     |    
 |     |- 未インストール:IIS-CommonHttpFeatures
 |     |     |    
 |     |     |- 未インストール:IIS-DefaultDocument
 |     |     |- 未インストール:IIS-DirectoryBrowsing
 |     |     |- 未インストール:IIS-HttpErrors
 |     |     |- 未インストール:IIS-HttpRedirect
 |     |     |- 未インストール:IIS-StaticContent
 |     |    
 |     |- 未インストール:IIS-HealthAndDiagnostics
 |     |     |    
 |     |     |- 未インストール:IIS-CustomLogging
 |     |     |- 未インストール:IIS-HttpLogging
 |     |     |- 未インストール:IIS-HttpTracing
 |     |     |- 未インストール:IIS-LoggingLibraries
 |     |     |- 未インストール:IIS-ODBCLogging
 |     |     |- 未インストール:IIS-RequestMonitor
 |     |    
 |     |- 未インストール:IIS-Performance
 |     |     |    
 |     |     |- 未インストール:IIS-HttpCompressionDynamic
 |     |     |- 未インストール:IIS-HttpCompressionStatic
 |     |    
 |     |- 未インストール:IIS-Security
 |           |    
 |           |- 未インストール:IIS-BasicAuthentication
 |           |- 未インストール:IIS-ClientCertificateMappingAuthentication
 |           |- 未インストール:IIS-DigestAuthentication
 |           |- 未インストール:IIS-IISCertificateMappingAuthentication
 |           |- 未インストール:IIS-IPSecurity
 |           |- 未インストール:IIS-RequestFiltering
 |           |     |    
 |           |     |- 未インストール:IIS-ASP
 |           |    
 |           |- 未インストール:IIS-URLAuthorization
 |           |- 未インストール:IIS-WindowsAuthentication
 |    
 |- 未インストール:IIS-WebServerManagementTools
 |     |    
 |     |- 未インストール:IIS-IIS6ManagementCompatibility
 |     |     |    
 |     |     |- 未インストール:IIS-LegacyScripts
 |     |     |- 未インストール:IIS-Metabase
 |     |     |     |    
 |     |     |     |- 未インストール:IIS-FTPServer
 |     |     |     |- 未インストール:IIS-LegacyScripts
 |     |     |    
 |     |     |- 未インストール:IIS-WMICompatibility
 |     |           |    
 |     |           |- 未インストール:IIS-LegacyScripts
 |     |    
 |     |- 未インストール:IIS-ManagementScriptingTools
 |    
未インストール:<u>Microsoft-Windows-RemovableStorageManagementCore</u>
未インストール:<u>MultipathIo</u>
未インストール:NetworkLoadBalancingHeadlessServer
未インストール:<u>Printing-ServerCore-Role</u>
 |    
 |- 未インストール:Printing-LPDPrintService
 |    
未インストール:QWAVE
未インストール:ServerForNFS-Base
未インストール:<u>SNMP-SC</u>
未インストール:<u>SUACore</u>
未インストール:<u>TelnetClient</u>
未インストール:WAS-WindowsActivationService
 |    
 |- 未インストール:WAS-ProcessModel
 |     |    
 |     |- 未インストール:IIS-ASP
 |     |- 未インストール:IIS-BasicAuthentication
 |     |- 未インストール:IIS-CGI
 |     |- 未インストール:IIS-ClientCertificateMappingAuthentication
 |     |- 未インストール:IIS-CustomLogging
 |     |- 未インストール:IIS-DefaultDocument
 |     |- 未インストール:IIS-DigestAuthentication
 |     |- 未インストール:IIS-DirectoryBrowsing
 |     |- 未インストール:IIS-HttpCompressionDynamic
 |     |- 未インストール:IIS-HttpCompressionStatic
 |     |- 未インストール:IIS-HttpErrors
 |     |- 未インストール:IIS-HttpLogging
 |     |- 未インストール:IIS-HttpRedirect
 |     |- 未インストール:IIS-HttpTracing
 |     |- 未インストール:IIS-IISCertificateMappingAuthentication
 |     |- 未インストール:IIS-IPSecurity
 |     |    
 |     |- 未インストール:IIS-ISAPIExtensions
 |     |     |    
 |     |     |- 未インストール:IIS-ASP
 |     |    
 |     |- 未インストール:IIS-ISAPIFilter
 |     |- 未インストール:IIS-LoggingLibraries
 |     |- 未インストール:IIS-ODBCLogging
 |     |- 未インストール:IIS-RequestFiltering
 |     |     |    
 |     |     |- 未インストール:IIS-ASP
 |     |    
 |     |- 未インストール:IIS-RequestMonitor
 |     |- 未インストール:IIS-ServerSideIncludes
 |     |- 未インストール:IIS-StaticContent
 |     |- 未インストール:IIS-URLAuthorization
 |     |- 未インストール:IIS-WindowsAuthentication
 |    
未インストール:<u>WindowsServerBackup</u>
未インストール:<u>WINS-SC</u></pre>]]></description>
         <link>http://www.kuwazou.net/blog/ms_server/windows_server_2008/server_core/oclistexe.html</link>
         <guid>http://www.kuwazou.net/blog/ms_server/windows_server_2008/server_core/oclistexe.html</guid>
         <category>Server Core</category>
         <pubDate>Tue, 15 Jan 2008 22:20:47 +0900</pubDate>
      </item>
      
      <item>
         <title>時刻、言語の設定をする</title>
         <description><![CDATA[<pre>>control timedate.cpl</pre>
とすればよい。

コントロールパネルの「日付と時刻」のダイアログが出現して
時刻設定ができる。

ちなみに、
<pre>>control intl.cpl</pre>
とすると、「地域と言語のオプション」が表示され、
キーボードの設定などが可能

]]></description>
         <link>http://www.kuwazou.net/blog/ms_server/windows_server_2008/server_core/post_33.html</link>
         <guid>http://www.kuwazou.net/blog/ms_server/windows_server_2008/server_core/post_33.html</guid>
         <category>Server Core</category>
         <pubDate>Tue, 15 Jan 2008 22:15:59 +0900</pubDate>
      </item>
      
      <item>
         <title>ユーザー(Administrator)のパスワードを変更する</title>
         <description><![CDATA[<pre>><strong>net user administrator *</strong>
ユーザーのパスワードを入力してください：
確認のためにパスワードを再入力してください：
コマンドは正常に終了しました。</pre>

net user administartor だけなら、administratorの情報一覧が出力される。
]]></description>
         <link>http://www.kuwazou.net/blog/ms_server/windows_server_2008/server_core/administrator.html</link>
         <guid>http://www.kuwazou.net/blog/ms_server/windows_server_2008/server_core/administrator.html</guid>
         <category>Server Core</category>
         <pubDate>Tue, 15 Jan 2008 22:08:59 +0900</pubDate>
      </item>
      
   </channel>
</rss>
