-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"You must provide a value expression following the '+' operator" and other errors #1
Comments
I was so pumped to finally get rolling on deploying RSAT with MDT, hit this snag early on sadly. I copied the script text, edited the iso path and destination folder and removed the line 21/22 line break, and that's what it's giving me. :( |
Ok, weird - I just copied and pasted each line one by one and it worked. Why would it be complaining when running the whole script? |
Success with line-by-line:
Attached : True PS C:\temp\rsat>
Attached : False |
Contents of script, which errors out when running the ps1: $FoD_Source = "C:\Temp\RSAT\Win10_1903_64_FOD1.ISO" #Mount ISO Mount-DiskImage -ImagePath "$FoD_Source" $path = (Get-DiskImage "$FoD_Source" | Get-Volume).DriveLetter #Language desired $lang = "en-US" #RSAT folder $dest = New-Item -ItemType Directory -Path "C:\temp\RSAT_1903_$lang" -force #get RSAT files Get-ChildItem ($path+":") -name -recurse -include *~amd64~~.cab,*~wow64~~.cab,* #get metadata copy-item ($path+":\metadata") -Destination $dest.FullName -Recurse copy-item ($path +“:"+“FoDMetadata_Client.cab”) -Destination $dest.FullName -Force -Container |
PS C:\temp\rsat> .\W10_FOD_RSAT_Offline_CopySource.ps1
At C:\temp\rsat\W10_FOD_RSAT_Offline_CopySource.ps1:21 char:227
You must provide a value expression following the '+' operator.
At C:\temp\rsat\W10_FOD_RSAT_Offline_CopySource.ps1:21 char:227
Unexpected token '“:\�+$_' in expression or statement.
At C:\temp\rsat\W10_FOD_RSAT_Offline_CopySource.ps1:21 char:227
Missing closing ')' in expression.
At C:\temp\rsat\W10_FOD_RSAT_Offline_CopySource.ps1:21 char:203
Missing closing '}' in statement block or type definition.
At C:\temp\rsat\W10_FOD_RSAT_Offline_CopySource.ps1:21 char:238
Unexpected token ')' in expression or statement.
At C:\temp\rsat\W10_FOD_RSAT_Offline_CopySource.ps1:21 char:285
Unexpected token '}' in expression or statement.
At C:\temp\rsat\W10_FOD_RSAT_Offline_CopySource.ps1:27 char:19
You must provide a value expression following the '+' operator.
At C:\temp\rsat\W10_FOD_RSAT_Offline_CopySource.ps1:29 char:43
The string is missing the terminator: ".
At C:\temp\rsat\W10_FOD_RSAT_Offline_CopySource.ps1:27 char:19
Unexpected token '“:"+“FoDMetadata_Client.cab�) -Destination $dest.FullName -Force -Container
#Dismount ISO
Dismount-DiskImage -ImagePath "$FOD_Source"' in expression or statement.
At C:\temp\rsat\W10_FOD_RSAT_Offline_CopySource.ps1:27 char:19
Missing closing ')' in expression.
+ CategoryInfo : ParserError: (:) [], ParseException
+ FullyQualifiedErrorId : ExpectedValueExpression
The text was updated successfully, but these errors were encountered: