January 2011 - Posts

SCAM Alert!!!
Monday, January 24, 2011 5:21 PM

Wow, I have to say that I just had the pushiest guys try to scam me! Edward (11868) from online PC care. He called me out of the blue to tell me that my PC is having problems!!! He then explains that Facebook , Amazon, and a few other site will infect my PC! (What a load a bull!) Get just keep ranting on!

 

Man a I never knew that using a computer could be so dangerous!

 

If you want to watch the scam in action, watch the video.

http://www.homehelptech.ie/blog/phone-pc-repair-scam/

 

Or this one!!! http://www.youtube.com/watch?v=nXjmmbDV1bk

 

 

BTW, if you want to messy with them DON’T HANG UP! Their phone system keep the guy online no matter what! This means that they can’t call anyone! At the time of this blog post, I keep them online for 35+ minutes!  

Why you should not use IP address data in a report
Sunday, January 23, 2011 5:05 PM

As most of you know I NEVER use IP data within a report. due to the large number of duplicate rows. however….

image

Notice that E6510, ES-04, ES-06 are list twice.. Hence why I NEVER use IP address date within a report.

select  distinct
R.Netbios_Name0 AS 'Computer Name',
R.Resource_Domain_OR_Workgr0 AS 'Domain/Workgroup',
S.SiteName as 'SMS Site Name',
R.AD_Site_name0 as 'AD Site',
IP.IP_Subnets0 as 'IP Subnet',
'Top Console User' = CASE
  when (SCUM.TopConsoleUser0 is NULL or SCUM.TopConsoleUser0 = '-1') then 'Unknown'
  Else SCUM.TopConsoleUser0
End,
OS.Caption0 AS 'Operating System',
OS.CSDVersion0 AS 'Service Pack Level',
SEU.SerialNumber0 AS 'Serial Number',
SEU.SMBIOSAssetTag0 AS 'Asset Tag',
CS.Manufacturer0 AS 'Manufacturer',
CS.Model0 AS 'Model',
RAM.TotalPhysicalMemory0/1024 AS 'Memory (MB)',
Pro.NormSpeed0 AS 'Processor (GHz)',
LD.Size0 as 'Disk Space (MB) on C:\',
LD.FreeSpace0 as 'Free Disk Space (MB) on C:\'
from
v_R_System_Valid R
inner join v_GS_OPERATING_SYSTEM OS on (OS.ResourceID = R.ResourceID)
left join v_GS_SYSTEM_ENCLOSURE_UNIQUE SEU on (SEU.ResourceID = R.ResourceID)
inner join v_GS_COMPUTER_SYSTEM CS on (CS.ResourceID = R.ResourceID)
inner join v_GS_X86_PC_MEMORY RAM on (RAM.ResourceID = R.ResourceID)
inner join v_GS_PROCESSOR Pro on (Pro.ResourceID = R.ResourceID)
inner join v_FullCollectionMembership FCM on (FCM.ResourceID = R.ResourceID)
left  join v_Site s on (FCM.SiteCode = S.SiteCode)
inner join v_GS_LOGICAL_DISK LD on (LD.ResourceID =R.ResourceID) and LD.DeviceID0 = SUBSTRING(OS.WindowsDirectory0,1,2)
left outer join v_GS_SYSTEM_CONSOLE_USAGE_MAXGROUP SCUM on (SCUM.ResourceID = R.ResourceID)
join dbo.v_RA_System_IPSubnets IP  on (IP.ResourceID = R.ResourceID)
Where
FCM.CollectionID = @CollectionID
Order by
R.Netbios_Name0

Adding AD site to Query
Sunday, January 23, 2011 4:19 PM

select  distinct
    R.Netbios_Name0 AS 'Computer Name',
    R.Resource_Domain_OR_Workgr0 AS 'Domain/Workgroup',
    S.SiteName as 'SMS Site Name',
    R.AD_Site_name0 as 'AD Site',
    'Top Console User' = CASE
        when (SCUM.TopConsoleUser0 is NULL or SCUM.TopConsoleUser0 = '-1') then 'Unknown'
        Else SCUM.TopConsoleUser0
    End,
    OS.Caption0 AS 'Operating System',
    OS.CSDVersion0 AS 'Service Pack Level',
    SEU.SerialNumber0 AS 'Serial Number',
    SEU.SMBIOSAssetTag0 AS 'Asset Tag',
    CS.Manufacturer0 AS 'Manufacturer',
    CS.Model0 AS 'Model',
    RAM.TotalPhysicalMemory0/1024 AS 'Memory (MB)',
    Pro.NormSpeed0 AS 'Processor (GHz)',
    LD.Size0 as 'Disk Space (MB) on C:\',
    LD.FreeSpace0 as 'Free Disk Space (MB) on C:\'
from
    v_R_System_Valid R
    inner join v_GS_OPERATING_SYSTEM OS on (OS.ResourceID = R.ResourceID)
    left join v_GS_SYSTEM_ENCLOSURE_UNIQUE SEU on (SEU.ResourceID = R.ResourceID)
    inner join v_GS_COMPUTER_SYSTEM CS on (CS.ResourceID = R.ResourceID)
    inner join v_GS_X86_PC_MEMORY RAM on (RAM.ResourceID = R.ResourceID)
    inner join v_GS_PROCESSOR Pro on (Pro.ResourceID = R.ResourceID)
    inner join v_FullCollectionMembership FCM on (FCM.ResourceID = R.ResourceID)
    left  join v_Site s on (FCM.SiteCode = S.SiteCode)
    inner join v_GS_LOGICAL_DISK LD on (LD.ResourceID =R.ResourceID) and LD.DeviceID0 = SUBSTRING(OS.WindowsDirectory0,1,2)
    left outer join v_GS_SYSTEM_CONSOLE_USAGE_MAXGROUP SCUM on (SCUM.ResourceID = R.ResourceID)
Where
    FCM.CollectionID = @CollectionID
Order by
    R.Netbios_Name0

Auditing your BITS settings
Thursday, January 20, 2011 2:13 PM

Use the following MOF edits to audit your BITS settings.

 

configuration.mof

// RegKeyToMOF by Mark Cochrane (thanks to Skissinger, Steverac & Jonas Hettich)

// this section tells the inventory agent what to collect

// 1/19/2011 10:21:30 AM

// Created by Enhansoft - Garth Jones

 

#pragma namespace ("\\\\.\\root\\cimv2")

#pragma deleteclass("BITS", NOFAIL)

[DYNPROPS]

Class BITS

{

[key] string KeyName;

Uint32 EnableBitsMaxBandwidth;

Uint32 MaxBandwidthValidFrom;

Uint32 MaxBandwidthValidTo;

Uint32 MaxTransferRateOnSchedule;

Uint32 MaxTransferRateOffSchedule;

};

 

[DYNPROPS]

Instance of BITS

{

KeyName="RegKeyToMOF_32";

[PropertyContext("Local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\Windows\\BITS|EnableBitsMaxBandwidth"),Dynamic,Provider("RegPropProv")] EnableBitsMaxBandwidth;

[PropertyContext("Local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\Windows\\BITS|MaxBandwidthValidFrom"),Dynamic,Provider("RegPropProv")] MaxBandwidthValidFrom;

[PropertyContext("Local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\Windows\\BITS|MaxBandwidthValidTo"),Dynamic,Provider("RegPropProv")] MaxBandwidthValidTo;

[PropertyContext("Local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\Windows\\BITS|MaxTransferRateOnSchedule"),Dynamic,Provider("RegPropProv")] MaxTransferRateOnSchedule;

[PropertyContext("Local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\Windows\\BITS|MaxTransferRateOffSchedule"),Dynamic,Provider("RegPropProv")] MaxTransferRateOffSchedule;

};

 

#pragma namespace ("\\\\.\\root\\cimv2")

#pragma deleteclass("BITS_64", NOFAIL)

[DYNPROPS]

Class BITS_64

{

[key] string KeyName;

Uint32 EnableBitsMaxBandwidth;

Uint32 MaxBandwidthValidFrom;

Uint32 MaxBandwidthValidTo;

Uint32 MaxTransferRateOnSchedule;

Uint32 MaxTransferRateOffSchedule;

};

 

[DYNPROPS]

Instance of BITS_64

{

KeyName="RegKeyToMOF_64";

[PropertyContext("Local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\Windows\\BITS|EnableBitsMaxBandwidth"),Dynamic,Provider("RegPropProv")] EnableBitsMaxBandwidth;

[PropertyContext("Local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\Windows\\BITS|MaxBandwidthValidFrom"),Dynamic,Provider("RegPropProv")] MaxBandwidthValidFrom;

[PropertyContext("Local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\Windows\\BITS|MaxBandwidthValidTo"),Dynamic,Provider("RegPropProv")] MaxBandwidthValidTo;

[PropertyContext("Local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\Windows\\BITS|MaxTransferRateOnSchedule"),Dynamic,Provider("RegPropProv")] MaxTransferRateOnSchedule;

[PropertyContext("Local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\Windows\\BITS|MaxTransferRateOffSchedule"),Dynamic,Provider("RegPropProv")] MaxTransferRateOffSchedule;

};

 

 

SMS_Def.mof

// RegKeyToMOF by Mark Cochrane (thanks to Skissinger, Steverac & Jonas Hettich)

// this section tells the inventory agent what to report to the server

// 1/19/2011 10:21:30 AM

// Created by Enhansoft - Garth Jones

 

#pragma namespace ("\\\\.\\root\\cimv2\\SMS")

#pragma deleteclass("BITS", NOFAIL)

[SMS_Report(TRUE),SMS_Group_Name("BITS"),SMS_Class_ID("Enhansoft|BITS|1.0"),

SMS_Context_1("__ProviderArchitecture=32|uint32"),

SMS_Context_2("__RequiredArchitecture=true|boolean")]

Class BITS: SMS_Class_Template

{

[SMS_Report(TRUE),key] string KeyName;

[SMS_Report(TRUE)] Uint32 EnableBitsMaxBandwidth;

[SMS_Report(TRUE)] Uint32 MaxBandwidthValidFrom;

[SMS_Report(TRUE)] Uint32 MaxBandwidthValidTo;

[SMS_Report(TRUE)] Uint32 MaxTransferRateOnSchedule;

[SMS_Report(TRUE)] Uint32 MaxTransferRateOffSchedule;

};

 

#pragma namespace ("\\\\.\\root\\cimv2\\SMS")

#pragma deleteclass("BITS_64", NOFAIL)

[SMS_Report(TRUE),SMS_Group_Name("BITS"),SMS_Class_ID("Enhansoft|BITS|1.0"),

SMS_Context_1("__ProviderArchitecture=64|uint32"),

SMS_Context_2("__RequiredArchitecture=true|boolean")]

Class BITS_64 : SMS_Class_Template

{

[SMS_Report(TRUE),key] string KeyName;

[SMS_Report(TRUE)] Uint32 EnableBitsMaxBandwidth;

[SMS_Report(TRUE)] Uint32 MaxBandwidthValidFrom;

[SMS_Report(TRUE)] Uint32 MaxBandwidthValidTo;

[SMS_Report(TRUE)] Uint32 MaxTransferRateOnSchedule;

[SMS_Report(TRUE)] Uint32 MaxTransferRateOffSchedule;

};

Blog Stats 2010
Sunday, January 16, 2011 10:40 PM

I was just looking at the blog stats for smsug.ca only, I had 70 125 hits!

 

An average of 192.1 hits/ day.

Or 8 hits an hour!

 

Since I know that the myitforum blog get more hits! I wonder what the stats are?

by Garth Jones
Filed under: ,
Afterbackup.bat
Thursday, January 13, 2011 8:04 AM

Here is an Afterbackup.bat file that will make a daily backup of ConfigMgr Backup, so that you have a full week of backups.

::: Created Garth Jones Jan 13 2011
::: -----
REM @echo off

setlocal enabledelayedexpansion

set target=\\FP.Enhansoft.com\D$\sccmbackup\%date:~0,3%

If not exist %target% goto datacopy
RD %target% /s /q
 
:datacopy
xcopy "D:\sccmbak\*" "%target%\" /E /-Y

PCs without SEP
Tuesday, January 11, 2011 6:52 PM

select

SMS_R_System.ResourceId,

SMS_R_System.ResourceType,

SMS_R_System.Name,

SMS_R_System.SMSUniqueIdentifier,

SMS_R_System.ResourceDomainORWorkgroup, SMS_R_System.Client

from 

SMS_R_System

where

SMS_R_System.ResourceId not in (select SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID

from 

SMS_G_System_ADD_REMOVE_PROGRAMS

where

SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName like "%Symantec Endpoint Protection%")

and SMS_R_System.ResourceId not in (select SMS_G_System_ADD_REMOVE_PROGRAMS_64.ResourceID

from 

SMS_G_System_ADD_REMOVE_PROGRAMS_64

where

SMS_G_System_ADD_REMOVE_PROGRAMS_64.DisplayName like "%Symantec Endpoint Protection%")

2011 myITforum.com Donation
Sunday, January 02, 2011 3:47 PM

With the start of a new year, it is that time again to support the System Management Community, with that in mind I have made my yearly donation of $250 USD to MyITForum (MIF).

Have you made a donation to your community yet? http://www.myitforum.com/donations/donate.asp

This Blog

Syndication