CURRENT CONFIGURATION: Microsoft Outlook 2003 or 2007
OBJECTIVE: Synchronise with Salesforce
ISSUE: Salesforce icons does not appear in Microsoft Office Outlook. Re installation of Salesforce add-on doesn't help.
User can’t synchronise mails to Salesforce accounts from outlook.
I used to have Salesforce on my outlook but it has somehow mysteriously disappeared.
SOLUTION:
Microsoft Office Outlook --> Help --> Disabled Items. Enable Salesforce add-on.
Logoff, login or restart PC.
2009/01/12
How to allow non-administrator to run scheduled tasks remotely
CURRENT CONFIGURATION: Windows 2003 server SP2
OBJECTIVE: allow non-administrator to run scheduled tasks remotely.
ISSUE: By default non-administrator, INTERACTIVE and TelnetClients only can run scheduled tasks remotely.
SOLUTION:
- Create scheduled task with system account
schtasks /create /tn TASKNAME /tr "cmd.exe /c echo %%DATE%% %%TIME%% %%COMPUTERNAME%% >> %%TEMP%%\TASKNAME.log" /ru System /sc minute /mo 60 /st 00:03 /et 23:45
- Change account for the scheduled task
schtasks /change /tn TASKNAME /s %COMPUTERNAME% /ru TASKUSER /rp TASKPASS
- Assign permissions to execute scheduled task to non-administrative user or group
cscript.exe XCACLS.vbs %systemroot%\tasks\TASKNAME.job /E /G YUORDOMAIN\TASKUSER:X
- Give permission to execute %SystemRoot%\system32\cmd.exe to the non-administrative user or group
cscript.exe XCACLS.vbs %systemroot%\system32\cmd.exe /E /G YUORDOMAIN\TASKUSER:X
- Assign to the non-administrative user or group "Log on as a batch job" rights.
Open "Local Security Settings" --> "Local Policies" --> "User rights Assignment" --> "Log on as a batch job" and add the non-administrative user or group.
Test result with next command
notepad %TEMP%\TASKNAME.log
--- Star of bat file --
@echo off
:: *************************************************
:: File: task-create_test1.cmd
:: Author: Vadims Zenins (http://vadimszenins.blogspot.com)
:: Version: 1.00
:: Date: 09/01/2009 12:07
:: Task create for non-administrator user or group
:: Usage: task-create_test1.cmd PASSWORD
:: Requirements: XCACLS.vbs
:: ************************************************
:: @IF ERRORLEVEL 1 PAUSE
::echo 1: %1
@SETLOCAL
SET SOURCEPC=%COMPUTERNAME%
SET TASKNAME=task_test1
SET LOGDIR=E:\tools\logs
SET LOGFILE=%LOGDIR%\%TASKNAME%.log
SET TASKUSER=MyDomain\MyTaskUser
SET TASKGROUP=MyDomain\MyTaskGroup
SET TASKPASS=%1
SET TASKCOMMAND="%%systemroot%%\system32\cmd.exe /c echo %%DATE%% %%TIME%% %%COMPUTERNAME%% >> %LOGFILE%"
SET XCACLS=E:\tools\XCACLS.vbs
:: ==============================================================
if not exist %LOGDIR% md %LOGDIR%
echo ====================== >> %LOGFILE%
echo %DATE% %TIME% >> %LOGFILE%
echo SCRIPT is started >> %LOGFILE%
@if "%1"=="" goto usage
@if "%1"=="/?" goto usage
@if "%1"=="-?" goto usage
schtasks /delete /tn %TASKNAME% /f >> %LOGFILE%
schtasks /create /tn %TASKNAME% /tr "cmd.exe /c echo %%DATE%% %%TIME%% %%COMPUTERNAME%% >> %LOGFILE%" /ru System /sc minute /mo 60 /st 00:03 /et 23:45 >> %LOGFILE%
schtasks /change /tn %TASKNAME% /s %COMPUTERNAME% /ru %TASKUSER% /rp %TASKPASS% >> %LOGFILE%
cscript.exe %XCACLS% %systemroot%\system32\cmd.exe /E /G %TASKGROUP%:X /L %LOGFILE%
cscript.exe %XCACLS% %systemroot%\tasks\%TASKNAME%.job /E /G %TASKGROUP%:X /L %LOGFILE%
@goto end
:USAGE
@echo Usage: >> %LOGFILE%
@echo task-create_test1.cmd ^ >> %LOGFILE%
::exit 1
:END
echo %DATE% %TIME% >> %LOGFILE%
echo SCRIPT is finished >> %LOGFILE%
echo. >> %LOGFILE%
--- End of bat file --
Links
Extended Change Access Control List Tool (Xcacls). Xcacls.vbs is an unsupported tool that provides additional capabilities not provided with the supported utility, Xcacls.exe.
Schtasks
OBJECTIVE: allow non-administrator to run scheduled tasks remotely.
ISSUE: By default non-administrator, INTERACTIVE and TelnetClients only can run scheduled tasks remotely.
SOLUTION:
- Create scheduled task with system account
schtasks /create /tn TASKNAME /tr "cmd.exe /c echo %%DATE%% %%TIME%% %%COMPUTERNAME%% >> %%TEMP%%\TASKNAME.log" /ru System /sc minute /mo 60 /st 00:03 /et 23:45
- Change account for the scheduled task
schtasks /change /tn TASKNAME /s %COMPUTERNAME% /ru TASKUSER /rp TASKPASS
- Assign permissions to execute scheduled task to non-administrative user or group
cscript.exe XCACLS.vbs %systemroot%\tasks\TASKNAME.job /E /G YUORDOMAIN\TASKUSER:X
- Give permission to execute %SystemRoot%\system32\cmd.exe to the non-administrative user or group
cscript.exe XCACLS.vbs %systemroot%\system32\cmd.exe /E /G YUORDOMAIN\TASKUSER:X
- Assign to the non-administrative user or group "Log on as a batch job" rights.
Open "Local Security Settings" --> "Local Policies" --> "User rights Assignment" --> "Log on as a batch job" and add the non-administrative user or group.
Test result with next command
notepad %TEMP%\TASKNAME.log
--- Star of bat file --
@echo off
:: *************************************************
:: File: task-create_test1.cmd
:: Author: Vadims Zenins (http://vadimszenins.blogspot.com)
:: Version: 1.00
:: Date: 09/01/2009 12:07
:: Task create for non-administrator user or group
:: Usage: task-create_test1.cmd PASSWORD
:: Requirements: XCACLS.vbs
:: ************************************************
:: @IF ERRORLEVEL 1 PAUSE
::echo 1: %1
@SETLOCAL
SET SOURCEPC=%COMPUTERNAME%
SET TASKNAME=task_test1
SET LOGDIR=E:\tools\logs
SET LOGFILE=%LOGDIR%\%TASKNAME%.log
SET TASKUSER=MyDomain\MyTaskUser
SET TASKGROUP=MyDomain\MyTaskGroup
SET TASKPASS=%1
SET TASKCOMMAND="%%systemroot%%\system32\cmd.exe /c echo %%DATE%% %%TIME%% %%COMPUTERNAME%% >> %LOGFILE%"
SET XCACLS=E:\tools\XCACLS.vbs
:: ==============================================================
if not exist %LOGDIR% md %LOGDIR%
echo ====================== >> %LOGFILE%
echo %DATE% %TIME% >> %LOGFILE%
echo SCRIPT is started >> %LOGFILE%
@if "%1"=="" goto usage
@if "%1"=="/?" goto usage
@if "%1"=="-?" goto usage
schtasks /delete /tn %TASKNAME% /f >> %LOGFILE%
schtasks /create /tn %TASKNAME% /tr "cmd.exe /c echo %%DATE%% %%TIME%% %%COMPUTERNAME%% >> %LOGFILE%" /ru System /sc minute /mo 60 /st 00:03 /et 23:45 >> %LOGFILE%
schtasks /change /tn %TASKNAME% /s %COMPUTERNAME% /ru %TASKUSER% /rp %TASKPASS% >> %LOGFILE%
cscript.exe %XCACLS% %systemroot%\system32\cmd.exe /E /G %TASKGROUP%:X /L %LOGFILE%
cscript.exe %XCACLS% %systemroot%\tasks\%TASKNAME%.job /E /G %TASKGROUP%:X /L %LOGFILE%
@goto end
:USAGE
@echo Usage: >> %LOGFILE%
@echo task-create_test1.cmd ^
::exit 1
:END
echo %DATE% %TIME% >> %LOGFILE%
echo SCRIPT is finished >> %LOGFILE%
echo. >> %LOGFILE%
--- End of bat file --
Links
Extended Change Access Control List Tool (Xcacls). Xcacls.vbs is an unsupported tool that provides additional capabilities not provided with the supported utility, Xcacls.exe.
Schtasks
2008/12/03
Postfix: Add or replace sender's full name with header_checks
CURRENT CONFIGURATION: Open SuSe 10.2, Postfix
OBJECTIVE: Add or replace sender's full name
ISSUE: Full Sender's name doesn't exist in field From: .
SOLUTION:
add to /etc/postfix/header_checks file next row:
/^From:.*no-reply@mydomain\.com/ REPLACE From: MyName
shell # postmap /etc/postfix/header_checks
shell # /etc/init.d/postfix restart
OBJECTIVE: Add or replace sender's full name
ISSUE: Full Sender's name doesn't exist in field From: .
SOLUTION:
add to /etc/postfix/header_checks file next row:
/^From:.*no-reply@mydomain\.com/ REPLACE From: MyName
shell # postmap /etc/postfix/header_checks
shell # /etc/init.d/postfix restart
2008/12/01
VMware: Underlying file system does not support files that large
CURRENT CONFIGURATION: Windows XP SP2, Western Digital External USB disk with NTFS file system, VMware converter 3.0.3 build-89816.
OBJECTIVE: Convert VMware images from External Disk to VMware ESX Server 3i Version 3.5.0 Build 123629.
ISSUE: DISKLIB-SPARSE: "E:\Clones\filename.vmdk" : failed to open (36872): Underlying file system does not support files that large;
diskLib.sparseMaxFileSizeCheck= "false" in *.vmx file doesn't help;
Convert for mapped network drive doesn't help.
SOLUTION:
Copy files to local disk (with NTFS file system).
OBJECTIVE: Convert VMware images from External Disk to VMware ESX Server 3i Version 3.5.0 Build 123629.
ISSUE: DISKLIB-SPARSE: "E:\Clones\filename.vmdk" : failed to open (36872): Underlying file system does not support files that large;
diskLib.sparseMaxFileSizeCheck= "false" in *.vmx file doesn't help;
Convert for mapped network drive doesn't help.
SOLUTION:
Copy files to local disk (with NTFS file system).
2008/11/26
Delete the WSUS Client ID's from registry by Logon script
CURRENT CONFIGURATION: Windows XP, 2003; WSUS 3; OS distribution method is cloning (imaging) of computers.
OBJECTIVE: Update all workstation and server trough WSUS
ISSUE: Computers override each other or not appear in WSUS console.
SOLUTION: When you clone (reimage) new computer from different either disk or clone image WSUS Client ID would be the same for either both or all recloned (reimaged) computers.
I've chosen VBS Login script approach to delete WSUS client ID's in registry.
The new WSUS ID's would be generated at "Automatic Updates" service start. The computer would connect to WSUS server.
Please change MyCompanyName and MyDivisionName.
--- Start of code ---
LINKS: Delete the WSUS Client ID's from registry by Powershell script
OBJECTIVE: Update all workstation and server trough WSUS
ISSUE: Computers override each other or not appear in WSUS console.
SOLUTION: When you clone (reimage) new computer from different either disk or clone image WSUS Client ID would be the same for either both or all recloned (reimaged) computers.
I've chosen VBS Login script approach to delete WSUS client ID's in registry.
The new WSUS ID's would be generated at "Automatic Updates" service start. The computer would connect to WSUS server.
Please change MyCompanyName and MyDivisionName.
--- Start of code ---
'******************************************************************************--- End of code ---
' Author: Vadims Zenins http://vadimszenins.blogspot.com
' Version: 1.01
' Date: 26/11/2009 18:18:44
' Subroutine DeleteWSUSid
' delete the WSUS Client ID's from the registry
' and Restart service "Automatic Updates
' Inputs - none
' Call DeleteWSUSid()
' WshShell.run "wuauclt.exe /resetauthorization /detectnow", 0, True
'******************************************************************************
Sub DeleteWSUSid()
On Error resume next
' Stop service "Automatic Updates"
WshShell.run "net.exe stop wuauserv", 0, True
'Set the registry keypath that we are going to work with
strKeyPath = "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate"
'Set the value name that we will use to create the registry marker
' (to determine if we've run the script before on this computer)
strKeyReportPath = "HKLM\SOFTWARE\MyCompanyName\MyDivisionName"
intValue = 1
If WSHShell.RegRead(strKeyReportPath & "\WSUSIDDeleted") <> "1" Then
strMessage = "Deleting WSUS IDs in registry: " & strKeyPath
'Show me a box for 3 sec.
WshShell.Popup strMessage,3
'Delete registry values
'strMessage = "Deleting " & strKeyPath & "\AccountDomainSid"
'WshShell.Popup strMessage,2
WSHShell.RegDelete strKeyPath & "\AccountDomainSid"
'strMessage = "Deleting " & strKeyPath & "\PingID"
'WshShell.Popup strMessage,2
WSHShell.RegDelete strKeyPath & "\PingID"
'strMessage = "Deleting " & strKeyPath & "\SusClientId"
'WshShell.Popup strMessage,2
WSHShell.RegDelete strKeyPath & "\SusClientId"
'strMessage = "Deleting " & strKeyPath & "\SusClientId"
'WshShell.Popup strMessage,2
WSHShell.RegDelete strKeyPath & "\SusClientIdValidation"
'Create Key in registry for report
WSHShell.RegWrite strKeyReportPath & "\WSUSIDDeleted", intValue, "REG_DWORD"
WSHShell.RegWrite strKeyReportPath & "\WSUSIDDeletedDate",Now
Wscript.Sleep 2000
' Start service "Automatic Updates"
WshShell.run "net.exe start wuauserv", 0, True
Else
End If
End Sub
'******************************************************************************
DOWNLOAD: DeleteWSUSid.vbs.zip
Download md5: 12d50a1db2af39c1a68884a107fccc43
Подписаться на:
Сообщения (Atom)