Omgetserverroleavailabilitystate Could Not Read From the Registry Error 5
Posts Tagged 'systems direction'
PowerShell: Report / Check the Size of ConfigMgr Task Sequences
Posted by Trevor Sullivan on 2012/01/ten
Introduction
In Microsoft Organization Center Configuration Manager 2007 operating organisation deployment (OSD), in that location is a limitation of 4MB for task sequence XML data. This is discussed in a couple of locations:
- http://social.technet.microsoft.com/forums/en-us/configmgrosd/thread/6C4A4BB2-847B-4290-878C-3E041D9B3FD2
- http://myitforum.com/cs2/blogs/smslist/archive/2009/ten/08/mssms-maximum-number-of-steps-in-an-sccm-task-sequence.aspx – Jason Sandys (ConfigMgr MVP) references the link beneath
- http://technet.microsoft.com/en-us/library/bb932192.aspx
The Technet document linked to to a higher place says the following:
Extremely big chore sequences tin can exceed the iv-MB limit for the chore sequence file size. If this limit is exceeded, an error is generated.
Solution: To bank check the job sequence file size, consign the task sequence to a known location and bank check the size of the resulting .xml file.
Basically, the Technet troubleshooting article is suggesting that you would need to get into the ConfigMgr console, right-click a task sequence, export it to a XML file, and and so pull up the file properties. That's fine for ane-off troubleshooting, but what if you lot had one thousand job sequences and needed to know how large all of them were? Read on to find out how!
Read the rest of this entry »
Posted in configmgr, powershell, scripting, wmi | Tagged: automation, configmgr, configmgr 2007, microsoft, msft, posh, powershell, sccm, sccm 2007, sccm sdk, script, scripting, sysctr, system centre, arrangement eye configuration manager, system centre configuration managing director 2007, systems management | 2 Comments »
PowerShell: Disable ConfigMgr Task Sequence Inaugural Notification
Posted by Trevor Sullivan on 2011/11/22
Introduction
If you are using Microsoft Organisation Center Configuration Manager (SCCM / ConfigMgr) to deploy task sequences to ConfigMgr client systems, you may observe that by default, a countdown notification is shown equally a airship notification in the client'south arrangement tray. In some cases, this functionality may be undesirable, and y'all may therefore wish to disable the balloon notification. Unfortunately, the task sequence properties GUI in the ConfigMgr console does not permit you to disable the notification, but yous can do then via script.
The SMS_TaskSequencePackage class in the root\sms\site_lab (where "lab" is your three-digit ConfigMgr site code) WMI namespace represents each chore sequence that has been created in a Configuration Director hierarchy. The ProgramFlags property on this course contains a serial of bitwise values (not sure if that'south the right term) which represent diverse options. In this case, we care about option 0x400 (1024 in base 10), which if enabled, disables the inaugural timer.
PowerShell Code
The PowerShell code included below will allow you lot to specify a chore sequence package ID that you lot would like to disable balloon notifications on. I suggest running the code inside of the PowerShell Integrated Scripting Editor (ISE).
Make sure you update your ConfigMgr server name (where the provider sits) and ConfigMgr site code before running it!
office Disable-ConfigMgrTaskSequenceNotification { param ( [Parameter(Mandatory = $truthful )] $SccmServer , [Parameter(Mandatory = $true )] $SiteCode , [Parameter(Mandatory = $true )] $TaskSequenceID ) try { # Retrieve the WMI instance that represents the intended chore sequence package $TaskSequencePackage = [ wmi ] " \\$SccmServer\root\sms\site_$SiteCode`:SMS_TaskSequencePackage.PackageID='$TaskSequenceID' " ; } # If the WMI object does non be, catch the mistake and deal with it ... somehow. grab [ Organization.Management.Automation.RuntimeException ] { Write-Host -Object ( " A Windows Management Instrumentation mistake occurred.`northward " + ` " `n* Is the computer powered on? " + ` " `n* Is a firewall blocking access to WMI? " + ` " `northward* Is the WMI service started on the remote arrangement? " ); } # If the object handle was caused from WMI, so go ahead and process it if ( $TaskSequencePackage ) { # Echo out the current ProgramFlags value Write-Verbose -Message ( " Current program flags for {0} are {one} " ` -f $TaskSequencePackage .Name, $TaskSequencePackage .ProgramFlags); # If the notification disablement is non enabled (confusing, I know), then enable it. if (( $TaskSequencePackage .ProgramFlags -band 0x400 ) -eq 0 ) { Write-Verbose -Message ( " Disabling countdown for job sequence: {0} " -f $TaskSequencePackage .Proper noun); # This is where the meat is: perform the binary XOR operation (same as calculation 1024 in base 10) and set # the resulting value back to the ProgramFlags belongings. Remember that -bxor oscillates between on & off, so # that's why we have to perform the check in the if { ... } statement, prior to blindly switching it. $TaskSequencePackage .ProgramFlags = $TaskSequencePackage .ProgramFlags -bxor 0x400 ; # Commit the in-retentiveness WMI example back to the ConfigMgr provider $TaskSequencePackage .Put(); } } # If a job sequence cannot be found with the appropriate ID, and so notify the user. else { Write-Host ` -Object ( " Could not observe job sequence with ID {0} in the {1} WMI namespace on {2} " ` -f $TaskSequenceID , " root\sms\site_$SiteCode " , $SccmServer ) } } Clear-Host ; $SccmServer = ' sccm01.mydomain.com ' ; $SiteCode = 'LAB ' ; $TaskSequenceID = Read-Host -Prompt ' Please enter a task sequence ID to modify ' ; Disable-ConfigMgrTaskSequenceNotification ` -SccmServer $SccmServer ` -SiteCode $SiteCode ` -TaskSequenceID $TaskSequenceID ` -Verbose;
When you execute this script, you'll be prompted for a job sequence ID, so make certain to have that handy.
Hope this helps!
Posted in configmgr, powershell, scripting, wmi | Tagged: automation, configmgr, configmgr 2007, microsoft, msft, posh, powershell, sccm, sccm 2007, script, scripting, sdk, sysctr, organization centre configuration director 2007, systems direction | ane Comment »
ConfigMgr 2012 RC Issues with CAS + Primary Hierarchy
Posted by Trevor Sullivan on 2011/xi/18
I just got done setting up a ConfigMgr 2012 Release Candidate principal site below a Cardinal Administration Site (CAS), and when firing up the console on the primary site, I'm getting the post-obit bulletin: "Your Configuration Manager panel is in read-only mode while this site completes tasks related to maintenance mode. Afterward these tasks are complete you must reconnect you lot Configuration Manager console before you lot can edit or create new objects."
Hither are a few facts about the hierarchy:
- The CAS runs on Windows Server 2008 R2 SP1
- The CAS points to a remote SQL 2008 SP1 Server on Windows Server 2008 R2 SP1
- The Primary Site runs on Windows Server 2008 R2 SP1
- The Primary Site points to a local SQL 2008 R2 SP1 example (with KB2603910 installed)
After passing this message box, the post-obit mistake would announced in the SmsAdminUI.log file:
[v, PID:3140][11/16/2011 20:28:22] :System.Management.ManagementException\r\nGeneric failure \r\n at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)
at System.Management.ManagementObjectCollection.ManagementObjectEnumerator.MoveNext()
at Microsoft.ConfigurationManagement.ManagementProvider.WqlQueryEngine.WqlQueryResultsObject.<GetEnumerator>d__0.MoveNext()\r\nManagementException details:
instance of SMS_ExtendedStatus
{
Clarification = " Could not notice property systemIsolationState";
ErrorCode = 1078464256;
File = "e:\\nts_sccm_release\\sms\\siteserver\\sdk_provider\\smsprov\\sspobjectquery.cpp";
Line = 3900;
Functioning = "ExecQuery";
ParameterInfo = "Select COUNT(*) FROM SMS_G_System_NAPCLIENT where systemIsolationState=0";
ProviderName = "WinMgmt";
StatusCode = 2147749889;
};
Obviously something was going on, considering this aforementioned error was not happening on the CAS when I'd launch the panel. We can come across in this bulletin that the holding named systemIsolationState obviously does not be in the SMS_G_System_NAPCLIENT WMI course in the root\sms\site_### namespace. Now that we know exactly what'due south missing, it's time to fire up the WMI Explorer and see if that property does or doesn't be.
As y'all tin come across, the holding surely does not be on the "001" site, which is the primary site beneath the CAS. Next, let's check the CAS for this property.
Note: I'm not sure that this property is necessarily supposed to exist on the CAS, but it's worth checking out anyway. Information technology's highly probable that information technology should exist on the CAS, because information technology's a common inventory grade for system resources.
Hither'due south a similar screenshot from the CAS.
Aha! It looks like the holding does exist on the CAS. At this betoken, I'm suspecting that something failed during the installation of the primary site, then allow'south head back over to the primary site and check out its ConfigMgr setup log (c:\ConfigMgrSetup.log). I saw this message repeating towards the end of the setup:
INFO: Still monitoring Replication initialization. Configuration Manager Setup xi/xvi/2011 3:35:38 PM 1168 (0x0490)
INFO: Still monitoring Replication initialization. Configuration Manager Setup 11/xvi/2011 three:44:38 PM 1168 (0x0490)
INFO: Still monitoring Replication initialization. Configuration Manager Setup 11/xvi/2011 three:53:38 PM 1168 (0x0490)
INFO: Nevertheless monitoring Replication initialization. Configuration Manager Setup 11/sixteen/2011 iv:02:38 PM 1168 (0x0490)
And finally, later on a while, it finished:
INFO: Stopping component monitoring every bit cease betoken received. Configuration Manager Setup 11/16/2011 six:52:25 PM 3752 (0x0EA8)
INFO: Stopping server role monitoring every bit stop indicate received. Configuration Manager Setup xi/sixteen/2011 6:52:26 PM 3836 (0x0EFC)
INFO: Stopping replication monitoring as cease signal received. Configuration Manager Setup 11/16/2011 6:52:26 PM 1168 (0x0490)
<xi-16-2011 18:52:27> ***************************************************** 1/i/1601 12:00:00 AM 1992907627 (0x76C95B6B)
<11-16-2011 18:52:27> ***** Exiting ConfigMgr 2012 Setup Bootstrapper ***** i/i/1601 12:00:00 AM 1992907627 (0x76C95B6B)
<eleven-16-2011 18:52:27> ***************************************************** 1/1/1601 12:00:00 AM 1992907627 (0x76C95B6B)
I'one thousand a little dislocated at how information technology finished successfully, because there were some other errors in the log as well:
omGetServerRoleAvailabilityState could non read from the registry on sccm03.mybiz.loc; mistake = v:
omGetServerRoleAvailabilityState could not read from the registry on sccm03.mybiz.loc; error = 5:
Also this showed upwards:
INFO: SDK Provider is on sccm03.mybiz.loc. Configuration Manager Setup 11/16/2011 8:56:25 PM 1748 (0x06D4)
INFO: Retrieving current site command prototype… Configuration Managing director Setup 11/sixteen/2011 8:56:25 PM 1748 (0x06D4)
INFO: SQL Connexion succeeded. Connection: SMS Admission, Blazon: Secure Configuration Managing director Setup 11/16/2011 viii:56:25 PM 1748 (0x06D4)
INFO: Stored SQL Server computer certificate for Server [sccm01.mybiz.loc] successfully on [sccm03.mybiz.loc]. Configuration Manager Setup 11/16/2011 8:56:25 PM 1748 (0x06D4)
CSql Fault: Cannot find blazon data, cannot get a connection. Configuration Director Setup 11/sixteen/2011 8:56:25 PM 1748 (0x06D4)
Error: SQL Connexion failed. Connection: CCAR_DB_ACCESS, Blazon: Unsecure Configuration Managing director Setup 11/16/2011 eight:56:25 PM 1748 (0x06D4)
CSql Error: Cannot find blazon data, cannot get a connection. Configuration Director Setup eleven/16/2011 eight:56:28 PM 1748 (0x06D4)
ERROR: SQL Connectedness failed. Connection: CCAR_DB_ACCESS, Type: Unsecure Configuration Manager Setup xi/xvi/2011 eight:56:28 PM 1748 (0x06D4)
CSql Error: Cannot notice type data, cannot become a connection. Configuration Manager Setup 11/16/2011 8:56:31 PM 1748 (0x06D4)
ERROR: SQL Connection failed. Connection: CCAR_DB_ACCESS, Type: Unsecure Configuration Director Setup xi/16/2011 8:56:31 PM 1748 (0x06D4)
CSql Mistake: Cannot discover type data, cannot get a connection. Configuration Director Setup 11/sixteen/2011 8:56:34 PM 1748 (0x06D4)
Fault: SQL Connexion failed. Connection: CCAR_DB_ACCESS, Type: Unsecure Configuration Manager Setup 11/16/2011 8:56:34 PM 1748 (0x06D4)
CSql Error: Cannot find blazon data, cannot get a connection. Configuration Director Setup 11/16/2011 8:56:37 PM 1748 (0x06D4)
ERROR: SQL Connection failed. Connexion: CCAR_DB_ACCESS, Type: Unsecure Configuration Managing director Setup 11/16/2011 8:56:37 PM 1748 (0x06D4)
CSql Error: Cannot notice type data, cannot get a connectedness. Configuration Director Setup eleven/16/2011 viii:56:40 PM 1748 (0x06D4)
Fault: SQL Connection failed. Connection: CCAR_DB_ACCESS, Blazon: Unsecure Configuration Manager Setup 11/16/2011 viii:56:40 PM 1748 (0x06D4)
CSql Error: Cannot find blazon information, cannot become a connection. Configuration Manager Setup xi/16/2011 8:56:43 PM 1748 (0x06D4)
ERROR: SQL Connexion failed. Connection: CCAR_DB_ACCESS, Type: Unsecure Configuration Director Setup 11/16/2011 eight:56:43 PM 1748 (0x06D4)
CSql Error: Cannot find blazon data, cannot get a connexion. Configuration Manager Setup 11/16/2011 8:56:46 PM 1748 (0x06D4)
ERROR: SQL Connectedness failed. Connection: CCAR_DB_ACCESS, Blazon: Unsecure Configuration Manager Setup xi/16/2011 8:56:46 PM 1748 (0x06D4)
CSql Fault: Cannot find type data, cannot get a connection. Configuration Director Setup 11/xvi/2011 eight:56:49 PM 1748 (0x06D4)
ERROR: SQL Connection failed. Connection: CCAR_DB_ACCESS, Type: Unsecure Configuration Manager Setup 11/16/2011 8:56:49 PM 1748 (0x06D4)
CSql Error: Cannot find type information, cannot get a connection. Configuration Manager Setup eleven/16/2011 8:56:52 PM 1748 (0x06D4)
Fault: SQL Connection failed. Connection: CCAR_DB_ACCESS, Type: Unsecure Configuration Manager Setup 11/xvi/2011 8:56:52 PM 1748 (0x06D4)
INFO: Registered blazon CCAR_DB_ACCESS for sccm01.mybiz.loc CM_CEN Configuration Manager Setup 11/16/2011 8:56:55 PM 1748 (0x06D4)
INFO: SQL Connexion succeeded. Connectedness: CCAR_DB_ACCESS, Type: Unsecure Configuration Manager Setup 11/xvi/2011 viii:56:55 PM 1748 (0x06D4)
INFO: Read CAS SQL Server information, stored CAS SQL Server certificate and registered connection to its database. Configuration Manager Setup 11/16/2011 8:56:55 PM 1748 (0x06D4)
Someone else posted this same bulletin when trying to exercise a CAS + Main Site configuration. Next step: reinstall the chief site.
Subsequently re-installing the primary site, the aforementioned problems returned. Finally I decided to just install a stand-alone chief site without a CAS.
Posted in configmgr, ConfigMgr vNext, fixes | Tagged: configmgr, configmgr 2012, configuration manager, microsoft, msft, sccm, sccm 2012, system center configuration manager 2012, systems management | 8 Comments »
Dell Updates Customer Configuration Toolkit (CCTK)
Posted by Trevor Sullivan on 2011/08/01
Dell has just recently updated the Client Configuration Toolkit (CCTK). CCTK is a well-documented command-line tool that allows IT administrators to manage hardware-level settings via script / batch. It uses a Hardware API (HAPI) driver, which can be dynamically installed at runtime, to make changes to the organization's BIOS / UEFI firmware configuration.
Download the Dell CCTK ii.0.1
The new publish date for this updated software is 7/25/11, and it is version 2.0.1. I've included the changes from the release notes below:
DELL CLIENT CONFIGURATION TOOLKIT
Version 2.0.one
Release Notes********************************************************************************
What'due south New in This Release
————————–
* Back up for new BIOS options, 'optimus' , 'controlwwanradio' and
'controlwlanradio'. For more than data run the post-obit commands
– cctk.exe -h –optimus
– cctk.exe -h –controlwwanradio
– cctk.exe -h –controlwlanradio* Support for additional arguments in the BIOS selection, 'keyboardillumination'.
For more than information, run the below command
– cctk.exe -h –keyboardillumination* Packaging CCTK installation file as a Dell Update Package (DUP) to:
– simplify upgrade and installation of CCTK in 1-to-many environments
– return Dell standard installation codes to simplify scripting for mass
distribution********************************************************************************
Posted in tools | Tagged: assistants, dell, engineering, it, it, systems management | Exit a Annotate »
Extreme PowerShell / ConfigMgr: Extending Hardware Inventory
Posted past Trevor Sullivan on 2011/07/05
Introduction
In previous versions of Microsoft System Center Configuration Manager (ConfigMgr / SCCM), a mutual task for administrators, engineers, and consultants, was to extend the hardware inventory configuration. These inventory extensions were written in Managed Object Format (MOF) and immune the SCCM client agents to written report back a wider array of information to the central site database for reporting purposes, drove edifice, and other management tasks. Making changes to the configuration could exist a tedious chore, as MOF is not very forgiving, and rather quite strict, in its syntax.
In Microsoft Systems Management Server 2003 (SMS 2003), each fourth dimension a configuration change was made, information technology was necessary to deploy the updated MOF file to the SMS clients — this made ensuring hardware inventory consistency beyond all clients a challenging chore. In SCCM, Microsoft included changes to these MOF files (SMS_DEF.mof and Configuration.mof) as part of the car policy refresh task, which is a client-side polling mechanism for configuration changes.
In SCCM 2012 Beta ii, Microsoft is taking it a stride farther and has eliminated the SMS_DEF.mof altogether, left the configuration.mof behind past itself, and stuck the WMI inventory configuration in … WMI. What is WMI? WMI stands for Windows Direction Instrumentation, a service built into the Windows Operating System since Windows XP (and Windows 2000 Service Pack 4, I recollect). It provides a standard method of exposing hardware and software level system information to applications, such as storage, processor, retentiveness, running processes, installed software, and other application configuration data. SCCM is built on top of this technology, and ofttimes makes developing software and scripts around the product much easier than it otherwise might be.
For the residuum of this article, we're going to look at specifically how to extend hardware inventory in SCCM 2012 programmatically using Windows PowerShell with the SCCM WMI provider.
Read the rest of this entry »
Posted in .Cyberspace, configmgr, ConfigMgr vNext, powershell, scripting, tools, wmi | Tagged: automation, configmgr, configmgr 2012, configuration manager, microsoft, msft, posh, powershell, sccm, sccm 2012, sccm 2012 beta ii, script, scripting, system center configuration manager, system center configuration manager 2012, systems management | two Comments »
PowerShell: Initiate Evaluation of ConfigMgr DCM Baselines
Posted by Trevor Sullivan on 2011/06/22
Introduction
Recently, I was working with Desired Configuration Direction (DCM) in System Eye Configuration Manager (SCCM / ConfigMgr) 2007 SP2 R3. During the development of configuration items (CIs) and baselines, it's common to have to trigger baseline evaluations to ensure that the validation rules you're writing are correct.
Read the residuum of this entry »
Posted in configmgr, ConfigMgr vNext, powershell, scripting, tools, wmi | Tagged: configmgr, configmgr 2007, microsoft, msft, powergui, quest, quest powergui, sccm, sccm 2007, sysctr, organization center configuration managing director 2007, systems management | Exit a Comment »
ConfigMgr: Written report of VMware Guests Missing VMTools
Posted by Trevor Sullivan on 2011/06/20
I needed to get a report of server systems that are missing the VMware Tools installation. This is pretty like shooting fish in a barrel to do with a subselect query in Microsoft's Organisation Center Configuration Director (SCCM / ConfigMgr). Here is the query I put together for this purpose:
select
[sys].[AD_Site_Name0]
, [sys].[Name0]
, [cs].[Manufacturer0]from v_R_System [sys]
join v_GS_COMPUTER_SYSTEM [cs] on [sys].[ResourceID] = [cs].[ResourceID]
where
[sys].[ResourceID] not in
(
select [sys].ResourceIDfrom v_R_System [sys]
join v_GS_SERVICE [svc] on [sys].[ResourceID] = [svc].[ResourceID]
join v_GS_COMPUTER_SYSTEM [cs] on [sys].[ResourceID] = [cs].[ResourceID]
where
[svc].[Name0] = 'vmtools'
)and [cs].[Manufacturer0] = 'VMware, Inc.'
and [sys].[Client0] = one
Posted in configmgr, ConfigMgr vNext | Tagged: configmgr, configmgr 2007, microsoft, msft, sccm, sccm 2007, sysctr, system center configuration managing director, system center configuration director 2007, systems management | Go out a Annotate »
PowerShell: Disable CapsLock
Posted by Trevor Sullivan on 2010/10/13
Here's a quick code snippet that shows how to disable CapsLock using PowerShell, combined with some embedded C# and .NET Interop (aka. P/Invoke.NET) lawmaking.
Credit goes to "BobS00327" for the C# code necessary to handle this.
function Set-CapsLock ([ switch ] $Disable = $true ) { $CapsCtrl = @" using System; using System.Runtime.InteropServices; using Organisation.Windows.Forms; public class CapsLockControl { [DllImport("user32.dll")] static extern void keybd_event(byte bVk, byte bScan, uint dwFlags,UIntPtr dwExtraInfo); const int KEYEVENTF_EXTENDEDKEY = 0x1; const int KEYEVENTF_KEYUP = 0x2; public static void Main() { if (Control.IsKeyLocked(Keys.CapsLock)) { keybd_event(0x14, 0x45, KEYEVENTF_EXTENDEDKEY, (UIntPtr) 0); keybd_event(0x14, 0x45, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, (UIntPtr) 0); } } } "@ if ( -not [ CapsLockControl ]) { Add-Type $CapsCtrl -ReferencedAssemblies Organization.Windows.Forms } if ( $Disable ) { [ CapsLockControl ]:: Main () Write-Host " Capslock has been disabled " } } Set-CapsLock -Disable
Posted in .Cyberspace, powershell, scripting, tools | Tagged: automation, c#, csharp, pinvoke, powershell, scripting, systems direction | 1 Comment »
Omgetserverroleavailabilitystate Could Not Read From the Registry Error 5
Source: https://trevorsullivan.wordpress.com/tag/systems-management/