azure-pipelines.yml: Consistently use pwsh instead of powershell
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index c867e3f..9897fb5 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -105,7 +105,7 @@
     - checkout: self # self represents the repo where the initial Pipelines YAML file was found
       fetchDepth: '1'  # the depth of commits to ask Git to fetch
 
-    - powershell: |
+    - pwsh: |
         $configuration = if ($env:BUILDCONFIGURATION) { $env:BUILDCONFIGURATION } else { "Release" }
         Write-Host "##vso[task.setvariable variable=BuildConfiguration;]$configuration"
         $isRelease = if ($env:ISRELEASE -eq 'true') { 'true' } else { 'false' }
@@ -123,7 +123,7 @@
       inputs:
         version: 5.0.100
 
-    - powershell: |
+    - pwsh: |
         Import-Module "$(BuildDirectory)/psake.psm1"
         $generateBuildBat = $env:ISRELEASE
         $primaryCommand = if ($env:RUNPACK -ne 'false') { 'Pack' } else { 'Compile' }
@@ -264,7 +264,7 @@
       vmImage: 'vs2017-win2016'
 
     steps:
-    - powershell: |
+    - pwsh: |
          $(Build.SourcesDirectory)/websites/apidocs/docs.ps1 -LuceneNetVersion $(PackageVersion) -Clean -BaseUrl https://lucenenet.apache.org/docs/
       errorActionPreference: 'continue'
       ignoreLASTEXITCODE: 'true'
@@ -290,7 +290,7 @@
       vmImage: 'vs2017-win2016'
 
     steps:
-    - powershell: |
+    - pwsh: |
          $(Build.SourcesDirectory)/websites/site/site.ps1 0 1
       errorActionPreference: 'continue'
       ignoreLASTEXITCODE: 'true'
@@ -563,14 +563,14 @@
         targetPath: '$(System.DefaultWorkingDirectory)/$(VersionArtifactName)'
 
       # For debugging this pipeline
-    - powershell: | 
+    - pwsh: | 
         Get-ChildItem -Path $(System.DefaultWorkingDirectory)
-    - powershell: | 
+    - pwsh: | 
         Get-ChildItem -Path '$(VersionArtifactName)'
 
       # NOTE: We are setting Build.BuildNumber here to the NuGet package version to work around the limitation that
       # the version cannot be passed to the Index Sources & Publish Symbols task.
-    - powershell: |
+    - pwsh: |
         $version = Get-Content '$(VersionArtifactName)/$(PackageVersionFileName)' -Raw
         Write-Host "##vso[task.setvariable variable=PackageVersion;]$version"
         Write-Host "##vso[build.updatebuildnumber]$version"
@@ -617,14 +617,14 @@
 
       # NOTE: We are setting Build.BuildNumber here to the NuGet package version to work around the limitation that
       # the version cannot be passed to the Index Sources & Publish Symbols task.
-    - powershell: |
+    - pwsh: |
         $version = Get-Content '$(Build.ArtifactStagingDirectory)/$(VersionArtifactName)/$(PackageVersionFileName)' -Raw
         $vcsLabel = 'Lucene.Net_' + $version.Replace('.', '_').Replace('-', '_')
         Write-Host "##vso[task.setvariable variable=VCSLabel;]$vcsLabel"
         Write-Host "##vso[task.setvariable variable=PackageVersion;]$version"
         Write-Host "##vso[build.updatebuildnumber]$version"
       displayName: 'Build VCS Label and Rehydrate Version Variables'
-    - powershell: |
+    - pwsh: |
         $files = 'build.bat','Version.props'
         foreach ($file in $files) {
             Copy-Item -Path "$(Build.ArtifactStagingDirectory)/$(VersionArtifactName)/$file" -Destination "$(Build.SourcesDirectory)/$file" -Force -ErrorAction Continue
@@ -669,7 +669,7 @@
         includeRootFolder: false
         archiveFile: '$(Build.ArtifactStagingDirectory)/$(ReleaseArtifactName)/Apache-Lucene.Net-$(PackageVersion).bin.zip'
 
-    - powershell: |
+    - pwsh: |
         $dir = '$(Build.ArtifactStagingDirectory)/$(ReleaseArtifactName)'
         if (!(Test-Path $dir)) { New-Item -ItemType Directory -Path "$dir" -Force }
         $nl = [Environment]::NewLine
diff --git a/build/azure-templates/publish-nuget-packages.yml b/build/azure-templates/publish-nuget-packages.yml
index 94e93d6..184fa2d 100644
--- a/build/azure-templates/publish-nuget-packages.yml
+++ b/build/azure-templates/publish-nuget-packages.yml
@@ -27,7 +27,7 @@
   testSymbolFilesConvention: '**/*.Tests*.pdb' # The glob pattern (within the debugArtifactName) where to look for test project symbols (.pdb) files, so they can be distinguished from other project file types.
 
 steps:
-- powershell: |
+- pwsh: |
     function EnsureNotNullOrEmpty([string]$param, [string]$nameOfParam) {
         if ([string]::IsNullOrEmpty($param)) {
             Write-Host "##vso[task.logissue type=error;]Missing template parameter \"$nameOfParam\""
diff --git a/build/azure-templates/publish-test-results-for-test-projects.yml b/build/azure-templates/publish-test-results-for-test-projects.yml
index d693e90..40cf1c0 100644
--- a/build/azure-templates/publish-test-results-for-test-projects.yml
+++ b/build/azure-templates/publish-test-results-for-test-projects.yml
@@ -54,7 +54,7 @@
   testResultsFileName: 'TestResults.trx' # The name of the file (not path) of the test results. Default 'TestResults.trx'.
 
 steps:
-#- powershell: |
+#- pwsh: |
 #    function EnsureNotNullOrEmpty([string]$param, [string]$nameOfParam) {
 #        if ([string]::IsNullOrEmpty($param)) {
 #            Write-Host "##vso[task.logissue type=error;]Missing template parameter \"$nameOfParam\""
diff --git a/build/azure-templates/publish-test-results.yml b/build/azure-templates/publish-test-results.yml
index 1e169bc..0fe4548 100644
--- a/build/azure-templates/publish-test-results.yml
+++ b/build/azure-templates/publish-test-results.yml
@@ -27,7 +27,7 @@
   testResultsFileName: 'TestResults.trx' # The name of the file (not path) of the test results. Default 'TestResults.trx'.
 
 steps:
-#- powershell: |
+#- pwsh: |
 #    function EnsureNotNullOrEmpty([string]$param, [string]$nameOfParam) {
 #        if ([string]::IsNullOrEmpty($param)) {
 #            Write-Host "##vso[task.logissue type=error;]Missing template parameter \"$nameOfParam\""
@@ -45,7 +45,7 @@
 
 #- template: 'show-all-files.yml' # Uncomment for debugging
 
-- powershell: |
+- pwsh: |
     $testResultsFileName = "$(Build.ArtifactStagingDirectory)/${{ parameters.testResultsArtifactName }}/${{ parameters.osName }}/${{ parameters.framework }}/${{ parameters.vsTestPlatform }}/${{ parameters.testProjectName }}/${{ parameters.testResultsFileName }}"
     $testResultsFileExists = Test-Path $testResultsFileName
     if ($testResultsFileExists) {
diff --git a/build/azure-templates/run-tests-on-os.yml b/build/azure-templates/run-tests-on-os.yml
index 2b06109..c808ba6 100644
--- a/build/azure-templates/run-tests-on-os.yml
+++ b/build/azure-templates/run-tests-on-os.yml
@@ -36,7 +36,7 @@
 steps:
 - checkout: none # self represents the repo where the initial Pipelines YAML file was found
 
-- powershell: |
+- pwsh: |
     function EnsureNotNullOrEmpty([string]$param, [string]$nameOfParam) {
         if ([string]::IsNullOrEmpty($param)) {
             Write-Host "##vso[task.logissue type=error;]Missing template parameter \"$nameOfParam\""
@@ -61,7 +61,7 @@
     artifactName: '${{ parameters.binaryArtifactName }}_${{ parameters.framework }}'
     targetPath: '$(System.DefaultWorkingDirectory)/${{ parameters.framework }}'
 
-#- powershell: Get-ChildItem -Path $(System.DefaultWorkingDirectory) # Uncomment for debugging
+#- pwsh: Get-ChildItem -Path $(System.DefaultWorkingDirectory) # Uncomment for debugging
 
 - task: UseDotNet@2
   displayName: 'Use .NET Core sdk 2.1.807'
@@ -81,7 +81,7 @@
     version: 5.0.100
 
 #- template: 'show-all-files.yml' # Uncomment for debugging
-- powershell: |
+- pwsh: |
     $framework = '${{ parameters.framework }}'
     $testBinaryRootDirectory = "$(System.DefaultWorkingDirectory)"
     $testResultsArtifactDirectory = "${{ format('$(Build.ArtifactStagingDirectory)/{0}',parameters.testResultsArtifactName) }}"
diff --git a/build/azure-templates/show-all-environment-variables.yml b/build/azure-templates/show-all-environment-variables.yml
index 1815e62..1a9e82a 100644
--- a/build/azure-templates/show-all-environment-variables.yml
+++ b/build/azure-templates/show-all-environment-variables.yml
@@ -18,7 +18,7 @@
 # Writes all environment variables to the host (helpful for debugging)
 
 steps:
-- powershell: |
+- pwsh: |
     $environmentVars = Get-ChildItem -path env:* | sort Name
     foreach($var in $environmentVars) {
         $keyname = $var.Key
diff --git a/build/azure-templates/show-all-files.yml b/build/azure-templates/show-all-files.yml
index 9591775..78041e9 100644
--- a/build/azure-templates/show-all-files.yml
+++ b/build/azure-templates/show-all-files.yml
@@ -22,5 +22,5 @@
 # Writes all file names (from the parent directory) to the host (helpful for debugging)
 
 steps:
-- powershell: cd ..;dir -r  | Where-Object {$_.PsIsContainer -eq $false} | % { $_.FullName }
+- pwsh: cd ..;dir -r  | Where-Object {$_.PsIsContainer -eq $false} | % { $_.FullName }
   displayName: 'Show all Files'
\ No newline at end of file