Tuesday, April 29, 2014

Windows 7 SCCM 2012 R2 clients unable to download content

This is a case where Windows 7 x86 non domain workstations with SCCM 2012 R2 client installed were unable to download content from SCCM server. Network Access Account was properly configured, and the client was using it but was still unable to download content. Anonymous clients were not allowed to connect to distribution point. Here are the error messages from DataTransferService.log:

<![LOG[Job {...} impersonating Network Access Account.]LOG]!>
<![LOG[[CCMHTTP] ERROR: URL=http://servername:80/SMS_DP_SMSPKG$/PackageID, Port=80, Options=224, Code=0, Text=CCM_E_BAD_HTTP_STATUS_CODE]LOG]!>
<![LOG[Error sending DAV request. HTTP code 401, status 'Unauthorized']LOG]!>
<![LOG[GetDirectoryList_HTTP('http://servername:80/SMS_DP_SMSPKG$/PackageID') failed with code 0x80070005.]LOG]!>

After installing the following hotfix KB2522623, this client has successfully downloaded and installed packages. This hotfix is applicable to Windows Server 2008 R2 SP1 also, so this kind of behavior should be expected for those server 2008 R2 SP1 clients that are members of workgroup or DMZ.
 

Application Catalog website point Status:Critical

In this case I was deploying Cumulative Update 1 for SCCM 2012 R2 and installation of CU has completed successfully, but Application Catalog website point site system role was in status Critical. Before installation of CU1, Application Catalog website point was in status OK. So, the quest for searching why the application catalog website point was in status Critical after installation of CU1 has begun.
  • I checked the log files and there were no errors in them.
  • All components were in status OK
  • There were no error messages for components
  • All counts were reset
  • System rebooted
And still the Application catalog website point was in status Critical, even though software center application catalog from clients was working as expected.
Finally, I have reinstalled the application catalog website point system role, and mysteriously the status was changed in OK state.
 

Thursday, April 10, 2014

Setting Sleep Option on multiple Windows 8.1 domain computers

This was an easy task that I want to share, and the request was to set the power option when the computer will go into sleep state on a list of Windows 8.1 domain computers. Most of the computers on the list were having the default option of 30 minutes for going into sleep state. And this value of 30 minutes has to be changed into 5 hours, but all computers that were having a changed default setting of 30 minutes into Never must not be set. I was using PowerShell with WMI for achieving this task. And here is the script:

$comps =Get-Content "C:\Temp\Scripts\computers.txt"

foreach ($comp in $comps)
{

if (Test-Connection -ComputerName $comp.Trim() -Quiet)
{
#find the active powerplan
$a = (gwmi win32_powerplan -Namespace root\cimv2\power -ComputerName $comp.Trim() -filter { IsActive = 'True' }).instanceid.split("\")[1]


#find the powersetting for sleep option
$b = (gwmi win32_powersetting -Namespace root\cimv2\power -ComputerName $comp.Trim() -Filter { Elementname = 'Sleep After' }).instanceid.split("\")[1]


#get the value for sleep setting on active power plan
$seconds =  gwmi win32_powersettingdataindex -Namespace root\cimv2\power -ComputerName $comp.Trim() -Filter "InstanceID like '%$a%ac%$b'"

#check if the setting is Never
if ( $seconds.SettingIndexValue -ne 0 )
{


#set the value to 5 hours
    $seconds.SettingIndexValue = 18000
    $seconds.Put()
   
}
else
{

    write-host "$comp has sleep option Never"
}
}
}


The script is easy to understand, but anyway here is the overview:
  • Getting the list of computers from file and looping from each of the computer and checking if the computer is online.
  • In the main part I'm getting the guid for active power plan and guid for sleep option. After that I'm getting the value for sleep option in seconds.
  • And in the last part of the script I'm setting the option for going into sleep after 5 hours if the current value is not 0, which is the value for never put computer into sleep state.

Sweet Dreams :)
 

Monday, April 7, 2014

Error events in system event log after P2V conversion

In this case I was converting (P2V) HP ProLiant DL 360 G4 server with Windows Server 2003 operating system installed. The conversion has completed successfully, and the VM was running as should, but the following error events were logged in system event log on every reboot:

Event Type: Error
Event Source: Service Control Manager
Event Category: None
Event ID: 7000
Description:
The cpqasm2 service failed to start due to the following error:
The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.

Event Type: Error
Event Source: Service Control Manager
Event Category: None
Event ID: 7001
Description:
The HP ProLiant System Management Interface Driver service depends on the cpqasm2 service which failed to start because of the following error:
The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.

Event Type: Error
Event Source: Service Control Manager
Event Category: None
Event ID: 7001
Description:
The HP ProLiant System Shutdown Service service depends on the HP ProLiant System Management Interface Driver service which failed to start because of the following error:
The dependency service or group failed to start.

All HP Software related to the old hardware was successfully uninstalled, but these three services were still trying to start. Here is the output of sc (service control) query for those services:

 

In order to prevent these services from starting in VM, I have deleted those services using sc delete, since they were absolutely not needed by the operating system, because the system now was running as virtual machine. Here is the screenshot of the output of sc command:
 

Happy P2V conversion ! :)