Powershell script not working properly

Welcome Forums General PowerShell Q&A Powershell script not working properly

Viewing 2 reply threads
  • Author
    Posts
    • #183165
      Participant
      Topics: 1
      Replies: 0
      Points: 11
      Rank: Member

      Hi Team I have powershell script that renames an existing file to a new file with appending sysdate, I am using the following script for this, this is called as part of another batch file, the file renaming is working properly but the sysdate is not appending properly for example today is 16th october but the file is renamed with 14th ocotober

    • #183201
      Moderator
      Topics: 5
      Replies: 237
      Points: 1,321
      Helping Hand
      Rank: Community Hero

      I don’t see anything odd there, add verbose statements and run it again with -Verbose.

      Thank you.

    • #183279
      Participant
      Topics: 1
      Replies: 64
      Points: 363
      Helping Hand
      Rank: Contributor

      I don’t see any obvious flaws so I would look at a few basic items:

      1. Is the system date on the server running the script correct?
      2. How long was this running?  (is it possible the script has been running since 10/14? )
      3. Has it ever worked properly?
      4. If you run it manually does it work?
Viewing 2 reply threads
  • The topic ‘Powershell script not working properly’ is closed to new replies.