Output from same script on two different platforms produce different outputs.

I'm running a command prompt script on two different platforms (Windows 7 desktop and a Microsoft Server 2008 R2 Enterprise platform) and the output the script produces is different on each platform.
 Specifically; the script is
       For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c-%%a-%%b)
       For /f "tokens=1-2 delims=/:" %%a in ('time /t') do (set mytime=%%a%%b)
       echo %mydate%>> log.txt
       echo %mytime%>> log.txt
and the output from the Windows 7 desktop is:
       2014-07-31
       0249 PM
While the output from the 2008 server is:
       ECHO is on.
       0249 PM

Hi Dave,
There's some very good learning resources here:
http://technet.microsoft.com/en-us/scriptcenter/dd793612.aspx
Also, there's a script repository full of examples you can learn from and tweak to meet your needs here:
http://gallery.technet.microsoft.com/scriptcenter
As an additional suggestion, I'd highly recommend upgrading PowerShell on Win7 and WS2008R2 to v4. v2 was okay, but v4 makes life much easier (make sure you read the system requirements first though, there's still a few incompatibilities):
http://www.microsoft.com/en-us/download/details.aspx?id=40855
Don't retire TechNet! -
(Don't give up yet - 12,950+ strong and growing)

Similar Messages

  • Difference in LOCL print preview for same script in two different systems

    Hi All,
    When I am testing a dunning letter ( Custom sapscript) in my testing system the LOCL print preview is correct...When I am testing  it in my development system by taking print preview from LOCL it is not printing a uline and some line item headers...
    There is one text element for printing line item header.
    U1....ULINE(73)
    T0    &vline& ....&T_MATNR&..
    T3    &vline&
    UL   &ULINE(73)
    IN Development sytame in print preview every thing is perfect except the above portion the first uline and vline are not getting printed and as a result next vline and uline are dispalyed a bit above .. I am unable to understand why one uline is not printed but the othe one is printed as we are using HELVE12 in both cases and above all  why in test system this problem is not occuring..
    I checked and am 100% sure there is no difference between the layout versions in the two sapscripts...Also checked most of the SPAD configs in two systems and found them same..
    Can you give me any idead about the reason for the diffrence in print preview as in both cases it will consider the printer installed on the local desktop....
    Just we use citrix metaframe to log in SAP but that should not be the reason as thne problem would be in both system..
    Please help me out...
    Thanks and Regards
    Sweta

    Hi ,
    I already mentioned that I am selcting LOCL ( Device type Sapwin)  in both cases so in both cases it is considering the printer installed on the local system...
    Can anyone tell me specific spad config or anything else which I need to compare in both systems..

  • Running same backup script on two different Databases

    Hello All,
    I am running same backup script on two different Databases.
    But output is different.
    Please give me your feedback.
    1) Database 1:
    OS: AIX
    DB: 10.1.0.4.0
    Script:
    export ORACLE_SID=sid1
    cd $ORACLE_HOME/bin
    ./rman nocatalog << EOF
    connect target
    ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE disk;
    configure controlfile autobackup on;
    backup as compressed backupset database plus archivelog delete input;
    delete noprompt obsolete;
    exit
    EOF
    6 Files created:
    -rw-r----- 1 oracle dba 4140032 Jun 19 00:00 uvhlvjs8_1_1
    -rw-r----- 1 oracle dba 38029824 Jun 19 00:00 backup_uuhlvjs8_1_1
    -rw-r----- 1 oracle dba 781287424 Jun 19 00:20 v1hlvjsk_1_1
    -rw-r----- 1 oracle dba 578027520 Jun 19 00:23 backup_v0hlvjsk_1_1
    -rw-r----- 1 oracle dba 1222656 Jun 19 00:23 backup_v2hlvl7r_1_1
    -rw-r----- 1 oracle dba 4259840 Jun 19 00:23 c-1052429639-20060619-00
    -rw-r----- 1 oracle dba 4177920 Jun 19 00:23 SNAPCF_ATHENA.F
    2. Databse 2:
    OS: Linux (SLES 8)
    DB: 10.1.0.5.0
    Log Archive Filename Format: %t_%s_%r.dbf
    2 files created:
    1_17804_535674251.dbf 1_17837_535674251.dbf SID_2chlmrrl_1_1.1
    1_17805_535674251.dbf 1_17838_535674251.dbf SID_2dhlms8c_1_1.1
    I am also getting dbf file every one hour as below:
    1_17868_535674251.dbf
    DN

    waiting for reply

  • Use two indicators for the same variable in two different VIs

    hello, I want to use two indicators for the same variable in two different VIs running at the same time
    should I use global variables?? I want to avoid because I have lot of variables and it would takes too much memory,I tried with this code but the value of the second indicator is not updated 
    I tried to use the queue and it works but the problem is as i said previously that i have many variables shoud I use a queue for each one??
    what should I do?
    thank you in advance
    cordialy
    Attachments:
    projet.zip ‏13 KB

    CrisSTine01 wrote:
    hello, I want to use two indicators for the same variable in two different VIs running at the same time
    I'm a huge fan of User Events to send updates to GUIs from who knows where.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How to use same DFF for two different forms with :BLOCK.field reference

    Hi,
    Can anyone suggest how to use the same dff in two different forms by using :BLOCK.field reference.
    Scenario is the same DFF is referenced by two forms, viz. Form-1 & Form-2.
    Form-1 Reference Field is :BLOCK.field name, but the same block is not available in Form-2, which throws an error while opening it.
    Any pointers please.
    Thanks,

    In the environment I currently have access to do not have similar setup.
    Let say you setup the DFF1 default value to $HEADER.customer_name, the name of the DFF is CUSTOMER_NAME, description can be anything.
    In DFF2, default value should be a SQL, where you can reference the DFF1. For example, SELECT DECODE($FLEX.CUSTOMER_NAME, 'ABC', 1, 'DEF', 2, NULL) FROM dual
    In this case, you can reference the DFF1.

  • Will a sequence return same value for two different sessions?

    Is there a possibility that a sequence will return same value to two different sessions when it is referred exactly at the same instance of time?

    @Justin... Thanks for your insight; indeed, we too feel this shouldn't ever happen and never heard of it either, but there it is. (No, we haven't logged a TAR yet -- whatever that is -- partly because it didn't occur to us and partly because we only recently came across the issue and sensibly want to do some testing before we cry foul.)
    However, the code is pretty straight-forward, much like this (inside a FOR EACH ROW trigger body):
    SELECT <seqname>.NEXTVAL INTO <keyvar> FROM DUAL;
    INSERT INTO <tblname> (<keyfield>, <... some other fields>)
    VALUES(<keyvar>, <... some other values> );
    (where <tblname> is NOT the table on which the trigger is fired). This is the only place where the sequence is ever accessed. The sequence state is way below its limits (either MAXVALUE or <keyfield>/<keyvar> datatype size).
    In this setup, end users sometimes got an out-of-the-blue SQL error to the effect that uniqueness constraint has been violated -- as I said, we used to have a unique index on <keyfield> -- which leads us to assume that the sequence generated a duplicate key (only way for the constraint to be violated, AFAIK). We released the constraint and indeed, using a simple SELECT <keyfield>, COUNT(*) FROM <tblname> GROUP BY <keyfield> HAVING COUNT(*)>1 got us some results.
    Unfortunately, the <tblname> table gets regularly purged by a consumer process so it's hard to trace; now we created a logger trigger, on <tblname> this time, which tracks cases of duplicate <keyfield> inserts... We'll see how it goes.
    @Laurent... winks at the CYCLE thing Our sequence is (needless to say) declared as NOCYCLE and the datatype is large enough to hold MAXVALUE.

  • HT2498 If I use camera window to download my pictures to my computer, and then I copy and paste the pictures to iPhoto. Would I be ending up having the same pictures in two different files in my computer, and so wasting space in my hard drive?

    I recently bought a canon camera. The instructions of the camara recommend to use the canon software (camara window) to download pictures to my computer.  I would like to have my pictures in i-photo because it syncs them to my ipad.
    I want to download the pictures from my camera to camara window, and then drag and drop the pictures to i-photo. If I keep my pictures in both programs would I be wasting space in my computer hard drive by having the same pictures in two different files?

    Yes.
    Ignore the Canon software. It gains you nothing and adds complexity. Just use iPhoto for the lot.
    Regards
    TD

  • Is it possible to use the same Switch for two different clusters.

    I have 10g Rac setup on windows.
    Now I am planning to install 11gR2 on different servers.
    Is it possible to use the same Switch for two different clusters.

    user9198027 wrote:
    I have 10g Rac setup on windows.
    Now I am planning to install 11gR2 on different servers.
    Is it possible to use the same Switch for two different clusters.
    Yes.  Technically there will not be any conflict as long as the private addresses used by the 2 clusters do not collide, and provided that the switch's port capacity and bandwidth will not be exceeded.
    Your NA (netadmin) can also configure the switch to separate the 2 Interconnects from one another (called partitioning when using Infiniband) - if the switch supports such features.
    A major consideration is not to make the switch, public. That typically cause a range of problems and can have a serious impact on an Interconnect. But using 2 private networks on the same infrastructure should not have the same problems - if configured and implemented correctly.

  • How can i use the same id on two different laptops?

    When trying to use the same login on two different laptops so that i can connect my nook to either depending on which one is free, i get the error that the id is already in use on another computer?

    The issue is embedded in the way the software works.  To comply with the
    Digital Millenium Copyright Act of 2000, all software companies in this
    business keep track of where their software is installed, making
    information about the computer and ereaders part of an ID file.  So, your
    user ID is embedded in the ID file of each computer, but each computer has
    a different ID of its own that is also embedded in that file.  Adobe's
    master server (yes, there is one that you connect to even if you didn't
    know it) also has that information, and when you try to use an ID on one
    that's embedded in the file of another, Adobe's server blows the whistle,
    and as you can see, you can't do that....
    ==========

  • HT4528 Can I put the same information on two different i-phones with different numbers and different ID's?

    Can I put the same information on two different i-phones with different numbers and different ID's?

    Yes and no it really depends on what information you are putting on the devices.

  • Same dimension in two different fact tables

    Hi,
    I have one same dimension in two different fact tables. I would like to know how BI server choose the fact table when I do a request in this dimension.
    I know that is always using the same fact table, but I would like to know why choose this table and not the other.
    Thanks

    Sorry,
    But it doesn't seem to me.
    I reorded the tables in the BMM layer and it continues to use the same table, regardless this table is in last.
    After, I droped that table in the BMM layer and it continued to use the same.
    Thanks for your reply

  • Urgent ! Assigning (or Linking ) the same workbook into two different roles

    Hi Gurus,
    Coul you tell how to link the same workbook to two different roles.
    I am assigning the same workbook to two different roles, but in the second role the workbook is displaying with different structure than in the first role. I want the workbook should be displayed with same structure in both the roles.
    This is Urgernt.
    Thanks in advance.
    Best regards
    Hari

    Hello hari,
    Both the roles should diplay the same layout for a single workbook.
    please ensure that both the users(with these 2 roles) have similar (all the other)authorisations.
    it's possible that one of the users may have further restrictions in authorisations. check out for z-authorisation objects if any.
    hope it helps..
    thanks,
    (*Don't forget to Assign points on SDN)

  • Unable to monitor two databases with same name on two different hosts

    I have got two databases with same name on two different hosts. I added one database to the list of monitored databases. Now If I try to add the other one , I get the message that the database is already being managed.
    Can't we monitor two databases with same name on two different hosts?

    you can... while saving the target,give a different name.. for eg target-2

  • I am trying to store music for two different iPods on the same computer, against two different Apple IDs. When I try and download content from the Cloud I get an error message?

    I am trying to store music for two different iPods on the same Windows 8 computer, and when I try and download content from the Cloud I get an error message. Is it possible to have two different Apple IDs on the same computer?

    Unfortunately you've discovered too late how important it is to maintain an up-to-date backup of your iTunes library (and all other data of value).  You could, before wiping the drive, have considered making use of a commercial data recovery service that could (albeit at considerable cost) have extracted your library from the hard disk, even if virus infected.
    In the absence of that option, you will need to restore the content of your library from its original sources:
    Depending on your location, you may be able to re-download any iTunes Store purchases that are still available on the Store
    Likewise, most digital purchases from Amazon (including auto-rip copies of purchased CDs) should be available from the Amazon Cloud and via the Amazon Music application - the same may be true of other commercial sources for digital downloads
    Content imported from your CDs will have to imported again
    The specific situation that you describe regarding the music imported from your friend's external HDD suggests that either the source is badly organized and/or originates from a source other than iTunes (other media players may use alternative tags for information like artist, title, album, etc. that are not wholly consistent with how iTunes handle these).  Without details of the issues you're seeing it is difficult to suggest a remedy other than going through the media album-by-album, track-by-track, and correcting the inconsistencies.
    In the absence of a backup or access to the original library data there is no option other than painstakingly recreating your library as described above.  As you do so, you'll now realize how important creating and maintaining backups are - in my case I have at all times three separate duplicates of my library, in two different locations, where none is ever more than a week old compared to the content of my master library.

  • Collecting data from advantech-usb4704 with two different apps at the same time

    I wonder if I can access to Advantech-4704 with two different applications at the same time?
    I use this block in my vis.
    I have enough ports, but inputs are needed in completely different applications. Do I have to close one of them or can they run simultaneously?
    Thankyou!

    Dear gtu,
    as nathand said, usually it is not supported to access the same physical resource simultaneously from multiple programs. In case of DAQmx for instance, you will get an error message which says that the resource is already reserved. I suppose the same would happen with your driver, however it might be worth a try.
    One workaround could be however if you revise your applications and merge the codes if it is possible so that no concurent resource allocation takes place.
    Best Regards,
    Adam Cseh
    Applications/Systems Engineer
    National Instruments

Maybe you are looking for

  • FBL5N Layout issue

    FBL5N transactions do not display customer name, country, city information on line item level. However layout can be set up to display these columns, the columns are empty. SAP standard program has not recommended this functionality. Can anybody prov

  • K8N Neo4 Platinum, how to move MBR to sata (make it drive #1)?

    I am not sure I am phrasing the question correctly, so bear with me. I have a K8N Neo4 platinum with the SiI3114 controller and sata ports 4-8 (I believe its what they are calling PCB 1.x) with bios v1.D. I moved the board to another box and installe

  • TS4062 my computer is no longer recognised as authorized to sync with my ipod touch after win 8.1 update

    OK, I did a recommended upgrade from WIN8 to WIN8.1 - for those of you who havent and are considering it..DON'T!!!!!!!!!! Amongst other problems, the i tunes store stops working, I even uninstalled and re installed..nothing helped, i tunes opens and

  • Unacceptable delay in provision of BT broadband

    Warning, this is going to be a bit of a rant, but the whole story involves both BT phones and BT broadband. It all started with BT's Homemove facility. I have recently moved from North Wales to Northern Ireland. On 20th January whilst still living in

  • How to get full package path?

    Hi all. My program consists of 2 files: 1.) run.exe 2.) classes.zip The second (.zip) file contains java classes. How can I gain a full path to any package in this .zip file? I tried MyClass.class.getPackage().getName() but it returned only somethig