Posts

Showing posts from October, 2017

Windows Task Scheduler - Value does not fall within the expected range.

Image
When you create a scheduled task trigger using the Windows Task Scheduler you may see the error "Value does not fall within the expected range". Whilst this looks like a serious error. The issue appears to be when you create a "Monthly" scheduled task on specific days and tick the "<Select all days>" option. Be warned the task is not updated, however if you double click the trigger again the user interface will have corrected itself by unticking the <Select all days> option, but leaving all of the days selected. You can then click OK and OK again and the task will be updated. You can also manually check each of the days in the list. This is the latest in a few issues I've found with the Windows Task Scheduler, as documented in this blog.

Not all scheduled tasks show up when running Get-ScheduledTask, certain tasks are missing

Image
When you run the Get-ScheduledTask command you notice that some of the tasks are missing, however you can see these tasks in the Task Scheduler Library. This can be caused if you have UAC enabled or are logged on as a user who is not an administrator. Ensure that you right click the PowerShell link and Run as Administrator . The difference can be seen here

Get-ScheduledTask does not return monthly, or monthly day of week triggers.

So having worked with the Task Scheduler Library in Windows over the last few weeks it's a real problem area of Windows I've already mentioned the issue that deprecated features still appear in the user interface . The next area to note is that the Get-ScheduledTask PowerShell cmdlet is not fully functional. If you create a scheduled task with a monthly trigger (or a monthly day of week trigger) this cannot be read using the cmdlet. Instead of a fully fledged object like you would receive from the other trigger types you instead receive the base object. MSFT_TaskTrigger Enabled               : True EndBoundary           : ExecutionTimeLimit    : Id                    : Repetition            : MSFT_TaskRepetitionPattern StartBoundary         : 2017-10-18T19:31:14 PSComputerName        : CimClass              : Root/Microsoft/Windows/TaskScheduler:MSFT_TaskTrigger CimInstanceProperties : {Enabled, EndBoundary, ExecutionTimeLimit, Id...} CimSystemProperties   :

An error has occurred for task 'name'. Error message: The following error was reported: 2147750704. When creating a scheduled task in Windows 2012 or above.

Image
When you create a scheduled task in Windows you notice that the Send an e-mail and Display a message tasks are marked as "deprecated". You can no longer create these task types and the following error is shown "An error has occurred for task ' name '. Error message: The following error was reported: 2147750704". I'm really not sure why Microsoft didn't remove the UI options, it seems strange to have gutted the functionality but leave the options in the user interface. If you want to send an email you can schedule to Start a program and use the Send-MailMessage PowerShell cmdlet .

Document Azure tenants with Microsoft Live accounts or multi-factor authentication

Image
Our network and cloud documentation tool XIA Configuration is getting a new update. As our product runs as a Windows service customers have previously had issues when trying to scan an Azure environment by logging on with a Microsoft Live account or with two-factor authentication. The new version will include a stand alone tool for scanning Azure tenants The tool operates in a similar way to the standard Azure scan agent. This will run interactively and display the standard Azure login dialog so that you can login using your normal credentials. You can then save the output and import it directly into the  XIA Configuration Server .