Is it possible to delete files older than x days in a sharepoint folder using powershell?

I want to run a script every night to delete zip files that are older than 7 days. In documents I have a folder called Folder1 and in that folder there are subfolders with zip files. I saw examples of websites / lists but no folders. The following cold will return:

However, I would like to recursively delete all ZIP files in folder1 that are older than 7 days.

Try {
   #Setup the context
   $securePassword = ConvertTo-SecureString $SPOnlinePassword -AsPlainText -Force
   $Context = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL) 
   $Context.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($SPOnlineUserName, $securePassword)

   #Get the List
   $List = $Context.Web.lists.GetByTitle($ListName)

   #Define CAML Query to Filter
   $Query = New-Object Microsoft.SharePoint.Client.CamlQuery
   $Query.ViewXML = "

   #Get List Items
   $ListItems = $List.GetItems($Query)

   Write-host -f Green "Number of List Items Found:"$ListItems.Count
   write-host $ListItems.Name
   #Get Each Item's Created Date
   $ListItems | ForEach-Object { Write-host ("List Item:{0} was created on {1}" -f $_("FileLeafRef"), $_("Created")) }

   foreach ($item in $ListItems) {
Catch {
   write-host -f Red "Error:" $_.Exception.Message

Edit: The code above works until I get Fehler Error: Exception when calling "ExecuteQuery" with the arguments "0": "The operation has expired."

Delete TSA at JFK

Later this year (hopefully) we have a flight to China Eastern. If we check in online, can we go through security with a boarding pass printed on our home printer? At this time, the flight is still planned because it will only take place in September 2020.

SQL Server – How do I delete records less than 10 minutes apart?

I have an MSSQL table from a system that records data at random, with the date being the primary key. However, this leads to a very large and unnecessary number of records because I cannot change the code that writes these records. I have to delete the excess of records with a minimum interval of 10 minutes between them.

|        DataHora         | Valor1 | Valor2 |
| 2020-04-07 10:01:37.000 |     10 |     15 |
| 2020-04-07 10:01:07.000 |     10 |     15 |
| 2020-04-07 10:02:40.000 |     10 |     15 |
| 2020-04-07 10:01:45.000 |     10 |     15 |
| 2020-04-07 10:11:47.000 |     11 |     14 |
| 2020-04-07 10:11:55.000 |     11 |     14 |
| 2020-04-07 10:11:57.000 |     11 |     14 |
| 2020-04-07 10:23:07.000 |     12 |     13 |
| 2020-04-07 10:24:27.000 |     12 |     13 |
| 2020-04-07 10:31:37.000 |     13 |     12 |
| 2020-04-07 10:35:45.000 |     13 |     12 |

The result should be:

    |        DataHora         | Valor1 | Valor2 |
    | 2020-04-07 10:01:37.000 |     10 |     15 |
    | 2020-04-07 10:11:47.000 |     11 |     14 |
    | 2020-04-07 10:23:07.000 |     12 |     13 |
    | 2020-04-07 10:35:45.000 |     13 |     12 |

8 – How can I programmatically delete a custom menu?

I am writing one hook_deploy_N This will move a number of menu items from an outdated custom menu to some newer ones. So far, so good. After moving the items, I want to delete the old menu, but I can't figure out how. DrupalCoreMenuMenuTreeStorage has a delete Function that can be what I'm looking for, but that DrupalCoreMenuMenuTreeStorage The object is housed in the DrupalCoreMenuMenuLinkTreethat I can at least load but has a protected status and I see no way to get there. In addition, I am not 100% convinced that I definitely want that.

Hooks – What is the fastest way to add, update or delete thousands of products in Woocommerce?

I am currently working on a Woocommerce shop that is synchronized with an external storage system every night.

We are talking about 500 ish parent products, each with about 10 children (variants). So a total of 5000 ish items.

What do you think, will fasting also be a nightly synchronization between this warehouse system and woocommerce? Hooks, API or automated CSV import?

The synchronization does the following:

  1. Add new products to Woocommerce
  2. Update current products in Woocommerce when they are updated in the warehouse system (attributes, price, inventory, categories, etc.).
  3. Delete products from Woocommerce when they are no longer in stock.
  4. Sync images.

Please share your thoughts. Would like some additional input before I start coding.
Thank you all.

Stay safe in this Covid 19 crisis.

Recovery – delete deleted records from MyIsam Engine

I did a lot of research on the Internet. After doing my research, I found that it is not possible to return the deleted line in MyIsam. MYD, MYI and FRM files are available. I can only repair the table with Myisamcheck, but I cannot retrieve the deleted data. However, when I use the MySQL recovery tool, I can retrieve the deleted data. I want to be able to do this without this tool. But I don't know where to start and how.

Delete more than 10,000 emails


I am trying to clean up my yahoo email accounts which is due to … a very long time that more than 10,000 emails have to be deleted.

However, if I try to delete too many emails, it says that this is not possible. So for some of them I manually deleted 10 by 10 at a time and then checked the trash (with about 8,000 emails). When I clicked the trash, it says that it doesn't …

I think there are too many emails at the same time, okay. What I might want is some kind of script to delete over 10,000 emails that are before a certain date.

Is it possible? Can anyone support this here? I don't know how to contact Yahoo directly. I hope this community can help.

Thanks a lot,