PowerShell: "Es wurde kein Positionsparameter gefunden, der das Argument "+" akzeptiert." Wie löse ich das?

Hi

Es geht um Reports... Programmiert wurde es mit PowerShell ISE

Hier der Fehler:

Rename-Item : Es wurde kein Positionsparameter gefunden, der das    Argument  "+" akzeptiert.
In Zeile:34 Zeichen:1
+ rename-item "c:\Reporting\Report_Telephone_" + $todaydate[0] +'-' + $todaydate[1 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Rename-Item], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.RenameItemCommand

hier mein Code:

#today's date (year-month-day)
$todaydate = Get-Date -Format yyyy-MM-dd

#arrays  (today => systemtime)
$todaydate = $todaydate.Split('-')
$todaydate[0] #year
$todaydate[1] #month
$todaydate[2] #day

#arrays yesterday (systemtime - one day)
$yesterdaysdate = Get-Date((Get-Date).AddDays(-1)) -Format yyyy-MM-dd
$yesterdaysdate = $yesterdaysdate.Split('-')
$yesterdaysdate[0] #year
$yesterdaysdate[1] #month
$yesterdaysdate[2] #day

#arrays yesterday (systemtime - one day)
$lastmonth = Get-Date((Get-Date).AddMonths(-1)) -Format yyyy-MM-dd
$lastmonth = $lastmonth.Split('-')
$lastmonth[0] #year
$lastmonth[1] #month
$lastmonth[2] #day


#Example 1:  Filename "Report_Telephone_yyyy-mm" => in this case "Report_Telephone_2016-12"
#it renames the file -> minus one month, so the name must be "Report_Telephone_2016-11"
$filename='Report_Telephone_'+ $lastmonth[0]+'-'+ $lastmonth[1] + '.xlsx'
$filemonth = [int][regex]::Match($filename, '\w+_\d+_(\d+)').Groups[1].Value
$filemonth = "{0:D2}" -f ($filemonth - 1)

write-host $filename
rename-item "c:\Reporting\Report_Telephone_" + $todaydate[0] +'-' + $todaydate[1] + ".xlsx" -NewName $filename

$sourcepath='C:\Reporting\'+ $filename
write-host $sourcepath
$destinationpath='C:\Reporting\'+ $lastmonth[0]+'\'+ $lastmonth[1]
write-host $destinationpath
if(test-path $destinationpath)
{

} 
else 
  {
     mkdir $destinationpath
  }
move-item -path $sourcepath -destination $destinationpath

Hat einer ne Idee, wie ich das lösen könnte? Thx im vorraus :3

PC, Computer, Windows, IT, programmieren, Informatik, PS, Report, Script, PowerShell, Powershell ISE
Minecraft 1.8 weigert sich zu starten (mit Crash Report)

Schon seit 3 Stunden weigert Minecraft sich zu starten, Ich klicke beim Launcher auf Play, dann kommt das Fenster, wo erstmal Mojang steht. Dann steht neben Minecraft 1.8 oben links in Klammern "Keine Rückmeldung". Es hängt und irgendwann kommt wieder der Launcher mit nem Crash Report, den ich hier gleich auch noch hinhauen werde, in der Hoffnung das jemand etwas damit anfangen kann. Ich bin Laie und habe bisher nur Java geupdatet und das System neu gestartet in dem Versuch es wieder hinzubekommen. Hier noch der Report: ---- Minecraft Crash Report ---- // My bad.

Time: 02.09.14 18:50 Description: Initializing game

ctz: Unable to fit: minecraft:items/record_13 - size: 256x256 - Maybe try a lowerresolution resourcepack? at ctw.c(SourceFile:60) at cua.b(SourceFile:197) at cua.a(SourceFile:77) at cxh.j(SourceFile:553) at cxh.a(SourceFile:139) at cxk.a(SourceFile:23) at cvt.a(SourceFile:99) at bsu.aj(SourceFile:437) at bsu.a(SourceFile:299) at net.minecraft.client.main.Main.main(SourceFile:120)

A detailed walkthrough of the error, its code path and all known details is as follows:

-- Head -- Stacktrace: at ctw.c(SourceFile:60) at cua.b(SourceFile:197) at cua.a(SourceFile:77) at cxh.j(SourceFile:553) at cxh.a(SourceFile:139) at cxk.a(SourceFile:23) at cvt.a(SourceFile:99) at bsu.aj(SourceFile:437)

-- Initialization -- Details: Stacktrace: at bsu.a(SourceFile:299) at net.minecraft.client.main.Main.main(SourceFile:120)

-- System Details -- Details: Minecraft Version: 1.8 Operating System: Windows 7 (x86) version 6.1 Java Version: 1.7.0_67, Oracle Corporation Java VM Version: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation Memory: 51070456 bytes (48 MB) / 523501568 bytes (499 MB) up to 523501568 bytes (499 MB) JVM Flags: 6 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx512M -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 Launched Version: 1.8 LWJGL: 2.9.1 OpenGL: AMD Radeon HD 7670M GL version 4.2.11411 Compatibility Profile Context, ATI Technologies Inc. GL Caps: Using GL 1.3 multitexturing. Using GL 1.3 texture combiners. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Shaders are available because OpenGL 2.1 is supported. VBOs are available because OpenGL 1.5 is supported.

Using VBOs: No
Is Modded: Probably not. Jar signature remains and client brand is untouched.
Type: Client (map_client.txt)
Resource Packs: [Sphax PureBDcraft 256x MC17.zip]
Current Language: Deutsch (Deutschland)
Profiler Position: N/A (disabled)
Computer, Minecraft, Crash, Report, startet-nicht, crash report

Meistgelesene Beiträge zum Thema Report