Sysadminsblog.com Anything for sysadmins!

12Aug/146

Dell warranty information API

I've always used the SOAP API that's provided by Dell, however recently it stopped working due to a misconfiguration in the service. This triggered me to find a different solution and luckily Dell also provides a REST API that is even simpler, gives more detailed information and actually still works.

There are 3 APIs available at the moment, but I will only dig into the warranty status as that is the most useful.

Functional specification of the warranty status API: http://en.community.dell.com/dell-groups/supportapisgroup/m/mediagallery/20438177/download.aspx

Function Global:Get-DellAssetInformation {
    Param([String]$ServiceTag = $(Get-WmiObject -Class "Win32_Bios").SerialNumber)
    Try {
        # Possible API keys
        # 1adecee8a60444738f280aad1cd87d0e
        # d676cf6e1e0ceb8fd14e8cb69acd812d
        # 849e027f476027a394edd656eaef4842
        $APIKey = "1adecee8a60444738f280aad1cd87d0e"
        $DellURL = "https://api.dell.com/support/v2/assetinfo/warranty/tags.xml?svctags=$ServiceTag&apikey=$APIKey"

        $XML = New-Object System.Xml.XmlDocument
        $XML.Load($DellURL)
        $XML.GetAssetWarrantyResponse.GetAssetWarrantyResult.Response.DellAsset
        $XML.GetAssetWarrantyResponse.GetAssetWarrantyResult.Response.DellAsset.Warranties.Warranty
    }
    Catch {
        Write-Host $($_.Exception.Message)
    }
}

Once you run this bit of code you can use the following to get the detailed information.

To get the information for the local machine use:

Get-DellAssetInformation

To get the information for a different ServiceTag use the following:

Get-DellAssetInformation -ServiceTag AB12AB1

If you have questions or comments, please post it below!

More information: http://en.community.dell.com/dell-groups/supportapisgroup/

Filed under: Powershell 6 Comments
2May/130

Forcing a full sync with Office 365 Dir Sync

There was a warning in the Application part of the event viewer.

The management agent "TargetWebService" completed run profile "Delta Confirming Import" with a delta import or delta synchronization step type. The rules configuration has changed since the last full import or full synchronization.
</p><p>User Action
</p><p>To ensure the updated rules are applied to all objects, a run with step type of full import and full synchronization should be completed.

Every time you run the Directory Sync Configuration you will force a delta sync, which is an incremental sync and not a full sync. To force a full sync you'll have to do the following.

  1. Start the registry editor - regedit
  2. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSOLCoExistence
  3. Find the FullSyncNeeded DWORD and set it to 1
  4. Start the Dir Sync Config Shell –
    %programfiles%\Microsoft Online Directory Sync\DirSyncConfigShell.psc1
  5. Run the CMDlet Start-OnlineCoexistenceSync

You can follow the sync steps by opening the Miisclient located at –

C:\Program Files\Microsoft Online Directory Sync\SYNCBUS\Synchronization Service\UIShell\miisclient.exe

Good luck!

2May/130

Dir Sync: Unable to establish a connection to the authentication service

Users reported that they couldn't access their personal archives. The archives are stored on the Office 365 services and should always be accessible. Of course the first clue was located in the event viewer where I found the following errors.

Log Name:      Application
</p><p>Source:        Directory Synchronization
</p><p>Date:          2-5-2013 8:31:38
</p><p>Event ID:      0
</p><p>Task Category: None
</p><p>Level:         Error
</p><p>Keywords:      Classic
</p><p>User:          N/A
</p><p>Computer:      &lt;servername&gt;
</p><p>Description:
</p><p>Unable to establish a connection to the authentication service. Contact Technical Support. GetAuthState() failed with -2147186688 state. HResult:0. Contact Technical Support.  (0x80048862)
</p><p>Event Xml:
</p><p>&lt;Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"&gt;
</p><p>  &lt;System&gt;
</p><p>    &lt;Provider Name="Directory Synchronization" /&gt;
</p><p>    &lt;EventID Qualifiers="0"&gt;0&lt;/EventID&gt;
</p><p>    &lt;Level&gt;2&lt;/Level&gt;
</p><p>    &lt;Task&gt;0&lt;/Task&gt;
</p><p>    &lt;Keywords&gt;0x80000000000000&lt;/Keywords&gt;
</p><p>    &lt;TimeCreated SystemTime="2013-05-02T06:31:38.000000000Z" /&gt;
</p><p>    &lt;EventRecordID&gt;27537&lt;/EventRecordID&gt;
</p><p>    &lt;Channel&gt;Application&lt;/Channel&gt;
</p><p>    &lt;Computer&gt;&lt;servername&gt;&lt;/Computer&gt;
</p><p>    &lt;Security /&gt;
</p><p>  &lt;/System&gt;
</p><p>  &lt;EventData&gt;
</p><p>    &lt;Data&gt;Unable to establish a connection to the authentication service. Contact Technical Support. GetAuthState() failed with -2147186688 state. HResult:0. Contact Technical Support.  (0x80048862)&lt;/Data&gt;
</p><p>  &lt;/EventData&gt;
</p><p>&lt;/Event&gt;

Log Name:      Application
</p><p>Source:        FIMSynchronizationService
</p><p>Date:          2-5-2013 8:31:50
</p><p>Event ID:      6803
</p><p>Task Category: Management Agent Run Profile
</p><p>Level:         Error
</p><p>Keywords:      Classic
</p><p>User:          N/A
</p><p>Computer:      &lt;servername&gt;
</p><p>Description:
</p><p>The management agent "TargetWebService" failed on run profile "Full Confirming Import" because the server encountered errors.
</p><p>Event Xml:
</p><p>&lt;Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"&gt;
</p><p>  &lt;System&gt;
</p><p>    &lt;Provider Name="FIMSynchronizationService" /&gt;
</p><p>    &lt;EventID Qualifiers="49152"&gt;6803&lt;/EventID&gt;
</p><p>    &lt;Level&gt;2&lt;/Level&gt;
</p><p>    &lt;Task&gt;1&lt;/Task&gt;
</p><p>    &lt;Keywords&gt;0x80000000000000&lt;/Keywords&gt;
</p><p>    &lt;TimeCreated SystemTime="2013-05-02T06:31:50.000000000Z" /&gt;
</p><p>    &lt;EventRecordID&gt;27539&lt;/EventRecordID&gt;
</p><p>    &lt;Channel&gt;Application&lt;/Channel&gt;
</p><p>    &lt;Computer&gt;&lt;servername&gt;&lt;/Computer&gt;
</p><p>    &lt;Security /&gt;
</p><p>  &lt;/System&gt;
</p><p>  &lt;EventData&gt;
</p><p>    &lt;Data&gt;TargetWebService&lt;/Data&gt;
</p><p>    &lt;Data&gt;Full Confirming Import&lt;/Data&gt;
</p><p>  &lt;/EventData&gt;
</p><p>&lt;/Event&gt;

Log Name:      Application
</p><p>Source:        FIMSynchronizationService
</p><p>Date:          2-5-2013 8:31:50
</p><p>Event ID:      6110
</p><p>Task Category: Management Agent Run Profile
</p><p>Level:         Warning
</p><p>Keywords:      Classic
</p><p>User:          N/A
</p><p>Computer:      &lt;servername&gt;
</p><p>Description:
</p><p>The management agent "TargetWebService" step execution completed on run profile "Full Confirming Import" but the watermark was not saved.
</p><p> 
 </p><p> Additional Information
</p><p> Discovery Errors       : "0"
</p><p> Synchronization Errors : "0"
</p><p> Metaverse Retry Errors : "0"
</p><p> Export Errors          : "0"
</p><p> Warnings               : "0"
</p><p> 
 </p><p> User Action
</p><p> View the management agent run history for details.
</p><p>Event Xml:
</p><p>&lt;Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"&gt;
</p><p>  &lt;System&gt;
</p><p>    &lt;Provider Name="FIMSynchronizationService" /&gt;
</p><p>    &lt;EventID Qualifiers="32768"&gt;6110&lt;/EventID&gt;
</p><p>    &lt;Level&gt;3&lt;/Level&gt;
</p><p>    &lt;Task&gt;1&lt;/Task&gt;
</p><p>    &lt;Keywords&gt;0x80000000000000&lt;/Keywords&gt;
</p><p>    &lt;TimeCreated SystemTime="2013-05-02T06:31:50.000000000Z" /&gt;
</p><p>    &lt;EventRecordID&gt;27540&lt;/EventRecordID&gt;
</p><p>    &lt;Channel&gt;Application&lt;/Channel&gt;
</p><p>    &lt;Computer&gt;&lt;servername&gt;&lt;/Computer&gt;
</p><p>    &lt;Security /&gt;
</p><p>  &lt;/System&gt;
</p><p>  &lt;EventData&gt;
</p><p>    &lt;Data&gt;TargetWebService&lt;/Data&gt;
</p><p>    &lt;Data&gt;Full Confirming Import&lt;/Data&gt;
</p><p>    &lt;Data&gt;0&lt;/Data&gt;
</p><p>    &lt;Data&gt;0&lt;/Data&gt;
</p><p>    &lt;Data&gt;0&lt;/Data&gt;
</p><p>    &lt;Data&gt;0&lt;/Data&gt;
</p><p>    &lt;Data&gt;0&lt;/Data&gt;
</p><p>  &lt;/EventData&gt;
</p><p>&lt;/Event&gt;

When I started the Synchronization Service Manager at

C:\Program Files\Microsoft Online Directory Sync\SYNCBUS\Synchronization Service\UIShell\miisclient.exe

, it showed the error stopped-server-down.

Seeing that it couldn't connect to some server I had to find out what server it was trying to connect to. In the Synchronization Service Manager I checked the Management Agents where in the properties of the TargetWebService I found the server that it was trying to connect to; https://adminwebservice.microsoftonline.com/ProvisioningService.svc.

After clearing the cache of the DNS services and flushing the DNS locally on the server I forced another full import which ran without problems.

Hope this helps you with solving your problem!

22Feb/130

Windows Update encountered an unknown error – 80243004

This error just showed itself on my Windows 2008 R2 SP1 server and it stopped me from installing any updates. The fix for this error is undoubtedly the strangest I ever came across. Pete Long described this fix on his website.

Strangely enough this error seems to be caused by the taskbar that is not showing all icons. Here are the steps:

  1. Right-click the taskbar and select properties
  2. In the Taskbar tab click Customize…
  3. Check "Always show all icons and notifications on the taskbar"
  4. Confirm all screens with OK

Now try installing the updates again and see that it'll work.

22Feb/130

Access denied in SharePoint 2010

Recently I did an update run on my SharePoint 2010 farm and I fixed some errors that were showing in the event log. This resulted in one specific error that resulted in an Access Denied on one of the sub-sites. The permissions weren't changed and even the Site Collection Administrator account was denied access. Here's what the solution was.

One of the errors that I tried to fix was setting the portal super reader account for proper caching. Unfortunately I didn't take the time to actually read up on it and I just entered an account that "should" work.

This resulted in an error in ULS about the Navigation not being able to be properly accessed. This was directly related to the access denied error. Seems like setting the account wasn't such a good idea. So I reset the property which instantly fixed the problem.

To find out how to properly set the "portal super reader account" and also the "portal super user account" visit the link below:

http://www.sharepoint24x7.com/2011/11/03/fix-it-configuring-object-cache-service/

17Jan/130

WSUS 3.0 SP2 gives error during install

I was trying to install the WSUS 3.0 SP2 patch when it gave me a very non-descriptive error.

There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor

If you go to

%temp%

you'll find some log files called wsuspatch####.log that will give you more information. For me it stated that the error occurred in the process

ExConfigureDb

.

MSI (s) (64:9C) [08:23:13:802]: Note: 1: 1722 2: ExConfigureDb 3: C:\Windows\Installer\MSIFFC2.tmp 4: -S &lt;DBServerName&gt; -F &lt;DBName&gt; -i "C:\Program Files\Update Services\Database\CreateDatabase.sql;C:\Program Files\Update Services\Database\mwus_database_schema.sql;C:\Program Files\Update Services\Database\ServerSync.sql;C:\Program Files\Update Services\Database\ClientWebService.sql;C:\Program Files\Update Services\Database\Setup.sql;C:\Program Files\Update Services\Database\Reporting.sql;C:\Program Files\Update Services\Database\ReportingSummarization.sql;C:\Program Files\Update Services\Database\ReportingRollup.sql;C:\Program Files\Update Services\Database\AdminAPI.sql;C:\Program Files\Update Services\Database\popdb.sql;C:\Program Files\Update Services\Database\EvtNamespaceImport.sql;C:\Program Files\Update Services\Database\SqlSettings.sql;C:\Program Files\Update Services\Database\Inventory.sql;C:\Program Files\Update Services\Database\PublicViews.sql" -l "C:\Users\ADMINI~1.SPI\AppData\Local\Temp\MWusCa.log"

At the end you'll see that the logging option was used (

-l

). This file revealed the next clue:

Changed database context to '&lt;DBName&gt;'.<br/>Msg 1468, Level 16, State 1, Server &lt;DBServerName&gt;,  Line 2<br/>The operation cannot be performed on database "&lt;DBNAME&gt;" because it is involved in a database mirroring session.Msg 5069, Level 16, State 1, Server &lt;DBServerName&gt;,  Line 2<br/>ALTER DATABASE statement failed.<br/>Starting WSUSService...<br/>WSUSService is now started.<br/>StartServer completed successfully.

I'm indeed using mirroring so I disabled it and it installed flawlessly! Don't forget to enable mirroring again afterwards!

Filed under: Microsoft, MSSQL No Comments
12Dec/120

Mailbox size overview for Exchange 2010

Once every now and then you'll want an overview of what the mailbox sizes are for your organization. You can then see who is using the most space and perhaps offer them some help archiving their mailbox. However Exchange 2010 doesn't really offer this in a organized way. This is exactly the reason why I created this one-liner. This will output to a GridView or to a CSV which you can then use to organize the data as you wish.

Get-MailboxDatabase | % { Get-MailboxStatistics -Database $_.Name | Select DisplayName, @{Name="Size (MB)";Expression={($_.TotalItemSize).Substring($a.IndexOf("(")).Replace("(","").Replace(" bytes)","").Replace(",","") / 1MB}} }

You could output it to GridView by piping it to

Out-GridView

Get-MailboxDatabase | % { Get-MailboxStatistics -Database $_.Name | Select DisplayName, @{Name="Size (MB)";Expression={($_.TotalItemSize).Substring($a.IndexOf("(")).Replace("(","").Replace(" bytes)","").Replace(",","") / 1MB}} } | Out-GridView

Or export it to a CSV by piping it to

Export-CSV

:

 Get-MailboxDatabase | % { Get-MailboxStatistics -Database $_.Name | Select DisplayName, @{Name="Size (MB)";Expression={($_.TotalItemSize).Substring($a.IndexOf("(")).Replace("(","").Replace(" bytes)","").Replace(",","") / 1MB}} } | Export-Csv C:\MailboxSizes.csv

As a result you can open the CSV in Excel, add some Conditional Formatting and Column Formating and voila! Yes, these are the actual mailbox sizes!

7Dec/123

PST Capture errors

I'm currently in the process of configuring PST Capture in order to migrate all the user's PST files to the recently configured cloud based Online Archive. As this wasn't working properly, I contacted Microsoft and opened a support ticket. I'm getting the error "Import error: Error opening mailbox <mail address>" when I try to import the PST file into my Online Archive. During the troubleshooting of this error I came across a nice list of requirements for the PST Capture tool to function properly. This might help you to configure everything correctly.

  1. Please make sure that you have the 64 Bit version of Outlook installed and that it is installed on the machine on which PST Capture Tool is running.
  2. Please check if the user has the Mailbox Import Export permissions. If it does not have them, then please assign them using the following command:
    </em>New-ManagementRoleAssignment -Role "Mailbox Import Export" -User "PSTImportUser"
  3. Please check that the Microsoft Exchange PST Capture Tool's Service Account has an Exchange 2010 Mailbox.
  4. Please check that the PST Capture Tool's Service Account is a member of Local Administrators Group.
  5. Please make sure that the PST Capture Tool's Service Account is a member of Organization Management and also the Public Folder Management.
  6. Check that the Service Account is mailbox-enabled and has an Outlook profile configured for it.
  7. Please make sure that the correct Service Account is chosen for the PST Capture Tool. To do this, please go to Properties of 'Microsoft Exchange PST Capture Service' > Log on tab  and check the Service Account.

 

Please comment below if you have questions about the PST Capture tool, or the above settings.

22Jun/120

PXE boot stopped working for WDS

After updating the Windows Deployment Service (WDS) server, it didn't seem to work anymore. The clients would try a PXE boot but couldn't find a TFTP server to get the boot image from. A colleague of mine found a great article about this problem.

It seems that when you have a single server that is running WDS and DNS, the DNS server binds to all ports in the WDS port range leaving the WDS server unable to respond to the clients.

Symptoms

  • TFTP downloads fail
  • Multicast downloads fail with a possible error code 2
  • When WDS tracing is enabled you will find one or more errors that resemble the following
    [2416] 16:01:36: [d:\w7rtm\base\ntsetup\opktools\wds\wdssrv\server\src\udpportrange.cpp:755] Expression: , Win32 Error=0x2<br/>[2416] 16:01:36: [d:\w7rtm\base\ntsetup\opktools\wds\wdssrv\server\src\regudpendpoint.cpp:192] Expression: , Win32 Error=0x2<br/>[2416] 16:01:36: [d:\w7rtm\base\ntsetup\opktools\wds\wdssrv\server\inc\RegEndpoint.h:354] Expression: , Win32 Error=0x2<br/>[2416] 16:01:36: [WDSTFTP][UDP][Ep=0] Registration Failed (rc=2)
  • When you run
    netstat –abn

    you'll find that 64001 to 65000 is displayed as being used

  • You've applied security update MS08-037: Vulnerabilities in DNS could allow spoofing

Solution

If you do not require WDS to use a static port range, you can configure WDS to dynamically query WinSock for available ports instead of using a port range. To do this you'll have to modify a registry key on the affected server.

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\WDSServer\Parameters

Modify the key

UdpPortPolicy

and set it to 0. Then restart the Windows Deployment Services.

More information can be found here: http://support.microsoft.com/kb/977512/en-us

21Jun/123

Room List Distribution Group

I just came across another Exchange 2010 surprise that I would like to share with you. When you are creating a new meeting and need a room to have the meeting in, you would normally add all the rooms and see which one is available. The guys behind Exchange 2010 came up with a solution for this. They introduced the Room List.

The room list is essentially a distribution group but with an added parameter. Unfortunately you can't create a Room List in the Exchange Management Console, so you'll have to use the Exchange Management Shell (PowerShell) for this. The command is quite straight forward.

New-DistributionGroup -Name "Meeting Rooms" –Members ConfRoom1,ConfRoom2,ConfRoom3,ConfRoom4 -RoomList

As you can see, the -RoomList parameter makes all the difference!

People no longer need to sift through the meeting rooms manually. They can now effectively use the Room Finder to find a suitable room.