Monthly Archives: July 2012

SCCM 2007 Corporate Training

AppREPACK houses an excellent team of  Technical Trainers, Development professionals. They form an integral part of the technical support system.Our practical approach lets you learn quickly through step-by-step procedures, using real-world scenarios. We offer both Classroom and Online training.

AppREPACK offers Corporate trainings on following platforms:
Application Repackaging/Packaging
Wise Package Studio
Installshield Adminstudio
SCCM 2007
Microsoft App-V


Start Service on Remote Computer – PowerShell

Following script will start the service “Browser”

$service=get-service browser
if ($Service.status -eq “Stopped”) {
write-Host “Starting service on $env:Computername” -foreground Green
$service | Start-service -PassThru
else {

To run the above script type following command:

invoke-command $sb -comp remotecomputername

Result will be as follows: 

Connect to Remote Machine using Powershell

To connect to remote machine using PowerShell. WinRM (Windows Remote Management) service needs to be in started mode on the remote computer.

Then, run the following command on remote computer: WinRM quickconfig

Follow the steps displayed in command prompt to receive requests and remote management. Now the remote machine is ready to be accessed using powershell from any other computer.

Type following command in Powershell to access the remote machine:
-> Enter-PSSession ComputerName

Get Status of Service on a Remote Machine – PowerShell Command

Get-Service ServiceName -computername remotecompname | Select-object -Property Name,Status, MachineName

Get all services which are running – PowerShell Command

Get-Service | Where {$_.Status -eq “running”}

What are Cmdlets

Cmdlets are specialized commands in the PowerShell environment that implement specific functions. These are the native commands in the PowerShell stack. Cmdlets follow a <verb><noun> naming pattern, such as Get-ChildItem

Display Message with Timer – VBScript

Following Script displays a message for 60seconds OR until user clicks OK.

a = “WSS 4.1 is already installed, Exiting WSS 5.0 Installation”
Set sh = CreateObject(“WScript.Shell”)
sh.Popup a,60, “”

PowerShell command to get all list of commands


Check if Registry Exists – VBScript

Const HKEY_CURRENT_USER = &H80000002

strComputer = “.”
Set objRegistry = GetObject(“winmgmts:\\” & strComputer & “\root\default:StdRegProv”)

strKeyPath = “SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{039694F1-2108-4B3E-8575-85C245210F94}”

strValueName = “DisplayName”
objRegistry.GetStringValue HKEY_CURRENT_USER,strKeyPath,strValueName,StrValue

If IsNull(StrValue) Then
    Wscript.Echo “The registry key does not exist.”
    Wscript.Echo “The registry key exists.”
End If

Bring a Process to Front for User Focus – AutoIT Script

Compile the following script using AutoIT and pass the process to be brought to front as commandline

For Example: BringToFront.exe “Caculator”

 AutoIt Version:
 Author:         myName

 Script Function:
Bring Window to front.

#ce —————————————————————————-
AutoItSetOption(“TrayIconHide”, 1)

If $CmdLine[0] > 0 Then
$WinTitle = $CmdLIne[1]
Exit 1
If $CmdLine[0] > 1 Then
$WinText = $CmdLIne[2]
$WinText = “”

WinWait($WinTitle, $WinText, 60)
If WinExists($WinTitle, $WinText) Then
WinActivate($WinTitle, $WinText)