Posts

Showing posts from 2017

Windows Update History Deleted After Sysprep

Image
I've been testing Windows Update History on my virtual machines and noticed that a machine which has had several Windows Updates installed on it was not listing any of them in its Update history: Cause After a little research, I discovered that it was because the updates were installed on my base virtual machine which I then cloned and ran sysprep on to create the test virtual machine.  It seems running sysprep causes the update history to be deleted. If I just clone my base virtual machine and do not run sysprep then look at the Update history, I can see all the installed updates: Related Posts -  Sysprep was not able to validate your Windows installation - Windows 11

Windows Patches Installed On Date Incorrect Format on Windows Server 2012

Image
If you run the following on Windows Server 2012 $patches = get-ciminstance Win32_QuickFixEngineering $patches[0].InstalledOn you get the date the patch was installed on in American date format MM/DD/YY.  PowerShell then converts the DD part of the date into a month so the result is incorrect. If you run the same query on Windows Server 2012 R2, the date is correct If you dig into the code, you can see the issue, here it is in Windows Server 2012 System.Object InstalledOn {     get=if ( [ environment ]:: osversion . version . build -ge 7000 )     {         # WMI team fixed the formatting issue related to InstalledOn         # property in Windows7 (to return string)..so returning the WMI's         # version directly         [ DateTime ]:: Parse( $this . psBase . CimInstanceProperties [ "InstalledOn" ]. Value)     }     else     {         $orig = $this . psBase . CimInstanceProperties [ "InstalledOn" ]. Value   

XIA Configuration review on 4sysops

Image
If you're interested in inventory and documentation, take a look at the  XIA Configuration review recently posted on the 4sysops website, an online community for SysAdmins and DevOps. The review is written by Timothy Warner who is a Microsoft Cloud and Datacenter Management Most Valuable Professional (MVP).

Bug renaming ODBC System Data Source with Oracle Driver

Image
I created a System Data Source with an Oracle driver and gave it the name "1Data Source Name" I then changed the Data Source Name to "Aéü1 "#$a%&'+-./:<>^_`|~£©™" Upon pressing OK, I discover that my System Data Source has been duplicated and I now have two entries, one with the original data source name and one with the new data source name! I seem to be finding a few bugs in Windows lately!

Bug copying files from host to virtual machine on VMware workstation

Image
I found another bug whilst testing Windows files on my virtual test environment. I made a folder on my host machine which contains a couple of test files as follows: C:\aAéü1 !#$%&'()-.@^_`{}~£©™\aAéü1 !#$%&'()+,-.;=@[]^_`{}~£©™.txt C:\aAéü1 !#$%&'()-.@^_`{}~£©™\aAéü1 !#$%&'()+,-.;=@^_`{}~£©™.txt I then dragged and dropped the folder onto my virtual machine and was shocked to see that a square bracket had been inserted into both file names! C:\aAéü1 !#$%&'()-.@^_`{}~£©™\aAéü1 !#$ ] %&'()+,-.;=@[]^_`{}~£©™.txt C:\aAéü1 !#$%&'()-.@^_`{}~£©™\aAéü1 !#$ ] %&'()+,-.;=@^_`{}~£©™.txt These particular file names are obscure but I do wonder if this could happen in circumstances with more conventional file names that happen to include characters that trigger this bug!

Brackets removed when copying files in Windows

Image
I've recently been testing files with different names in Windows using a long set of special characters: aAéü1 !#$%&'()+,-.;=@[]^_`{}~£©™ Part of this testing involved copying these files and I noticed that the round brackets are automatically removed by Windows when doing so! aAéü1 !#$%&'+,-.;=@[]^_`{}~£©™ - Copy This only seems to happen if the curved brackets do not contain any text.  If you put some characters between the brackets, they remain when the file is copied.

Error 0x80041013 WMI Provider load failure

Image
This post describes how to fix error 0x80041013 'Provider load failure' which can occur when using the Windows Management Instrumentation Tester (wbemtest) to run a WMI query: Screenshot of error 0x80041013 Cause This error can occur when wbemtest does not have sufficient privileges to load the required provider. Resolution To fix this error, run wbemtest as an administrator: Your query should now execute successfully. Screenshot of a query in wbemtest Video YouTube link:  0x80041013

Document Printer Properties on Windows Computers

Image
Automatically document your Printer properties with the network documentation tool XIA Configuration. Screenshot or Printer Properties in the XIA Configuration Server web interface Scan your network with the XIA Configuration Client to find Windows machines and network devices including printers.  Then view this data in the XIA Configuration Server web interface where you can run reports to audit your environment and generate professional documentation. The following data is included when documenting printers: Available From Available Until Capabilities Caption Comment Device ID Driver Location Port Print Processor Priority Security Separator Page Share Name Spool Mode Advanced Settings Find out more about XIA Configuration > Request a Free Trial >

The WSMan provider host process did not return a proper response

Image
This post describes one way to fix the error: The WSMan provider host process did not return a proper response. Issue When retrieving data from a remote machine using PowerShell, you see errors such as: 'The paging file is too small for this operation to complete.' 'Not enough storage is available to complete this operation.' 'The WSMan provider host process did not return a proper response.  A provider in the host process may have behaved improperly.' Screenshot from XIA Configuration Cause This error can occur when the MaxMemoryPerShellMB value on the remote machine is not high enough to allow a proper response to be returned. Resolution To check the MaxMemoryPerShellMB setting, run the following on the remote machine you are trying to retrieve data from using PowerShell: Get-Item WSMan:\localhost\Shell\MaxMemoryPerShellMB On my Windows Server 2016 virtual machine, this error occurred when the value was set to 25.  To set a

Value does not fall within the expected range - Task Scheduler

Image
This post describes how to fix the error 'Value does not fall within the expected range' which can occur when using Microsoft Windows Scheduled Tasks. Cause This error occurs when you add a Monthly trigger to a scheduled task and you pick one of the 'Select all' options: After you press OK, then press OK again to save the Task, the error ''Value does not fall within the expected range'' appears. Resolution To fix this error, open the triggers where 'Select all' has been used, observe that 'Select all' is no longer checked however all the other options are selected, then press OK. Warning If you have picked 'Last', this option is also no longer selected when you open the triggers after seeing the error. You must re-select this option in order to re-apply it.

Document Windows Server Roles and Features

Image
Use XIA Configuration to automatically document all roles and features on all your servers running Windows Server 2008 and above. The following information is documented for each role or feature: Name Numeric Identifier Install State Parent Numeric Identifier Parent Unique Name Unique Name Use the reporting feature to query the install state of all the roles and features across your entire environment at once. Find out more about documenting Windows servers > Request a free trial >

File Access Denied - You'll need to provide administrator permission to move this file

Image
After performing some testing on one of my virtual machines, I somehow lost the ability to drag and drop files from my host machine to the vm, even though I was logged on as the Administrator. Further investigation revealed that I could not drag and drop files from the root of my local drive to my desktop without the following User Account Control prompt appearing: File Access Denied You'll need to provide administrator permission to move this file A similar prompt also appeared for folders: Destination Folder Access Denied You'll need to provide administrator permission to move to this folder Permissions? At first, I thought it might be a permissions issue but this checked out ok. Policy Setting I then checked the policy settings and noticed the following policy was enabled: User Account Control: Admin Approval Mode for the Built-in Administrator account This is located in Computer Configuration > Windows Settings > Security Settings > Loca

Document Windows Computer Devices

Image
If you want to save time and automatically keep a record of the configuration of the devices on the Windows servers and workstations in your organization, take a look at the network documentation tool XIA Configuration . It scans all the Windows machines on your network then makes the configuration data available in a searchable web interface or a PDF export allowing you to create professional documentation in seconds. XIA Configuration also includes over 200 reports allowing you to audit all the machines in your environment at once.  Reports can be exported to CSV for further analysis. The following data can be audited for Windows machine devices: Device Settings Class Class GUID Device Status PNP Device Identifier Manufacturer Device Class Location Driver Details Driver Date Driver Provider Signed By Driver Version Inf Name Find out more about XIA Configuration > Download Free 30-Day Trial >

A constraint violation occurred. (exception from hresult: 0x8007202f)

Image
When calling the System.DirectoryServices.DirectoryEntry.CommitChanges method, the following error can occur if one of the property values is too long or of the wrong type: A constraint violation occurred. (exception from hresult: 0x8007202f) This can occur for example if you try to create a user account in Active Directory with a first name which is too long. If you are using the user provisioning software XIA Automation and you enter an invalid value during the user creation process, this error will display.  You can also see the full exception in the trace log. Screenshot showing error 'A constraint violation occurred' Solution Ensure that the values you are using to create the user account are valid according to the Microsoft documentation for Active Directory i.e. the correct type and within the length constraints.

Document Remote Desktop and Remote Assistance Settings

Image
If you have a business requirement to audit and document the remote desktop and remote assistance settings on the Windows PCs and servers on your network, use XIA Configuration to perform this task automatically. Each Windows PC and server is automatically discovered and scanned.  The data can then be viewed in the web interface where you can also perform audits and run reports. Or you can generate professional documentation with your own look and feel. The following settings are documented: Remote Assistance Settings Allow Remote Control Create invitations for Windows Vista or later Enabled Maximum Ticket Expiry Remote Desktop Settings Allow Connections Connection Mode Is Session Host Licensing Mode Security Group Name Remote Desktop Users Learn more about documenting Remote Desktop and Remote Assistance settings > Request a Free Trial >

Stop Windows Modules Installer Worker High CPU Server Permanently

Image
In this post, I describe how to permanently stop Windows Modules Installer Worker from using high CPU on Windows server.  As with my previous post on this subject, I would not do this on a live machine, however, it can be a pain on a test machine, particularly one that is only on from time to time as it seems to kick in as soon as you turn the machine back on. Stop Windows Modules Installer Worker Stop Windows Maintenance Modules Installer Worker from ever being started by Windows Maintenance tasks by downloading PSTools and running the following commands: Server 2012 R2 psexec  \\% computername %   -s  schtasks  / change  / tn "\Microsoft\Windows\TaskScheduler\Maintenance Configurator"  / disable psexec  \\% computername %   -s  schtasks  / change  / tn "\Microsoft\Windows\TaskScheduler\Regular Maintenance"  / disable psexec  \\% computername %   -s  schtasks  / change  / tn "\Microsoft\Windows\TaskScheduler\Idle Maintenance"  / dis

List Installed Programs on Windows

Image
Did you know you can use XIA Configuration to automatically get a list of the installed programs on all your Windows servers and workstations?  Read this article to find out how. How to get a list of Installed Programs on Windows 1. Create a Windows Machine Scan Task Create a Windows Machine scan task in the XIA Configuration Client.  In agent settings, ensure Installed Programs is set to Scan. 2. Scan the Windows Machines Either start a scan manually or schedule a scan.  Once complete, check it was successful. 3. List Installed Programs In the XIA Configuration Server, open a Windows machine item, navigate to Software > Installed Software to see a list of installed programs: 4. Run the Software Installation Report You can also run the Software Installation Report under Windows Machine Reports in the Browse Reports section of XIA Configuration Server. Installed Programs data The Installed Programs data listed by XIA Configuration includes:

Document Windows Shares

Image
Use the network documentation tool XIA Configuration to automatically document your Windows shares including shared folders and printers. The following Windows share settings are documented: Shared Folder Name Description Maximum Connections Allowed Path Type Caching Share Permissions Owner NTFS Permissions Find out more about the Windows Machine capability > Request a Free Trial >

Document Windows Local User Accounts and Groups

Image
If you need to document the local user accounts and groups on each Windows machine on your network then use the network documentation tool XIA Configuration to perform this task automatically. Each Windows machine is automatically discovered and scanned, the data is then stored in a database where you can track changes and compare items.  You can then either view the local accounts in the web interface or export to a PDF with bespoke branding. The following information is available for local accounts: Users Name Full Name Description Enabled/Disabled Home Directory Home Drive Last Login Login Script Password Expired Password Last Set Password Never Expires Profile Path Security Identifier User Cannot Change Password Administrator Account Guest Account Groups Name Description Members Security Identifier Administrators Group Find out more about XIA Configuration > Request a Free Trial >

Find out what the experts have to say about XIA Automation

Image
The user provisioning tool XIA Automation has recently been reviewed in IT Administrator magazine from Germany.  The review is over four pages long and goes into lots of detail. You can read a small snippet of the review and order a copy of the magazine here: http://www.it-administrator.de/magazin/heftarchiv/artikel/241728.html

Stop Antimalware Service Executable - Turn Off Windows Defender

Image
If you're using a Windows machine in a test environment and you're not interested in the protection that Windows Defender offers, you can turn off Windows Defender and prevent the Antimalware Service Executable from taking CPU resources away from other processes. To do this, open the relevant policy editor then navigate to Computer Configuration > Administrative Templates > Windows Components > Windows Defender > Turn off Windows  Defender Once the policy is applied to a machine, Windows Defender will be turned off.

PowerShell check if firewall rule exists before create

This post describes how to use PowerShell to check if a firewall rule exists in Windows. This can be very useful if you're creating a PowerShell script which creates Windows Firewall rules multiple times and you don't want to end up adding lots of duplicate firewall rules! Command Using the netsh command, you can check for the existence of rules e.g. with a particular name: netsh advfirewall firewall show rule name="** TCP Port 1433" This returns "No rules match the specified criteria." if no rules are found. Solution Put the netsh command in an if statement to check if the rule exists before creating it: if (( netsh   advfirewall   firewall   show   rule   name="** TCP Port 1433" )  -Contains   "No rules match the specified criteria." ) {   netsh advfirewall firewall add rule name="** TCP Port 1433" dir=in protocol=TCP localport=1433 action=allow } Edit: This script was corrected following the co

Windows Server 2016 start menu search not working

Image
If you're using the Windows Server 2016 start menu and the search is not working, even though you know for sure that what you're searching for exists in the start menu, this post describes a few techniques to resolve this issue. Windows Search Service Firstly, you need to install the 'Windows Search Service' feature: Windows Server 2016 Unlike Windows Server 2012 R2 in which the 'Windows Search' service is already started, on Windows Server 2016, you have to change the startup type to Automatic and Start the service. Once the indexing is complete, you should then be able to find shortcuts in your Windows Server 2016 start menu. Administrator If you're logged in as Administrator, you may also need to enable UAC Admin Approval mode: Start > Run > secpol.msc > Local Policies > Security Options > User Account Control: Admin Approval Mode for the Built-in Administrator account Then restart the machine. Video YouTub

Fix Slow Search in Start Menu on Windows Server 2012 R2

Image
If you're experiencing a slow search in the start menu on Windows Server 2012 R2 then this post describes a quick and easy way to fix this issue. All you need to do is install the feature 'Windows Search Service': Windows will then index the Start Menu and Users locations.  You can see how many items have been indexed by opening the Indexing Options: Once this is complete, you should notice that searching the start menu on Windows Server 2012 R2 is a lot faster.

Get Started with XIA Configuration Server v9.1

Image
If you've recently installed XIA Configuration Server v9.1 and you need some help getting started, take a look at this video from CENTREL Solutions: The video describes how to perform your first scan using the XIA Configuration Client and how to perform some of the main functions, such as generating documentation, from the XIA Configuration Server web interface. Find out more about XIA Configuration > Request a Free Trial >

The trust relationship between this workstation and the primary domain failed VMware snapshot

Image
This article describes a really quick way to fix the error "The trust relationship between this workstation and the primary domain failed" on a VMware virtual machine snapshot.  A permanent fix is also included at the end of the article. Cause For me, this error occurs all the time when I revert to snapshots of my virtual machines within VMware Workstation.  In fact, I already blogged about how to fix this issue on Nano Server here:  http://howardsimpson.blogspot.co.uk/2017/09/fix-microsoft-nano-server-wont-logon-to-domain.html The error actually describes the problem quite well.  The domain member and domain controller have a trust in the form of cryptographic data.  As you change snapshot, the domain member's data no longer matches the domain controller. Fix Shut Down If your snapshot is shut down, the error will surface on the login screen when you boot the VM There are two ways to fix this: Fix 1 Firstly, you can log in as a local account...