Quantcast
Channel: File Services and Storage forum
Viewing all articles
Browse latest Browse all 13565

Batch file for DFSR Backlog check doing weird stuff

$
0
0

Hi Everyone,

I have a DFS Replication structure with just over 20 Replication Groups and wrote a batch file that runs a backlog check on each writing the results to a text file.

It works perfectly except for three RGs.  The only common factor I can see so far is that the Replicated Folder name in each of the RGs has spaces in it.  But, here's the weird part:

I have the command saved in OneNote and if I copy and paste it from there into a DOS box, it reports the backlog status of the group just fine.  The command is:

dfsrdiag backlog /smem:eng-V28 /rmem:ENG-G03 /rgname:V28-Acct-EIS/rfname:"Acct – EIS"

If I copy and paste this command into a batch file and save it, the batch run fails; reports back: 

[ERROR] Cannot find DfsrReplicatedFolderConfig object. Possible reasons:
   + The replicated folder is not configured on the member 
   + Access is denied to its configuration information

[ERROR] Replicated folder <acct – eis> not found. Err: -2147217406 (0x80041002)


Operation Failed

This is the exact same command that just worked when pasted into the same DOS window;  I paste directly from the clipboard into DOS, it works - then immediately paste it from the clipboard into a batch file, run the batch and it fails.

Then, if I copy the command from in the batch file I just created - that failed - back into the clipboard and then paste into the DOS window it fails.  I go back to the original command in my OneNote page, copy to cllipboard, paste into same DOS window, it works.  Now, paste the new clipboard contents into the batch file overwriting the bad one, run the batch and fail.

I set the echo ON at one point to see how the command was being parsed and it looks fine; no weird characters or mistakes (which would be even weirder since I'm doing copy/paste so there is no chance of typo).  Tried matching case exactly, all lower case etc - no change.

Tried saving batch code with Notepad, Notepad++ and Edit Pad Pro. Also, tried

echo [command] > test.bat

to put the command into a batch file all by itself without an editor at all and that batch still fails.

The way I did that was to copy from OneNote into the clipboard and past into DOS, run it and see it succeed.  The, I press up-arrow, left-arrow and insert echo at the beginning of the command. Next, press right-arrow to the end of the line and type> test.bat and press Enter thus creating test.bat

  Now, I run test.bat and it fails

I am completely puzzled.

Anyone have an idea wtf is going on?

Thanks!

- a -


Viewing all articles
Browse latest Browse all 13565

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>