List services as colums

hi
i'm using this code from this forum https://social.technet.microsoft.com/Forums/windowsserver/en-US/75b3dcde-af1e-4d87-9eff-ce923b090ef8/get-services-from-remote-computers
$array = @()            
foreach($i in (gc c:\computers.txt)) {            
 $svc = Get-Service winrm -ComputerName $i -ea "0"            
 $obj = New-Object psobject -Property @{            
  Name = $svc.name            
  Status = $svc.status            
  Computer = $i            
 $array += $obj            
$array | Select Computer,Name,Status | FT -AutoSize
this  works fine for multiple computers and one servic but how can i verify 3 services at time...i'm loking to achieve this:
server service1
service2 service3
server1 Running
running stoped
server2 Running
stoped running
server3 Running
running running
thanx 

I won't engage in futile discussions with you, since you only seem to read what small parts of what people write and draw your own conclusions from it, but I will say that your answer is not what the OP asked for. He wants the service name to be a column
with the state as rows under it, not the name of the service as rows under a column named "Name"
It is a pity you use your skills to pluck holes into the work of others, instead of using them to help the community, which is what the purpose of these forums are about.
You may keep trying to destroy this community, but I will keep helping it.
Once more, your code screws up other's computers. The only futile thing is your decision not to warn the OP about the rubbishell quality of your code, mixing data of a service with data from another service, making the data from your rubbishell code
completely useless!
If you keep posting code with rubbishell quality, you'll destroy all community's computers.
If the OP uses your rubbishell code, it may lead to disastrous consequences.
=> at the OP:
Here's a PowerShell code that does exactly what you want:
$computers=$env:COMPUTERNAME,'.'
$services='wuauserv','alg','dnscache','spooler'
$servicesData=gsv $services -ComputerName $computers
$(
foreach ($group in $servicesData|group machinename){
$obj=[pscustomobject]@{Machine=$group.Name}
foreach ($service in $group.group){
$obj|Add-Member $service.name $service.status
$obj
)|ft -AutoSize
Notice:
1- you enter the services names in only one place!
2- all data is held in one variable; which means you can opt to show the data in another format without having to query the data all over again!
3- the professional coding style ( the other can only be qualified as rubbishell quality code)

Similar Messages

  • Regd attachment list service

    Dear all,
    I am using Integrated ITS 640 .Basis support pack is 18 . When i try to view the attachments in ME23N tran by clicking the obect service menu >> Attachment list, i am getting attachment list service popup screen for the PO but the screen is blank. When i do the same thing in R/3 GUI i am able to see the attachments for the same PO i checked thru ITS.
    Please help me in this regard.
    Thanks
    Vasu

    Hello Vasu,
    This should have been resolved using the same JVM as previously mentioned in your other message (note 980772).  If it was not then it may be a good idea to open a support message for further assistance.  You can also have the JVM window open and start the log/trace so that more information is available.
    Edgar
    Message was edited by:
            Edgar Chuang

  • Failing "List Services Information" Cluster validation test

    Hi
    I'm building a 2 node Windows 2008 SP2 Cluster. I've setup the SAN Disks, NIcs etc and am running the cluster validation tests. However this always fails on the "List Services Information" Test with the following error statement:
    "An error occurred while executing the test. There was an error getting information about the running services on the nodes. There was an error retrieving information about the Services from node '<Server FQDN>'. Object reference not set to an
    instance of an object.
    Note: I replaced the actual server fqdn with <Server FQDN>
    Any help is appreciated.
    Thanks

    Hi,
    I know it is not a SQL cluster but you could still have a try with steps below as a workaround. See:
    http://support.microsoft.com/kb/953748/en-us
    •For an integrated failover Add-Note setup, run the following command on each node that is being added:
    Setup /SkipRules=Cluster_VerifyForErrors /Action=InstallFailoverCluster
    •For an advanced or enterprise installation, run the following command:
    Setup /SkipRules=Cluster_VerifyForErrors /Action=CompleteFailoverCluster
    •If you receive this validation failure when you add a node to an existing failover installation, run the following command on each node that is being added:
    Setup /SkipRules=Cluster_VerifyForErrors /Action=AddNode
    TechNet Subscriber Support in forum |If you have any feedback on our support, please contact [email protected]

  • Trouble with Integrating The Lists Service

    I have managed to integrate the lists service but, I can't save anything I do and anytime I do anything with the lists service I get this message. An error occurred accessing the WebCenter repository.
    When I start up the app I get:
    Error code 942: table or view does not exist
    Call: SELECT * FROM (SELECT /*+ FIRST_ROWS */ a.*, ROWNUM rnum  FROM (SELECT ACTIVITY_ACTOR_DETAIL_ID AS a1, STATUS AS a2, DEPARTMENT AS a3, APPLICATION_ID AS a4, ENTERPRISE_ID AS a5, VERSION AS a6, EMAIL AS a7, ACTOR_ID AS a8, MANAGER_ID AS a9, DISPLAY_NAME AS a10, UPDATED_ON AS a11, ACTOR_NAME AS a12, JOB_TITLE AS a13 FROM WC_AS_ACTOR_DETAIL WHERE (ACTOR_ID = ?)) a WHERE ROWNUM <= ?) WHERE rnum > ?
         bind => [C67208F0F21611E18F6D0FE5FA5B26A4, 1, 0]
    Query: ReadAllQuery(name="WcAsActorDetail.findActorByActorId" referenceClass=WcAsActorDetail sql="SELECT * FROM (SELECT /*+ FIRST_ROWS */ a.*, ROWNUM rnum  FROM (SELECT ACTIVITY_ACTOR_DETAIL_ID AS a1, STATUS AS a2, DEPARTMENT AS a3, APPLICATION_ID AS a4, ENTERPRISE_ID AS a5, VERSION AS a6, EMAIL AS a7, ACTOR_ID AS a8, MANAGER_ID AS a9, DISPLAY_NAME AS a10, UPDATED_ON AS a11, ACTOR_NAME AS a12, JOB_TITLE AS a13 FROM WC_AS_ACTOR_DETAIL WHERE (ACTOR_ID = ?)) a WHERE ROWNUM <= ?) WHERE rnum > ?")But when I run this query
    Select * from all_objects
    where object_type in ('TABLE', 'VIEW')
    AND object_name = 'WC_AS_ACTOR_DETAIL';It finds the table
    OWNER                          OBJECT_NAME                    SUBOBJECT_NAME                 OBJECT_ID              DATA_OBJECT_ID         OBJECT_TYPE         CREATED                   LAST_DDL_TIME             TIMESTAMP           STATUS  TEMPORARY GENERATED SECONDARY NAMESPACE              EDITION_NAME                  
    DEV1_WEBCENTER                 WC_AS_ACTOR_DETAIL                                            75853                  75853                  TABLE               17-SEP-12                 17-SEP-12                 2012-09-17:11:36:23 VALID   N         N         N         1                                                    
                                                      What am I doing wrong? Did I forget to do something or did I not do something right?
    Edited by: beachw08 on Sep 18, 2012 6:32 AM
    Edited by: beachw08 on Sep 18, 2012 8:18 AM
    Edited by: beachw08 on Sep 18, 2012 8:52 AM

    Yes I did that. I have a connection to the database and I have the WebCenter schema installed on my database. I don't understand why it can't find the table, I can find the table. Also do I have to use spaces or can Framework use lists?
    Edited by: beachw08 on Sep 19, 2012 8:35 AM
    Edited by: beachw08 on Sep 19, 2012 8:46 AM

  • Address list service failed to respond error on Exchange 2007 (after adding first 2013 server)

    Hi,
    We just installed an Exchange 2013 server within an Exchange 2007 environment.
    The Exchange 2013 (CU6) server will be used to setup a hybrid connection with O365, and move mailboxes to O365.
    After installing the Exchange 2013 server it isn't possible anymore to create/enable mailboxes on the Exchange 2007 server.
    We end up with an error :
    Mig1 TestAccount
    Failed
    Error:
    The Exchange server address list service failed to respond. This could be because of an address list or email address policy configuration error.
    Exchange Management Shell command attempted:
    Enable-Mailbox -Identity 'domain.be/customer/TEMP/Mig1 TestAccount' -Alias 'mig1' -Database 'Exchange2007\SG01\DB02'
    When executed via EMS we receive this error :
    The Exchange server address list service failed to respond. This could be because of an address list or email address policy configuration error

    Hi Lyncer
    This error can be caused if the default Public Folder Database not being pointed to the exchange 2007 database which you are trying to create a new mailbox.
    Also it can happen if System Attendant service is not running.
    Troubleshooting steps:
    1) Restart the System Attendant Service 
    2) Point the affected database to the default public folder
    Follow the below steps to do that 
    Open EMC
    Go to Organization Configuration > Mailbox.
    Select the mailbox database that you want to change the default public folder database.
    Right click the database and select properties
    In <Mailbox Database Name> Properties, click the Client Settings tab.
    Next to the Default public folder database box, click Browse.
    In Select Public Folder Database, select the public folder database from the list of public folder databases, and then click OK.
    Cheers!!!
    Remember to mark as helpful if you find my contribution useful or as an answer if it does answer your question.That will encourage me - and others - to take time out to help you Check out my latest blog posts on http://exchangequery.com Thanks Sathish
    (MVP)

  • Using Reading List service with Twitter rather than Read It Later?

    Hello, when using twitter, there is the option to 'save' links to services such as 'Read It Later/Instapaper'. However, I don't see how to do the same but using Apple's own Reading List service. Seeing the Twitter is integrated into iOS I am a little surprised by this. Am I missing something here?
    Thxs,

    Hi,
    Is function mike_get_dir_list in your app parsing schema?
    If not, you should grant execute privilege to function on your app parsing schema and
    1. create synonym to app parsing schema
    or
    2. use schema qualifier in query
    Regards,
    Jari
    My Blog: http://dbswh.webhop.net/htmldb/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai

  • I need s:list display 2 colums item, like mx:tilelist.

    RT,
    How can I do, I need 2 colums item,  I write itemrenderer, set some properties, but it's not work.
    I want s:list like mx:tilelist.
    Please help me.
    code is here:
          c2.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/halo" minWidth="1024" minHeight="768">
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
            <mx:CurrencyFormatter id="currFormatter" precision="2" />
        </fx:Declarations>
        <s:layout><s:BasicLayout /></s:layout>
        <fx:Script>
            <![CDATA[
                import mx.collections.ArrayCollection;
                public var  myar:ArrayCollection = new ArrayCollection(
                [{name:"The",   price:"0.23"},
                {name:"quick", price:"1.03"},
                {name:"brown", price:"0.98"},
                {name:"fox",   price:"1.19"},
                {name:"jumps", price:"0.28"},
                {name:"over",  price:"0.42"},
                {name:"the",   price:"0.09"},
                {name:"lazy",  price:"0.81"},
                {name:"dog",   price:"0.72"}]
                private function comboBox_labelFunc(item:Object):String {
                    return item.name + "\t" + currFormatter.format(item.price);
            ]]>
        </fx:Script>
        <s:List id="comboBox"
            itemRenderer="TabItemRenderer"
            horizontalCenter="-157"
            verticalCenter="-124"
            width="250"
            height="500"
             dataProvider="{myar}"
            >
        </s:List>
    </s:Application>
    tabItemRenderer.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
                    xmlns:s="library://ns.adobe.com/flex/spark"
                    xmlns:mx="library://ns.adobe.com/flex/halo"
                    xmlns:fxg="http://ns.adobe.com/fxg/2009">
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <s:layout><s:BasicLayout /></s:layout>
            <mx:Tile   direction="horizontal" autoLayout="true" tileWidth="100" tileHeight="50" horizontalGap="0"  >
                <s:Button  label="{data.name}" width="100%" height="100%"  />
            </mx:Tile>
    </s:ItemRenderer>
    this only one colum.
    please!!!!

    I know it.
    in c2.mxml change to:
    <s:List id="comboBox"
            itemRenderer="TabItemRenderer"
            horizontalCenter="-157"
            verticalCenter="-124"
            width="250"
            height="500"
             dataProvider="{myar}"
            >
           <s:layout>
                <s:TileLayout requestedColumnCount="2" />
            </s:layout>
        </s:List>
    add s:layout here.
    and tabItemRenderer.mxml, delete mx:Tile.
    set s:TileLayout  requestedColumnCount = 2.
    and ,it's working.

  • In Attachement List Services for Objects White Screen when I Display a Note

    Hi Expert,
    Need your assistance.
    I am trying to view a note in Vendor Master data but no information provided and I can only see white screen. Below are the steps that I performed:
    1. Go to FK03
    2. Open a Vendor
    3. Click the Services for Objects
    4. Attachement List
    5. Select a Note
    4. Display it
    5. Pop up window appreared and no information occurred. Only White screen
    Is there's a missing configuration, plugin, or data in my SAP system/workstation?
    I tried to login to other PC and it worked.
    Just wondering what is missing on my computer.
    Your response will be helpful.

    Hey,
    I have the exact same problem as you have described. I also used my ipod as a watch but starting from today, whenever I unlock it the screen turns white until a reset is done. Even a factory reset through itunes didn't fix it.
    Have you found any solution?
    Bah, this is annoying.
    //Gubbar

  • Problems while uploading Task List - Service Pack with LSMW

    We are trying to upload General Maintenance Task List using LSMW. We are using Standard Batch/Direct Input method with Object 0490.
    We need to upload task list header, operations, maintenance pack, component and service pack for operations.
    We have created separate files containing data for different structures and they are linked using Group, group counter and operation number according below
    Header
    |----Operations
    .......... |----Long Text
    ..........|----Maintenance Pack
    ..........|----Components
    ..........|----Service Pack
    We have multiple operations per task list and multiple services per operation. The service pack is required only for a specific control key - PM03.  As per the configuration this screen (PROGRAM - SPLMLSP, Screen Number - 0200) is accessible only when the value PM03 is entered in the operation. We are able to upload all other details except service pack details. We have tried using structure IBIPBDCD for the same.
    While uploading the task list in foreground, when control key is entered as PM03 in an operation, service pack screen is displayed with error u201CNo batch input data for screen SAPLMLSP 0200u201D. The data provided in structure IBIPBDCD does not get processed at this time.
    On exiting the screen using back button, the data in IBIPBDCD structure is passed incorrectly to fields in screen 3400 (SAPLCPDI)
    Are we doing something incorrect? Is there a way to use this standard functionality to upload task lists with service packs?
    Thanks
    Edited by: jvalitp on Dec 15, 2011 12:46 PM

    Hi,
    When loading the tasklists you need to define a source structure as per the IBIP structure. You have different levels for example level 1 - header then below that level 2 - Operations, Header Long text then below that you have level 3 - Operation Long text, Operation Package assignments, operation component allocation.
    For each of these levels you need an identifier that links then together. In your source file specify identifier 1 for header, Identifier 1 and Identifier 2 for operations, identifier 1 identifier 2 and identifier 3 for packages. This way the system can create the correct structure when it reads the data from the text file.
    The identifiers are numeric and will dissapear once the files are loaded. specify then in the source structure as 2 characters and remember to set the xcel file up to have a 2 character field.
    For the header file each line will be a new identifier 1,2,3,etc.
    The operations are assigned to the header and have 2 identifiers. The first corresponds to the header identifier the next is a sequential number stating at 1 and incrementing for each line e.g Header 1 op 1, header 1 op 2, header 2 op 3, header 2 op 4, header 2 op 5 (this would be 2 header records. The first with 2 operations on it the second with 3 operations)
    The package is assigned to the operation and as such needs to have a third identifier. Header (identifier 1), Operation (identifier 2), Package (identifier 3) Example Header 1 op 1 pack 1, header 1 op 2 pack 2, header 2 op 3 pack 3, header 2 op 4 pack 4, header 2 op 5 pack 5
    I have a loading file for each of the items i.e. Header file, Operation file, maintenance package file. This is then assigned to the respective source structure.
    Regards,
    ravi

  • Cluster Creation Validation Error - List Services

    Good Afternoon All,
    I am setting up a simple two node Windows 2008 SP2 Failover cluster.  The nodes are brand new and patched with all updates.  Having gone through this process many times before I was confident it would be quick and painless.  However I am getting
    the following validation error that I have never seen before:
    An error occurred while executing the test. There was an error getting information about the running services on the nodes. There was an error retrieving information about the Services from node 'Node.domain'. Object reference not set to an instance of an
    object
    I'm at a complete loss as to where to start.  If the task is to simply obtain a list of running services I would have thought that would be relatively straight forward.  A simple Get-Service from Powershell will display those details.  I have
    located a KB article that refers to this exact error and there is a hotfix available but this is strictly for Windows 2008 R2 not R1 (SP2).
    http://support.microsoft.com/kb/2559392
    Has anyone seen this error before?

    Hi valleydoofer,
    This error some time occur when you installed Powershell 3, please try to uninstall Powershell 3 from the nodes then rerun the validation.
    More information:
    Install and Configure Windows PowerShell
    http://msdn.microsoft.com/en-us/library/cc952756(v=exchsrvcs.149).aspx
    Best Regards,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • List service notifications web service

    I'm not sure where to put this question - so I thought I would try here
    We use service notifications.  These are created through transaction IW51 and listed through IW58/IW59.
    We have Microsoft Share Point as well.
    The Share Point people are asking me - is there a web service or some existing SAP function to download the service notifications in XML so that they can load it into Share Point and produce some reports there.
    I am not good yet at finding existing web services in SAP.
    I searched through here:  http://esworkplace.sap.com.
    I also searched SDN and did a little debugging in IW58/IW59.
    I also looked at SICF and SOAMANAGER.
    I know how to create a web service and deploy it.
    I have not been successful in finding existing SAP web services that may be there just not activated.
    Any help on finding out where this might exist (if it does) - and also some help on how to find things like this in the future would be appreciated.
    I get questions like this periodically from other groups asking if a web service already exists to download infromation from SAP and I haven't figured out how to find where they might exist.
    Thanks.
    Scott Overmeyer

    You can retrieve the versions from the history option and re-generate it.

  • List service tickets and activities by Business Partner

    Does anyone know of a function / BAPI that can be passed Business Partner ID and list all Service Tickets and activities associated with it.  Many thanks

    The only FM I found list the order guids and is CRM_BUPA_READ_ORDER_OBJECTS.
    I would advise you to pass the date from and to as well, else this might create performance problems.

  • Limitation List Services Bluetooth Low Energy Central

    I have a central application (C #) that consume a Peripheral application services Bluetooh Low Energy (BLE). From the peripheral application services 100 are provided. But in Central application (Windows) only 40 services are listed. This is a technical
    limitation of Bluetooth Low Energy (BLE) layer of Windows? Has anyone experienced this?

    Might try them over here.
    Windows Desktop Dev on MSDN
    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]
    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

  • Script to list services on servers running as a particular id

    does anyone know of  a script that i can run which will list all services on all of our servers running under a specfiic id, for example any services running domain\userX
    thx,
    jason

    Hi Jason,
    Please refer to Dave’s suggestion and check if can help you.
    In addition, based on your description, this issue seems to be more related to Script. I suggest that you would
    post the question in
    The Official Scripting Guys Forum or
    PowerShell Forum. I believe we will get a better assistance there.
    Best regards,
    Justin Gu

  • List Service Restored

    The Subject says it all. No need to reply.
    Thanks,
    Supportcuenet.com
    http://www.cuenet.com Infocuenet.com
    -= At the speed of the Internet =-

    I am sorry to hear about the service outage. We can check on the status for you. I have sent you a private message to get more information.
    Anthony_VZ
    **If someones post has helped you, please acknowledge their assistance by clicking the red thumbs up button to give them Kudos. If you are the original poster and any response gave you your answer, please mark the post that had the answer as the solution**
    Notice: Content posted by Verizon employees is meant to be informational and does not supersede or change the Verizon Forums User Guidelines or Terms or Service, or your Customer Agreement Terms and Conditions or plan

Maybe you are looking for

  • Is there a way to restore an iPod to its factory condition?

    Since the last updater, I havnt been able to connect my iPod to any computer. Im sure the updater corrupted the iPod, so what I would like to do is wipe the iPod clean and start fresh with the factory settings. I know you can restore it using the upd

  • DHTML Support in Portal

    <body class="prtlBody" xmlns:sap="urn:http://schemas.sap.com/SAP.Web.UI.Controls"> <STYLE>LI {behavior:url(irjportalappsSAP.PDK.Samples.ClientSideEventsCSscriptshilite.htc)} </STYLE> Mouse over the two list items below to see this effect. <UL> <LI>DH

  • Can't remember my password to sign in to Mac mini

    Help. I can't sign into my Mac mini. Nothing comes up. No menu. Nothing. I have forgotten my password. And have lost my disc. I don't know what to do

  • Property Inspector Help Please!!

    I am running Dreamweaver MX Educator version in OSX 10.4.7 - everything works - except I am unable to get the full display in property inspector - I don't have the ability to center tables. What's up? And how do I fix? Thanks, Steve

  • I've remapped the Function key to show desktop, can't undo.

    As the title says, I remapped this key to the show desktop feature. Now when I want to use the function keys I have to use them blind as the windows disappear when I try to use it! I've reset all keyboard shortcuts in Keyboard. I've made sure that "s