Script to list Hyper-v CSV disks and their LUNs

Hi all
I am getting to grips with powershell now but one thing i am struggling to do is create a script that will query CSV's volumes and show their SAN volume LUNs.
Have searched frantically and pieced together something, which uses two WMI queries to gather the information and then use the signature to match them up. However, some CSVs do not come back with a signature. 
Now surely to match a CSV with the corresponding physical disk and thus its LUN should be easy. Looks like lots of people have tried to crack this with WMI queries and even using diskpart. But their has to be an easy way. We are running 2012 Hyper-v
and 2012 R2 clusters. So a solution for either platform would be good.
Thanks

Hi Chris Ryan,
To get the CSV and their LUNs , you can start the
Failover Clusters Cmdlets  in powershell, please check the script below:
Getting More Information About You Cluster LUN’s
Best Regards,
Anna

Similar Messages

  • How can I use PowerShell 3.0 cmdlets or script to list all the local groups and local users of a server?

    Using PowerShell 3.0 (And if possible the CIM, not WMI cmdlet), how can I script with | out-file C:\<filename>.txt or .csv option to list all local user accounts & local groups
    on remote computers? 
    Thank You!

    I don't recall PowerShell V3 introducing anything new to handle local users and groups. You need to use PowerShell V1 methods, using the [ADSI] accelerator and the WinNT: provider. The scripts linked above show this. No need to use WMI (which would probably
    be slower).
    Here is a script I've used to enumerate all local groups and their members:
    $Computer
    = "MyServer"
    $Computer =
    [ADSI]"WinNT://$Computer"
    $Groups =
    $Computer.psbase.Children | Where {$_.psbase.schemaClassName
    -eq "group"}
    ForEach ($Group
    In $Groups)
        "Group: "
    + $Group.Name
        $Members
    = @($Group.psbase.Invoke("Members"))
        ForEach ($Member
    In $Members)
            $Class
    = $Member.GetType().InvokeMember("Class",
    'GetProperty', $Null,
    $Member, $Null)
            $Name
    = $Member.GetType().InvokeMember("Name",
    'GetProperty', $Null,
    $Member, $Null)
            "-- Member: $Name ($Class)"
    A similar script to enumerate all local users would be:
    $Computer
    = "MyServer"
    $Computer =
    [ADSI]"WinNT://$Computer"
    $Users =
    $Computer.psbase.Children | Where {$_.psbase.schemaClassName
    -eq "user"}
    ForEach ($User
    In $Users)
        "User: "
    + $User.Name
    Richard Mueller - MVP Directory Services

  • Script Task to Create a ".CSV" file and save it on SFTP.

    I have a sql query that is being pulled from a variable. Using this variable I want to create a .csv and save it on SFTP. I do not want to use any third party tools. I really appreciate if anyone can help me with the code. I do not know coding.  

    The solution Visakh has provided still requires third-party tool. And the proposed tool is not integrated in SSIS.
    For a better alternative I would recommend the commercial COZYROC
    SFTP Task. It is completely integrated in SSIS and very similar to the standard FTP Task.
    SSIS Tasks Components Scripts Services | http://www.cozyroc.com/

  • SQL 2014 CSV Disks and SCOM Technical Preview

    i'm trying to install system center technical preview on SQL 2014 using CSV but the setup cannot access the cluster name\c$ which has the clusterstorage mount points for CSV
    setup can detect the data and log paths "c:\clusterstorage\volume1\mssql12.mssqlserver\mssql\data\ but unable to create the database in that location
    Hesham Mousa

    Hi Hesham,
    Since the issue is more related to SCOM, I recommend you post the question in the
    System Center - Operations Manager forums. It is appropriate and more experts will assist you.
    Thanks,
    Lydia Zhang
    Lydia Zhang
    TechNet Community Support

  • Is there a way of getting a list of upcoming alerts/alarms and their times?

    I'd like to get a list of alert times, so that I can see if I have any that will be going off in the middle of the night!
    Many months back, I purged those pesky midnight alerts by scrolling through week by week and looking for the all-day events and checking each one. It was a chore.
    Now, due an odd synching issue between iCal and an app, I'm a tad concerned that some late night alerts may have been set, or PMs may have changed to AMs, or other oddities introduced. I'd like to scan a list of alerts for the next several months to ensure that none are set to go off during the sleeping hours!
    Just browsing events (say week by week) doesn't help me because they could have alerts set for all sorts of different times (or no alerts at all). If there isn't a way of listing the alerts, then I'll have to go through each individual event/to do to check its alert and time-- and there are hundreds!
    Hope this makes sense.

    Try this in Script Editor - the list of alarms will be in the result pane.
    AK
    click here to open this script in your editor<pre style="font-family: 'Monaco', 'Courier New', Courier, monospace; overflow:auto; color: #222; background: #DDD; padding: 0.2em; font-size: 10px; width:400px">tell application "iCal"
    set Alarming to ""
    set MyCalendars to every calendar where writable of it is true
    repeat with ThisCal in MyCalendars
    set MyEvents to events of ThisCal
    repeat with ThisEvent in MyEvents
    repeat with ThisAlarm in (display alarms of ThisEvent) & (sound alarms of ThisEvent)
    set AlarmTime to (start date of ThisEvent) + (trigger interval of ThisAlarm)
    set GotOne to ((name of ThisCal) & ": " & (summary of ThisEvent) & ": " & (start date of ThisEvent as string) & " alarm " & trigger interval of ThisAlarm as string) & " minutes."
    set Alarming to Alarming & GotOne & return
    end repeat
    end repeat
    end repeat
    end tell
    Alarming
    </pre>

  • Exporting a list of a full VIs and their path in a hierarchy

    I would like to know if there is a way to display a full list of VIs hierarchy with their path along and to export that window to a standard jpeg or another data base.
    The current dispay of Labview 2009 has two forms of charts and not list.
    I thought to use that feature for documentation purpose as well.

    pini wrote:
    [..]The current dispay of Labview 2009 has two forms of charts and not list.[..]
    Are you referring to the "VI Hierarchy Window"?
    I have a hard time to see a general purpose of "a list" regarding call hierarchy display. The reason:
    How should it look like if a subVI is called by more than one caller?
    How is the list structured (tree, flat, ...)?
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • ADFS - SmartLinks - Is there a list of all 'LoginOptions' values and their meaning

    I am crafting a smartlink for ADFS signin to SharePoint online (MySite).
    I can find details on LoginOptions = 1 (Keep me signed in) and = 3 (Don't), but specifically
    What does value = 2 mean?
    and are there any others?
    Boz

    I would recommend asking them here: http://community.office365.com/en-us/f/613.aspx
    This posting is provided AS IS with no warranties or guarantees , and confers no rights.
    Ahmed MALEK
    My Website Link
    My Linkedin Profile
    My MVP Profile

  • Displaying a list of Portal users connected and their connection time

    We are using Portal version 10.1.2.0.2 and I cannot find in App Server Control (EM Website) how I can track the number of users connected to my portal site as well as their connection time. Are there reports available that will provide the requested information?
    Can anyone tell me what other reports are available in this version of Portal that would be useful to an administrator of a portal site?
    Thank you,
    Denise

    select attrvalue as id from ods.CT_UID
    give that a burl

  • Import group members those are inactive more than 30 days to a csv file and then send the updated list by email

    Hello,
    I am very new to powershell and I have been looking for a solution where I can list all the inactive members more than 30 days from  particular groups in AD, export the updated list to a csv file and send the file by email . . Can someone help me on
    this?
    thanks

    Hi,
    Take a look at Get-ADGroupMember, Get-ADUser, Export-Csv, and Send-MailMessage:
    http://ss64.com/ps/get-adgroupmember.html
    http://ss64.com/ps/get-aduser.html
    http://ss64.com/ps/export-csv.html
    http://ss64.com/ps/send-mailmessage.html
    Let us know if you have any specific questions.
    Don't retire TechNet! -
    (Don't give up yet - 13,085+ strong and growing)

  • Getting list of all users and their group memberships from Active Directory

    Hi,
    I want to retrieve a list of all the users and their group memberships through JNDI from Active Directory. I am using the following code to achieve this:
    ==================
    import javax.naming.*;
    import java.util.Hashtable;
    import javax.naming.directory.*;
    public class GetUsersGroups{
         public static void main(String[] args){
              String[] attributeNames = {"memberOf"};
              //create an initial directory context
              Hashtable env = new Hashtable();
              env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
              env.put(Context.PROVIDER_URL, "ldap://172.19.1.32:389/");
              env.put(Context.SECURITY_AUTHENTICATION, "simple");
              env.put(Context.SECURITY_PRINCIPAL, "[email protected]");
              env.put(Context.SECURITY_CREDENTIALS, "p8admin");
              try {
                   // Create the initial directory context
                   DirContext ctx = new InitialDirContext(env);     
                   //get all the users list and their group memberships
                   NamingEnumeration contentsEnum = ctx.list("CN=Users,DC=filenetp8,DC=com");
                   while (contentsEnum.hasMore()){
                        NameClassPair ncp = (NameClassPair) contentsEnum.next();
                        String userName = ncp.getName();
                        System.out.println("User: "+userName);
                        try{
                             System.out.println("am here....1");
                             Attributes attrs = ctx.getAttributes(userName, attributeNames); // only asked for one attribute so only one should be returned
                             System.out.println("am here....2");
                             Attribute groupsAttribute = attrs.get(attributeNames[0]); // memberOf
                             System.out.println("-----"+groupsAttribute.size());
                             if (groupsAttribute != null){
                                  // memberOf is a multi valued attribute
                                  for (int i=0; i<groupsAttribute.size(); i++){
                                  // print out each group that user belongs to
                                  System.out.println("MemberOf: "+groupsAttribute.get(i));
                        }catch(NamingException ne){
                        // ignore for now
                   System.err.println("Problem encountered....0000:" + ne);
                   //get all the groups list
              } catch (NamingException e) {
              System.err.println("Problem encountered 1111:" + e);
    =================
    The following exception gets thrown at every user entry:
    User: CN=Administrator
    am here....1
    Problem encountered....0000:javax.naming.NamingException: [LDAP: error code 1 -
    000020D6: SvcErr: DSID-03100690, problem 5012 (DIR_ERROR), data 0
    ]; remaining name 'CN=Administrator'
    I think it gets thrown at this line in the code:
    Attributes attrs = ctx.getAttributes(userName, attributeNames);
    Any idea how to overcome this and where am I wrong?
    Thanks in advance,
    Regards.

    In this sentence:
    Attributes attrs = ctx.getAttributes(userName, attributeNames); // only asked for one attribute so only one should
    It seems Ok when I add "CN=Users,DC=filenetp8,DC=com" after userName, just as
    userName + ",CN=Users,DC=filenetp8,DC=com"
    But I still have some problem with it.
    Hope it will be useful for you.

  • Get the list of reports and their ODBC details

    Hi :
    We have around 20,000 objects hosted on our BOXI R2 SP3 environment. May be around 17000 of these are reports. I have a few questions >>
    1. Is their a way to get the list of all the reports and their ODBC details. I tried running the following query 'Select Top 20000 SI_ID, SI_NAME, SI_PROCESSINFO.SI_LOGON_INFO From CI_INFOOBJECTS Where SI_PROGID = 'CrystalEnterprise.Report' and SI_INSTANCE = 'False'' in the query builder. But it times out.
    2. Will running this query using the sdk affect the stability of the environment.
    3. Is there a way to spilt the query into 4-5 batches to get 3000-4000 records at a time.
    4. Can we get the min(SI_ID) and max(SI_ID), how ?
    Regards,
    Abhijit Sanas

    You can try batching on SI_ID, doing something like:
    "Select TOP 1000  SI_ID, SI_NAME, SI_PROCESSINFO.SI_LOGON_INFO From CI_INFOOBJECTS Where SI_PROGID = 'CrystalEnterprise.Report' and SI_INSTANCE = 0 and SI_ID > " + max_si_id_value + " ORDER BY SI_ID ASC"
    then update the max_si_id_value each batch.  SI_ID and SI_PROGID are indexed properties, so they help.
    Sincerely,
    Ted Ueda

  • List all users and their own roles.

    Hi everybody!
    I have to make a list of all sap users and their own separated roles by user. There are any transaction to do it? The SUIM transaction gives me a sap user and their own roles, but if I try with a lot users It gives me all the roles that are using those users but don't give me the roles for each one.
    Thanks a lot.
    Best regards.

    Hi Reynaldo,
    You can go to SE16 -> table name "AGR_USERS" and see the records for all users. Arrange them in ascending order by name and you will get the report what you have mention above.
    Download it and put it in EXCEL.
    Best Wishes.
    Kumar

  • List of errors and their description..

    Hi,
    Can anyone provide me with the list of errors in Oracle and their related descriptions or give a link to some site which provides the same.
    Thanks.

    Why don't you try the official error message documentation?
    Message was edited by:
    Leo Mannhart
    I knew I would be too slow compared to Nicolas, thats why I linked 10.1 documentation ;-)

  • How to export users and their roles/responsibilities from OBIEE 11g weblogic console ? (we have nearly 8000 users)

    Hi Gurus,
    I am not an expert in the OBIEE 11g security area, we have an urgent requirement where in i need to obtain the complete list of all users along with their roles/responsibilities.Ours is a big organization and there are nearly 8000 users. Please advice if i need to write any weblogic script (WLST) or is there any other simple way for this..
    Thanks,

    If it is through Presentation Layer,Below the steps you can follow:-
    1. Open the OBIEE 11G RPD (offline/online) in Administration Tool
    2. Select the ALL/required presentation objects form your Presentation Layer and right-click.
    3. On the context menu select “Permission Report”
    4 .The Permission Report dialog displays the name and a description of the selected presentation object,
    along with a list of users/application roles and their permissions. CLick the Save button to save the permissions in CSV format.
    5.Once you saved to a CSV format, you can use that report for the quick auditing of security management.
    Below the screen shot for the same
    http://www.4shared.com/photo/h1EKYgh1/zrclip_002p5719bc78.html
    Mark if helps.
    Thanks,

  • ZBAPI to display Supply source/vendor/material and their descriptions...

    Hi Frnds,
    I need to write 3 ZBAPIs to list (1)all supply source and their text (2)all vendors and their text,(3)materials and their text
    by calling some std Fm in the source code.
    IF you know any STD BAPI/ RFC FM/ FM to get those datails, please  provide me...
    Note: I shd get all existing vendors with their texts. i.e., what we get when we press F4 like that.
    Regards,
    Kiran.

    Hi Frnds,
    I need to write 3 ZBAPIs to list (1)all supply source and their text (2)all vendors and their text,(3)materials and their text
    by calling some std Fm in the source code.
    IF you know any STD BAPI/ RFC FM/ FM to get those datails, please  provide me...
    Note: I shd get all existing vendors with their texts. i.e., what we get when we press F4 like that.
    Regards,
    Kiran.

Maybe you are looking for

  • Users randomly losing capabilities through ichat server

    Hi, i have iChat server set up, there are 10 users, capabilities for certain users disappear and i cant find out a reason why, when the capabilities go they lose the ability to send a file through iChat, i can move the user out of the group that they

  • ISight in use but is not in use

    I was trying to video chat in iChat with no other programs open and my computer told me my iSight was in use, so I tried restarting my computer, opened photo booth and only photo booth and again it told me iSight was in use, so I then turned off my c

  • Merge Module Problem - I think!!

    I had tried the trail version of Crystal Reports XI and was able to make it work in my applications just fine.  Now that I have purchased the product I have had nothing but trouble.  I can not get it to work even with the previous application that I

  • Error when creating table (Document contains no data)

    Hi, I've installed htmldb 2.0 and after playing with it for a while, everything seems to be ok, except for table creation. No matter I use the sql command console or the object creation wizard, the situation is the same: i can arrive until the last c

  • Unable to add "SendGrid" app service with 6-Month Plan (Prepaid)

    Hi, I'm unable to add "SendGrid" app service from my account.  I was signing up free plan of "sendgrid" account with "SouthEast Asia" region. And I was using Azure account with 6-Month Plan(prepaid). The error message as following: We cannot provide