October 2008 - Posts

Important changes to Microsoft Action Pack subscription

Whisper This is new....

For those partners who are not aware, there have been some important changes made to Microsoft Action Pack subscription. All first time subscribers and renewing partners must now study a course and pass a qualifying assessment with a score of 70 per cent or higher in order to subscribe or renew their Action Pack subscription. This presentation and webcast can help you understand the changes and how to go about subscribing. If you experience any issues subscribing to or renewing Action Pack subscription or have any questions you should contact the Regional Service Centre on 0870 60 70 700 (press option 1) for further assistance. Alternatively, the following email addresses are available:

Posted by scambler | with no comments
Filed under:

Scripting and scheduled tasks.....

Scripting and scheduled task...

I wanted to find a an easy way to create and check scheduled tasks via a script, not as easy as I first thought - all will be revealed why, read on.

so I create a scheduled task via the scheduled task control panel applet, no problem there.
I then try and query it via a vb script using WMI (attached) nothing is returned, no scheduled task present. Even using other WMI tools and looking in CIMV2 Win32_ScheduledJob - no jobs there.

However when I create a scheduled task via a vb script (see below)

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" _
    & strComputer & "\root\cimv2")
JobID = "Test"
Set objNewJob = objWMIService.Get("Win32_ScheduledJob")
errJobCreate = objNewJob.Create _
    ("Notepad.exe", "********143000.000000-420", _
        True , 1 OR 4 OR 16, ,True, JobId)
If errJobCreate = 0 Then
    WScript.Echo "Job created successfully: " & VBNewLine _
        & "Notepad.exe scheduled to run repeately at 14.30 (2:30 P.M.) PST" & VBNewLine _
        & "on Mon, Wed, and Fri."
Else
    WScript.Echo "Job not created. Error code = " & errJobCreate
End If

And query the scheduled tasks via a script, the query returns the script generated scheduled task, the reason (I have now found out) is below.

The problem we have here is that Windows actually has two different - and, sadly, not fully-compatible - APIs (Application Programming Interfaces) used to manage scheduled tasks. For one, there are the Task Scheduler APIs used by both the Task Scheduler and by Schtasks.exe, a command-line task management tool that ships with Windows XP and Windows Server 2003. For another, there are the so-called At APIs used by At.exe and by WMI’s Win32_ScheduledJob class.

So what’s the problem? Well, let’s say you use WMI to create a scheduled task. If you do that, you can then use a script to retrieve information about that task and about any other tasks created using the At APIs:

On top of that, if you open up the Task Scheduler, you’ll see the task in there as well. So far so good, huh?

However, suppose you say to yourself, “Hey, as long as I have the Task Scheduler open I might as well schedule a second task.” Let’s say you do so. That task, created by the Task Scheduler, will not be visible to your WMI scripts. The Task Scheduler can deal with tasks created by WMI, but WMI cannot deal with tasks created by the Task Scheduler.

Even worse, suppose you use Task Scheduler to modify the task you originally created with WMI. That task will be successfully modified, but you’ll no longer be able to access it using WMI, even though WMI created the thing in the first place. Yes, we know. And, hopefully, this problem will be corrected in future versions of Windows. And, yes, we know: that doesn’t really help you much right now, does it? Sorry.

So what does all this mean? Well, it means that managing scheduled tasks using WMI is kind of a hit-or-miss proposition. If you can be assured that no one is scheduling tasks using the Task Scheduler then WMI works great. But if people are using both WMI scripts and the Task Scheduler, well, then management becomes a bit more complicated, to say the least.

Posted by scambler | with no comments
Filed under: ,

Free version of Hyper-V released

No surprise here, after VMWare release ESXi for free download, you can now get a free version of Hyper-V - which one to use - decisions, decisions, decisions

http://www.microsoft.com/servers/hyper-v-server/default.mspx

http://www.microsoft.com/servers/hyper-v-server/how-to-get.mspx

Microsoft® Hyper-V™ Server 2008 is a stand-alone product that provides a simplified, reliable, cost-effective and optimised visualisation solution enabling organisations to improve server utilisation and reduce costs. It allows organisations to consolidate workloads onto a single physical server and is a good solution for organisations who want a basic and simplified visualisation solution for consolidating servers as well as for development and test environments. Low utilisation infrastructure workloads, departmental applications and simple branch office workloads are also candidates to virtualise using Hyper-V Server 2008.

Hyper-V Server 2008 is a cost-effective solution that is convenient because it plugs into existing IT infrastructures enabling companies to reduce costs, improve utilisation and provision new servers. It allows IT professionals to leverage existing patching, provisioning, management and support tools and processes. IT Professionals can continue to leverage their individual skills and the collective knowledge of Microsoft tools, minimising the learning curve to manage Microsoft Hyper-V Server 2008. In addition, with Microsoft providing comprehensive support for Microsoft applications and heterogeneous guest operating systems support, customers can virtualise with confidence and peace of mind.

Posted by scambler | with no comments
Filed under:

Extending Schema for ConfigMgr and 'A Referral was returned from the server'

I know this has been covered on a number of sites, but I had not seen this error before.

I have always said that the best way to extend the schema was to use an LDIF file (LDAP Data Interchange Format)

I prefer it as 'you are in more control' of the schema extension, and can see what changes are going to be made.

The only down side is that you have to modify the LDIF file before hand. The file in question is ConfigMgr_ad_schema.ldf, the modifications in question are changing all instances of DC=x to specific entries for your domain, more precisely the full name of the domain to be extended. For example for domain.com you would change DC=x to DC=domain, DC=com.

So the process I follow is

Backup the schema master domain controller’s system state using the NTBACKUP utility.
Disconnect the schema master domain controller from the network.
Edit the ConfigMgr_ad_schema.ldf file, located in the \SMSSETUP\BIN\I386 directory of the Configuration Manager 2007 installation files, as show above.
Use the LDIFDE command-line utility to import the contents of the modified ConfigMgr_ad_schema.ldf file.

For example, this command line will import the schema extensions into Active Directory, turn on verbose logging, and create a log file during the import process:
ldifde –i –f ConfigMgr_ad_schema.ldf –v –j <location to store log file>.

Seems simple.....

However I had a phone call from a site today saying it had not worked, and they had received the following error 'A Referral was returned from the server', add error on line 56.

Line 56 is where it updates the MS-SMS-Management-Point class, I couldn't see anything wrong there - and then it hit me. Their domain was domain.co.uk, they had changed DC=x to DC=domain, DC=co.uk - not good, it needs to be DC=domain, DC=co, DC=uk

Posted by scambler | 1 comment(s)
Filed under: , ,