title: Powershell: The property 'WorkingDirectory' cannot be found on this object (WIN10 - 18363) but exist
body: <p>Hy, i try to use powershell to automate some scheduling tasks
  Should start a cmd.exe in a specific directory.</p>
  <p>Unfortunately it returns an error on a specific property</p>
  <p>Property: TaskName.Actions.WorkingDirectory</p>
  <pre><code># Testprog for Scheduler working directory setup
  cls
  $TaskName = &quot;TestTask&quot;
  
  # Helpers for Task creation comment out when task exist
  UnRegister-ScheduledTask -TaskName $TaskName  
  
  $Description = &quot; Test Powershell Task creation&quot;
  $Trigger= New-ScheduledTaskTrigger -Daily -At 02:00pm  
  $Action= New-ScheduledTaskAction -Execute cmd.exe -Argument $StartString 
  
  $ProgPath = &quot;&quot;&quot;e:\Temp\Software\7zip\7za.exe&quot;&quot;&quot;
  $Param =  &quot; a -t7z -bd -ssw -wE:\Temp&quot;
  $Archive = &quot; &quot;&quot;E:\Temp\LocalArch\TestArch.7z&quot;&quot;&quot;
  $SourcePath = &quot; &quot;&quot;E:\Logs\&quot;&quot; &quot;
  $User= &quot;NT AUTHORITY\SYSTEM&quot;
  
  $StartString = &quot;/c &quot; + $ProgPath + $Param + $Archive + $SourcePath
  
  Register-ScheduledTask -TaskName $TaskName -Trigger $Trigger -User $User -Action $Action -RunLevel Highest –Force -Description $Description 
  
  #&gt;
  
  
  $Task = Get-ScheduledTask -TaskName $TaskName  # Read Scheduler Task to Object
  
  $Task.Actions.WorkingDirectory   # Retrieve no error
  # E:\WrittenViaGUI  # Test return value written via schduler GUI
  
  $Task.Actions.WorkingDirectory = &quot;E:\Temp\&quot;  #New working dir
  
  
  </code></pre>
  <p>Error: The property 'WorkingDirectory' cannot be found on this object.</p>