Simple issue, I'm trying to run the following command:
$d = ((Get-Date).AddMonths(-1)).ToString('MMM')
$filepath = "<<PATH>>\EOM " + $d + " " + $d.Year
New-Item $filepath -type directory
Path works correctly, that is a parameter set by an external program.
I can't get it to recognise the " " + $d.Year in the path, it just stops after $d. Is there an easy way I can get it to read the whole file path? At the moment It keeps creating a new folder ...\EOM Sep without the year.