I’ve put arguments inside of invoke file that matches variables. Whole script is " " and is readable as string also i need to use names from excel sheet and assign them to PS variables
As you can see I concatenate here three PS commands. The first is a Param, the second the Add-Type and the last calls a method of this library and uses the content of the variable.
thanks for your solution. Unfortunetly when I run It I’ve recieved following error:
{
“message”:
"System.Management.Automation.CommandNotFoundException: The term ‘Param([string]$arg_zapis,[string]$arg_zapisZIP);Add-Type -Assembly system.io.compression.filesystem;[io.compression.zipfile]::CreateFromDirectory($arg_zapis,$arg_zapisZIP)’
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.\r\n at System.Activities.Statements.Throw.Execute(CodeActivityContext context)\r\n at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)\r\n at System.Activities.ActivityInstance.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)\r\n at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)",
}