Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. Powershell script not working suddenly

Powershell script not working suddenly

Scheduled Pinned Locked Moved Web Development
sysadminwindows-admintoolsquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Member 14474607
    wrote on last edited by
    #1

    Hello All, Since past few days, the powershell script is not working, it does a simple thing of moving files from one location to another location within same server. One location on E drive to another location on E drive. I had a look at the event viewer - application logs, for any errors - I also manually copied a file to location, to see if there was any space or permissions issues all of a sudden. Is there any other location I can look for errors? Many thanks!

    Richard DeemingR 1 Reply Last reply
    0
    • M Member 14474607

      Hello All, Since past few days, the powershell script is not working, it does a simple thing of moving files from one location to another location within same server. One location on E drive to another location on E drive. I had a look at the event viewer - application logs, for any errors - I also manually copied a file to location, to see if there was any space or permissions issues all of a sudden. Is there any other location I can look for errors? Many thanks!

      Richard DeemingR Online
      Richard DeemingR Online
      Richard Deeming
      wrote on last edited by
      #2

      Maybe a permissions issue? Without seeing the relevant parts of the script and the output from running the script, we can only guess. Try debugging the script: How to Debug Scripts in Windows PowerShell ISE | Microsoft Docs[^]


      "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

      "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

      M 1 Reply Last reply
      0
      • Richard DeemingR Richard Deeming

        Maybe a permissions issue? Without seeing the relevant parts of the script and the output from running the script, we can only guess. Try debugging the script: How to Debug Scripts in Windows PowerShell ISE | Microsoft Docs[^]


        "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

        M Offline
        M Offline
        Member 14474607
        wrote on last edited by
        #3

        Thank you for reply. Is there any other location we can find the log files, other than the event viewer? ==

        move files to ScriptsWeb folder

        Get-ChildItem -Path "E:\<.myfolder>INT" | Move-Item -Destination "E:\" -force

        Richard DeemingR 1 Reply Last reply
        0
        • M Member 14474607

          Thank you for reply. Is there any other location we can find the log files, other than the event viewer? ==

          move files to ScriptsWeb folder

          Get-ChildItem -Path "E:\<.myfolder>INT" | Move-Item -Destination "E:\" -force

          Richard DeemingR Online
          Richard DeemingR Online
          Richard Deeming
          wrote on last edited by
          #4

          AFAIK, Powershell scripts don't log errors anywhere by default. If you execute the script interactively, you should see the errors in the Powershell console. If you execute the script from a scheduled task, you could try redirecting the output to a log file:

          .\YourScript.ps1 > YourScriptLog.txt


          "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

          "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups