Sida loo tirtiro ama loo abuuro hawl la qorsheeyay ee PowerShell gudaha Windows 11

Haddii aad rabto inaad tirtirto ama abuurto hawl qorshaysan(delete or create a scheduled task) Windows 11/10 adoo isticmaalaya Windows PowerShell , casharkan ayaa kaa caawin doona inaad taas sameyso. Uma baahnid inaad furto Jadwalka Hawsha(Task Scheduler) si aad u  abuurto hawsha la qorsheeyay(create the scheduled task) . Si kastaba ha noqotee, waa inaad fulisaa amarada qaar si aad shaqada u qabato.

Jadwalka Hawsha(Task Scheduler) waa mid ka mid ah adeegyada ugu wanaagsan ee Windows 10 , wuxuu kuu ogolaanayaa inaad abuurto hawlo oo aad ku qabato wakhti cayiman. Laga bilaabo furitaanka abka sida Notepad ilaa fulinta qoraalada PowerShell , waxaad wax walba ku samayn kartaa caawimada Jadwalka Hawsha.

Ku samee hawl la qorsheeyay  PowerShell

Si aad u isticmaasho PowerShell si aad u abuurto hawl qorshaysan Windows 10 , raac talaabooyinkan-

  1. Ka raadi sheelka tamarta( powershell) gudaha sanduuqa raadinta Taskbar.
  2. Guji Orod sida maamulaha(Run as administrator) .
  3. Guji badhanka Haa(Yes)
  4. Geli doorsoomaha $action si aad u kaydiso falka
  5. Geli doorsoomaha $trigger si aad u kaydiso wakhtiyada hawsha la qorsheeyay.
  6. Geli amarkan si aad u abuurto hawsha la qorsheeyay.

Aynu eegno nooca faahfaahsan ee tillaabooyinkan.

Marka hore, waa inaad  furto Windows PowerShell oo leh mudnaanta maamulaha(open Windows PowerShell with administrator privileges) . Taas awgeed, ka raadi "powershell" sanduuqa raadinta Taskbar , oo dhagsii  badhanka Maamulaha ee Run (Run as administrator ) . Haddi u soo baxo UAC , dhagsii  badhanka Haa (Yes ) . Marka shaashadda PowerShell la arko, geli amarka soo socda-

$action = New-ScheduledTaskAction -Execute 'app-path'

Ha iloobin inaad ku badasho wadada-app-da dariiqa asalka ah ee abka aad rabto inaad ku shaqeyso.

Tusaale ahaan, haddii aad rabto inaad furto Notepad , geli notepad.exe. Haddii aad rabto in aad Google Chrome ka furto 64-bit Windows 10 computer, geli dariiqa soo socda-

C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

Talisku wuxuu u ekaan doonaa sidan-

$action = New-ScheduledTaskAction -Execute ' C:\Program Files (x86)\Google\Chrome\Application\chrome.exe'

Sida loo isticmaalo PowerShell si loo abuuro hawl qorshaysan Windows 10

Haddii aad rabto inaad sameyso qoraalka PowerShell , waa inaad isticmaashaa -argument oo qeex qoraalka. Markaas, amarku wuxuu u ekaan doonaa sidan-

New-ScheduledTaskAction -Execute 'powershell.exe' -argument script-path

Marka xigta, waa inaad dejisaa wakhtiga aad rabto inaad hawsha fulinayso. Sida Jadwalka Hawsha(Task Scheduler) , waxaad dooran kartaa wakhti kasta iyadoo loo eegayo shuruudahaaga. Amarka aasaasiga ah wuxuu u eg yahay sidan-

$trigger = New-ScheduledTaskTrigger -Once -At 06:30PM

Sida loo isticmaalo PowerShell si loo abuuro hawl qorshaysan Windows 10

Sida ku cad amarkan, hawshu waxay socon doontaa hal mar 06:30 PM ama 18:30 isla maalintaas. Waxaa suurtagal ah in la isticmaalo goobo kala duwan sida  -Maalin walba, -Toddobaadle, -Bishii(-Daily, -Weekly, -Monthly) , iwm. Dhanka kale, waxaad dooran kartaa wakhtiga qaab 12 ama 24 saacadood ah. Haddii aad doorato qaab 12-saac ah, waa inaad qeexdaa AM/PM .

Taas ka dib, waa inaad iska diiwaan gelisaa hawsha. Taas, geli amarka soo socda-

Register-ScheduledTask -Action $action -Trigger $trigger -TaskPath "DemoName" -TaskName "DemoTask" -Description "DemoDescription"

Ha iloobin inaad bedesho  DemoName, DemoTask , iyo  DemoDescription  si waafaqsan dookhaga.

Sida loo isticmaalo PowerShell si loo abuuro hawl qorshaysan Windows 10

Marka la sameeyo, waxaa lagugu soo dhaweyn doonaa shaashadda soo socota-

Sida loo isticmaalo PowerShell si loo abuuro hawl qorshaysan Windows 10

Ku tirtir(Delete) hawsha la qorsheeyay ee  PowerShell

Si aad u isticmaasho PowerShell si aad u tirtirto hawlaha la qorsheeyay, raac talaabooyinkan-

  1. Ka raadi sheelka tamarta(powershell) gudaha sanduuqa raadinta Taskbar.
  2. Guji Orod sida maamulaha(Run as administrator) .
  3. Guji badhanka Haa(Yes)
  4. Geli(Enter) amarka soo socda si aad u doorato hawsha.
  5. Geli amarka iska- diiwaangelinta(Unregister) si aad hawsha u tirtirto.

Si aad wax badan uga barato tillaabooyinkan, sii wad akhriska.

Marka hore,  fur daaqadda sare ee Windows PowerShell(open an elevated Windows PowerShell window)  oo geli amarka soo socda-

Get-ScheduledTask -TaskName "DemoTask"

Ha iloobin inaad ku bedesho  DemoTask  magaca hawsha asalka ah. Intaa ka dib, geli amarkan si aad u tirtirto hawsha-

Unregister-ScheduledTask -TaskName "DemoTask" -Confirm:$false

Sida loo isticmaalo PowerShell si loo abuuro hawl qorshaysan Windows 10

Si loo xaqiijiyo ka saarista, waxaad geli kartaa amarka ugu horeeya. Haddii ay muujiso fariin qalad ah, hawsha waa laga saarayaa.

Boostadani waxay ku siinaysaa habab badan oo lagu  tirtiro Hawsha la qorsheeyay .

Waa intaas! Rajo in ay ku caawin



About the author

Waxaan ahay khabiir kombuyuutar waxaanan dadka ku caawinayey pc ilaa 2009. Xirfadahayga waxaa ka mid ah iphone, software, qalabyada, iyo in ka badan. Waxaan sidoo kale macalinimo ka shaqaynayay afartii sano ee la soo dhaafay. Waqtigaas, waxaan bartay sida dadka looga caawiyo inay bartaan barnaamijyo cusub iyo sida loo isticmaalo qalabkooda hab xirfadeed. Waxaan ka helaa talooyin ku saabsan sidii aan u horumarin lahaa xirfadeyda si qof walba uu ugu guuleysto shaqada ama dugsiga.



Related posts