When I am trying to set up this useful modification, when I execute the single .ps1 script in the sources folder, it gives me a list of errors. How can I solve these?
Split-Path : Cannot bind argument to parameter 'Path' because it is an empty string.
At C:\ProgramData\Run_in_Sandbox\RunInSandbox.ps1:18 char:39
+ $FolderPath = Split-Path (Split-Path "$ScriptPath" -Parent) -Leaf
+ ~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Split-Path], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Microsoft.PowerShell.Commands.Spli
tPathCommand
Get-Item : Cannot bind argument to parameter 'Path' because it is an empty string.
At C:\ProgramData\Run_in_Sandbox\RunInSandbox.ps1:19 char:29
+ $DirectoryName = (get-item $ScriptPath).DirectoryName
+ ~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Get-Item], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Microsoft.PowerShell.Commands.GetI
temCommand
Get-Item : Cannot bind argument to parameter 'Path' because it is an empty string.
At C:\ProgramData\Run_in_Sandbox\RunInSandbox.ps1:20 char:24
+ $FileName = (get-item $ScriptPath).BaseName
+ ~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Get-Item], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Microsoft.PowerShell.Commands.GetI
temCommand
Get-Item : Cannot bind argument to parameter 'Path' because it is an empty string.
At C:\ProgramData\Run_in_Sandbox\RunInSandbox.ps1:21 char:29
+ $Full_FileName = (get-item $ScriptPath).Name
+ ~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Get-Item], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Microsoft.PowerShell.Commands.GetI
temCommand
& : The term 'C:\Users\Arshan\Desktop\.wsb' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At C:\ProgramData\Run_in_Sandbox\RunInSandbox.ps1:275 char:3
+ & $Sandbox_File_Path
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\Users\Arshan\Desktop\.wsb:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Hello,
When I am trying to set up this useful modification, when I execute the single .ps1 script in the sources folder, it gives me a list of errors. How can I solve these?