Using the FIM PowerShell Module to Remove a Manager

Just added a sample for using the FIM PowerShell module to
Remove a Person's Manager.

Hello,
Modify this script as per your requirement. This script will help you to get all broken permission from site list and items.
http://manditech.wordpress.com/2011/08/05/finding-lists-and-items-with-unique-permissions-broken-inheritance/
To remove group permission, look at here:
http://sharepoint.stackexchange.com/questions/70071/need-to-remove-permission-level-from-a-sharepoint-group-using-powershell
http://stackoverflow.com/questions/2278289/remove-unwanted-user-permissions-from-sharepoint
Hope it could help
Hemendra:Yesterday is just a memory,Tomorrow we may never see
Please remember to mark the replies as answers if they help and unmark them if they provide no help

Similar Messages

  • How to print text rertrived by using the READ_TEXT fun module in smartform

    Please tell me how to print the text which is rertrived by using the READ_TEXT function module in smartform.
    I have coded all things in the program lines and in that i am retriveing the long texts.
    I am getting the text lines in my internal table clearly, the thing is that I am not able to pass these lines to the text module.
    its urgent. Points will be rewarded for any type of clue. whether it will work or not.

    loop the table into which u have retrieved the text .
    in the form interface of the smartform ... in importing parameter give the that table name .
    and in smartform whereever u want to print there insert the data into work area and pass to fields for dispaly .
    decalre ur work area in global defintions
    thnaks .

  • Simple way to use the Photo Gallery Module and flexslider to create an editable image slider?

    I want to offer an image slider that my clients can easily update themselves through the Admin. Ive researched it alot and I know it can be done using web apps but does my cliently seriously need to pay over $400 a year for the webcommerce option just to have an updatable image slider?? I find that unrealistic. Does anyone know how to set this up using the photo gallery module and "flexslider" so clients on the business marketing plan can have access to a simple and clean editable image slider?
    Any BC experts that can help would be greatly appreicated!
    Thankyou

    Not an expert, but I think what you're looking for is a slider that can get its list of photos from an XML file.  The Photo Gallery module can produce an XML file.

  • Use the same code module for several steps in the sequence

    Hello All,
      I have been trying to set up a sequence that uses the same code module for all of the steps in the sequence, but am having trouble referring back to it when I need to send it commands.  I have gotten as far as calling the VI in a new thread so that it can be run asynchronously.  I can run the simple sequence and it will indeed open the VI, and move on to the next step.  When I close the VI manually from the front panel, the sequence in TestStand completes, as expected.  So it appears that I have that much working. 
      My question is how to call the separate thread from the main sequence or other sub sequences when I need to edit the parameters.  If I insert an Action step, I am required to select a VI file, but from what I can tell, it opens a different instance of the file, and does not provide an interface with the other instance running asycronously.  My next guess was to use a Statement step, but I was not able to figure out how to configure the lookup string to call the VI parameters.  Beyond that, I'm not sure how to proceed.  Please advise.   
      My intention is to start the code module VI (asynchronously), run several different subsequences within the main sequence that call that same VI and edit it's parameters, close everything and report on the results.  If I am misunderstanding how TestStand is supposed to work, please let me know. 
    Thanks,
    GSinMN    
    Solved!
    Go to Solution.

    What I do is use a Queue to send data to the asynchronous VI.  So it can run and do whatever, but also recieve the commands from the queue.  I use an Action Engine that holds the queue reference and sends the commands.  So you really just have to call the Action Engine from your sequences.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • I need this file "How to Use the Content Conversion Module in JMS Adapter"

    Can someone send me this file:
    "How to Use the Content Conversion Module in JMS Adapter"
    I am not able to find it.
    Thanks
    Antonello

    pls refer guide
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-adapters/how%20to%20use%20the%20content%20conversion%20module%20with%20xi%203.0%20j2ee%20jms%20adapter.pdf
    Regards,
    Swetha.

  • I bought the student and teacher version of CS5 extended for windows. Can I download the Mac version to my new  apple computer  and use the same serial number after removing phtoshop from my PC?

    i bought the student and teacher version of CS5 extended for windows. Can I download the Mac version to my new  apple computer  and use the same serial number after removing phtoshop from my PC?

    Can I download the Mac version to my new  apple computer  and use the same serial number after removing phtoshop from my PC?
    Short answer: not for CS5.
    Platform swaps are available but only for CS6
    Order product | Platform, language swap

  • Using the MSG_* Function Modules

    Hello,
    I want to use the MSG_* function modules (e.g. MSG_OPEN, MSG_ACTION ...) and the MAC_MSG_* macros in my own programs, but they are not documented. Are there any docs about it?
    Regards
    Stefan

    Hi,
    Check this link
    http://wwwcs.uni-paderborn.de/cs/heiss/lehre/pg/intern/docs/bc_xbp_45.pdf
    Also see Re: Read Application Log
    Thanks & Regards,
    Judith.

  • Internal Error - User not authorized to use the gross profit module

    We have a client who has a limited logistics license and just recently moved to 8.8.  in the past he could deliver directly from a pick list but now he is getting an error "User not authorized to use the gross profit module".  Is this something related to an authorization setting?  Before the move this task was not an issue.  Please advise.
    Thank you.
    Rene

    Hi Gordon, one of our user just experienced the same problem in sales order.
    In Form Settings he ticked "Display BP Catalog Number", and while he entered the catalog number he got the same error message.
    I'm not sure what this has to do with the gross profit base method...maybe the fields "Gross profit" and "Gross profit base price"?   Don't know where to set them up.
    Thanks.

  • The Windows PowerShell snap-in 'Microsoft.Exchange.Management.PowerShell.Admin' is not installed on this computer

    hi all,
    i am using Exchange server 2013.
    when i run the below code i got the following error.
    RunspaceConfiguration rsConfig = RunspaceConfiguration.Create();
    PSSnapInException snapInException = null;
    PSSnapInInfo info = rsConfig.AddPSSnapIn("Microsoft.Exchange.Management.PowerShell.Admin", out snapInException);
    Runspace myRunSpace = RunspaceFactory.CreateRunspace(rsConfig);
    myRunSpace.Open();
    Pipeline pipeLine = myRunSpace.CreatePipeline();
    Command myCommand = new Command("Get-Mailbox -ResultSize Unlimited");
    pipeLine.Commands.Add(myCommand);
    Collection<PSObject> commandResults = pipeLine.Invoke();
    Error :
    The Windows PowerShell snap-in 'Microsoft.Exchange.Management.PowerShell.Admin' is not installed on this computer.
    when i run the command  get-pssnapin
    result : 
    Name : Microsoft.PowerShell.Core
    PSVersion : 3.0
    Description : This Windows PowerShell snap-in contains cmdlets used to manage components of Windows PowerShell
    when i run below  command 
    get-pssnapin -registered
    result is:
    PS C:\Users\Administrator> get-pssnapin -registered
    Name : EnginePSSnapin
    PSVersion : 2.0
    Description : Register cmdlets for Content Engine
    Name : HostControllerPSSnapIn
    PSVersion : 2.0
    Description : Register cmdlets for Host Controller
    Name : InteractionEnginePSSnapIn
    PSVersion : 2.0
    Description : Register cmdlets for InteractionEngine
    Name : JunoPSSnapin
    PSVersion : 2.0
    Description : Register cmdlets for Juno
    Name : Microsoft.Exchange.Management.PowerShell.E2010
    PSVersion : 1.0
    Description : Admin Tasks for the Exchange Server
    Name : Microsoft.Exchange.Management.PowerShell.Setup
    PSVersion : 1.0
    Description : Setup Tasks for the Exchange Server
    Name : Microsoft.Exchange.Management.PowerShell.SnapIn
    PSVersion : 1.0
    Description : Admin Tasks for the Exchange Server
    Name : Microsoft.Exchange.Management.Powershell.Support
    PSVersion : 1.0
    Description : Support Tasks for the Exchange Server
    Name : Microsoft.Forefront.Filtering.Management.PowerShell
    PSVersion : 2.0
    Description : Microsoft Forefront Filtering PowerShell Interface
    Name : SearchCorePSSnapIn
    PSVersion : 2.0
    Description : Register cmdlets for SearchCore
    Name : WDeploySnapin3.0
    PSVersion : 2.0
    Description : This is a PowerShell snap-in that contains cmdlets for managing Microsoft Web Deployment infrastructure
    All powershell commands is installed fine .
    but still I am getting error
    The Windows PowerShell snap-in 'Microsoft.Exchange.Management.PowerShell.Admin' is not installed on this computer
     

    Hi Olaf Reitz,
    After running the command still i am getting same error,
    The Windows PowerShell snap-in 'Microsoft.Exchange.Management.PowerShell.SnapIn' is not installed on this computer
    please see below my task and i achieved so far.
    i need to get list of Users in C# from Exchange Server. for that i  created new User [[email protected]]
    in Exchange Server , then i give Full Access Permissions to that User to Access all other Mail Boxes.
    By giving below command in PowerShell  I am getting all Users List . 
    Get-Mailbox -ResultSize Unlimited
    i need the same list In C# code. for that I
    tried with below code.
     Here i got only particular user [ [email protected]] details , instead of list.
    SecureString secureString = new SecureString();
    string myPassword = "EIS2014!@#"; string username = "[email protected]";
    foreach (char c in myPassword)
    secureString.AppendChar(c);
    PSCredential ExchangeCredentials = new PSCredential(username, secureString);
    WSManConnectionInfo connectionInfo = new WSManConnectionInfo(new Uri("http://ExchangeServer.admin.com/powershell ), "http://schemas.microsoft.com/powershell/Microsoft.Exchange , ExchangeCredentials);
    Runspace runspace = System.Management.Automation.Runspaces.RunspaceFactory.CreateRunspace(connectionInfo);
    runspace.Open();
    string newCommand = "Get-Mailbox | Get-MailboxPermission";
    Pipeline cmd = runspace.CreatePipeline(newCommand);
    Collection<PSObject> results = cmd.Invoke();
    runspace.Close();
    so , i changed the code below
    RunspaceConfiguration rsConfig = RunspaceConfiguration.Create();
    PSSnapInException snapInException = null;
    PSSnapInInfo info = rsConfig.AddPSSnapIn("Microsoft.Exchange.Management.PowerShell.SnapIn", out snapInException);
    Runspace myRunSpace = RunspaceFactory.CreateRunspace(rsConfig);
    myRunSpace.Open();
    Pipeline pipeLine = myRunSpace.CreatePipeline();
    Command myCommand = new Command("Get-Mailbox -ResultSize Unlimited");
    pipeLine.Commands.Add(myCommand);
    Collection<PSObject> commandResults = pipeLine.Invoke();
    i need Users list In C# , how can i achieve this ?
    i am getting list in PowerShell , but i need it in C# code. 
    Is Visual studio Compiled code  be 64 bit for running PowerShell scripts  ? 

  • How do you make the Filter so we can use the FIM cmdlets to list Users who have no Manager attribute

    I can easily create a Set of Users who are "unusual"
    The SET criteria is
    EmployeeID starts with %
    and Any of
        EmployeeStatus not starts with %
        EmployeeType not starts with %
        Manager not in All FIM users
    This criteria works and gives me all the users when I push the View Members button.
    But when I look at the Set's Filter it seems to refer to a uuid of that All FIM users Set. To be honest I dont fully understand the set's XPATH filter.
    What I hope to do is to some how build a filter so that the FIM cmdlets can be used to identify and fix up these users, especially those who do not have a valid Manager. There are hundreds of these non-standard users and although possible, its not practical
    to do this by hand via the "All Non Standard Users" set.
    Any hints welcomed.

    All users without a manager: Xpath Filters
    /Person[not(Manager=/Person)]
    or,
    /Person[Manager!=/Set[DisplayName='All People']/ComputedMember]
    <# Please do not anything in the production environment unless and until you are very much sure #>
    # Powershell Cmdlet to find all users in portal not having manager
    # Load FIMAutomation module
     if(@(Get-PSSnapin | ? { $_.Name -eq "FIMAutomation" } ).Count -eq 0)
         Add-PSSnapin FIMAutomation;
    $users = Export-FIMConfig -customConfig "/Person[not(Manager=/Person)]" -Uri "http://localhost:5725"  -OnlyBaseResources
    foreach ($user in $users)
    $x = (($user.ResourceManagementObject.ResourceManagementAttributes | Where-Object {$_.AttributeName -eq "DisplayName"}).Value) 
    Write-Host "$x"
    Thanks and regards,
    Anirban Singha(Bangalore)

  • How to use the J_1B_NF_VALUE_DETERMINATION fn.module

    dear all,
    can anybody help me out in using  the function module.
    J_1B_NF_VALUE_DETERMINATION : Read values from NF returned combined with J_1B_NF_DOCUMENT_READ using.
    to determine the NFTOT value.
    regs,
    Raja

    Refer this report - J_1BLB03
    Regards,
    Amit
    Reward all helpful replies.

  • Is it necessary to use the standard function modules always?

    Hi All,
       Suppose i can retrieve the BUSINEES PARTNER ID from the table BUT000 with the help of 'BP_GUID' field through a select query statement. 
    Now is it necessary to use a standard function module to retrieve the same data. what about the performance? which is the better solution. to implement our own code or to use the function module available.
    Please someone clarify me about this issue.
    Regards,
    Sharry.

    If you'd ask the question in general it's obvious that there is no good answer as it always would depend on the circumstance. However, as you've posted your question in the performance tuning forum, let's look at your question in this context first. I think it's fairly safe to say, that in almost 100% of the cases a standard function module will not be as fast as any well implemented and custom tailored code. If in doubt, just try reading the code of the function module you want to read; most likely you will find lots of unnecessary fluff in there, often they read data that you don't even need.
    And as far as buffering is concerned, that can also be an issue. E.g. let's say you do a massive read of distinct business partners and you only need the data once for each partner. Obviously buffering is silly in this case and it might even slow down your program, because the implemented buffering is not necessarily well implemented. I've come across a few cases, where the buffer tables where standard tables with no efficient read access (so no sorted table or hash table) and once tons of data were buffered, it actually took a moment to look up if the record already was buffered (just to find it wasn't there yet).
    Now most of the times this slowdown is not an issue as the lookup is still fast compared to the (usually) prevalent database accesses with their slower IO timing. But another factor to consider is memory consumption and why buffer data in memory (and waste it), if you can't use the buffer anyway? So when I do use standard function modules, I usually try to see what they retain in global memory, to better understand if I need to call some initialization/clearing/refresh function...
    Note also that often you need to process lots of data, but don't find a standard function module for "mass access", so you need to read your object one by one. Obviously that's another good candidate for implementing your own queries, where you can process the data in packages.
    So what might be the reason to use a standard function module? Well, often it's required because the logic is so complex that it would take you too much time to implement it (not to mention that we often simply don't know all the logic that's coded in there). Another advantage is that you might get independent of the data model. E.g. for IDoc interfaces SAP switched in some release the tables where the data is stored. So if you had coded your own queries to get IDoc data, they wouldn't have worked after this particular release upgrade. The standard function on the other hand, checks both the old and new tables, so by using it you would have been fine.
    The one major caveat I'd give though is to always check whether the function module is released or at least documented to some degree. I.e. if it's not released, SAP won't support it and does not guarantee that the interface or logic stays the same. In my experience lots of functions I do want to use are not released (or documented), but I will still use them because they seem to be the best alternative in certain scenarios.
    Cheers, harald

  • Finding out the sales tax type using the Fun. Module-ME_PO_PRICE_SIMULATION

    HI,
       I have used the function module ME_PO_PRICE_SIMULATION to give the pricing details in one report.  In the same function module it is also giving the tax applicable for the vendor-material-site combination. ie., tax code and the tax. procedure. Is it possible to find out the Tax type using
    this data ie,, if it is LST or CST

    Hi ,
    I think from the taxcode you can findout LST(or) CST
    try
    G.Ganesh Kumar

  • Using the "Run Powershell command" in Task Sequence

    Hi,
    We are having problems executing PowerShell Scripts from within a TaskSequence. We use this to perform different actions on our servers.
    * We have a GPO for Windows PowerShell that is set to "allow all scripts"
    * In Sccm, the computer agent setting is set to "bypass"
    *In the deployement we specify that we want to run the content from the DP
    When we run the TaskSequence, powershell is started but the script is not executed. The TS is stuck at this time and is just waiting for the script to execute... After killing the powershell process, the TS failes (of course).
    How can we get this working:
    -by disabling the GPO -> indeed then it works
    -by downloading the content locally (we don't want that either)
    Is there any other solution to this?
    I've also tried this but no go:
    Quote:
    Please note, that this policy will only work for scripts which are executed locally. If you want to execute ps1 scripts from a network drive it might be neccessary to add the dp server name into the trusted sites of the IE!
    Source:http://social.technet.microsoft.com/Forums/en-US/a2d44774-a352-40f6-93be-037ccf0bc98b/not-able-to-execute-powershell-scripts-when-running-a-task-sequence-or-running-from-packageprogram?forum=configmanagersdk
    I also tried to run it via the command line option and call powershell.exe, same problem. Executing a scriptblock on the other hand does work. (In the scriptblock, it put get-executionpolicy and it is returning unrestricted)
    Thanks,
    WiM
    IC3CUB3

    Add below to .ps1 file
    $session = New-pssession
    Import-PSSession $session
    New-ItemProperty 'HKLM:\Software\Microsoft\Windows\CurrentVersion\AutoRotation' -Name Enable -Value  0 -PropertyType Dword" 
    Schedule task
    ================
    Program to choose
    C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
    add argument section 
    powershell.exe -noprofile -executionpolicy bypass -file \\server\file.ps1

  • Scan the mailbox Content using the exchange powershell commands (need urgent info)

    hi,
    Is there any way where in i can scan the mail content of each mailbox user and classify that these no of voice or video or text messages are there in user inbox using the powershell.
    My requirement
    1) is to collect the voice , video, text etc... messages for inbox of each exchange user. Is there any command that gives the type of message, text, voice, video, etc.?
    2) I am an administrator and i want to monitor the mailbox users and there content .Do we know whether ,this requires a login into the individual mailbox with the user credentials?
    Please reply me @ [email protected]
    Advanced thanks for your help...
    Thanks
    Shiva

    Use "search-mailbox" command to search the mailbox based on subject,date,attachement,sender etc...
    $users = Get-content "c\users.txt"
    To get the details only
    $users | SEARCH-MAILBOX –SearchQuery subject:"Payment_for_" -TargetMailbox "adminmailbox" -TargetFolder "queryfolder"-LogOnly -LogLevel Full

Maybe you are looking for