The variable for the share was evaluated but the value of the variable represented by the share permissions was not. Is there a way to evaluate its value?
Grant-SmbShareAccess -Name $SHARE -AccessRight Read -AccountName $SHARERead Grant-SmbShareAccess : Cannot validate argument on parameter 'Name'. The argument is null. Provide a valid value for the argument, and then try running the command again. At line:1 char:36+ Grant-SmbShareAccess -Name $SHARE -AccessRight Read -AccountN ...+ ~~~~~~+ CategoryInfo : InvalidData: (:) [Grant-SmbShareAccess], ParameterBindingValidationException+ FullyQualifiedErrorId : ParameterArgumentValidationError,Grant-SmbShareAccess