Forum Discussion

Stacy Plante's avatar
Stacy Plante
Copper Contributor
Jul 01, 2021
Solved

Powershell Results to TXT file

Powershell newbie here......looking to run the following but want to send the output to a text file.     Get-SPOSite -Template REDIRECTSITE#0   I tried adding | Out-File -FilePath C:\somefilename...
  • pvanberlo's avatar
    Jul 01, 2021
    Likely the issue is you’re writing to a file in the root of your C drive. That’s generally not allowed unless you are running PowerShell as a local admin. Try another location like your user folder.

Resources