Delete all packages from Distrubution Point

Did you get ever a situation to delete all the Packages from one Specific DP ? There are few tools/Scripts are available –          ConfigMgr 2007 Distribution Point Package Utility o   Can be downloaded from https://www.myitforum.com/inc/arts/12171Setup.zip –          Vbscript I like this tool as it is very quick o   https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-00-54-13-12/DPClean.zip For SCCM 2012 https://gallery.technet.microsoft.com/scriptcenter/Remove-Packages-from-5031a1b5 ‘Rslaten 03/2005’https://blogs.msdn.com/b/rslaten/archive/2006/03/01/removing-a-retired-dp-from-all-your-packages.aspx On … Read more

Disable services on list of servers

Below script will be useful for disabling the services ‘create a file called list.Txt Set Fso = CreateObject(“Scripting.FileSystemObject”)Set InputFile = fso.OpenTextFile(“list.Txt”)Do While Not (InputFile.atEndOfStream)sComputer = InputFile.ReadLineaTargetSvcs= Array(“WDSServer”)‘For list of services use below…‘arrTargetSvcs = Array(“service1”, “service2”, “service3”) Set oWMIService = GetObject(“winmgmts:” & “{impersonationlevel=impersonate}!” _ & sComputer & “rootcimv2”)Set cServices = oWMIService.ExecQuery(“SELECT * FROM Win32_Service”) For Each oService In … Read more

Systems Part of What Collections

–Systems Part of What Collections SELECT v_R_System.Name0, v_Collection.Name FROM v_FullCollectionMembership INNER JOIN v_R_System ON v_FullCollectionMembership.ResourceID = v_R_System.ResourceID INNER JOIN v_Collection ON v_FullCollectionMembership.CollectionID = v_Collection.CollectionID WHERE (v_R_System.Name0 = ‘Systemname’)

script that has WMI connection error will skip it and move to next

strComputer = “MYcomputername” Set objExcel = CreateObject(“Excel.Application”) objExcel.Visible = True objExcel.Workbooks.Add intRow = 2 objExcel.Cells(1, 1).Value = “Logon Name” objExcel.Cells(1, 2).Value = “Full Name” objExcel.Cells(1, 3).Value = “Description” objExcel.Cells(1, 4).Value = “Domain” objExcel.Cells(1, 5).Value = “Password Changeable” objExcel.Cells(1, 6).Value = “Password Required” objExcel.Cells(1, 7).Value = “Password Expires” objExcel.Cells(1, 8).Value = “Account Disabled” objExcel.Cells(1, 9).Value = … Read more

Excel output Script : for file version check well explained

Correct Script Set Fso = CreateObject(“Scripting.FileSystemObject”) Set InputFile = fso.OpenTextFile(“MachineList.Txt”) Set objExcel = CreateObject(“Excel.Application”) objExcel.Visible = True objExcel.Workbooks.Add intRow = 2Do While Not (InputFile.atEndOfStream) strComputer = InputFile.ReadLine intRow = intRow +1 objExcel.Cells(1, 1).Value = “System Name”objExcel.Cells(1, 2).Value = “Version”Set objWMIService = GetObject(“winmgmts:” & strComputer & “rootcimv2”)Set colFiles = objWMIService.ExecQuery _     (“Select * from CIM_Datafile … Read more

TO GET THE USER STATUS : Guest account status

  Set Fso = CreateObject(“Scripting.FileSystemObject”) Set InputFile = fso.OpenTextFile(“MachineList.Txt”) Do While Not (InputFile.atEndOfStream) strComputer = InputFile.ReadLine strUserName = “Guest” On Error Resume Next Set objUser = GetObject(“WinNT://” & strComputer & “/” & strUserName) If objUser.AccountDisabled = True Then Wscript.Echo (strUserName) & ” Is Disabled On ” & UCase(strComputer) Else MsgBox UCase(strUserName) & ” Is Enabled … Read more

Scripts to query installed Service Packs, Patches/updates and Hotfixes

Scripts to query installed Service Packs, Patches/updates and Hotfixes There are many known scripts which use WMI class Win32_QuickFixEngineering to enumerate hotfixes installed on a computer. These scripts can give you a list of installed updates like; 1. This Script reports installed updates that are installed with Windows Update (v5) technology and the result will … Read more

create 1000 users

‘ Create 1000 Sample User Accounts Set objRootDSE = GetObject(“LDAP://rootDSE”) Set objContainer = GetObject(“LDAP://cn=Users,” & _ objRootDSE.Get(“defaultNamingContext”)) For i = 1 To 1000 Set objLeaf = objContainer.Create(“User”, “cn=UserNo” & i) objLeaf.Put “sAMAccountName”, “UserNo” & i objLeaf.SetInfoNext WScript.Echo “1000 Users created.”

'Below script to create number of computers in AD–for testing

‘Below script to create number of computers in AD–for testing ‘============================================================================== ‘ ‘ Description: This script creates multiple sequential computer accounts ‘ in an AD OU. It appends a 3 digit number to the base name starting with ‘ the number entered at the prompt. ‘ ============================================================================== Option Explicit ‘Define Constants Const ADS_SCOPE_ONELEVEL = 1 … Read more