Automate your PowerShell scripts with Windows Task Scheduler

Ғылым және технология

In this video you will learn how to save your PowerShell cmdlets as a PS1 file and then run that PS1 file as a scheduled task. Pretty cool stuff. Short and to the point keeping you moving forward on your PowerShell skills journey.
Here is the code from the script if you need it:
Get-Date | Out-File E:\Demo\log4video.txt -Append
Get-PSDrive -PSProvider FileSystem | Out-File E:\Demo\log4video.txt -Append
Video on creating useful CSV files
• PowerShell Arrays Intr...
Video on using Get-Date
• Work with Date & Time ...
BONUS: This video shows you how to create the task with PowerShell
• PowerShell create a sc...
If you need more PowerShell help you can always contact me via www.BoldZebras.com

Пікірлер: 210

  • @TheYanivR
    @TheYanivR6 жыл бұрын

    Loves your channel, it's a real help in entering the Powershell world.

  • @scottwood1143
    @scottwood11432 жыл бұрын

    Thanks Shane, perfect working example ‘beginners intro’ to Windows Task Scheduler!

  • @ShanesCows

    @ShanesCows

    2 жыл бұрын

    Glad it was helpful!

  • @shokeensachin7088
    @shokeensachin70885 жыл бұрын

    Good to see the way of sorting everything easily...

  • @ShanesCows

    @ShanesCows

    5 жыл бұрын

    😀

  • @mehmetgullu4514
    @mehmetgullu45143 жыл бұрын

    I was struggling with bat files to run a simple p.shell script on task scheduler. Thanks a lot for this helpful video.

  • @ShanesCows

    @ShanesCows

    3 жыл бұрын

    Glad it was helpful!

  • @kennyjide2933
    @kennyjide29336 жыл бұрын

    Hi Shane, you've done the great job again. This is the mystery Kenny. The video is very helpful as usual. Many thanks and keep up the great work.

  • @ShanesCows

    @ShanesCows

    6 жыл бұрын

    Hopefully, it nailed it for you. :) Great idea for a topic. Keep them coming. Thank you! Shane

  • @kennyjide2933

    @kennyjide2933

    6 жыл бұрын

    Yes it did nail it for me. Thanks again

  • @ShanesCows

    @ShanesCows

    6 жыл бұрын

    Hey. I just made a video on how to create the scheduled task with PowerShell to finish the circle. :) kzread.info/dash/bejne/m66gq6yNnbi9YNI.html

  • @cazmaj
    @cazmaj4 жыл бұрын

    You're the best Shane! Thanks for all your amazing videos :)

  • @ShanesCows

    @ShanesCows

    4 жыл бұрын

    Glad to help. 😀

  • @mera479
    @mera4792 жыл бұрын

    Love your tutorials and I'm new at this! Can you share how to do a full and incremental backup using PowerShell for simple folder backup? Thank you!

  • @nolitimere724
    @nolitimere7243 жыл бұрын

    Yet, again Shane. Thanks for your vids. Its thru your vids where I was able to learn powershell for work. Ah, to add though, In the Actions part: I'd suggest to add: ' -command "Set-ExecutionPolicy -ExecutionPolicy Bypass -Force" ' in the arguments part since there are times the script wont be able to run because execution policies restrictions.

  • @ShanesCows

    @ShanesCows

    3 жыл бұрын

    Thanks for sharing 😎

  • @techs82
    @techs824 жыл бұрын

    Thanks a lot man help me out loads

  • @ShanesCows

    @ShanesCows

    4 жыл бұрын

    Glad to help. 😀

  • @glenr5461
    @glenr54612 жыл бұрын

    Thanks mate, that's realy cool

  • @ShanesCows

    @ShanesCows

    2 жыл бұрын

    Awesome :)

  • @PokemonBlueVersion
    @PokemonBlueVersion Жыл бұрын

    You da man! This video was awesome. New sub B^)

  • @ShanesCows

    @ShanesCows

    Жыл бұрын

    Awesome, thank you!

  • @shivendrakumaryadav5811
    @shivendrakumaryadav58115 жыл бұрын

    Many thanks, it helped me. :)

  • @ShanesCows

    @ShanesCows

    5 жыл бұрын

    Great! 👍

  • @ramchandran8132
    @ramchandran81323 жыл бұрын

    Thanks Shane !

  • @ShanesCows

    @ShanesCows

    3 жыл бұрын

    Happy to help Ram

  • @sharathchandra6166
    @sharathchandra61664 жыл бұрын

    great video! love it

  • @ShanesCows

    @ShanesCows

    4 жыл бұрын

    Thanks 🙏

  • @valeriem6475
    @valeriem64753 жыл бұрын

    thanks Shane... this is exactly what I needed.... thanks for making it simple

  • @ShanesCows

    @ShanesCows

    3 жыл бұрын

    Glad it helped!

  • @valeriem6475

    @valeriem6475

    3 жыл бұрын

    @@ShanesCows Hi Shane.. I'll keep you in my back pocket... as I am a DBA that is trying to pretend I know how to use PS lol... don't let out my secret.

  • @vikasrajbhar6598
    @vikasrajbhar6598 Жыл бұрын

    Thank you for the Video

  • @ShanesCows

    @ShanesCows

    Жыл бұрын

    You're welcome

  • @TheHerbsterooney
    @TheHerbsterooney3 жыл бұрын

    Thanks Shane for this lovely and simple to understand intro to executing PS script from windows task scheduler. I am completely new to PS scripting so please bear with me. From this video, I noticed that when setting up the "Action" tab, you did not use the syntax "-File" before the path to where your PS1 script (Add arguments (Optional)) is located. Though i have seen other forum and videos specified the use of this. Are you able to explain when you might need to use this please? Also, I am looking for an intro to subject incorporating the task scheduler whereby new files are monitored via PS scripts and send notification via emails on scheduled timetable. Would you have such video in your gallery please? Many thanks|!

  • @ShanesCows

    @ShanesCows

    3 жыл бұрын

    I don't, sorry 😐

  • @kodkid
    @kodkid4 жыл бұрын

    Loved the content and your personality, made it fun. Hope dinner was good! :-)

  • @ShanesCows

    @ShanesCows

    4 жыл бұрын

    It was, thanks. Which K are you a fan of? Wildcats? Jayhawks?

  • @kodkid

    @kodkid

    4 жыл бұрын

    Shane Young University of Kentucky Wildcats!

  • @ShanesCows

    @ShanesCows

    4 жыл бұрын

    Awesome. I grew up a UK basketball fan. My family bleeds blue.

  • @marting.4050
    @marting.40504 жыл бұрын

    It works. Thanks a lot!!!

  • @ShanesCows

    @ShanesCows

    4 жыл бұрын

    Glad to help. 😀

  • @souravsamanta5931
    @souravsamanta59314 жыл бұрын

    nice and simple staff...thanks Shane, you are the best....

  • @ShanesCows

    @ShanesCows

    4 жыл бұрын

    Glad to help. 😀

  • @DPaquette
    @DPaquette5 жыл бұрын

    Well I just discovered your channel here. Interesting.

  • @AdrianMcDaid
    @AdrianMcDaid3 жыл бұрын

    This was the answer I was looking for. Thank you :)

  • @ShanesCows

    @ShanesCows

    3 жыл бұрын

    Glad to help. 😀

  • @dadimibhaskar9578
    @dadimibhaskar95782 жыл бұрын

    Guides to us super and Tqx.

  • @Sexyoldgeraldorivera
    @Sexyoldgeraldorivera2 жыл бұрын

    Thanks man! Exactly what I needed.

  • @ShanesCows

    @ShanesCows

    2 жыл бұрын

    Awesome 😎

  • @jamiebaker1437
    @jamiebaker14375 жыл бұрын

    You were a big help! Thanks!

  • @ShanesCows

    @ShanesCows

    5 жыл бұрын

    Cool

  • @swisslibya
    @swisslibya6 жыл бұрын

    With all respect, you are the best.. Please upload more video about PowerShell scripts. Start from A to Z... I like how you demonstrate .. Heeeeeeeeer is our intro :) ... Thank you

  • @ShanesCows

    @ShanesCows

    6 жыл бұрын

    Thank you. I promise at least one more PowerShell script this week. :) Creating AD users from a CSV.

  • @andres100r
    @andres100r3 жыл бұрын

    Thank you!

  • @ShanesCows

    @ShanesCows

    3 жыл бұрын

    Glad to help. 😀

  • @hectord.7107
    @hectord.71073 жыл бұрын

    'That's right, dedication here, we are making this video on a saturday', take your like good sir.

  • @ShanesCows

    @ShanesCows

    3 жыл бұрын

    I am here for you guys 😎

  • @KelvinWKiger
    @KelvinWKiger3 жыл бұрын

    Thank you Bro!

  • @ShanesCows

    @ShanesCows

    3 жыл бұрын

    Happy to help

  • @MickSkitz
    @MickSkitz2 жыл бұрын

    Hi Shane, not sure if you check old comments but here goes. I've got a parameterised PS script with a username and password that I want automated but I don't want to have my password in plain text within my script for security reasons. Any tips about this? Thanks, great video.

  • @themariofv
    @themariofv2 жыл бұрын

    Thanks!!

  • @sreepriyanks398
    @sreepriyanks3984 жыл бұрын

    shane.... u r a coolman!!

  • @ShanesCows

    @ShanesCows

    4 жыл бұрын

    Thank you :)

  • @perilgg9059
    @perilgg90592 жыл бұрын

    every 10 mins d b scheduler pops up and it ruins my gaming, i try deleting it and stopping it and everything on task scheduler and no matter what i do it comes back, i dont know what to do

  • @deadelrosario3008
    @deadelrosario30083 жыл бұрын

    Hello Shane! Awesome videos - I'm learning a lot from you! :) Would like to ask how can I get multiple output files so everytime the task runs my powershell script via task manager, it won't overwrite the existing one? I am trying to get the list of logged in users in the RDS server per hour. So I need a new output file everytime the task runs. Is that possible? Thank you so much! :)

  • @ShanesCows

    @ShanesCows

    3 жыл бұрын

    Use the Out-File cmdlet and don't select Append

  • @wahajkhan77841
    @wahajkhan778412 жыл бұрын

    Shane can you make a video on how to ping multiple machines and get the services of the machines like windows uptime and windows update in powershell

  • @ShanesCows

    @ShanesCows

    2 жыл бұрын

    Sorry haven’t done that one

  • @apolomachine
    @apolomachine2 жыл бұрын

    Thanks man!, this video really help me!

  • @ShanesCows

    @ShanesCows

    2 жыл бұрын

    Glad to hear it!

  • @mohammedtoufeeqahamed9825
    @mohammedtoufeeqahamed98253 жыл бұрын

    Shane, Can we get email notification from Powershell if newer version of Adobe Flash player(Activex and NPAPI), Google Chrome, Mozilla Firefox ESR and Adobe acrobat reader release

  • @ShanesCows

    @ShanesCows

    3 жыл бұрын

    I don't know... sorry

  • @Credomatic01
    @Credomatic019 ай бұрын

    What if the location from the ps1 scrip is in another server, should I use as argument \\servername\folder\.ps1 or how should I put there? Thank you in advance.

  • @ShanesCows

    @ShanesCows

    9 ай бұрын

    Sorry, been too long since I played with this give you a solid answer.

  • @joevanynguyen9691
    @joevanynguyen96915 жыл бұрын

    I subscribed simply because you're a very good tutor.

  • @ShanesCows

    @ShanesCows

    5 жыл бұрын

    Thank you for the kudos.

  • @mrmuranga
    @mrmuranga5 жыл бұрын

    nice and simple...just managed to automate a task that saves me 10-15 minutes daily

  • @ShanesCows

    @ShanesCows

    5 жыл бұрын

    PERFECT!

  • @yeuharng4845
    @yeuharng48459 ай бұрын

    Hi, if i have 11 ps1 file how can i run it everyday, how to write it?

  • @DPSHIZZ
    @DPSHIZZ3 жыл бұрын

    hi Shane i have been trying to copy folders in the same way but it is not working for me so i have just copied exactly what you have done and it is not completing the script both your script and mine both work if i just run them in powershell would you have any suggestions as i am new to powershell and task scheduler and can't help but think i am missing something simple sorry and thanks in advance if you can

  • @ShanesCows

    @ShanesCows

    3 жыл бұрын

    Hey Dave. I wish I had an answer. I haven't worked on PowerShell like this in so long. Maybe check out www.powershell.org I think they have a community that can help.

  • @Lucad2278
    @Lucad22782 жыл бұрын

    Hi save option is greyed out for me - any idea why? Thanks

  • @philliploftis9583
    @philliploftis95834 жыл бұрын

    Solve a BIG issue with automation... as I was using a cmd file to launch the ps files and it stopped working. Thank you.

  • @ShanesCows

    @ShanesCows

    4 жыл бұрын

    Glad to help. 😀

  • @dowhatIdo
    @dowhatIdo3 жыл бұрын

    Heyy do you know how to run shutdown program at certain time Let just say for 8 hours. So evertime somwone turn on the PC it will turn off automatically.

  • @ShanesCows

    @ShanesCows

    3 жыл бұрын

    I don’t sorry

  • @akshitdhariwal6257
    @akshitdhariwal62573 жыл бұрын

    Hi Shane for me everything working task is being creating but whenever it run it didn't show the file updated as if not run

  • @ShanesCows

    @ShanesCows

    3 жыл бұрын

    Not sure. Sorry

  • @venkateshguruvugari8957
    @venkateshguruvugari89574 жыл бұрын

    Hi pls do the video to run schedular jobs automatically using powershell script.

  • @ShanesCows

    @ShanesCows

    4 жыл бұрын

    Sorry never done it.

  • @onlysub307
    @onlysub3073 жыл бұрын

    What if I want to run the script with Admin rights? any way to pass that cmdlet into Task Scheduler rather than inserting it into the script itself.

  • @ShanesCows

    @ShanesCows

    3 жыл бұрын

    I am not sure 🤔

  • @icecool742
    @icecool7425 жыл бұрын

    yo good deal. thanks a alot. how about power shell windows update scheduled via task scheduler not gp

  • @ShanesCows

    @ShanesCows

    5 жыл бұрын

    That would be cool

  • @kirankkc99
    @kirankkc993 жыл бұрын

    Thanks lot Shane.it saved my time.

  • @ShanesCows

    @ShanesCows

    3 жыл бұрын

    Glad to help. 😀

  • @multitaskprueba1
    @multitaskprueba12 жыл бұрын

    Thank you for the video! You are a genius!

  • @ShanesCows

    @ShanesCows

    2 жыл бұрын

    Glad you liked it!

  • @vivekpathak5757
    @vivekpathak57575 жыл бұрын

    Hi Shane, Do you have something to run a task scheduler job from task scheduler job?

  • @ShanesCows

    @ShanesCows

    5 жыл бұрын

    Never tried. Sorry.

  • @vivekpathak5757

    @vivekpathak5757

    5 жыл бұрын

    @@ShanesCows I just don't want to stop a task scheduler job , I also tried triggers in the task, yes that is working but saw pathetic history of task scheduler task like warning and failed error. Do you have something for.

  • @ramakantthorat5241
    @ramakantthorat52413 жыл бұрын

    It is possible to run powershell with admin access from task scheduler?

  • @ShanesCows

    @ShanesCows

    3 жыл бұрын

    I think so but have never tried.

  • @fayyazali2217
    @fayyazali22174 жыл бұрын

    Hi.. Please help in how to write script in powershell which can trigger birthday / anniversary email from outlook on daily basis when the event occurs

  • @ShanesCows

    @ShanesCows

    4 жыл бұрын

    Sorry haven’t done that.

  • @fayyazali2217

    @fayyazali2217

    4 жыл бұрын

    I now have script which can trigger email however unable to trigger from windows task scheduler. is there any way if I can trigger any task without login?

  • @maheshmuliya4512
    @maheshmuliya45123 жыл бұрын

    Thanks

  • @ShanesCows

    @ShanesCows

    3 жыл бұрын

    You are welcome 🤗

  • @pankajshinde6205
    @pankajshinde62053 жыл бұрын

    Hi Sir, How can I use power shell to write down PC Lock time and PC unlock time in any of the text applications?

  • @ShanesCows

    @ShanesCows

    3 жыл бұрын

    I don’t know. Sorry

  • @pankajshinde6205

    @pankajshinde6205

    3 жыл бұрын

    It's okay sir

  • @lyspooner5093
    @lyspooner50934 жыл бұрын

    When I do this it says, running, but never finishes. Heard somewhere that you need to do something with the Set-ExecutionPolicy cmdlet. Any ideas?

  • @ShanesCows

    @ShanesCows

    4 жыл бұрын

    Not sure. Sorry

  • @Battleripper
    @Battleripper3 жыл бұрын

    Does this also work if powershell HAVE to be opened as an administrator?

  • @ShanesCows

    @ShanesCows

    3 жыл бұрын

    I don't think it has to be. Just depends on what you need access to.

  • @osamaasif9601
    @osamaasif96014 жыл бұрын

    I am currently working on Auto-mailer reports, Your a #Live #Saver . Keep it up Shane.

  • @ShanesCows

    @ShanesCows

    4 жыл бұрын

    Glad to help. 😀

  • @asnyc01
    @asnyc015 жыл бұрын

    So if I'm running exchange 2010 SP3 I can run the script in power shell not the exchange management shell? I'm trying to get an export of a user's calendar and contacts with a time stamp in the file name. Can you assist or do you have a video that covers that already?

  • @ShanesCows

    @ShanesCows

    5 жыл бұрын

    I don’t sorry. I haven’t touched Exchange on Prem in a long time

  • @asnyc01

    @asnyc01

    5 жыл бұрын

    @@ShanesCows Thank you for your reply.

  • @WishToGrow20224
    @WishToGrow202243 жыл бұрын

    I want to put an alert email when a particular task success/fails and last run time of that task scheduled by task scheduler . Help me please

  • @ShanesCows

    @ShanesCows

    3 жыл бұрын

    I haven’t done that before. Sorry

  • @StupidLostSoul-pu5xy

    @StupidLostSoul-pu5xy

    3 жыл бұрын

    try to implement that also , it will be good

  • @IronMan-jj2fd
    @IronMan-jj2fd4 жыл бұрын

    I have a set of weather report sounds (from JARVIS), so i want to hear the current weather report when i turn ON my computer from my custom sounds. So can u help me out?

  • @ShanesCows

    @ShanesCows

    4 жыл бұрын

    Sorry, not something I have done before.

  • @venommedias4580
    @venommedias4580 Жыл бұрын

    how can i set it for every 5 mins ??

  • @snorewak
    @snorewak5 жыл бұрын

    is that the gobblegum machine from black ops 3 in the background?

  • @ShanesCows

    @ShanesCows

    5 жыл бұрын

    No but that would be cool.

  • @RUIZ0411
    @RUIZ04115 жыл бұрын

    I Need some help. At work i am requiered to audit 300 machines so i go to eEvent Viewer/windows logs/security then i save the security file. Can you help me to automate this. v.r. Rick

  • @ShanesCows

    @ShanesCows

    5 жыл бұрын

    Sorry Rick I haven’t done anything like that.

  • @sandhireddyvenubabu6213
    @sandhireddyvenubabu62134 жыл бұрын

    hi Shane, i dont want my script to run on Saturday and Sunday , what could i do possibly.

  • @ShanesCows

    @ShanesCows

    4 жыл бұрын

    The tool has a lot of scheduling flexibility. I am sure you can make a schedule to do this.

  • @ManishKumar-yj5yl
    @ManishKumar-yj5yl4 жыл бұрын

    Lovely video Shane, can you help me with script to ping multiple ip address and send the output to outlook 365 and schedule it run every day 6am. Pls

  • @ShanesCows

    @ShanesCows

    4 жыл бұрын

    Never done it. Sorry

  • @venkateshVenky-et6jg
    @venkateshVenky-et6jg Жыл бұрын

    Tq bro

  • @powermykola
    @powermykola3 жыл бұрын

    Hi, I have a task for PowerApps when the application starts, I need to get information about the computer from which the application is launched. Is it possible to use Power Shell (script) + Power Automate + Power Apps ... if it is technically possible, tell me where to look or maybe there is an opportunity and you will share the script like this :)

  • @ShanesCows

    @ShanesCows

    3 жыл бұрын

    I haven't done this before. And sadly I don't even have a good guess of where to tell you to look to start. Sorry.

  • @vasileiosnl
    @vasileiosnl6 жыл бұрын

    What if I need to run a script as an administrator? What arguments do I need to pass?

  • @ShanesCows

    @ShanesCows

    6 жыл бұрын

    I am pretty sure you can tell the timer job to run as admin? This post has a lot of ideas but I haven’t tried any. Sorry. superuser.com/questions/108207/how-to-run-a-powershell-script-as-administrator

  • @lashleytyler6162
    @lashleytyler6162 Жыл бұрын

    thanks

  • @ShanesCows

    @ShanesCows

    Жыл бұрын

    You're welcome!

  • @madhuryareddy3994
    @madhuryareddy39944 жыл бұрын

    Great video Shane!But how can we run the powershell script every 15 or 10 minutes automatically?

  • @ShanesCows

    @ShanesCows

    4 жыл бұрын

    Change the schedule.

  • @JayPatel101
    @JayPatel1014 жыл бұрын

    Any thoughts on how to run powershell script as a service?

  • @ShanesCows

    @ShanesCows

    4 жыл бұрын

    I haven’t done that. Sorry

  • @shivas3381
    @shivas33814 жыл бұрын

    Stumbled upon your videos recently.Liked it and am following very much.I have a doubt though. I am unable to save my scripts. My "Save as" is greyed out.can you please help?.thanks in advance Shane.

  • @shivas3381

    @shivas3381

    4 жыл бұрын

    Never mind ,Got it...I saved .txt as .ps1 and opened it in ISE

  • @ShanesCows

    @ShanesCows

    4 жыл бұрын

    awesome

  • @rahima.r1835
    @rahima.r18355 жыл бұрын

    Can we change name of folder or file by using PS code

  • @ShanesCows

    @ShanesCows

    5 жыл бұрын

    Yes. There is a rename.

  • @Raghavendra8231
    @Raghavendra82315 жыл бұрын

    Hi Shane, Can you please make a video on - How to start multiple bat files sequentially from PowerShell script

  • @ShanesCows

    @ShanesCows

    5 жыл бұрын

    I haven don’t that before. Sorry

  • @yannick1470
    @yannick1470 Жыл бұрын

    And does it matter whether the client is turned on or not?

  • @ShanesCows

    @ShanesCows

    Жыл бұрын

    Client has to be on.

  • @donnielewis186
    @donnielewis1863 жыл бұрын

    So what if you PowerShell is looking for input. Select A for all?

  • @ShanesCows

    @ShanesCows

    3 жыл бұрын

    I think so but not exactly sure where you are seeing that.

  • @donnielewis186

    @donnielewis186

    3 жыл бұрын

    @@ShanesCows Thanks. What I'm asking is I have a powershell that will kick off disconnected users. It ask me what server and what group of users I want to kick off... I cant figure out how to input those values so that i can run in nightly to disconnect the usrs that "forgot" to log off. I had found that someone said to add the argument -command “& ‘c:\PSFiles\LogOffSession.ps1’ ‘ServerName’ ‘Disc'”... Not working though.

  • @darshanhc7424
    @darshanhc74246 жыл бұрын

    how can i schedule my Powershell script in my base machine to run on Azure portal.

  • @ShanesCows

    @ShanesCows

    6 жыл бұрын

    Hi Darshan - I don't exactly understand your question? Can you give me more details? Thanks

  • @darshanhc7424

    @darshanhc7424

    6 жыл бұрын

    HI Shane, I want to run some Powershell script which uploads some file to azure ADLS and get some more information from Azure portal. But i want the script to run from my base machine powershell prompt. everytime i Dont want to login to azure portal via powershell and execute the script. (I can create profile in powershell and through that i can run my main script. But other than powershell profile concept how can i do this.) instead if i schedule the script how do i do that.? and one more question...., In azure portal for VM monitoring i can create metric alerts. but how to create metric alert to monitor RAM usage and disk usages like C, D, and E drives. i can select metric for %CPU usage, but for RAM and disk usage what parameters should i select. Please help me on this. Will be waiting for your response. Thank you.

  • @Non-Artificial-Intelligence
    @Non-Artificial-Intelligence5 жыл бұрын

    I have a question: I created a Task Scheduler that runs a batch file. The batch file kills a process and then uses a "start " command to launch the same application (.EXE). The batch file runs flawlessly if I manually double-click it to make it run. However, when Task Manager runs the batch file, it kills the process but does not start the application.Also, the task is listed as "Running" for about a minute before it comes "Ready" again. Have you seen this before? I am running WIN7. Thanks in advance!

  • @ShanesCows

    @ShanesCows

    5 жыл бұрын

    Sorry. I have not messed with that before. 😑

  • @jatinderanand8576
    @jatinderanand85765 жыл бұрын

    How about a powershell script that could be used to send emails when a specific event triggers in system?

  • @ShanesCows

    @ShanesCows

    5 жыл бұрын

    Should be possible. There is a cmdlet for sending email.

  • @alphaomega5017
    @alphaomega5017 Жыл бұрын

    Nice video. Just wanted to know how to take the current config back up

  • @ismailariff1450
    @ismailariff14503 жыл бұрын

    how to schedule by month ?

  • @ShanesCows

    @ShanesCows

    3 жыл бұрын

    Not sure, I haven't done that.

  • @funhurtsmylungs1056
    @funhurtsmylungs10566 жыл бұрын

    How about a PowerShell script to create a schedule task, that runs a PowerShell script? That's the real goal. ;)

  • @ShanesCows

    @ShanesCows

    6 жыл бұрын

    I will have to look at it but I think that is pretty doable.

  • @funhurtsmylungs1056

    @funhurtsmylungs1056

    6 жыл бұрын

    Oh yeah it is. Just thought its funny :)

  • @ShanesCows

    @ShanesCows

    6 жыл бұрын

    LOL. Yeah, my literal hat was on. I see what you did there. Though I do think this is a solid video idea also.

  • @funhurtsmylungs1056

    @funhurtsmylungs1056

    6 жыл бұрын

    Shane Young I’ve got a script that I think your viewers might be interested in. What’s the best way to contact you about it?

  • @ShanesCows

    @ShanesCows

    6 жыл бұрын

    shane.young at boldzebras.com I can't wait to see it. Thanks

  • @xeonzero1
    @xeonzero14 жыл бұрын

    Any chance you could possibly demonstrate using powershell to run a sql select statement then send those results via ftp on a csv file? Is that possible to do? Been playing with the syntax but I'm not able to figure it out.

  • @ShanesCows

    @ShanesCows

    4 жыл бұрын

    Yikes. I haven't done that one. Sorry.

  • @xeonzero1

    @xeonzero1

    4 жыл бұрын

    @@ShanesCows no problem. I'll keep digging. Thanks for the quick reply!

  • @durgarasane-kolapkar1842
    @durgarasane-kolapkar18424 жыл бұрын

    Hi Shane, Thanks for this video. I want to check daily if a file exists and then send automated mail if file is not created in a folder on a particular day. How can I do this using powershell and task scheduler? Can we send automated email (no manual intervention) using powershell? Please guide.

  • @ShanesCows

    @ShanesCows

    4 жыл бұрын

    I am not sure. Sorry. I use Microsoft Flow for things like that these days.

  • @augus255
    @augus2553 жыл бұрын

    my windows say 'value does not fall within the expected range'

  • @ShanesCows

    @ShanesCows

    3 жыл бұрын

    Not sure why. Sorry

  • @nimstudios7574
    @nimstudios75742 жыл бұрын

    How to run a PS script daily as a service account, please? And it should not have any human intervention.

  • @beebop187
    @beebop1872 жыл бұрын

    is there a way to tell it to start a certain line on the script after logon so you don't rerun what's already completed?

  • @ShanesCows

    @ShanesCows

    2 жыл бұрын

    Not that I have done but maybe. I guess you could have if Logic to have it skips sections?

  • @tonyuketui
    @tonyuketui3 жыл бұрын

    Hey Shane Please could you do a video that creates a task scheduler with a bash script

  • @polsloganguntakala7439
    @polsloganguntakala74392 жыл бұрын

    Hi shane! This video is really useful.I want to set a task scheduler using powershell script. It has to trigger weekly once. It has to give prompt to users reboot the device. Could you please help me with this how to write a script for this.

  • @FRAN-vd9rl
    @FRAN-vd9rl3 жыл бұрын

    5:52 i'm currently using vbscripts and all i have to do is press the "browse" button and browse to the location of my vbscript file. this seems more complicated, however i heard vbscripts can be a security issue

  • @ShanesCows

    @ShanesCows

    3 жыл бұрын

    I would just say this is a different option.😀

  • @haris_yt69
    @haris_yt694 жыл бұрын

    Greetings Sir, Off the topic question, but still out of curiosity. Is there any way to export driver using power shell on Windows 7 system? I tried the dism /Online /Export-Driver /Destination:C:\Drivers command but it doesn't work (Error: 87). Regards.

  • @ShanesCows

    @ShanesCows

    4 жыл бұрын

    I don’t know. Sorry

  • @vlogsbaleneors9249
    @vlogsbaleneors9249 Жыл бұрын

    How do we add the hostname on the text file using the Powershell

  • @manjunathamanju8390
    @manjunathamanju83902 жыл бұрын

    Easy and nice. How can we automate email report.

  • @bennettjoseph6508
    @bennettjoseph65085 жыл бұрын

    How about a script to prompt user for varible like ##$Store =read-host -prompt "Store Location?"## ping multiple hosts ## ping "$Store"rtf -t. Ping "$Store"sw -t## outputting results to two frames then turning frame red upon a failed ping, wait for user input to stop pings, and then loop itself

  • @ShanesCows

    @ShanesCows

    5 жыл бұрын

    Yikes. Not sure on that one.

  • @dennisvandinter3700
    @dennisvandinter370011 ай бұрын

    So I have this strange problem with running a Powershell script with a scheduled task. The task will trigger on a 1074 event ID (event ID for shutdown or reboot). If I shutdown the task will run and execute the script. If I reboot the task will run, but after reboot the comment says the task was started but was interrupted by the user. It gives error code 2147943515. Someone any ideas?

  • @nedstudt
    @nedstudt5 жыл бұрын

    Maybe better to get to the point quicker. You were half-way through before you got to the subject of automating the script.

  • @ShanesCows

    @ShanesCows

    5 жыл бұрын

    Sorry you didn’t like it. 😔

  • @danielkrajnik3817
    @danielkrajnik38173 жыл бұрын

    Start at 4:55 lol

  • @ShanesCows

    @ShanesCows

    3 жыл бұрын

    😎

  • @ravipremani6201
    @ravipremani62012 жыл бұрын

    So here is my requirement First please help me with the script to launch Visual Studio Test from powershell using windows scheduler Second, I want to intentionally stop that test case close the desktop app on which I am performing automation and invoke it again This should happen in every half an hour So it should keep doing this process like an infinite loop

Келесі