title: How to read a script file from a repo in Yaml Pipeline in azure Devops
body: <p>I have a repository where I have a powershell(.ps1) file which i would like to call in one of the stage of my Yaml Pipeline. I am trying the following way but i get the error as <em>&quot;[error]ENOENT: no such file or directory, stat '/home/vsts/work/1/s/_DevOpsScripts/ReleaseNoteScripts/abc.ps1'&quot;</em></p>
  <p>Would like to know What is the correct way of calling the powershell script .</p>
  <p>Here is what I am doing now</p>
  <pre><code>name: $(SourceBranchName)_$(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.r)
  trigger:
    - master
  
  resources:
    repositories:
    - repository: DevOpsScripts
      type: git
      name: XeThru/DevOpsScripts
      trigger:
        branches:
          include:
            - master
  
  
  - stage: PublishSignalFlowNotebooks
      dependsOn: SignalFlow
      jobs:
        - job: SignalFlow_ReleaseNoteBook    
          steps:
            - checkout: DevOpsScripts
            - task: PowerShell@2
              displayName: 'PowerShell Script'
              inputs:
                  targetType: filePath
                  filePath: $(System.DefaultWorkingDirectory)/_DevOpsScripts/ReleaseNoteScripts/abc.ps1
                  arguments: '-WId $(NoteBookArtifactDirectory) -ClientID $(clientId) -ClientSecret $(clientSecret) -RDname $(Release.DefinitionName) -RName $(Release.ReleaseName) -RReqFor $(Release.RequestedFor) -RRId $(Release.ReleaseId) -NbId $(NotebookId) -SPid $(SharePointSiteID) -LibId $(LibraryID) -AzDevToken $(AzureDevOpsPersonalAccessToken)' 
  </code></pre>
  <p>On Debugging I get this:</p>
  <pre><code>Directory: D:\a\1\s
  
  
  Mode                LastWriteTime         Length Name                                                                  
  ----                -------------         ------ ----                                                                  
  d-----        3/11/2021   6:03 PM                ReleaseNoteScripts                                                    
  -a----        3/11/2021   6:03 PM           1319 README.md                                                             
  
  
      Directory: D:\a\1\s\ReleaseNoteScripts
  
  
  Mode                LastWriteTime         Length Name                                                                  
  ----                -------------         ------ ----                                                                  
  -a----        3/11/2021   6:03 PM           5341 UploadInSharePoint.ps1                                                
  -a----        3/11/2021   6:03 PM          13779 abc.ps1 
  </code></pre>