I am trying to delete some files on a network share. I need to add different credentials in the script of an administrator to finish the command.
can I get the exact syntax of the powershell command if these are my variables.
these are made up examples of variables....
server unc path
domain = trees
username = moon
pwd = rock
I want to delete all files within the directory of \\apples\stems
also for bonus points... if you could tell me how to delete all the files in that directory that are over 14 days old
so two scripts requested.