I recently ran into the following error message while modifying a PowerShell script:
Invalid assignment expression. The left hand side of an assignment operator needs to be something that can be assigned to like a variable or a property
The cause of the error was that I had added a line of code in front of my param declaration:
1
2
3
4
|
Set
-StrictMode
-Version
2
param(
[string][parameter(mandatory=
$true
)]
$WebsitePhysicalPath
,
|