1. Write your coding on notepad and save as sample.ps1
for (;;)
{
start-sleep -s 30
move-item D:\Powershell\source\*.mp3 D:\Powershell\destination
move-item D:\Powershell\source\*.mp4 D:\Powershell\destination
}
2. Open Windows PowerShell
3. Check your execution policy like
if it Remotesigned.
4. execution like > d:\Powershell\sample.ps1
for (;;)
{
start-sleep -s 30
move-item D:\Powershell\source\*.mp3 D:\Powershell\destination
move-item D:\Powershell\source\*.mp4 D:\Powershell\destination
}
2. Open Windows PowerShell
3. Check your execution policy like
if it Remotesigned.
4. execution like > d:\Powershell\sample.ps1
No comments:
Post a Comment