Category Archives: Windows

Windows tips, howtos, scripts

Windows: Cannot bring up Cluster Networkname Resources

Hi,

a customer has, accidentally, deleted multiple Active Directory Computer objects which correspond to Network Name Resources of a Windows Cluster 🙁 .

The cluster network name itself was also affected and no backup of the AD Database to restore the objects was available.

All solutions that I’ve found to get the cluster working again are based on the restore of the AD objects.

But there is also another way respective hack 🙂 . This works for me on a Windows 2008 R2 Cluster.
Typical error are:

  • Event ID 1207 is logged to the Eventlog: “Unable to get Computer Object using GUID” “There is no such object on the server.”
  • Or in the C:\Windows\Cluster\Reports\cluster.log file (exported with cluster.exe log g)
    Network Name <Clustername>: Unable to Logon. winError 1326

Continue reading Windows: Cannot bring up Cluster Networkname Resources

Advertisment to support michlstechblog.info

Windows: Determine uptime from command line

Hi,

unlike Linux, Windows has no builtin uptime command to see when the operating system starts.

But nevertheless it’s possible. Use the systeminfo command.


c:\> systeminfo | findstr /i time
System Boot Time:          05.06.2014, 21:05:06
Time Zone:                 (UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna

Note: If you have installed a language different then english replace time as filter which applies to your language.

Michael

Windows: Install a feature which is in State “removed”

Hi,

if a windows feature is in Install State removed, in this example the .NET Framework on Server 2012 R2.

PS C:\> Get-WindowsFeature *net*

Display Name                          Name                       Install State
------------                          ----                       -------------
.....
            [ ] ASP.NET 3.5           Web-Asp-Net                    Available
            [ ] ASP.NET 4.5           Web-Asp-Net45                  Available
[ ] .NET Framework 3.5 Features       NET-Framework-Features         Available
    [ ] .NET Framework 3.5 (inc....)  NET-Framework-Core             Removed
    [ ] HTTP Activation               NET-HTTP-Activation            Available
    [ ] Non-HTTP Activation           NET-Non-HTTP-Activ             Available
....

and if you try to install you’ll get an error message:
Continue reading Windows: Install a feature which is in State “removed”

Windows: No installation of Windows Updates at a policy defined scheduled date and time

Hi,

since Windows 8 respectively Server 2012 the policy to install Updates at a specific date and time has no affect.

Microsoft changed the behaviour for installing updates. The schedule for a installation and restart of updates is just defined by the deadline for Updates on the WSUS Server.
Continue reading Windows: No installation of Windows Updates at a policy defined scheduled date and time

Powershell: Error while calling the SaveAs Method of some Office Applications

Hi,

if you tried to save a word or excel document as another format you got an error. For example, if you want to convert a CSV File to a Excel workbook and save it in Excel 95/97/2003 format.

[reflection.assembly]::LoadWithPartialName("Microsoft.Office.InterOp.Excel")
$oExcel = New-Object -ComObject "Excel.Application"
$sCSVFile="D:\temp\ImportFile.csv"
$oExcel.Visible = $true
$oCSVWorkbook=$oExcel.Workbooks.Add()
$oExcel.Workbooks.OpenText($sCSVFile)
$oCSVWorkbook.SaveAs("D:\temp\test.xls",[Microsoft.Office.Interop.Excel.XlFileFormat]::xlExcel9795)
Exception calling "SaveAs" with "1" argument(s): "SaveAs method of Workbook class failed"
At D:\test\CSV2Excel.ps1:29 char:20
+ $xl_workbook.SaveAs <<<< ("D:\Temp\test.xls")
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ComMethodTargetInvocation

Continue reading Powershell: Error while calling the SaveAs Method of some Office Applications