Automated SQL installation for SharePoint server (Using PowerShell or Batch)

As we all know that SharePoint needs SQL server in background one of the important topic is what we need to install it and how. Especially if we have more than one farm intention is to install all SQL with same configuration. Best way to do it by using configuration file.

First we need to copy all installation binaries to location on a local or a network hard drive. Then you need to put configuration file to same location as well. And for a final step you need to run setup.exe with config file parameters.

Continue reading

Manually updating Symantec AV for Sharepoint

If you will have need that you want to manually update Symantec Antivirus for SharePoint servers you can use existing definitions.

Main reason is that if you have Symantec Endpoint Protection, you are using Symantec Endpoint Protection Manager. For updating Antivirus for SharePoint you need to have Live Update server. From my point of view there is no common sense to have two “update” servers in same environment, one for every product, especially when both products are using same definition packages.

So in that case you can/want do it manualy.  Simple copy/paste can do the trick, but still you need to have this scripted. Biggest issue is how to deal with definition update folder from where you want to copy it, because it have name based on date (20140121.003).

Here is script example and inside you can find example how I was resolve this:

echo
::stopping Symantec Protection Engine service
Net Stop symcscan
::Wait 20 seconds till service is stopped
timeout /t 20
::continue with script
::Copy from: “C:\ProgramData\Symantec\Symantec Endpoint Protection\CurrentVersion\Data\Definitions\VirusDefs\%date:~6,4%%date:~3,2%*”
::Syntax %date:~6,4%%date:~3,2%* throws result yyyymm in folder name and * replace any other characters what will continue (for example: dd.xxx)
::At the end should be folder with date in name (20131113.xxx)
::Copy To: “C:\Program Files (x86)\Symantec\Scan Engine\Definitions\AntiVirus\VirusDefs”
::Use switches for confirming overwrite and to copy all files with all attributes
::Used switches:
::  /R           Overwrites read-only files.
::  /Y           Suppresses prompting to confirm you want to overwrite an
::               existing destination file.
::  /Q           Does not display file names while copying.
::  /I           If destination does not exist and copying more than one file,
::               assumes that destination must be a directory.
::Navigate to “C:\ProgramData\Symantec\Symantec Endpoint Protection\CurrentVersion\Data\Definitions\VirusDefs\%date:~6,4%%date:~3,2%*”
CD “C:\ProgramData\Symantec\Symantec Endpoint Protection\CurrentVersion\Data\Definitions\VirusDefs\%date:~6,4%%date:~3,2%*”
::copy all files from this directory to destination
xcopy *.* “C:\Program Files (x86)\Symantec\Scan Engine\Definitions\AntiVirus\VirusDefs\” /Y /Q
::Wait 20 seconds until copying is over
timeout /t 20
::Start Symantec Protection Engine Service
net start symcscan

Later on script was scheduled with good old AT.
Syntax:

AT 21:00 /every:M,T,W,Th,F,S,Su “C:\Folder\SymUpdTask.bat

In current age this way of updating can easily be called Retro 🙂

Cheers
Dubravko

 

Deploying Windows XP SP3 without GPO and WSUS

If You are managing wide infrastructure of your organization You could be unpleasantly surprise that Windows XP SP3 is not deployed to every Windows XP machine.

For some reason WSUS is not an option and GPO is upgraded to Windows Server 2008 R2 functionality. What You will do?

Using GPO is not an option because of too much configuration and lot of requested modification.

Using of logon script could be a point.

Requests is that you can deploy and install Windows XP SP3 without disturbing users.

At first we must create temporary user with administrative rights

After that we must download lsrunas tool. We will use it for passing the password. You can download it from here.

After that we will put Windows XP SP3 (WindowsXP-KB936929-SP3-x86-ENU) in network share accessible for domain users.

Check that every user can see it.

Create .bat script with following parameters

lsrunas.exe /user:tempadmin /password:password /domain:domain /command:xpsp3.cmd /runpath:

Create .cmd script with parameters:

net use x: /delete /y (where x is logical name of ntw share where SP3 is)

net use x: \\server\share ( reconnect share)

x:

cd sp3 (where Sp3 is name of directory where .exe file is)

WindowsXP-KB936929-SP3-x86-ENU.exe /quiet /promptrestart

Job done.

You can use this switches:

[/help] [/quiet] [/passive] [/norestart] [/forcerestart] [/warnrestart] [/promptrestart] [/overwriteoem] [/nobackup] [/forceappsclose] [/integrate: ] [/d: ] [/log: ]
/help Displays this message
SETUP MODES
/quiet Quiet mode (no user interaction or display)
/passive Unattended mode (progress bar only)
RESTART OPTIONS
/norestart Do not restart when installation is complete
/forcerestart Restart after installation
/warnrestart[: ] Warn and restart automatically if required (default timeout 30 seconds)
/promptrestart Prompt if restart is required
SPECIAL OPTIONS
/overwriteoem Overwrite OEM files without prompting
/nobackup Do not backup files needed for uninstall
/forceappsclose Force other programs to close when the computer shuts down
/integrate: Integrate this software update into
/d: Back up files into
/log: Create log file at