Wednesday, 10 July 2013

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.

Wednesday, 25 July 2012

Event ID: 10016, Source: Microsoft-Windows-DistributedCOM

Description: The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID
{61738644-F196-11D0-9953-00C04FD919C1}
to the user GKN\sp_db_access SID (S-1-5-21-973244980-2087295393-1065927410-1142) from address LocalHost (Using LRPC). This security permission can be modified using the Component Services administrative tool.


Solution:
-GUID: {61738644-F196-11D0-9953-00C04FD919C1}
-Application name following to this GUID: IIS WAMREG admin Service
-Service Name: IISADMIN
-Permission issue: GKN\sp_db_access


Action taken:
Added in the account GKN\sp_db_access and set local launch and local activation

Path:
Administrative tool -> Component Services ->DCOM Config -> View -> Details -> Find GUID {61738644-F196-11D0-9953-00C04FD919C1} -> Added in the account GKN\sp_db_access and set local launch and local activation

PGP: Message is blocked - recipient email address could not be resolved. Error code: [0xa1010004].

CAUSE:The MAPI address space in PGP Desktop has to be configured to allow specific FAX address spaces.

SOLUTION:Add the following values to PGPprefs.xml
<key>MAPIfaxAddressSpaceList</key>
<string>FAX</string>

-To find PGPprefs.xml, go to
\%username%\UPM_Profile\AppData\Roaming\PGP Corporation\PGP \PGPprefs.xml

-Edit PGPprefs.xml in notepad.

-Find <key>MAPIfaxAddressSpaceList</key>

-Look next text to this string, it will show as <string></string>.

-Replace to <string></string> as <string>FAX</string>,
Note: Same will be performed in entire PGPprefs.xml file wherever you get <key>MAPIfaxAddressSpaceList</key>

-
Once it will replace, text will be shown as below.

<key>MAPIfaxAddressSpaceList</key> <string>FAX</string>,

-Log off and relogin back to PC, and check fax services. It should work.

Friday, 13 July 2012

Blackberry- Block Social Networking Applications from BES

-Login to blackberry server.
-In BlackBerry Administration Service console, select BlackBerry solution management.
-Select Policy and then select Manage IT policies.
-Highlight the "Default" IT Policy or create new policy, and then click to open the policy.
-With the IT policy open, click Edit IT policy.
-Select the Security tab and set Disable Public Social Networking Applications to Yes.

Friday, 18 May 2012

Error: ANS1705E System Writer(s) 'system writer' do(es) not exist.

If System Writers is not showing in "vssadmin list writers", there is some issue with permission on "%windir%\winsxs\temp\PendingRenames".
To allow appropriate permission, use below mentioned commands.

-Open cmd
-Go to %windir%\winsxs
-Type the following commands to allow permission:

Takeown /f %windir%\winsxs\temp\PendingRenames /a
icacls %windir%\winsxs\temp\PendingRenames /grant "NT AUTHORITY\SYSTEM:(RX)"
icacls %windir%\winsxs\temp\PendingRenames /grant "NT Service\trustedinstaller:(F)"
icacls %windir%\winsxs\temp\PendingRenames /grant BUILTIN\Users:(RX)
Takeown /f %windir%\winsxs\filemaps\* /a
icacls %windir%\winsxs\filemaps\*.* /grant "NT AUTHORITY\SYSTEM:(RX)"
icacls %windir%\winsxs\filemaps\*.* /grant "NT Service\trustedinstaller:(F)"
icacls %windir%\winsxs\filemaps\*.* /grant BUILTIN\Users:(RX)
net stop cryptsvc
net start cryptsvc


Now again run "vssadmin list writers" in command prompt, "system writers" should be visible there.