The file compression in script on Windows. CAB is good, ZIP is not good.
If you want to know how to compress files in script(PowerShell, VBScript ...)and implemented with only windows builtin function, you may find "operate ZIP folder provided Windows Shell object"
But it is not stable on production server.
I implemented file compression batch with powerShell, Windows.Shell process is crashed and powershell.exe process is dead.
Because of killing PowerShell.exe, error handl block( try - Catch ) is not work.
I suppose to use CAB compresion.
See this article.
how to use - makecab.exe(updated)
Makecab.exe, it's file compress and packaging tool.
Makecab capable of making install package.
But,I will compress files to CAB.
Goal
- Make single CAB file.I will not split CAB file that size is same as legacy media(FD,MO,CD and etc)
- no subfolders to contain splited CAB files
- no file created for install package
makecab.exe /D CabinetNameTemplate=CABFilePath /D RptFileName=nul /D InfFileName=nul /D DiskDirectoryTemplate= /D MaxDiskSize=0 SorceFilePath
Parameters
CABFileName:Path of CAB file to create.
SorceFilePath:Name of file list. It is contained file path of files to be contained in CAB.
RptFileName and InfFileName is nul: these file is used to install package.
DiskDirectoryTemplate is blank: we do not haev to make CAB in any subfolder to splited files.
MaxDiskSize is 0: We donot have to split file.
STOP: c00002e2 ... when boot domain controller on Hyper-V
I had a windows 2008 R2 active directory domain controller, it's running on hyper-v virtual machine.
The DC had a NTDS directory on D drive.
The VM had used a differencial VHD.
I had merge the virtual disk from differencial to new single vhd.
After merging VHD, attach the new VHD and boot domaincontroller.
I had encount the error as bellow.
STOP: c00002e2 Directory services could not start because of the following error:
Error Status: 0xc000001.
please shutdown this system and reboot into Directory Services restore Mode, check the event log for more detailed information.
Resolution
- Press F8 key on start up
- Select "Directory Service Restore mode" and Press Enter
- Log on as ".\Administrator" with the password for "Directory Service Restore mode".
- Open NTDS directory("D:\NTDS" in my case, Windows default may be "C:\Windows\NTDS")
- rename "*.log"(rename to "*.log.bak" in my case)
- restart VM
BOOTMGR is missing
Hyper-Vゲストが突然 BOOTMGR is missing を出して起動しなくなった。
宅鯖の仮想マシンをAzureにアップロードしようと、差分仮想ディスク(VHDX)を別VHDに結合していたら、なにかやってしまったらしい。
ネットでいろいろ調べたが、この手順で成功。
BOOTMGR is missing in Windows Server 2008 R2
Windows Server 2008 R2だが、Windows 7 インストールディスクの自動修復で回復させると一発だった。
export event log on remote machine with wevtutil
when wevtutil 'remote' option is specifies,
example
Remote Machine:RServer
wevtutil export-log "System" "D:\Log\Exported\Sys.evtx" /Remote:LServer
The file will exported as \\RServer\D$\Log\Exported\Sys.evtx
KingSpec SATA-Mini PCIe EeePC 900/901/903/S101 MLC SSD 128GB performance - Crystal Disk Mark
----------------------------------------------------------------------- CrystalDiskMark 3.0.2 x64 (C) 2007-2013 hiyohiyo Crystal Dew World : http://crystalmark.info/ ----------------------------------------------------------------------- * MB/s = 1,000,000 byte/s [SATA/300 = 300,000,000 byte/s] Sequential Read : 162.848 MB/s Sequential Write : 85.056 MB/s Random Read 512KB : 140.574 MB/s Random Write 512KB : 40.697 MB/s Random Read 4KB (QD=1) : 13.717 MB/s [ 3348.8 IOPS] Random Write 4KB (QD=1) : 1.057 MB/s [ 258.0 IOPS] Random Read 4KB (QD=32) : 14.584 MB/s [ 3560.5 IOPS] Random Write 4KB (QD=32) : 0.629 MB/s [ 153.6 IOPS] Test : 1000 MB [H: 0.1% (0.1/119.2 GB)] (x5) Date : 2014/01/09 14:55:57 OS : Windows 8 Professional [6.2 Build 9200] (x64)
Equipments.
SSD:KingSpec SATA-Mini PCIe EeePC 900/901/903/S101専用 MLC SSD 128GB
KingSpec SATA-Mini PCIe EeePC 900/901/903/S101専用 MLC SSD 128GB
- 出版社/メーカー: KingSpec
- メディア: エレクトロニクス
- この商品を含むブログを見る
MiniPCIe to SATA2 converter:RunCore Mountig Bracket
RunCore 70mm/50mm Mini PCI-e SSD to 2.5" SATA II Converter Adapter
- 出版社/メーカー: RunCore
- メディア: エレクトロニクス
- この商品を含むブログ (1件) を見る
SATA2 to USB3.0 Converter:RATOC SA25-TR1-U3BK
ラトックシステム USB3.0接続2.5インチSATAハードディスクケース(ブラック) SA25-TR1-U3BK
- 出版社/メーカー: ラトックシステム
- 発売日: 2011/12/14
- メディア: Personal Computers
- この商品を含むブログを見る
How to convert the virtual achine from VMWare to Hyper-V
MS製品を担いでる会社なのに、なぜか検証環境をVMWare Player 6で作っていたメンバーから、技術検証用の仮想マシンを貰った。
うちのチームは仮想環境はHyper-V2.0で統一してるので、仮想マシンをコンバート。
一般的なvmdk to VHDコンバーターは、MBRのコンバートができないらしく、起動させるまで一苦労。
手順をおぼえがき。
- VMDKをVHDにコンバート。最終的にStarWind V2V Converterを使ったが、 VMDK2VHD、NHCなど、どれでも問題ないと思われる。
- TestDiskで、ブートセクタを再作成する。→参考Rebuilding NTFS boot sector using Testdisk