I would like to know if there is a Powershell ISE command to schedule a .flac file to open at a specific time (and a cancel command)
I would like to know if there is a Powershell ISE command to schedule a .flac file to open at a specific time (and a cancel command)
Hi,
You can register a scheduled task using the Register-ScheduledTask cmdlet.
$Time = New-ScheduledTaskTrigger -At 12:00 -Once
$User = "Contoso\Administrator"
$PS = New-ScheduledTaskAction -Execute "C:\folder\a.flac"
Register-ScheduledTask -TaskName "openflac" -Trigger $Time -User $User -Action $PS
To cancel the task run Unregister-ScheduledTask
Unregister-ScheduledTask -TaskName "openflac"
https://docs.microsoft.com/en-us/powershell/module/scheduledtasks/register-scheduledtask
https://docs.microsoft.com/en-us/powershell/module/scheduledtasks/unregister-scheduledtask
Best Regards,
Ian Xue
============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
I got an error saying "no mapping between account names and security IDs was done." what does this mean?
is there any way it can be typed into a signal command line? script running is disabled
maybe this will help:
Start-Process -Filepath "vlc.exe something.flac"
Stop-Process -Name "vlc"
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/start-process?view=powershell-7.1
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/stop-process?view=powershell-7.1
Create scripts (start and stop script) and use the Task Scheduler to schedule the scripts.
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Regards
Andreas Baumgarten
If you can't run scripts you posted in the wrong area! :-)
You can try this, though: how-create-task-using-task-scheduler-command-prompt
command prompt is locked by admin my way of running commands is through the command line of Powershell ISE. EX.`Shutdown -s -t 00` the command line of Powershell isn't locked.
I'm not the Admin of the device in questin
You can run SCHTASKS from the PowerShell shell as well as from the cmd shell. Start Powershell with "run as administrator".
Seems like you're trying to subvert the admin's blocking you from doing things. Why not discuss this with that person?
Im not trying to subvert the admins block im just trying to find another way after a failed attempt at swaping a alarms and clock file with one with the same name (with admin permission) 
Copy the script from the edit pane and paste it into the terminal window.
13 people are following this question.