Sunday, March 3, 2013

SMS/ConfigMgr SQL query to find the list of systems in a specific IP subnet





SELECT SYS.Netbios_Name0, SYS.User_Domain0, SYS.User_Name0, AIP.IP_Subnets0, SYS.Client_Version0
FROM v_R_System  as SYS
JOIN v_RA_System_IPSubnets as AIP on SYS.ResourceID=AIP.ResourceID
WHERE AIP.IP_Subnets0 = '<IP Subnet>'
Order by SYS.Netbios_Name0

Determine which NTFS drive should have distribution point



First time when you distribute the package to distribution point then SMS/SCCM chooses the NTFS drive which has maximum free space.If you have 2 to 3 NTFS drives and you want to chosse one of them. There is no provision given at SMS/SCCM server side to prevent SMS/SCCM from using a NTFS dirve with maximum free space. Also, if any drive that is currently being used for distribution point is full, then SMS/SCCM starts using the next available drive with maximum. 

Method 1: 

Create the blank text file on the other drives with the name NO_SMS_ON_DRIVE.SMS which will prevent respective NTFS drive from creating SMSPKGC$ (Here C represents the drive) folder.This file named NO_SMS_ON_DRIVE.SMS needs to be placed at the root of the drive you want excluded.Drive which dont has NO_SMS_ON_DRIVE.SMS file,will have SMSPKGC$ folder. 
  
Method 2: 

Insted of installing a standard distribution point,install a distribution point on a server share. 

1) Create a folder called smspkgx$ on the partition you want it and share that folder. (x is the drive letter of your choice).

2) Create the distribution point on a share basis in the sms admin console instead of on a server name. (Share has to exist). Just right-click site systems inside the sms admin console, select new, server share, ...)

REF : http://support.microsoft.com/kb/871234

Friday, February 22, 2013

Operating System Deployment Using SCCM 2007


OPERATING SYSTEM DEPLOYMENT USING SCCM 2007

  1) Install windows deployment server ( WDS )
  2) Install Microsoft deployment toolkit ( MDT )- Optional
  3) Install PXE-Role point in SCCM.

         And verify following files also presented :
                C:\RemoteInstall\SMSBoot
                C:\RemoteInstall\ SMSIMAGES
                C:\RemoteInstall\ SMSTemp
                C:\RemoteInstall\ Stores
  
4) Add boot image to standard & PXE Distribution point.
  5) Add Install operating system image to standard distribution point
  6) Create sccm client package ( package from definition method ) and necessary software packages.
  7) Add DHCP Scope options :
Port 66 : <Boot server IP Address>
Port 67 : smsboot\x64\wdsnbp.com
  8) Create Task sequence & assign to required collection

Installing WDS :



Click Next & select Windows Deployment Services


Click Next.
 Click Next
 Click Install.
Click Close.



PXE- Role Installation : 

Site Database -> Site Management -> Site settings -> System systems -> right click


Select “PXE Service point”

 ( Optional: Enable unknown computer support ) & type PXE boot password. Click next

 Click next and finish.
PXE Installation Check : (C:\Program Files (x86)\Microsoft Configuration Manager\Logs\pxesetup.log )



Add Boot Image to Distribution Point :

Add default boot image to PXE Disrtibution point & standard distribution point.

Make sure that, required model network driver added to boot image.

After Boot image Distribution verify following files presented here : C:\Windows\Temp\PXEBootFiles\Windows\Boot\EFI
C:\Windows\Temp\PXEBootFiles\Windows\Boot\PXE






Add Operating System Image wizard :

Site Database -> computer management -> Operating system deployment -> Operating system images  -> right click -> add operating system image.(specify Captured image.wim file instead of install.wim )

Add this image to Standard distribution Point.


ADD Operating System Install Package :

Site Database -> computer management -> Operating system deployment -> Operating system install packages  -> right click -> add operating system install package.

Select operating system image share path and click next. Once completed add to standard distribution point.



TASK Sequence creation : 

NOTE : 
Type desired admin password in that text box.








Assign Task Sequence to Required collection.

 Program rerun behaviour should be : Never Rerun

Once Tasksequence Created and advertised,
Start workstation and press F12 select Network book
Need to provide password for entering to Task Sequence.
==============================================================
ERRORS Faced During OSD and solution : 



1) Error : pxe-e52 - tftp open timedout

add port 66,67 in DHCP

66 Boot server name : Boot server IP address
67 Boot file name  :  SMSBoot\x86\wdsnbp.com


2) Error : error 0x000000032

Sol : disable Apply drivers device option in task sequence.

3) Error : 0*80070005

Sol : access denied for DP,  whatever packages added to Task Sequence should be in Distribution points.
MY CASE : some packages were not added to any distribution points..


---------------------------------------------------------------------------------



Capture Image using Create task media - SCCM

Capturing Image using Task sequence create media wizard,

1) create task sequence capture media,



Select location where you need to save .iso image, click next and finish.

Once ISO Image created, burn it to CD or DVD.

2) Capturing Image using CD,
Run this CD or DVD to machine, where we need to capture image.


Run -> TSMBAUTORUN.EXE


Click Next & Specify destination folder and file name : C:\Windows7 32bit ent sysprep\Win7 32bit ent with all apps


Once Setup is started capturing Image, system will restart once, please wait.

After Restart you will get Following screen.




Thats it, now we can deploy this image with OSD.

Friday, December 28, 2012

Error in PXE Role uninstallation


Error : Unable to delete PXE Role in sccm,

Solution :
Run following sql query in sccm Database.


delete from pkgservers where NALPATH like '%\\sccm server name\smspxeimages$%'
delete from pkgstatus where pkgserver like '%\\sccm server name\smspxeimages$%'

After this, we can able to delete PXE role.

Thursday, December 13, 2012

SCCM Report to collect video file information

collecting video file information using SCCM Report



1) add video file extension in inventory collection under software Inventory client agents properties as shown below.

once added all required extension in inventory collection, run software inventory client agent on all systems.

2) Create SCCM Report now, ( i used SQL Server Business intelligence studio configured already)

 In solution explorer, right click -> Reports -> Add new report


 Next


Next

Copy SQL Query into : query string and click on Query Builder ( sql query available below )

SQL Query : 

SELECT     SYS.Netbios_Name0 AS 'System Name', SYS.User_Name0 AS 'User Name', SF.FileName, SF.FilePath, SF.FileSize AS 'FileSize(Byte)', SF.FileModifiedDate,
FCM.CollectionID
FROM         v_GS_SoftwareFile AS SF INNER JOIN
v_R_System AS SYS ON SF.ResourceID = SYS.ResourceID INNER JOIN
v_FullCollectionMembership AS FCM ON FCM.ResourceID = SYS.ResourceID
WHERE     (SF.FileName LIKE '%.avi%'
or sf.filename like '%.3gp'
or sf.filename like '%.flv'
or sf.filename like '%.mov'
or sf.filename like '%.mp4'
or sf.filename like '%.mpg'
or sf.filename like '%.mpeg'
or sf.filename like '%.wmv'
or sf.filename like '%.divx'
or sf.filename like '%.mkv') AND (FCM.CollectionID = @CollectionID)
ORDER BY 'FileSize(Byte)'


Select check box : CollectionID and enter OK

Select CollectionID check box 
Enter the name of the Report

OUTPUT : 

Any help required : prakaash2109@gmail.com

Saturday, December 8, 2012

Uninstall uTorrent Completely using command line

How to uninstall uTorrent Completely from system.


1) open notepad and type following command.


cd "C:\Program Files\uTorrent"
uTorrent.exe /uninstall /s
rmdir /s /q "C:\Program Files\uTorrent"
reg delete HKEY_CURRENT_USER\software\BitTorrent /f
reg delete HKEY_CURRENT_USER\software\BitTorrent\uTorrent /f
reg delete HKEY_CLASSES_ROOT\.torrent /f
reg delete HKEY_CLASSES_ROOT\Applications\uTorrent.exe /f
reg delete HKEY_CLASSES_ROOT\uTorrent /f
reg delete HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run /v uTorrent /f

save as batch file ( .bat ) and run. it removes uTorrent completely from your system.

same batch file we can create package through SCCM and distribute via software distribution.