Wednesday, 10 February 2016

Powering on a virtual machine fails: could not open/create change tracking file

Virtual machine does not power on and we see the error.

could not open/create change tracking file vmdk_file_name





To resolve this issue, remove or rename the filename-ctk.vmdk file.

To remove or rename the filename-ctk.vmdk file:

  •     Make note of the SCSI controller type used by the hard disk.
  •     Remove the hard disk specified in the error message from the virtual machine.
  •     Open a Secure Shell session to the host.
  •     Navigate to the virtual machine's folder:


    /vmfs/volumes/GUID/vm_name


  •     Remove or rename the filename-ctk.vmdk file.
  •     Re-add the hard disk back to the virtual machine using the SCSI controller type from step one.
  •     Edit the descriptor file (.vmdk) and remove or comment out any references that specify use of a ctk file.
  •     Power on the virtual machine.

Sunday, 20 October 2013

Unable to access Windows Update - Error 0xC80003F3

Run below commands and rerun update file.

regsvr32 MSXML3.dll /s
net stop wuauserv
cd /d %windir%\SoftwareDistribution
rd /s /q DataStore
net start wuauserv
regsvr32 softpub.dll
regsvr32 mssip32.dll

Wednesday, 10 July 2013

VBScrip - List a Perticular Service of All WMI Enabled Computers

On Error Resume Next

InputFile = ("c:\computers.txt")
OutputFile = ("c:\result.txt")
Service = ("netlogon")

Set oFS = CreateObject("Scripting.FileSystemObject")
Set f = oFS.OpenTextFile(InputFile)
Set fr = oFS.CreateTextFile(OutputFile, True)

Computers = f.ReadAll
f.Close
arrComputers = Split(Computers,  vbCrLf)

fr.WriteLine("Server" & vbTab & "Services" & vbTab & "State")

For Each strComputer in arrComputers
    Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & _
    strComputer & "\root\cimv2")
    Set colRunningServices = objWMIService.ExecQuery("Select * from Win32_Service")

    For Each objService in colRunningServices 
        If objService.DisplayName = Service Then
            fr.WriteLine(strComputer & vbTab & objService.DisplayName & vbTab & objService.State)
        End If
    Next
Next
MsgBox "Service gathering complete", 0, "Info"

MS Outlook: Working with Safe Mode Command Line Switches

- When something isn’t working right with Outlook we often tell users to start Outlook in safe mode or using the /safe switch. This loads Outlook without many of the customization files and add-ins loaded. If outlook works correctly in Safe mode, the problem is with one of add-ins or customization files.

We can use one of these methods to start Outlook using a command line switch:

    Hold Ctrl key as we click the Outlook shortcut.
    If Run…. is shown on start menu (any version of Windows) click it and type outlook.exe /safe in the Open field and click OK.

- In most cases we only need to type outlook or outlook.exe, but occasionally Windows complains that it can’t find the file. When this happens we need to use the full path to Outlook.

- The default location is usually C:\Program Files\Microsoft Office\OfficeXX, where XX is our version number. We can browse to it or look on the Quick Launch shortcut for the file path. Do this by right click on the Outlook shortcut on Quick Launch toolbar and choosing Properties. The default switch is /recycle, we can replace this with /safe, press Apply then double-click on the shortcut to run it (leave the dialog open). After Outlook opens, replace safe with recycle and click OK.

- In most cases we only need to type outlook or outlook.exe, but occasionally Windows complains that it can’t find the file. When this happens we need to use the full path to Outlook.

- The default location is usually C:\Program Files\Microsoft Office\OfficeXX, where XX is our version number. We can browse to it or look on the Quick Launch shortcut for the file path. Do this by right click on the Outlook shortcut on Quick Launch toolbar and choosing Properties. The default switch is /recycle, we can replace this with /safe, press Apply then double-click on the shortcut to run it (leave the dialog open). After Outlook opens, replace safe with recycle and click OK

- If Outlook is not closing properly, look in Task Manager, Processes tab and verify it’s not running. We can open Task Manager by right clicking on the Windows task bar and choosing Task Manager.

The following safe switches are available:

/safe 

Starts Outlook without extensions, Reading Pane, or toolbar customization. Works with all versions.

/safe:1 

Starts Outlook with the Reading Pane off. Outlook 2003/2007 only.

/safe:2 

Starts Outlook without checking mail at startup. Outlook 2003/2007 only.

/safe:3 

Starts Outlook with extensions turned off, but listed in the Add-In Manager. Outlook 2003/2007.

/safe:4

Starts Outlook without loading Outcmd.dat (customized toolbars) and *.fav file. Outlook 2003/2007.

Thank You


Batch File: List a Perticular Service of All WMI Enabled Computers

@echo off
for /F %%s in (d:\Servers.txt) do (
  echo Processing %%s
  echo Processing %%s >> d:\Services.txt
  sc.exe \\%%s query netlogon >> d:\Services.txt
  echo. >> d:\Services.txt
)

Friday, 22 February 2013

VB Script: Retrieving Extended Files Properties of all files in folder, and import all attributes to Excel file.

To list extended Properties of files inside folder, use below script.

Save script in any localtion, i;e C:\Script.vbs, run below command

C:\>cscript //nologo script.vbs > report.csv

In addition, depending on the OS version, the properties are in different order and there may be many more.  Win XP has 33 standard items, but Win 7 has 286 and the order of some of them differ between the two OSs.

Script,...

--------------------------------------------------------------------------------------
Dim arrHeaders()
  
Set objShell = CreateObject("Shell.Application")Set objFolder = objShell.Namespace("D:\Database")
  
On error resume nextFor i = 0 to 287
  redim preserve arrHeaders(i)
  arrHeaders(i) = objFolder.GetDetailsOf(objFolder.Items, i)
  if err.number <> 0 then exit forNextOn error goto 0
wsh.echo "File Name" & "," & Join(arrHeaders, ",")
   
For Each strFileName in objFolder.Items
  wsh.stdout.write strFileName 
  For j = 0 to i - 1
    wsh.stdout.write "," & objFolder.GetDetailsOf(strFileName, j) 
  Next
  wsh.echo
Next


Tuesday, 18 September 2012

Citrix: Cannot start Microsoft Office Outlook. Cannot open the Outlook window.

It occurs when file that maintains the Navigation Pane settings of outlook becomes corrupted, means outlook profile get corrupted. Please see below small steps to get resolve this issue if outlook doesn’t open at user end in citrix.

-In citrix, Outlook profiles saves under \\Profile Server\TS_Proifles\%username%\AppData\Roaming\Microsoft\outlookprofilename.xml (e;g outlook.xml).
-If outlook profile is corrupted then this outlookprofilename.xml file size will show 0 KB. This is a good indication of this corruption.
-We just need to rename this outlookprofilename.xml file, and ask user to logoff and relogin back to citrix and outlook.
-Once user will login, it will again automatically create a new outlookprofilename.xml, and all settings of outlook will remain same.