Hi,
I am trying to come up with a Powershell script to query a text file with a list of folders, delete the folders listed and create a log file of the deleted folders.
I am new to this, so do bare with me, this is what i have come up with so far. But it does not seems to do anything. Any ideas would be appreciated.
Thanks in advance.
*******************************************************************************************************************************
$Deleted_Users = "C:\Test\Delete\filelist.txt"$Home_Folders = "C:\Test\Delete"
$UserList = Import-Txt $filelist
$UserList | ForEach-Object {
$ID = $_.ID
$User_Home = $Home_Folders + "\" + $_.ID }
Remove-Item $Home_Folders | Out-File c:\Test\Delete\Deleted.txt }
*******************************************************************************************************************************