How to make batch script to write in shared network directory ?

Home Forums Scripting General Scripting How to make batch script to write in shared network directory ?

Viewing 1 post (of 1 total)
  • Author
    Posts
  • Avatar
    albertwt
    Member
    #155097

    Hi All,

    I just wondering and would like to know if batch script can write the result of this powershell script into shared network drive ? [so that i can gather the result of the script in one single location]

    md %computername%
    cd %computername%

    ver > Evidence_Basic.txt

    wmic computersystem get Domain, Name >> Evidence_Basic.txt

    wmic service where state=”Running” get DisplayName, Caption > Evidence_Running.txt

    netstat -an | findstr /I “listen udp” | find /V “127.0.0.1” > Evidence_netstat.txt

    wmic startup list brief > Evidence_Start.txt

    ipconfig | findstr /C:”IP Address” >> Evidence_basic.txt

    reg query “HKLMSYSTEMCurrentControlSetControlTerminal ServerWinStationsrdp-tcp” | findstr /I “minencryptionlevel” > Evidence_reg_query_mine.txt

    wmic service where name=”EventLog” get Name, SystemName, StartMode, Status > Evidence_service_event.txt

    net time /querysntp >> Evidence_basic.txt
    [/CODE]

    any kind of help would be greatly appreciated.

    Thanks.[CODE]md %computername%
    cd %computername%

    ver > Evidence_Basic.txt

    wmic computersystem get Domain, Name >> Evidence_Basic.txt

    wmic service where state=”Running” get DisplayName, Caption > Evidence_Running.txt

    netstat -an | findstr /I “listen udp” | find /V “127.0.0.1” > Evidence_netstat.txt

    wmic startup list brief > Evidence_Start.txt

    ipconfig | findstr /C:”IP Address” >> Evidence_basic.txt

    reg query “HKLMSYSTEMCurrentControlSetControlTerminal ServerWinStationsrdp-tcp” | findstr /I “minencryptionlevel” > Evidence_reg_query_mine.txt

    wmic service where name=”EventLog” get Name, SystemName, StartMode, Status > Evidence_service_event.txt

    net time /querysntp >> Evidence_basic.txt
    [/CODE]

    any kind of help would be greatly appreciated.

    Thanks.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.