Sunday 17 November 2013

Symantec manual scan using command line.

Run the command.

"C:\Program Files (x86)\Symantec\Symantec Endpoint Protection\DoScan.exe" /ScanName "Weekly Scan"

Access blocked websites in Office

This happens with almost everybody when one does not have access to all websites in the office and he is not able to find the important information available on blocked websites. Then he has to make request to IT person to allow those websites and for that he ash to go through so many approvals. But there are several ways through which one can gain access to blocked websites like the one I have referred below.

First one has to find the IP address of the computer on which all websites are allowed. Just note down the IP address and use enter in your computer and then see if you can access all websites. Also do not forget to create the batch file for this because once the person who had that IP address will switch on his system your IP address will conflict with him and niether you nor he will able to access internet and eventually IT persona will try to find the solution for this so the best way is to find someones computer which stays switched off most of the times.

I have made one batch file for changing the IP address which will help you to change the address in seconds.
Below batch file is for configuring the static IP address whenever is required.



One may change the bold text as per his/her environment.

Start

@ECHO off
cls
:start
ECHO.
ECHO 1. Static
ECHO 2. DHCP
set /p choice=Type the Choice:
rem if not '%choice%'=='' set choice=%choice:~0;1% ( don`t use this command, because it takes only first digit in the case you type more digits. After that for example choice 23455666 is choice 2 and you get "bye"
if not '%choice%'=='' ECHO "%choice%" is not valid please try again
if '%choice%'=='1' goto Static
if '%choice%'=='2' goto DHCP
ECHO.
goto start
:Static
netsh interface ip set address "Local Area Connection" static 10.10.10.2 255.255.255.0 10.10.10.1 1
goto end
:DHCP
netsh interface ip set address "Local Area Connection" dhcp
goto end
:end
pause
exit

Finish

Regards, IIS

Install Windows 8/7/XP over network.

Today, We'll discuss about how to capture full windows image to deploy over the network. This I believe is one of the best way to prepare the machine in less time and also one has to not bother about after windows installation as these software are the part of same image.However in order to start this command one has to go through the following steps.

1. Boot the machine over the network and wait till he gets the command prompt.

2. Map the shared location where ghost32.exe and your windows image exist so that you can access the utility over the network itself.

3. Get your command prompt to the map drive and run below command.

ghost32.exe -sure -clone,Mode=restore,DST=1,SRC=I:\imagename.gho

like above I have mapped I drive as shared drive where ghost32.exe and image saved.

Regards, IIS

Capture windows image using Symantec ghost command.

Capture windows image using Symantec ghost command.

ghost32.exe -sure -clone, Mode=create,SRC=1,DST=I:\image.gho

How to sync system time with internet.

How to sync system time with internet using command line.

Command -

w32tm /config /syncfromflags:domhier /update

Windows ImageX - Capture Windows Copy

Microsoft had released Imagex which is a nice tool by the way and can be used to automate IT task when it comes to installing windows. However in order to install windows we need to have one windows image that would consist of basic software's and other settings that is necessary. once we are done with those preparation we need to use Imagex. Please go through below steps to achieve my point.

1. Boot the machine over the network and wait till it gets the command prompt.

2. Map the shared location where imagex  and your windows image exist so that you can access the utility over the network itself.

3. Get your command prompt to the map drive and run below command.

imagex /capture D: I:\image.wim "Description" /Verify

like above I have mapped I: drive as shared drive where windows image has to be saved.

Regards, IIS

Fast Install Altiris Agent.

I was quite fascinated with the job of installing Altiris Agent on every system manually thus I created one batch file using below commands and made my job easier. Also it takes less time installing because we are doing it through command line.

1. Copy the setup using command on local workstation.

Xcopy \\10.10.10.2\Altiris\AeXNSC.exe C:

2.Run the command to setup notification server name during setup.

C:\AeXNSC.exe -s -a ns="ServerName"

It is recommended that you create its batch file so that you can run it using psexec tools remotely on many system at once.

Also there is another command that can be used to uninstall Altiris agent faster then manual.Also this would removed it from registry as well.

"C:\Program Files\Altiris\altiris agent\AexAgentUtil.exe" /Clean

Please comment if you are facing challenges in creating its batch file or using it the way I suggested.

Regards, IIS

Deploy windows using Microsoft ImageX from Pre-boot Environment.

Deploy windows using Microsoft ImageX from Pre-boot Environment.

From preboot environment command prompt run the below commands.

first partition the drive using diskpart command.

Commands -

Select Disk 0

Saturday 16 November 2013

PowerShell for Computer Inventory

Remotely pull Computer Name, Serial Number, Model Name using powershell script from multiple computers.

save computer name in abc.txt and save it to c drive.

$com = Get-Content C:\abc.txt
foreach($computers in $com){
$sn =  Get-WmiObject -Class win32_bios -Computername $computers -EA silentlyContinue
$cn =  Get-WmiObject -Class Win32_ComputerSystem -Computername $computers -EA silentlyContinue
Write-Host $sn.SerialNumber, $cn.Name, $cn.Model
}


Powershell Script to pull file Version remotely of multiple systems.

Powershell Script to pull file Version remotely of multiple systems.

Put the computer names in abc.txt and save it in C drive.

File path exist or not –

$colComputers = Get-Content C:\abc.txt
$ErrorActionPreference = "SilentlyContinue"

PowerShell Script to pull Computer names and Serial numbers remotely.

PowerShell Script to pull Computer names and Serial numbers remotely.

Put computer Names or IP Address in a text file to which we need serial numbers.

Like I did in my case C:\sss.txt is a file which needs to have Computer names or Serial Numbers.

Friday 15 November 2013

Pull or Export Active Directory computer objects in a csv file.

Pull or Export Active Directory computer objects in a csv file.

I've used filter abc* in command. Please change it as per your needs.

DSQUERY Computer "OU=Computers,DC=childdomainname,DC=domainname,DC=local" -name abc* -scope subtree -limit 0 > C:\ComputerOU.csv

Ping a Series of IP Address using Powershell

How to ping a Series of IP Address using Powershell Script.


I have used series 10.200.200 in code. Please change it as per requirement. 


$ping = New-Object System.Net.NetworkInformation.Ping
$i = 0
1..255 | foreach { $ip = “10.200.200.$_”
$Res = $ping.send($ip)
if ($Res.Status -eq “Success”)
{
$result = $ip + ” = Success”
Write-Host $result
$i++
}}
$Hosts = [string]$i + ” Hosts is pingable”
Write-Host $Hosts

Check FSMO roles in AD

How to check FSMO role AD Environment

Put this command in command prompt.

Netdom query fsmo



Install SQL Server 2008 in One Click

SQL Server 2008 R2 is such a big application which takes so much time to install itself and it is vry irrtitaing to see its processing. Thus I have created a batch file using which you can install SQL Server 2008 R2 with one click and also you can customize it according to your need. What you have to do is to create one configuration file and use the same in batch file. Besides the installtion will be silent so that one can still contijue to work while this application sis installed

Follow the steps to install the same.

1. Given command will help you install the application.

Setup.exe /ConfigurationFile=ConfigurationFile.ini /IAcceptSQLServerLicenseTerms

2. Save the below text in a file with .ini extension.


Note - For the installation of SQL Client Only.

 
#Start
 
;SQLSERVER2008 Configuration File
[SQLSERVER2008]

; Specifies a Setup work flow, like INSTALL, UNINSTALL, or UPGRADE. This is a required parameter. 

ACTION="Install"

; Specifies features to install, uninstall, or upgrade. The list of top-level features include SQL, AS, RS, IS, and Tools. The SQL feature will install the database engine, replication, and full-text. The Tools feature will install Management Tools, Books online, Business Intelligence Development Studio, and other shared components. 

FEATURES=SSMS,ADV_SSMS,SNAC_SDK

; Displays the command line parameters usage 

HELP="False"

; Specifies that the detailed Setup log should be piped to the console. 

INDICATEPROGRESS="False"

; Setup will not display any user interface. 

QUIET="True"

; Setup will display progress only without any user interaction. 

QUIETSIMPLE="False"

; Specifies that Setup should install into WOW64. This command line argument is not supported on an IA64 or a 32-bit system. 

X86="True"

; Detailed help for command line argument ENU has not been defined yet. 

ENU="True"

; Specify if errors can be reported to Microsoft to improve future SQL Server releases. Specify 1 or True to enable and 0 or False to disable this feature. 

ERRORREPORTING="False"

; Specify the root installation directory for native shared components. 

INSTALLSHAREDDIR="C:\Program Files (x86)\Microsoft SQL Server"

; Specify the installation directory. 

INSTANCEDIR="C:\Program Files (x86)\Microsoft SQL Server"

; Specify that SQL Server feature usage data can be collected and sent to Microsoft. Specify 1 or True to enable and 0 or False to disable this feature. 

SQMREPORTING="False"

; Auto-start service after installation.  

AGTSVCSTARTUPTYPE="Manual"

; Startup type for Integration Services. 

ISSVCSTARTUPTYPE="Automatic"

; Account for Integration Services: Domain\User or system account. 

ISSVCACCOUNT="NT AUTHORITY\NetworkService"

; Controls the service startup type setting after the service has been created. 

ASSVCSTARTUPTYPE="Automatic"

; The collation to be used by Analysis Services. 

ASCOLLATION="Latin1_General_CI_AS"

; The location for the Analysis Services data files. 

ASDATADIR="Data"

; The location for the Analysis Services log files. 

ASLOGDIR="Log"

; The location for the Analysis Services backup files. 

ASBACKUPDIR="Backup"

; The location for the Analysis Services temporary files. 

ASTEMPDIR="Temp"

; The location for the Analysis Services configuration files. 

ASCONFIGDIR="Config"

; Specifies whether or not the MSOLAP provider is allowed to run in process. 

ASPROVIDERMSOLAP="1"

; A port number used to connect to the SharePoint Central Administration web application. 

FARMADMINPORT="0"

; Startup type for the SQL Server service. 

SQLSVCSTARTUPTYPE="Automatic"

; Level to enable FILESTREAM feature at (0, 1, 2 or 3). 

FILESTREAMLEVEL="0"

; Set to "1" to enable RANU for SQL Server Express. 

ENABLERANU="False"

; Specifies a Windows collation or an SQL collation to use for the Database Engine. 

SQLCOLLATION="SQL_Latin1_General_CP1_CI_AS"

; Provision current user as a Database Engine system administrator for SQL Server 2008 R2 Express. 

ADDCURRENTUSERASSQLADMIN="False"

; Specify 0 to disable or 1 to enable the TCP/IP protocol. 

TCPENABLED="1"

; Specify 0 to disable or 1 to enable the Named Pipes protocol. 

NPENABLED="1"

; Startup type for Browser Service. 

BROWSERSVCSTARTUPTYPE="Disabled"

; Specifies how the startup mode of the report server NT service.  When 
; Manual - Service startup is manual mode (default).
; Automatic - Service startup is automatic mode.
; Disabled - Service is disabled 

RSSVCSTARTUPTYPE="Automatic"

; Specifies which mode report server is installed in.  
; Default value: “FilesOnly”  


RSINSTALLMODE="FilesOnlyMode"





Regards, IIS





Login Barracuda using script

If you want to log in barracuda client using vbscript. Here below is the solution for you. Thinking Why on earth someone would do it. There are incidence where one has to log in on multiple system to update windows manually and has to log in barracuda client on every system. One can simple push script remotely on multiple computer and may log in all of them at the same time.





I have used Google.com in the code. Please use website which is blocked in your case to come up with login page where the script will perform rest coding.

#Start

WScript.Quit Main
Function Main
  Set IE = WScript.CreateObject("InternetExplorer.Application", "IE_")
  IE.Visible = True
  IE.Navigate "http://www.google.com"
  Wait IE
  With IE.Document
    .getElementByID("login_field").value = "put your username"
    .getElementByID("password_field").value = "Put your password"
    .getElementByID("login_form_action").Click
  End With
End Function
Sub Wait(IE)
  Do
    WScript.Sleep 500
  Loop While IE.ReadyState < 4 And IE.Busy
  Do
    WScript.Sleep 500
  Loop While IE.ReadyState < 4 And IE.Busy
End Sub
Sub IE_OnQuit
  On Error Resume Next
  WScript.StdErr.WriteLine "IE closed before script finished."
  WScript.Quit
End Sub

#End

Regards, IIS

Unable to Login in domain Machine

Every other day when I came across this issue while working in IT infrastructure support, I thought what is happening to the machine connected with domain has started saying that machine has no data in the domain database.

After checking everything in the machines I came to know that this is not the machine issue but the server. We have had one policy configured on the server which would have ensured if no one would log in to the machine with domain account till 2 weeks it will automatically delete machine account from domain and after that if anybody would log in to the system with his domain ID will see the error as "The Security database on the server does not have a computer account".

Thus if you see this error while log in with domain ID, You need to check whether this account exist in the domain active directory if not then simply go to the machine and join it again in domain. In order to do that follow the steps stated below

1. Put the computer in any workgroup and restart the machine
2. Rejoin in specified domain.

Please comment if you are not sure how to do it.

Regards, IIS

IT Solutions with My real time experience.

Find solutions to IT issues raised on IT Helpdesk.

I will keep them in easy language so that You find them in google search with little words.

Lets Begin.

Completely install or uninstall any software

There have been many instances when we meet issues like uninstalling or installing any software and start browsing over internet for the solution or call software support team and it consumes so much time in getting the solution. Not just that we end up in installing more unnecessary softawre software claiming the solution. However these software creates more issues later.

Keeping this in mind microsoft had provided a fix for the issue which is very safe and do not create issues later.

Also if you encounter any of such issue you should not waste time in figuring out what was wrong with them unless they are major softwares and has its database configured. Instead of that we should use the below solution which can be downloaded from Microsoft Fixit .


Regards, IIS



Install Multiple Software with a Click