Power Shell Script for getting the list of members of a particular collection group

Hi Group
I am looking for a powershell script for the below  manual process in sccm2012. please help
Obtain the list of “All Users Group1” collection that have been defined as a Primary User of a device, and what that Users ShortName and Device name is
Obtain the list of user from Active Directory that have their “Title” attribute equal to “Non-Employee” (samAccountName)
For each user that is returned from AD, determine if they are assigned as a Primary User of a Device and write the Device name to a file
Continue to append all of the applicable Device names to the file
End Result = List of all Devices that have Users that have their AD Attribute “Title” equal to “Non-Employee”
thanks
VAR

Hi,
The Cmdlets below should be helpful for you to write the script. You could have a look.
Get-CMUser
Get-CMUserDeviceAffinity
Get-ADUser
Best Regards,
Joyce Li
We
are trying to better understand customer views on social support experience, so your participation in this
interview project would be greatly appreciated if you have time.
Thanks for helping make community forums a great place.

Similar Messages

  • Power shell script for get a content db for a particular web application

    Hi
    what  is the power shell script for get a content db for a particular web application
    Get-SPDatabase 
    adil

    try this one
    Get-SPContentDatabase -webapplication http://url
    this will return all the database for the web applications.
    Get-SPContentDatabase -site http://contoso.com
    this will return the database name in which the contose site collection is.
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog

  • Powershell script to get the list of pages using a particular webpart in SharePoint 2013

    I want to find all the pages withing a web application  or site collection on which particular webpart is enabled. I have seen the link
    http://www.glynblogs.com/2011/07/listing-all-web-parts-in-a-site-collection-with-powershell.html but it doesnt work for default.aspx.please suggest

    found a script at
    https://gallery.technet.microsoft.com/List-all-web-parts-in-page-afc7840f
    Please Mark it as answer if this reply helps you in resolving the issue,It will help other users facing similar problem

  • Need  Shell Script  for picking the files

    Hi,
        I want to write a shell script for piking the files in a sequence order (according to filename with time stamp)  from the sorce FTP server ..
                     Requirement is  in the source directory I'm getting files (Jain_1.xml  , Jjain_2.xml, Jain_3.xml .. ect..)  at  present my file adapter is picking all the files at a time  but  i want to pick  one by one... that to first i want to Jain_1.xml  after finish the processing of the file then only my file adapter should  pick the next file ( Jain_2.xml )  .
                  so..  all the forum mates suggest me to write a shell script..  but where  i have to write the s hell script. and where i have to deploy this script.... my Xi is running on UNIX ... so please sugest me  the procedure ...
    Regards
    Jain

    Hi,
    Why dont you use the option EOIO in which files will be picked up in order and will be proccessed in sequence....one after another....
    Regards,
    Sreeni.

  • Power Shell Script for Check Remote machinces are live or not

    I have required a Power Shell Script for Check multiple Remote machines are live or not.Please guide me

    This will do it.
    http://gallery.technet.microsoft.com/Ping-IP-Adress-Range-d90ce82d
    ¯\_(ツ)_/¯

  • By API action, how can I get the list of user IDs within a specific group  (which is created by API) ?

    By API action, how can I get the list of user IDs within a
    specific group (which is created by API) ?
    or How can I get the group (which is I create by API) ID to
    which a specific user belong by API action?
    Thanks
    Alex

    The poster already posted at the Acrobat Users Community, Interactive Forms that sums up a client order from catalog. The sample form posted to Acrobat.com was a revision of the sample form that came with Acrobat 4.0. There are some fairly advance scripts, templates, and document level functions involved with this form.

  • Need VB script for getting the IIS certification information

    Hi guys,
    I have totally 1000 IIS servers  2003 & 2008
    windows and some of the  servers configured
    IIS 3rd party Security certificates. I need a script to get the certification information like expiry date & certificate vendor name.
    Regards,
    SreeM

    Post here:http://forums.iis.net/
    Look in Gallery for IIS scripts:http://gallery.technet.microsoft.com/
    ¯\_(ツ)_/¯

  • Help on preparing shell script for setting the listener password

    Hi All,
    I am working on checking all my DB servers listeners and if the password is not set for the listener then I need to set the password for that.
    As we have many servers, I am planning to prepare the shell script for doing this task.
    I am familiar with setting up the listener password manually, but strucked up to prepare the shell script to do the same task.
    Can any one kindly help me on this.
    Thanks in advance,
    Mahi

    815537 wrote:
    Could any body please help me.
    Thanks,
    MahiPatience, Grasshopper
    This forum is not a chat line, and it is not paid support.
    No one is responsible for monitoring it and giving a quick response.
    Furthermore, it is a global forum. The person with the information you seek may very well live 20 time zones away from you and was going to bed just as you posted. He will not even see your post for several more hours.
    Your original post went up in the middle of the night for half the world.
    No one with the information you seek is deliberately withholding it until you sound sufficiently desperate.

  • Shell script to get the mail whenever the primary or standby DBs down

    Hi,
    Can any one please provide the shell script to monitor the primary and standby databases, such that whenever the primary or standby database is down we have to get the mail.
    Thanks,
    Mahi

    Hi Mahi,
    in 10g you can configure this through EM dbconsole which will be very easy.
    (i am not sure if this exists in 9i EM)

  • Power shell script for AD User

    Hi Team,
    can any one help me to find out this in ad through power cell script.
    List of users who's password has been reset in 90 days.
    Regards, Triyambak

    Try amending the following script from the repository.http://gallery.technet.microsoft.com/scriptcenter/Query-for-AD-Users-that-b87acf2f

  • Script for getting the online/offline status

    Hi all,
    After enabling checkbox of "Enable assistive access device" is possible to get the online/ offline status.From Menu we will get the status.Without doing this i want to get the apple mail account online/offline status.hope some help scripts for this.

    [That script|http://discussions.apple.com/message.jspa?messageID=11012484#11012484] could change the Online Status of all mail accounts. The following one will just report their Online Status. Is this what you are (were) asking for?
    --BEGINNING OF SCRIPT
    tell application "Mail" to activate
    tell application "System Events" to tell process "Mail"
    set theMenu to menu "Mailbox" of menu bar 1
    if enabled of menu item "Take All Accounts Online" of theMenu then
    return "All accounts are currently offline"
    else
    return "All accounts are currently online"
    end if
    end tell
    --END OF SCRIPT

  • Script to get the List of Disabled Users in UserProfiles

    Hi All,
    can somebody help me in writing a script to get all the disabled users in Share Point userProfiles.
    Thanks
    Kishore

    Hi All,
    can somebody help me in writing a script to get all the disabled users in Share Point userProfiles.
    Thanks
    Kishore

  • Power shell script to change the Extension of file

    Hi All,
    i need to change the extension which is as .out file to .xml below is the pwershell script which i used
    $fileName="C:\temp\suj.txt"
    $newExtension="xml"
    [System.IO.Path]::ChangeExtension($filName, $newExtension)
    neither i get any error for the above script nor the extension is changing
    can onayone help me on this

    No worries
    i have used the below script
    Dir C:\temp *.out | rename-item -newname {  $_.name  -replace ".out",".xml"  }

  • Script for: Getting the closest price within the group

    Hello
    I need some help for my script.I would like to add new field . Do you guys have an idea any OLAP functions .
    It was my simple script which doesn't give the answer I want.
    SELECT
    NO,
    SUM_QTY,
    QTY_QUOTED,
    CASE WHEN QTY_QUOTED < SUM_QTY
    THEN MAX(QTY_QUOTED)
    WHEN QTY_QUOTED = SUM_QTY
    THEN QTY_QUOTED
    WHEN QTY_QUOTED > SUM_QTY
    THEN MIN(QTY_QUOTED) END AS CLOSEST_Q
    from table1
    GROUP BY NO, SUM_QTY, QTY_QUOTED;
    output for the script below:
    No SUM_QTY QTY_QUOTED CLOSEST_Q
    567     3     2     2
    567     3     99     99
    130     140     156     156
    123     515     40     40
    911     120     600     600
    911     120     800     800
    567     3     3     3
    567     3     5     5
    911     120     700     700
    130     140     138     138
    130     140     12     12
    123     515     2     2
    I would like to see the last field below:
    No Sum_Qty Qty_Quoted The Field I want to have or  The other way I want to see
    ==== ======= ======== ================ ==================
    123 515 40 x 40
    123 515 2 40
    567 3 5 3
    567 3 2 3
    567 3 3 x 3
    567 3 99 3
    911 120 600 x 600
    911 120 700 600
    911 120 800 600
    130 140 12 138
    130 140 138 x 138
    130 140 256 138
    I willl appreciate if you can give any clue /solution or idea.
    Thanks a lot,
    Pinar

    [That script|http://discussions.apple.com/message.jspa?messageID=11012484#11012484] could change the Online Status of all mail accounts. The following one will just report their Online Status. Is this what you are (were) asking for?
    --BEGINNING OF SCRIPT
    tell application "Mail" to activate
    tell application "System Events" to tell process "Mail"
    set theMenu to menu "Mailbox" of menu bar 1
    if enabled of menu item "Take All Accounts Online" of theMenu then
    return "All accounts are currently offline"
    else
    return "All accounts are currently online"
    end if
    end tell
    --END OF SCRIPT

  • PowerShell Script for Setting the Welcome Page View of a document set

    Hi,
    We are using document set in the document library and we have created the separate view in the document set and it will show only particular metadata columns. We need to change from default view to another view. For this, we need to write the power shell
    script and update the document set welcome page view link in the document set template. Please let me know how we can get this.
    Thanks,
    Mylsamy

    Hey Mylsamy,
    welcome page view is stored in $contenttype.XmlDocuments. Here is how you can change the view using powershell:
    $web = Get-SPWeb "WEBURL"
    $list = $web.Lists["LISTNAME"]
    $contenttype = $list.ContentTypes["CONTENTYPENAME"]
    $viewid = $list.Views["VIEWNAME"].Id
    $xmldocs = $contenttype.XmlDocuments
    foreach($xmldoc in $xmldocs)
    if($xmldoc.Contains("WelcomePageView"))
    Write-Host "XML contains WPV"
    $newview = [XML] @"
    <wpv:WelcomePageView xmlns:wpv="http://schemas.microsoft.com/office/documentsets/welcomepageview" ViewId="$viewid" />
    $xmldocs.Delete("http://schemas.microsoft.com/office/documentsets/welcomepageview")
    $xmldocs.Add($newview)
    break;
    $contenttype.Update($updateChildren, $false)
    Write-Host "Welcome Page View updated at " $list.Title
    Regards,
    Alexander 

Maybe you are looking for

  • Boot camp, MAC pro and windows XP

    Hi, I am leading a programmers team, what we want is the faster machines to improve performance. Currently investigating an HP machine with windows XP 64 on it. But that doesn't work for us as most of hour programming tools do not work under XP 64. W

  • How to determine canceled purchase orders

    Hi all, I have to block purchase requisition if purchase order is created. if PO is deleted (canceled) PR can be modified again. So i want to khow how can i see if PO is canceled??? Thank you

  • Automation of AWR report.

    Hi All, I want to automate for awr report generating for every 30 min. For this I am creating a script which is not working properly. Script given below. 1. Declaring an variable 2. Giving value to the variable by running sql query 3. Executing dbms_

  • I can't upgrade from 10.6.3 to 10.6.8 on my Core Duo iMac (2008).

    I have just acquired an iMac Core Duo 2008 3.06GHz running Snow Leopard 10.6.3. I have tried both 'Software Update' and a 10.6.8 Combo download but I just get a 'failed' message 'contact your software manufacturer' as soon as I launch it. The combo I

  • Error code 36 when moving big files

    getting error code 36 when moving big files from my mbp (10.6.8) to my external hard drive. have tried using the sudo command in terminal, but it doesnt work. what do i do?