Please kindly help I am totally new to powershell and am needing help deleting old inventory from csv and related folders.
I have details as follows in the csv file:
Inv code, Inventory name, Date Entered
I have to run a function to look up the cvs file in a directory and any inventory that is older than 2 yrs, to go delete the entry from the csv file and in the same directory to delete the relevant inventory code folder.
Let’s say I have:
Inv code / Inventory Name / Date Entered
MSPN001 / Metal Spoon / 2/15/2006
The same inventory has a folder in the directory that contains details of the inventory such as first batch, quantity, returns etc…
Folder name is according to the Inv Code in the cvs file, so for the above would be:
I need the function to look up only the ones older than 2 years and delete.
Sorry I am still in the learning phase and due to a colleague on long term leave I had to learn and do this.
Thanks a bunch!