Category: Windows Server 2012
Restart Windows Server Task Scheduler
Requires PSExec to use the interactive account psexec -i -s cmd sc stop schedule sc start schedule Credits: StackOverflow
Remotely remove a broken user profile from another computers registry when the user folder is deleted
I recently had an issue where someone had deleted my admin user profile from a remote server by deleting its folder. The logon then failed as Windows still expected the folder to be there, as obviously the registry entries were not removed. Rather than manually checking HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList for the SID and then removing it…
Display advanced properties of scheduled tasks in command line
The following command requests a detailed display of the tasks on the local computer. It uses the /v parameter to request a detailed (verbose) display and the /fo LIST parameter to format the display as a list for easy reading. You can use this command to verify that a task you created has the intended…
Updating a network location in Windows 2012
I had an issue where a server which was joined to a domain had incorrectly set its network as Public. A TechNet article and TenForum article provided the answer (As it states Windows 10 it also applies to Server 2012) so I have placed credits above the steps I followed. Following a re-occurrence I have…
Filtering in Event Viewer Windows Server 2008 onwards
The Event Viewer from Server 2008 onwards is XML based. Filters based on XML syntax can be used such as: <QueryList> <Query Id=”0″ Path=”System”> <Select Path=”System”> *[EventData[Data and (Data='<Search Parameter>’)]] </Select> </Query> </QueryList> <QueryList> <Query Id=”0″ Path=”Application”> <Select Path=”Application”> *[EventData[Data and (Data='<Search Parameter>’)]] </Select> </Query> </QueryList> You…
Within a batch file run a program for a certain length of time before killing it
I needed to run a scheduled batch job and kill it off after a certain amount of time, this was because the program would run what it needed and then run as normal (If it exists then there is no reason to use start or timeout). As it actually ran as a service I didn’t…
Compress and move existing Windows 2012 and Microsoft SQL Server 2008 Express backups
The following has been used to backup a server with Cisco Cubac on. The software runs on Windows 2012 machine and uses SQL Server 2008 Express. As its not on a managed server I had to find a way to backup the server and the database, plus keep the backup as small as possible. I…