Search notes:

Get-ChildItem, Parameter -Include

Cast objects to string

foreach ($file in get-childItem . -recurse -include *.ps1) {
  [string] $name  = $file
   $name

   $file.GetType().FullName
}


foreach ($file in get-childItem . -recurse          *.ps1) {
  [string] $name  = $file
   $name

   $file.GetType().FullName
}
Github repository about-PowerShell, path: /cmdlets/childItem/get/include/cast-to-string.ps1
See also this Stackoverflow question.

See also

get-childItem, get-childItem -include

Index