Windows Store failed to sync machine licenses. Result code 0x80070002

November 29, 2016 Leave a comment

Problem
Log Name: Microsoft-WS-Licensing/Admin
Source: Microsoft-WS-Licensing
Date: 18/10/2016 3:52:15 PM
Event ID: 512
Task Category: None
Level: Error
Keywords: Service Keyword
User: DOMAIN\administrator
Computer: server.domain.local
Description: Windows Store failed to sync machine licenses. Result code 0x80070002
Event Xml:
<Event xmlns=”http://schemas.microsoft.com/win/2004/08/events/event”&gt;
<System>
<Provider Name=”Microsoft-WS-Licensing” Guid=”{ED76D77F-7FB5-4EE4-8268-EE46212CB2D3}” />
<EventID>512</EventID>
<Version>0</Version>
<Level>2</Level>
<Task>0</Task>
<Opcode>0</Opcode>
<Keywords>0x2000000000000001</Keywords>
<TimeCreated SystemTime=”2016-10-18T05:22:15.694926800Z” />
<EventRecordID>127</EventRecordID>
<Correlation />
<Execution ProcessID=”6692″ ThreadID=”6252″ />
<Channel>Microsoft-WS-Licensing/Admin</Channel>
<Computer>server.domain.local</Computer>
<Security UserID=”S-1-5-21-1324492469-2274245932-2023616121-500″ />
</System>
<EventData>
<Data Name=”HRESULT”>2147942402</Data>
</EventData>
</Event>

Explanation
Scheduled Task syncing app licenses for Microsoft Store. it has a requirement to sign in to the store with a Microsoft account. This is a production server and is never used nor required.

Resolution
Disable the WSRefreshBannedAppsListTask task in Task Scheduler.

Access to drivers on Windows Update was blocked by policy

November 29, 2016 Leave a comment

Problem
Log Name: Microsoft-Windows-DeviceSetupManager/Admin
Source: Microsoft-Windows-DeviceSetupManager
Date: 18/10/2016 3:44:20 PM
Event ID: 122
Task Category: None
Level: Warning
Keywords:
User: SYSTEM
Computer: server.domain.local
Description: Access to drivers on Windows Update was blocked by policy
Event Xml:
<Event xmlns=”http://schemas.microsoft.com/win/2004/08/events/event”&gt;
<System>
<Provider Name=”Microsoft-Windows-DeviceSetupManager” Guid=”{FCBB06BB-6A2A-46E3-ABAA-246CB4E508B2}” />
<EventID>122</EventID>
<Version>0</Version>
<Level>3</Level>
<Task>0</Task>
<Opcode>0</Opcode>
<Keywords>0x4000000000000000</Keywords>
<TimeCreated SystemTime=”2016-10-18T05:14:20.860369100Z” />
<EventRecordID>1413</EventRecordID>
<Correlation />
<Execution ProcessID=”896″ ThreadID=”3480″ />
<Channel>Microsoft-Windows-DeviceSetupManager/Admin</Channel>
<Computer>server.domain.local</Computer>
<Security UserID=”S-1-5-18″ />
</System>
<EventData>
</EventData>
</Event>

Resolution
If you open “Devices and Printers” in Control Panel, you might see a small pop-down about displaying enhanced device icons. right click that bar and select “Open device installation settings”.
If you change the setting to “Always install the best driver software from Windows Update.” then the EventID 122 errors will go away.
If you *also* select the “Automatically get the device app and info provided by your manufacturer” then the whole setting will change itself to the first “Yes, do this automatically” option (so the first option is the same as selecting both the bottom ones)
Whether you want to do this or not is on you!

Windows 10 issue where the Start Menu and Cortana to lock up and become unusable

November 29, 2016 Leave a comment

Problem
Windows 10 issue where the Start Menu and Cortana to lock up and become unusable. Here’s how to fix the Windows 10 Start menu.

Resolution
Run powershell as Admin
Get-AppXPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register “$($_.InstallLocation)\AppXManifest.xml”}

Symantec Backup Exec 15 after Windows Updates was unable to connect to the BEDB Database

November 29, 2016 Leave a comment

Problem
Running Symantec Backup Exec 15 after Windows Updates and a restart was unable to connect to the BEDB Database.

Resolution
Uninstall .NET Framework 4.6.1 by going to Control Panel > Programs > Programs and Features > View Installed Updates. Search for or scroll down the list of Microsoft Windows updates to find Update for Microsoft Windows (KB3102467) and click Uninstall. After a restart all was good.

Shrink Windows Partition hosted on ESXi VMWare – Virtual Disk Drive .vmdk

September 19, 2016 Leave a comment

Problem

I had a partition on a Windows Server (VM) that was used for log files and was 300GB, 200GB of which will never be used. I needed to shrink this drive to 100GB. This can not be achieved via the vSphere client so here are the steps I took.

Resolution

First open up Disk Management in Computer Management in your guest Windows environment.

Right click the volume on the disk you want to shrink.

Windows will inform you the maximum amount it can shrink the disk by. Choose an amount that you wish to actually shrink it by and click Shrink.

Once it is done and you are satisfied that the volume on the disk is the size you want.

Shut down the VM.

Enable SSH Access – This can be done via vSphere or by logging in to the iLo, depending on your infrastructure. I did it via vSphere as it was just quicker and easier.

Use Putty to SSH to the ESXi server itself and login as root

Navigate to the datastore path where the VMware virtual machine disk (.vmdk) is located.

cd /vmfs/volumes/<datastore name>/<vm name>

Make a backup copy of the .vmdk file, to be sure, just the descriptor file.

cp vmdiskname.vmdk vmdiskname-bak.vmdk

Need to edit the *.vmdk, which is the descriptor file, which contains the variables for the size of the *.-flat file. Using cat, this is what the descriptor file contains.

cat <vmdiskname>.vmdk

The number under the heading #Extent description defines size

e.g. 300GB = 300 X 1024 X 1024 X 1024 / 512 = 629145600

I wanted 100GB so… 100GB = 100 x 1024 x 1024 x 1024 / 512 = 209715200

Using vi, edited the descriptor file and changed the number.

Saved the file.

Exited out of SSH and started the VM.

Logged into Windows guest machine and opened Disk Management…Voila

 

Categories: ssh, vmWare Tags: , , ,

Exchange 2013: Unable to add Users to Exchange Group

May 31, 2016 Leave a comment

Problem

I was tasked with adding additional users to receive emails from a particular Exchange Group. Easy enough!. This group had  a type of ‘Security Group’ and had several email addresses associated as it basically replaced a public folder setup.

After adding the users and clicking on ‘Save’ I got the following error;

“You don’t have sufficient permissions. This operation can only be performed by a manager of the group”

But I was logged into the ECP as the Domain Administrator whom is a member of the Exchange Administrators group also.

Explanation

This issue occurs if you’re not a manager of the group. In this situation, you’re not listed in the ManagedBy attribute.

Running the following PowerShell script determined that there was no entry in the ‘ManagedBy’ attribute.

Get-DistributionGroup -Identity FrontOfficeGroup Select-Object ManagedBy

Solution

I ran the following PowerShell script to add the appropriate person to the ‘ManagedBy’ attribute.

Set-DistributionGroup -Identity FrontOfficeGroup -ManagedBy “Joe.Blow@company.com” -BypassSecurityGroupManagerCheck

SQL Server Job Fails: syspolicy_purge_history job getting failed

May 30, 2016 Leave a comment

Problem
In SQL Server 2012 there is a default job called ‘syspolicy_purge_history’ which was continually failing.
The job has 3 steps and the last one is to run a PowerShell script, which is…
(Get-Item SQLSERVER:\SQLPolicy\SQLSERVER\DEFAULT.EraseSystemHealthPhantomRecords()
This was the job that was failing.
Explanation
The execution policy of powershell on the server is set to Restricted, which is good as this  will prevent any scripts from being run. However, this is also why the job was failing. I was not comfortable with changing the execution policy to a blanket unrestricted. I discovered that you can allow the sql PS engine to run with the execution policy of unrestricted  without allowing all.
Resolution
Check if the following registry keys exist, if not, add them. If so, change appropriately:
For SQL 2012
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\Shellds\Microsoft.SqlServer.Management.PowerShell.sqlps110
ExecutionPolicy          REG_SZ          RemoteSigned
Path                           REG_SZ          C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\SQLPS.exe

For SQL 2014
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\Shellds\Microsoft.SqlServer.Management.PowerShell.sqlps120
ExecutionPolicy          REG_SZ         RemoteSigned
Path                           REG_SZ         C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\SQLPS.exe

Categories: SQL Tags: , , ,