Jump to content
JamesyG

Script to randomize extra data field values - Help required for the last little snag

Recommended Posts

All,

I worked out a script for randomisation of our windows update categories in extra data fields.  However I cannot get the last heading to work, they split nicely between "mon-wed" and "thu-fri" however they never assign anything to the Sat-Sun group and all the syntax and spelling seems correct.

I have attached the XML and a screengrab from the console, not quite sure where I went wrong so any pointers would be greatly appreciated.  I am sure it's a relatively rookie mistake as I don't do this often.

script.JPG.b1bccee88c9c53e046f01a2ee7b37a46.JPG

Assign WindowsUpdatePolicy at Random.xml

Share this post


Link to post
Share on other sites

Lets see if this helps you find out why ;)

 

C:\Users\mendy.GLT>set /a "rand=%random% %2"
0
C:\Users\mendy.GLT>set /a "rand=%random% %2"
0
C:\Users\mendy.GLT>set /a "rand=%random% %2"
1
C:\Users\mendy.GLT>set /a "rand=%random% %2"
0
C:\Users\mendy.GLT>set /a "rand=%random% %2"
1
C:\Users\mendy.GLT>set /a "rand=%random% %2"
1
C:\Users\mendy.GLT>set /a "rand=%random% %2"
0
C:\Users\mendy.GLT>set /a "rand=%random% %2"
0
C:\Users\mendy.GLT>set /a "rand=%random% %2"
0
C:\Users\mendy.GLT>set /a "rand=%random% %2"
1
C:\Users\mendy.GLT>set /a "rand=%random% %2"
0
C:\Users\mendy.GLT>set /a "rand=%random% %2"
1
C:\Users\mendy.GLT>set /a "rand=%random% %2"
1
C:\Users\mendy.GLT>set /a "rand=%random% %2"
0
<------------LOOK HERE -------------->
C:\Users\mendy.GLT>set /a "rand=%random% %3"
2
C:\Users\mendy.GLT>set /a "rand=%random% %3"
1
C:\Users\mendy.GLT>set /a "rand=%random% %3"
2
C:\Users\mendy.GLT>set /a "rand=%random% %3"
1
C:\Users\mendy.GLT>set /a "rand=%random% %3"
1
C:\Users\mendy.GLT>set /a "rand=%random% %3"
2
C:\Users\mendy.GLT>set /a "rand=%random% %3"
1
C:\Users\mendy.GLT>set /a "rand=%random% %3"
0
C:\Users\mendy.GLT>set /a "rand=%random% %3"
0
C:\Users\mendy.GLT>set /a "rand=%random% %3"
2
C:\Users\mendy.GLT>set /a "rand=%random% %3"
1
C:\Users\mendy.GLT>set /a "rand=%random% %3"
0
C:\Users\mendy.GLT>set /a "rand=%random% %3"
1
C:\Users\mendy.GLT>set /a "rand=%random% %3"
0
C:\Users\mendy.GLT>set /a "rand=%random% %3"
0

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...