分类目录归档:Windows

a fix to windows update can’t check updates restart computer…

The following may be recorded in Application Logs

wuaueng.dll (948) SUS20ClientDataStore: Unable to read the header of logfile C:\Windows\SoftwareDistribution\DataStore\Logs\edb.log. Error -546.

Application ESENT 412 Logging/Recovery Error

Fix:

stop windows update service and delete X:\Windows\SoftwareDistribution directory then start windows update and go get some snacks while windows is checking and downloading updates.

Cluster resource ‘Virtual Machine XXX’ of type ‘Virtual Machine’ in clustered role ‘XXX’ failed in windows 2012 hyperv cluster

Cluster resource ‘Virtual Machine XXX’ of type ‘Virtual Machine’ in clustered role ‘XXX’ failed. The error code was ‘0x80004005’ (‘Unspecified error’).

Based on the failure policies for the resource and role, the cluster service may try to bring the resource online on this node or move the group to another node of the cluster and then restart it. Check the resource and group state using Failover Cluster Manager or the Get-ClusterResource Windows PowerShell cmdlet.

–AND–

Live migration of ‘Virtual Machine VM’ failed.

Virtual machine migration operation for ‘VM’ failed at migration destination ‘HYPERVHOST’. (Virtual machine ID AFDD9E40-58EF-4364-AF83-0EA9F4B54C0E)

The virtual machine ‘VM’ is using processor-specific features not supported on physical computer ‘HYPERVHOST’. To allow for migration of this virtual machine to physical computers with different processors, modify the virtual machine settings to limit the processor features used by the virtual machine. (Virtual machine ID AFDD9E40-58EF-4364-AF83-0EA9F4B54C0E)

—–

This may happen if you are running hyper-v cluster with different hardware especially you are mixing up a latest server and a old box.

Just shutdown the VM and open settings in cluster manager, make sure Migrate to a … is selected under Processor>Compatibility

坑爹的windows server 2008 r2安全配置引起不能安装.net 服务

Microsoft (R) .NET Framework Installation utility Version 4.0.30319.1
Copyright (c) Microsoft Corporation. All rights reserved.

Exception occurred while initializing the installation:
System.IO.FileLoadException: Could not load file or assembly ‘file:///blablabla\blablabla.exe’ or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515).

解决办法很简单:找到服务的exe,右键属性,unblock,完事。
如果服务还要加载别的dll,那么一个个来吧……

VAMT 2.0: An item with same key has already been added

param($inputFilePath, $vamtDirPath)

$cilFilePath = Resolve-Path $inputFilePath;

if (!$cilFilePath)

{

Write-Error “Expected input file name of target CIL”;

exit 1;

}

if ($vamtDirPath)

{

$vamtDirPath = Resolve-Path $vamtDirPath;

}

else

{

$prograPath = [environment]::GetEnvironmentVariable(“ProgramFiles(x86)”);

if (!$prograPath -or $prograPath -eq “”)

{

$prograPath = [environment]::GetEnvironmentVariable(“ProgramFiles”);

}

$vamtDirPath = $prograPath + “\VAMT 2.0”

}

try

{

$assembly = [System.Reflection.Assembly]::LoadFile($vamtDirPath + “\Vamtrt.dll”);

}

catch

{

Write-Error “Error while attempting to load VAMT assembly. Provide the correct path to your VAMT installation if VAMT is not installed to the default directory.”;

exit 1;

}

$fileSerializer = new-object Microsoft.SoftwareLicensing.Vamt.FileSerializer($cilFilePath);

$softwareLicensingData = $fileSerializer.Deserialize();

for ($i = 0; $i -lt $softwareLicensingData.Machines.Length; $i++)

{

$machine = $softwareLicensingData.Machines[$i];

if ($machine.MacAddresses.Count -gt 0)

{

$distinctMacAddrs = new-object System.Collections.ObjectModel.Collection[string];

foreach ($mac in $machine.MacAddresses)

{

if (!$distinctMacAddrs.Contains($mac))

{

$distinctMacAddrs.Add($mac);

}

}

$machine.MacAddresses.Clear();

foreach ($distinctMac in $distinctMacAddrs)

{

$machine.MacAddresses.Add($distinctMac);

}

}

}

$fileSerializer.Serialize($softwareLicensingData);

Copy your saved .CIL file to c:\script. For example c:\script\saved.cil
Copy the included source code from this KB article into the clipboard
Click Start, All Programs, Accessories, Windows Powershell, “Windows powershell ise”
In Windows PowerShell click in the Untitled1.ps1 window
Paste in contents of the script from this article
Click File, save as, c:\script\ScrubCil.ps1
Click Start, All Programs, Accessories, Windows Powershell, Right click “Windows powershell” and choose “Run as Administrator”
At the powershell prompt type the following commands
cd \script
set-executionpolicy unrestricted
.\ScrubCil.ps1 saved.cil

在windows8RTM下安装.net 3.5 2.0 1.0……

很多操蛋的软件依旧需要.net 2.0甚至1.0才能运行,在win8下尝试了很多种方法都失败,最后只有老老实实的按照安装失败时的提示去看ms的kb,答案如下:

首先解压或者挂载win8的iso,这里不得不说ms现在nb了,虚拟光驱可以去死了,win8原生可以挂载iso为虚拟光驱了。

然后,打开一个管理权限的cmd

Dism /online /enable-feature /featurename:NetFx3 /All /Source:X:\sources\sxs /LimitAccess

完事