LucD,
Thanks. The timing will be in Central time, but its weird that even after fixing this error, a new error throws every time. But out put is getting generated.
PowerCLI C:\temp> .\RVTools_Export.ps1
Get-ChildItem : Cannot find path 'C:\VSXXYwrv100' because it does not exist.
At C:\temp\RVTools_Export.ps1:37 char:13
+ $Items = Get-ChildItem "$path\$server"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\usphicwsrv020:String) [Get-C
hildItem], ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetCh
ildItemCommand
I changed to $Items = Get-ChildItem "$BasePath\$server" (as suggested above)
Get-Date : Cannot bind parameter 'Date'. Cannot convert value "15/20/0929" to
type "System.DateTime". Error: "String was not recognized as a valid DateTime."
At C:\temp\RVTools_Export.ps1:42 char:57
+ if ((((Get-date).AddDays(-$OldFileDays))-(Get-Date($itemDate))).Days
-gt 0 ...
+ ~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Get-Date], ParameterBindin
gException
+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.PowerSh
ell.Commands.GetDateCommand
Get-Date : Cannot bind parameter 'Date'. Cannot convert value "28/09/2015" to
type "System.DateTime". Error: "String was not recognized as a valid DateTime."
At C:\temp\RVTools_Export.ps1:42 char:57
+ if ((((Get-date).AddDays(-$OldFileDays))-(Get-Date($itemDate))).Days
-gt 0 ...
+ ~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Get-Date], ParameterBindin
gException
+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.PowerSh
ell.Commands.GetDateCommand
thanks
vm2014