Adding "Wscript.echo" in place of Report.txt in VBS?

Hi, This script gets remote user's membership info and saves a report.txt as a result.
Can this code be changed with wscript.echo in place of Report.txt
I tried to change it but i couldnt :( Thank you in advance
Note: I am afraid Jrv responds or answers to me :(
strUsers = InputBox("Enter Username: ")
arrUsers = Split(strUsers, ",")
If strUsers <> "" Then
On Error Resume Next
Err.Clear
'("WScript.Network")
Set fs = CreateObject ("Scripting.FileSystemObject")
Set outFile = fs.CreateTextFile (".\Report.txt")
outFile.WriteLine "Active User's Membership"
For x = 0 to UBound(arrUsers)
arrUsers(x) = Trim(arrUsers(x))
If x = 0 Then
'outFile.WriteLine "USER: " & arrUsers(x)
Else
outFile.WriteLine " " & arrUsers(x)
End If
Next
outFile.WriteLine "==========="
For x = 0 to UBound(arrUsers)
Call getGroups(arrUsers(x))
Next
Wscript.echo "Check the Report (report.txt) File!"
Sub getGroups(strUser)
Set oNetwork = CreateObject("WScript.Network")
strDomain = oNetwork.UserDomain
On Error Resume Next
Set oUser = GetObject("WinNT://" & strDomain & "/" & strUser & ",user")
If Err.Number <> 0 Then
outFile.WriteLine strUser & " not found..."
Exit Sub
End If
Err.Clear
On Error Goto 0
outFile.WriteLine strUser & " - " & oUser.FullName
For Each strGroup In oUser.Groups
outFile.WriteLine "" & strGroup.Name
Next
End Sub
ElseIf strUsers = "" Then
WScript.Echo "Cancelled."
End If
\_(ツ)_/ twitter.com/serdaruzun

strUsers = InputBox("Enter Username: ")
arrUsers = Split(strUsers, ",")
If strUsers <> "" Then
On Error Resume Next
Err.Clear
WScript.Echo "Active User's Membership"
For x = 0 to UBound(arrUsers)
arrUsers(x) = Trim(arrUsers(x))
If x = 0 Then
'outFile.WriteLine "USER: " & arrUsers(x)
Else
WScript.Echo " " & arrUsers(x)
End If
Next
WScript.Echo "==========="
For x = 0 to UBound(arrUsers)
Call getGroups(arrUsers(x))
Next
WScript.Echo "Check the Report (report.txt) File!"
Sub getGroups(strUser)
Set oNetwork = CreateObject("WScript.Network")
strDomain = oNetwork.UserDomain
On Error Resume Next
Set oUser = GetObject("WinNT://" & strDomain & "/" & strUser & ",user")
If Err.Number <> 0 Then
WScript.Echo strUser & " not found..."
Exit Sub
End If
Err.Clear
On Error Goto 0
WScript.Echo strUser & " - " & oUser.FullName
For Each strGroup In oUser.Groups
WScript.Echo "" & strGroup.Name
Next
End Sub
ElseIf strUsers = "" Then
WScript.Echo "Cancelled."
End If
This is :)
\_(ツ)_/ twitter.com/serdaruzun

Similar Messages

  • HT4009 Not very user friendly! Where is the place to report a problem!? I have been billed for an in-app purchase but not had the goods - I received an error message telling my I hadn't been charged at the time and now it is on my bill! What can I do?

    Not very user friendly! Where is the place to report a problem!? I have been billed for an in-app purchase but not had the goods - I received an error message telling my I hadn't been charged at the time and now it is on my bill! What can I do?

    You can try contact iTunes support via this page : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

  • Adding a push button on the report toolbar

    adding a save button on the report toolbar, so that after clicking the button, the data fetched on the report will be stored in the application server.

    Hi
    to automate this process ,best way is to create a Z rport and there u can submit this sap standard report and get its output into an Internal table and then u can write this internal table to application server via following demo code -
    this is code for both (download /upload),u can not use CG3y and CG3z as u want to do it as a background job ..
    *& Report ZGILL_AS *
    REPORT ZGILL_AS message-id rp .
    tables: pa0001,pa0002.
    select-options s_pernr for pa0001-pernr no intervals MODIF ID XYZ.
    parameters: p_dwnld AS CHECKBOX ,
    p_upld AS CHECKBOX DEFAULT 'X'.
    parameters: P_DSNI(75) TYPE C MODIF ID ABG DEFAULT
    '/usr/local/sapdata/amit.dat' LOWER CASE.
    data: begin of itab occurs 0,
    pernr(8),
    sp1(1) value ',',
    werks(4),
    sp2(1) value ',',
    persg(1),
    sp3(1) value ',',
    persk(2),
    end of itab.
    data: s_eof(3).
    start-of-selection.
    if p_upld = 'X'.
    OPEN DATASET P_DSNI FOR OUTPUT IN LEGACY TEXT MODE.
    PERFORM FETCH_DATA.
    STOP.
    elseif p_dwnld = 'X'.
    OPEN DATASET P_DSNI FOR INPUT IN LEGACY TEXT MODE.
    IF SY-SUBRC NE 0.
    MESSAGE E016 WITH
    'Error opening seq. file, RC:' SY-SUBRC.
    EXIT.
    ENDIF.
    CLEAR S_EOF.
    DO.
    PERFORM FETCH_file.
    IF S_EOF EQ 'YES'. stop. ENDIF.
    ENDDO.
    endif.
    END-OF-SELECTION.
    if itab[] is not initial.
    perform print_file1 tables itab.
    else.
    write:/ 'No records exists'.
    endif.
    *& Form FETCH_DATA
    text
    --> p1 text
    <-- p2 text
    FORM FETCH_DATA .
    SELECT * FROM PA0001 WHERE PERNR IN S_PERNR.
    MOVE-CORRESPONDING PA0001 TO ITAB.
    TRANSFER ITAB TO P_DSNI.
    APPEND ITAB.
    ENDSELECT.
    CLOSE DATASET P_DSNI.
    ENDFORM. " FETCH_DATA
    *& Form FETCH_file
    text
    --> p1 text
    <-- p2 text
    FORM FETCH_file .
    READ DATASET P_DSNI INTO itab.
    append itab.
    clear itab.
    IF SY-SUBRC NE 0.
    S_EOF = 'YES'. EXIT.
    ENDIF.
    ENDFORM. " FETCH_file
    *& Form print_file1
    text
    -->P_ITAB text
    FORM print_file1 tables P_ITAB structure itab .
    write:/2 'EmpNo',
    14 'Personnel Area',
    34 'Emp Group',
    47 'Emp SubGroup'.
    skip 1.
    loop at p_itab.
    write:2 p_itab-pernr,
    14 p_itab-werks,
    34 p_itab-persg,
    47 p_itab-persk.
    skip 1.
    endloop.
    ENDFORM. " print_file1
    <b>Reward if usefull</b>

  • Added new key figure in the report

    Experts,
    I have added new key figure in the report .If i display this key figure value in the report it is populating correct value with ERROR(example 22.5 ERROR).The report is on the multiprovider .i have check the value for this in multiprovider it is populating correctly .There is no calculation in the report for this .While extracting in to report i am getting this. Help me to resolve this issue.
    Thanks
    Murali

    Hi,
    I have already created a formula like NODIM(Key field).that only i am using .
    and mapping I did in this way. I went to multiprovider and I have selected this key figure and right click and select (assign) then I have click on create proposal for all infoobjects option.
    Please suggest any thing need to do.
    I am sorry .I did not understand the lonterm solution suggested by you .what is UOM .Please tell me how to map.can you pls tell me clearly please
    Thanks
    Murali

  • Adding a stored Procedure to the Report

    Hi,
    I am developing a report using crystal plugin in eclipse.I have problems in adding a stored procedure to the report .I write the following command in SQL SCRAPBOOK dbo.StoredProcedure @Param1="param1",@Param2="param2",@Param3="None" and run it. It runs successfully ,but when i try to add it to report nothing is being added to it.
    I am using a Sybase database and driver(com.sybase.jdbc3.jdbc.SybXADataSource)
    Any suggestions regarding this would be of great help.
    Thanks in advance
    Siva
    Edited by: Siva_velicheti on Jun 1, 2010 12:10 PM

    Hmm, not sure about stored procedures, but you can get SQL queries to work like below....
    @method to get ResultSet from SQL query with user, pwd, and dbConnectionInfo
    @param query, scrollType, user, password, dbName, db
    @throws SQLException 
    @throws ClassNotFoundException
             private static ResultSet getResultSetQueryDBInfo(String query, int scrollType, String user, String password, String dbName, String db)
             throws SQLException, ClassNotFoundException
                  String DBUSERNAME =  user;
                  final String DBPASSWORD = password;
                  final String CONNECTION_URL = "jdbc:oracle:thin:@" + dbName + ":1521:" + db;
                  Connection connection = DriverManager.getConnection(CONNECTION_URL, DBUSERNAME, DBPASSWORD);
                  DatabaseMetaData meta = connection.getMetaData();
                  System.out.println("getResultSetQueryDBInfo - Connected to URL : " + meta.getURL());
                  System.out.printf("getResultSetQueryDBInfo - as user: %s\n", meta.getUserName() );
                  Statement statement = connection.createStatement(scrollType, ResultSet.CONCUR_READ_ONLY);
                  System.out.println("getResultSetQueryDBInfo method - executing query: \n");
                  return statement.executeQuery(query);

  • Wdfdevice.h is missing some wpp annotations. Where is the best place to report this?

    I am trying to use the WPP enum annotations in wdfdevice.h but found that many of the enums that are declared with CUSTOM_TYPE in wdftraceenums.h are not annotated with "begin_wpp enum" so the WPP generation step fails.  I'm actually
    building with WDK 1.9 but i checked the include files in 1.11 and 1.13 and they have the same issue.
    The following enums are not annotated in wdfdevice.h but listed in wdftraceenums.h:
    WDF_STATE_NOTIFICATION_TYPE
    WDF_POWER_POLICY_S0_IDLE_CAPABILITIES
    WDF_POWER_POLICY_S0_IDLE_USER_CONTROL
    WDF_POWER_POLICY_IDLE_TIMEOUT_CONSTANTS
    WDF_POWER_POLICY_SX_WAKE_USER_CONTROL
    WDF_POWER_DEVICE_STATE
    WDF_DISPATCH_IRP_TO_IO_QUEUE_FLAGS
    WDF_SPECIAL_FILE_TYPE
    WDF_DEVICE_IO_TYPE
    WDF_FILEOBJECT_CLASS
    WDF_DEVICE_FAILED_ACTION
    WDF_RELEASE_HARDWARE_ORDER_ON_FAILURE
    WDF_REQUEST_TYPE WDF_REQUEST_TYPE
    WDF_POWER_POLICY_IDLE_TIMEOUT_TYPE
    WDF_REMOVE_LOCK_OPTIONS_FLAGS
    Where is the "right" place to report this to MSFT?

    You are completely correct, It seems the CUSTOM_TYPE declarations in wdftraceenum.h are enough. The compile error I got was because I left a commented out line as one of the parameters to my TraceEvents call which apparently the preprocessor didn't like.
    Thanks,
    Eric

  • Whenever a change takes place (in report format) then trriger an email

    Hello Gurus/Seniors,
    Is there any way in OBIEE where I can put an alert in terms of any changes has taken place in report/dashboard/publisher report like (filter/column etc) then trigger an email about the same?
    It is more or less like change control/notification.....
    kindly enlighten me about the same and thanks in advance for your time and effort
    Thanks

    I dont think you can do that within BI. How about the same in other way like if there are new items in your webcat notify it using batch file or .sh script or any other way.
    Mark if helps, if you get thru with share your solution

  • Where's the best place to report a bug?

    I've found what I believe to be a solid, reproducible bug in ID CC 2014.
    Where is the best place to report this to Adobe?
    Allan

    Thanks so much!
    Allan

  • At first.Them credit card hack two card account lost, and no place to report its.

    4 time i was victims of fraud, as far its seen a 5 time is in progress now. Everywherey look i cant find place to report its, always the same technique. Your order good.They ship in your country, exp is 2000 kilometre from you home, to some strangerNot always the same name. But same post office. Time and money lost. At first.Them credit card hack two card account lost, and no place to report its. I don’t even no who are involve, certainly not the store them self, goshthou-sen of customers. I can believe its the seller, but some employer.How to report its. Whitout accusing the store(seler) them self. They’re something missingSome fraud is actually in progress, no place to report its untilsis too late,...  

    There are deadlines but you can open a Dispute about a transaction with eBay for 45 days.The Resolution Centre is at the bottom of this page. Your credit card information cannot be accessed if you paid by Paypal. They anonymize your financial information.However, you can open a Dispute about a transaction with Paypal through their Resolution Centre on the left side of your account page. If you believe your credit card has been stolen or otherwise compromised, call the 1-800 number on the back of the card. Explain your problem to the clerk. She will cancel your card and issue a new one.It is possible that she can reverse fraudulent charges to the compromised card. Since English is not your first language, it might be helpful to ask a friend to read and translate any information.  And whatever you are buying, stop. 

  • I have a Galaxy S5 with Global International plan in place. My txt to Jamaica are not being received there, but others are. Is there a setting in my phone I need turned on? Verizon customer service doesn't have any answers.

    I have a Galaxy S5 with Global International plan in place. My txt to Jamaica are not being received there, but others are. I can receive the messages, but not send. I get an msg saying, message to (my daughters number) failed: Network problem. Is there a setting in my phone I need turned on? Verizon customer service doesn't have any answers.

    Hello ffdaisy!  I sure hope you're having a great time in Jamaica! I'm so sorry about your messages. Let's get going on a resolution! to clarify, are you able to receive messages? Can you send to the states, but not to numbers originating in Jamaica?  First, I want to let you know how to get in touch with our Global Support Team while outside the US. Just click here for the information: http://vz.to/18oaptS   Second, I'd like to provide you with the dialing pattern for messaging to US numbers, and Jamaica nunbers. For the US, dial 1, then the area code, then the 7-digit number. for Jamaica numbers, dial area code 876, then the 7-digit number. For more information, click here: vzw.com/international   Thanks so much, and have a great trip! ChristinaB_VZW Follow us on Twitter @VZWSupport If my response answered your question please click the "Correct Answer" button under my response. This ensures others can benefit from our conversation. Thanks in advance for your help with this!!

  • How to Place the report in the WEB from Parameter Form

    Hello folks,
    We are using report 9i.
    From the one our form we are going call the report and get
    the parameter from Parameter form and generate the PDF format of report and show it in the WEB browser.
    Tried with option DesType "Cache" and Desformat "PDF" in the parameter form. It generates but does not show anything anywhere.
    But the following way it works. By calling from Browser directly and pass the parameter.
    /reports/rwservlet?report=Weekly_Status_3.rdf&userid=user/pass&destype=cache&desformat=pdf
    I would like to goto Parameter form, accept the values and generate pdf report and place it in the browser automatically.
    Suggestions please..
    Thanks,
    Senthil

    have paramform=yes added to your url, it will work.
    /reports/rwservlet?report=Weekly_Status_3.rdf&userid=user/pass&destype=cache&desformat=pdf&paramform=yes
    ideally all these can be set in a report server's config file cgicmd.dat.
    venkat

  • ProcessdpCommandEx error when adding or removing object from WebI report (based on BEX query) query panel object list

    Hi,
    We have WebI reports build on BEX using BAPI connectivity. When we are trying to add a object in query panel in a existing report we are getting this ProcessdpCommandEx error. But error does not appear when we add at the end of the list of objects already added.
    Can you calrify whether this could be some setting issue or it is a known bug?
    Can you share SAP Note No in case it is a known bug?

    Hi Avijit,
    This error occurs in case of any failure in the connectivity. It is like the data providers are not getting processed.
    You have mentioned that the issue does not come with newly created reports
    Are you creating new reports on migrated universe or a newly created universe?
    If issue only comes with migrated universe, please check if the connection has been migrated properly and required middleware and database connectors are in place.
    If connections are in place, try importing and exporting the universe once and check.
    In case, new report works fine with migrated universe, then you can simply try to re-point the universe by editing the query and can run it again and check.
    Regards,
    Yuvraj

  • Decimal places in report painter

    Hi experts.  I have a financial report written in report painter.  I want to show two decimal places on a single row.  The rest of the report is in whole dollars, but this one row is a percentage, so I want to show decimal places.  I know that you can format an entire column, but I can't figure out how to format a single row.  Can anyone help?
    Thanks
    Janet

    YES U CAN
    SAME AS ABOVE PROCEDURE
    BUT SELECT ROW INSTEAD OF COLUMN
    Edited by: Anil Kumar Potnuru on Feb 10, 2009 9:02 PM

  • Adding new column in an existing report which was build using Union

    While working in OBIEE 11g I encounter an issue.
    My existing report was build using UNION at Criteria Tab in Analysis. Now I have a requirement to add a new column into the same report. For each criteria I have added the new column but when I go back to the "Result Columns". I see a new field added but it is not allowing me to open or edit column properties for that new column & at the same time it is not allowing me to navigate to other tabs like Results, Promts, and Advanced.
    I don’t want to build this report from scratch. Is there any workaround to get it resolved?

    Hi,
    Just check it once the new added column data types are mismatched or not?
    and the new added column should be navigated into excluded section, so u should edit the report and dragged into the table column section.
    Thanks..

  • Adding a field to a crystal report in sap b1

    All I am trying to do is to add the field for credit limited to the standard item invoice in SAP 8.8,
    I have added the BP table OCRD and draged the creditline field to the layout, but when you view all the fields are empty.
    I obviously need to link somthing - I have excepted the links that are automatically completed by SAP.
    Can anyone point me in the right direction.
    Thanks
    Jo

    do a test report with just the table BP and see if the data is there.  
    If you see the data in the test report, than add the table you originally tried to link to. remove all the links that crystal has created and link it manually from the new table to the table BP. and run again. Once you get the link right, go back to your original report and fix the link.
    Autolinking in Crystal is not reliable  in fields linked and in the direction of the link.

Maybe you are looking for

  • Is there a way to make the Bing Translator Attribution to not float on a page and to place it in a specific location?

    I have found a way to place the widget TRANSLATE button in a specific place on a page however the the return from the translate method from the widget is placing the Attribution in the same location each time as well as making it floating meaning I c

  • How to set dynamic date in variant

    Hi, I'm going to create a variant for report RBDAPP01, I want to set the create on date dynamically, create on from should be one day before current day, to should be currently day, how to create this variant?

  • Bitmap images have grayscale settings

    I'm creating pdfs using Acrobat Standard 6.0 from Word documents. The documents contain images in color, grayscale and bitmap mode. For some reason the bitmap images in the final pdfs are not appearing as bitmaps but appear with the settings for the

  • Import Captivate .exe files

    By accident someone deleted my original captivate files. I only have my captivate .exe files. I need to update them. Is there any way to open the .exe files in captivate. Judy

  • What is home folder for disk diagnostic

    I started to run disk diagnostics for the first time to help me determine why every program I open is running so slowly, especially safari, and it asked me to choose my 'home folder" .  I don't know what it is asking for - what is my home folder?  Ap