Activation Error Code 0x8007000D. slmgr.vbs The data is invalid.

Scenario:
Windows Server 2008 R2. Refusing to activate.
Changed Keys, reset the spp service, renamed tokens.bat, removed softwaredistribution / any other fix under the sun

Errors:

Through the GUI.
Activation Error Code 0x8007000D

through the Telephone Option
The data is invalid.
Next screen just shows the numbers 1 2 3 4 5 6 7 8 9

slmgr.vbs /dlv to get the Installation ID
C:\Windows\system32\slmgr.vbs(1333, 5) (null): The data is invalid.

Microsoft Fix It wasn’t available and the permissions it mentioned matched what I had.
https://support.microsoft.com/en-us/help/2230957/error-code-0x8007000d-when-trying-to-activate-a-windows-server-2008-or-windows-7-machine-using-any-type-of-product-key.

The fix:
Albeit struggling, there is some merit to Microsofts article above.

Note: Always take a backup first.

To fix, I took ownership of the Key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root and set “replace permissions on child objects” in the advanced security.

Once applied, I was able to successfully activate. I hope this helps someone else out there.

Exchange 2013. VSS Exchange Writer. Reset without Reboot.

I’ve found that the Microsoft Exchange Writer gets into a retryable error quite often. Organising an outage to get the server restarted isn’t always an option.

Writer name: ‘Microsoft Exchange Writer’
Writer Id: {76fe1ac4-15f7-4bcd-987e-8e1acb462fb7}
Writer Instance Id: {963d5c60-7683-4a2b-9ec4-85af944723b9}
State: [5] Waiting for completion
Last error: Retryable error

There is a non-impacting way to reset this.

Restart service MSExchangeRepl

Exchange 2007. eseutil /cc. JET_errLogSectorSizeMismatch

Consider this scenario.

You’ve had to recover email from an older version of Exchange. You’ve created a new domain, installed Exchange with the same organisation name and added a new Exchange server where the Storage Group and Database retains the same name and structure.

You’ve successfully restore from tape. However the Database isn’t mounted and fails to mount.

You’ve try to replay the logs from the restore.env file and you get this error

eseutil /cc

Operation terminated with error -546 (JET_errLogSectorSizeMismatch, the log file sector size does not match the current volume’s sector size) after 0.78 seconds.

You get the same error when you try to reply the logs manually using eseutil /r

The cause? The sector size.

As discussed in this blog post, the sector size and physical disk types for databases in an Exchange 2010 Dag need to remain the same across all volumes. I highly recommend taking the time to read the article in it’s entirety. https://blogs.technet.microsoft.com/exchange/2013/04/24/exchange-2010-database-availability-groups-and-disk-sector-sizes/

First. I had a look at my disks by running this command

fsutil fsino ntfsin DriveLetter:

Take note of my example below and the ‘Bytes Per Physical Sector’

>fsutil fsinfo ntfsinfo c:

NTFS Volume Serial Number :       0x1e6848246847f953
Version :                         3.1
Number Sectors :                  0x00000000077ccfff
Total Clusters :                  0x0000000000ef99ff
Free Clusters  :                  0x00000000004ba961
Total Reserved :                  0x0000000000000040
Bytes Per Sector  :               512
Bytes Per Physical Sector :       4096
Bytes Per Cluster :               4096
Bytes Per FileRecord Segment    : 1024
Clusters Per FileRecord Segment : 0

>fsutil fsinfo ntfsinfo D:

NTFS Volume Serial Number :
Version :                         3.1
Number Sectors :                  0x00000000077fefff
Total Clusters :                  0x0000000000effdff
Free Clusters  :                  0x0000000000c99b89
Total Reserved :                  0x0000000000000000
Bytes Per Sector  :               512
Bytes Per Physical Sector :       512
Bytes Per Cluster :               4096
Bytes Per FileRecord Segment    : 1024
Clusters Per FileRecord Segment : 0

>fsutil fsinfo ntfsinfo e:

NTFS Volume Serial Number :
Version :                         3.1
Number Sectors :                  0x000000007cffefff
Total Clusters :                  0x000000000f9ffdff
Free Clusters  :                  0x0000000002edb5ec
Total Reserved :                  0x0000000000000000
Bytes Per Sector  :               512
Bytes Per Physical Sector :       512
Bytes Per Cluster :               4096
Bytes Per FileRecord Segment    : 1024
Clusters Per FileRecord Segment : 0

The backup product had restored the logs required for the database onto the C:\. As this failed the database was in a ‘dirty shutdown state’ and eseutil /cc or eseutil /r failed

The ‘Bytes Per Physical Sector’ for the C:\ differed from the disks that held the database and logs

The fix was relatively simple. I moved the logs required for restore to the D: and reran eseutil /cc

 

Netbackup. AdvancedDisk. CIFS Share. STS error.

I was wanting to set up an Advanced Disk Pool in Netbackup for duplication to our long term storage.

I went through the steps and created a new Disk Storage Server through ‘Configure Disk Storage Servers’ Wizard and configure my media server as the Disk Storage Server.

diskstorageserver

Next, I go through the Disk Pool Wizard. Type Advanced Disk, Server as my Media Server, then I go to add Volume.

Each time, I’d get this error. “RDSM has encountered an STS error: failed to update storage server configuration due to unsupported platform, invalid configuration or system error”

volume

Why was this happening? According to the user guides, a CIFS share is supported for Advanced Disk.

Hindsight is a wonderful thing, eventually the problem was identified. The volume needs to be the root of the CIFS share.

Don’t add a path to a subfolder! I was adding the UNC path to a subfolder on the share.

Hopefully this saves somebody out there a headache.

DNS. Remove NS Records. Powershell.

After a force removal of a Domain Controller and the metadata cleanup using ntdsutil, I was left with a heap of NS records for each Zone in DNS to remove. Although possible, using the GUI to do this would be painful.

I removed these using Powershell and the DNS cmdlets.

Get-DnsServerZone | %{$Name = $_.zonename ; Get-DnsServerResourceRecord -ZoneName $_.zonename -RRType ‘NS’ | ?{$_.RecordData.NameServer -like “*serverfqdn.domain.com*”} | Remove-DnsServerResourceRecord -ZoneName $name}

Note: This requires confirmation each time. If you are brave enough use the ‘-Confirm:$false’ switch, however I wouldn’t recommend it.

If you want to confirm the records returned are correct, run the command below first

Get-DnsServerZone | %{$Name = $_.zonename ; Get-DnsServerResourceRecord -ZoneName $_.zonename -RRType ‘NS’ | ?{$_.RecordData.NameServer -like “*serverfqdn.domain.com*”}

 

Internal CA. The request subject name is invalid or too long.

You create a certificate request and submit it to your internal CA and you get this error.

“Error Parsing Request The request subject name is invalid or too long”

It may seem odd, as the CN for your request isn’t that long.

Tip. Check the country field, this only supports the two characters

certutil -dump %YourRequestFile%

It is discussed in futher detail in this forum post.

https://social.technet.microsoft.com/Forums/office/en-US/dc23cde8-089a-46ca-9238-0eb2fe29447f/error-parsing-request-the-request-subject-name-is-invalid-or-too-long-when-trying-to-create-a?forum=winserversecurity

If you prefer openssl, us this command

openssl req -noout -text -in %YourRequestFile%

 

Exchange 2013. VSS Microsoft Exchange Writer. Reset without Reboot.

I’ve found that the Microsoft Exchange Writer will be in a retryable error quite often and this can be a right pain in the backside to organise an outage and get the server restarted.

Writer name: ‘Microsoft Exchange Writer’
State: [5] Waiting for completion
Last error: Retryable error

There is a relatively non-impacting way to reset this.

Restart service MSExchangeRepl. Some sources suggest restarting the Microsoft Information Store Service, at least in my environment I haven’t found this necessary

Writer name: ‘Microsoft Exchange Writer’
State: [1] Stable
Last error: No error

Exchange 2013. IMAP (S) not Connectable. No peer certificate available

You are find IMAPS connections aren’t working. You’ve checked the settings with Get-IMAPSettings and confirmed the services are running.

Testing with OpenSSL you find there are problems with the SSL Handshake

openssl s_client -showcerts -connect %ServerName%:993
Loading ‘screen’ into random state – done
CONNECTED(00000634)
write:errno=10054
—
no peer certificate available
—
No client certificate CA names sent
—
SSL handshake has read 0 bytes and written 317 bytes
—
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated

It took me a while to find this. It looks like Active Manager has intervened and disabled the Imap component.

Get-ComponentState -Identity ExchangeServer

And what do we see?

Component State
——— —–
ImapProxy Inactive

This kind of makes sense, just think about what you do to the Hub Transport component when you patch servers in a DAG.

This can be fixed by running

Set-ServerComponentState -Identity ExchangeServer1 -Component imapproxy -State Active -Requester HealthApi

Exchange 2013. Management Tools. RDS. Part 2

You may have read this post
https://mxrnz.wordpress.com/2014/07/30/exchange-2013-management-tools-rds/

Or this Microsoft Article
https://support.microsoft.com/en-gb/kb/2921141

I had given up on this and after some time, I thought I’d reattempt this with the Exchange 2013 CU 12 release and to my surprise the Management Tools have installed!

I’m not so sure when the fix was made and I may have missed it in the updates notes, however it does appear to have been fixed!

Party Time!

 

 

SCCM. SQL Query for AV Detections. v_gs_threats.

Rather than using the in built SCCM’s reports, I run a customized query to return Anti Virus detection.

SELECT v_R_System.Name0 as Name,Username,DetectionID,DetectionTime,ThreatName,Path,CleaningAction,ActionSuccess
From v_GS_Threats
Inner Join v_R_System
ON v_GS_Threats.ResourceID=v_R_System.ResourceID
WHERE DetectionTime >= DATEADD(DAY,-%days%, GETDATE())

Edit the days value depending on how far back you want to go. I like to run this weekly and in my case, it would be -7.

You can use this if you build your own report in Reporting Services or if you are that way inclined, wrap it in Powershell to send an HTML email.

You can download and install the SQL Powershell module on a non sql server by following the instructions here http://guidestomicrosoft.com/2015/01/13/install-sql-server-powershell-module-sqlps/