How to Delete a File/Folder at Logon [GPO Script Settings]

Since I started, there has been a GPO in place, but I just learned that it is not performing its intended function. Since this platform might occasionally transmit sensitive information between agents and supervisors, it was determined that these logs should be frequently removed. How to delete a file/folder at logon?

Best Answered by

Dany· Answered on Oct 29, 2024

We think the GPO logon/logoff script performs well for your situation. Let us check how to use your computer's logon and logoff script.

1. Start by launching the Local Group Policy Editor.

2. In the console tree, choose Scripts (Logon/Logoff). User ConfigurationWindows SettingsScripts (Logon/Logoff) is the route.

3. Double-click Logon/Logoff in the results box to begin.

4. Click "Add" in the Logon/Logoff Properties dialog box.

5. Type the script's path into the Script Name field or click "Browse" to look for the script file in the domain controller's Netlogon shared folder. Type whatever parameters you like in the Script Parameters box in the same manner as you would on the command line. For instance, type /logo /I if your script includes the parameters /logo (display banner) and /I (interactive mode).

6. The Logon/Logoff Properties dialog box provides a list of all the scripts that are presently assigned to the chosen GPO. When numerous scripts are assigned, they are executed in the sequence you choose. Click a script and then choose "Up" to move it up the list. Click a script in the list, then click "Down" to move it down.

After using the logon/logoff script, the files can be deleted normally. If you find some important sensitive files are deleted, you can download a third-party recovery tool to recover lost files. EaseUS Data Recovery Wizard can help you do that. This data recovery software can help you recover files after reinstalling Windows, partition loss, virus attacks, etc.

Use EaseUS Data Recovery Wizard to recover deleted or lost files easily and quickly.

Tutorials on how to recover lost, deleted, or formatted data from HDD, SSD, USB, SD card, or other storage media on Windows and Mac.

People Also Ask

How to Create A Batch File to Delete Files Older Than N Days

You may save space and keep things ordered by removing files in any folder that are more than a certain number of days old. If you have a lot of files in several directories and wish to clean them up by removing those that are older than a certain number of days, you can use the ForFiles command.

Jaden

Oct 29, 2024

How to Recover Data Deleted by Robocopy Command on Windows

While using a Robocoy command or script, enter the wrong path will cause data loss. The best way to recover these files deleted by Robocopy command is to download a data recovery program.

Dany

Nov 07, 2024

Recover Accidentally Deleted Excel Files with Software

Accidentally delete Excel files? Don't worry! This article will introduce a powerful Excel file recovery software that can easily recover accidentally deleted Excel files. Read on to get detailed information.

Brithny

Nov 07, 2024

How to Recover Deleted Files from SD Card Using Chrome OS

SD cards are widely used due to their high data transfer speed and hot-swappable features, although various data loss issues plague them. Don't panic if you accidentally delete files from your SD card; different recovery methods and SD recovery software can help you retrieve deleted files from your SD card.

Jaden

Oct 29, 2024

How to Recover Deleted File from WinSCP

You may find the ultimate solution here if you have lost or unintentionally deleted files from WinSCP. Read this post and use EaseUS Data Recovery Wizard to recover deleted file from WinSCP.

Finley

Oct 29, 2024

Do Delete Files from SD Card Go to Recycle Bin on Windows

Do delete files from SD card go to Recycle Bin? After deleting some files from your SD card, you can't find the deleted files in Recycle Bin. If you want to know where the deleted files from the SD card go, this article will tell you the answer.

Brithny

Nov 07, 2024