Exchange, trying to make a change (via powershell) to all users & resources folder level permissions.

The command I am trying to use is not working, I need to change the default users folder permissions for every user and resource in our Org but only on the deleted items folder. If I use the -identity it works for individual changes, but I need to make this
happen for everyone. I have done things like this in the past but never to just a folder.  Hopefully someone out there can help with this.
Get-Mailbox -OrganizationalUnit test | Set-MailboxFolderPermission "deleted items" -user default -AccessRights contributor
The input object cannot be bound to any parameters for the command either because the command does not take pipeline
input or the input and its properties do not match any of the parameters that take pipeline input.
    + CategoryInfo          : InvalidArgument: (test:PSObject) [Set-MailboxFolderPermission], ParameterBindingException

Hi Chad,
Here's something to get you moving in the right direction:
$mailboxes = Get-Mailbox -OrganizationalUnit Test
ForEach ( $mailbox in $mailboxes ) {
#Do things in here on the individual mailbox.
#This example selects the name property
$mailbox | Select Name
EDIT: Link to syntax:
http://ss64.com/ps/foreach.html
EDIT2: Hah, never mind. See jrv's post below.
Don't retire TechNet! -
(Maybe there's still a chance for hope, over 12,000+ strong and growing)

Similar Messages

  • I'm trying to make a purchase via iPod, but it insists on a credit card number. I have money left on a gift card.  Why is this happening?

    Why, if I have a $25 credit on my iTunes account, do I get asked for a credit care number when trying to make a purchase via my iPod??/

    Found out what the issue was... turned out that I typed the answers in wrong.
    But I did go in and add in a rescue email just to be on the safe side.

  • HT3819 For home sharing do you have to use one apple ID? Im trying to make my own new account for all my devices (iphone, ipad, mac) , but i still want the music from my dads account.

    For home sharing do you have to use one apple ID? Im trying to make my own new account for all my devices (iphone, ipad, mac) , but i still want the music from my dads account.

    For home sharing do you have to use one apple ID? Im trying to make my own new account for all my devices (iphone, ipad, mac) , but i still want the music from my dads account.

  • Remove various accepted domains (exchange 2007) from a list file via powershell

    hello!
    i'm a newbie with powershell and i'm trying to find if is it possible to remove a lot of exchange 2007 accepted domains from a csv file using powershell.
    I want to delete accepted domains contained in a csv, it has only domains name and powershell requires the name , that is different from the domain.
    example of accepted domain in my organization:
    Name                           DomainName                DomainType            Default
    Domain0001        
    domain1.com     Authoritative         False 
    Domain0002 hello1.com
    Authoritative False
    I've only a csv with domains name:
    domain.csv:
    Domain
    domain1.com
    hello1.com
    Deleting an accepted domain via powershell requires the name so I need to extract first the name of , i've tried with this command and it works:
    Get-AcceptedDomain | Where{$_.DomainName -eq 'domain1.com'}
    This works only for 1 domain, I've a lot of domains to delete so it's inviable
    Now, i'm trying to launch this command without success:
    import-csv domain.csv | foreach {Get-AcceptedDomain | Where{$_.DomainName -eq '$_.Domain'}}
    Probably there is a syntax error, or maybe I just can't do it. 
    Any help? 
    Many thanks in advance!!

    Don't know what to tell you, then.  If I create a test file with that data, the Import-CSV works for me:
    Domain
    3414257440.domain.com
    domain1.domain.com
    '@ | set-content c:\testfiles\domain.csv
    $DomainNames =
    Import-CSV 'c:\testfiles\domain.csv' |
    Select -ExpandProperty Domain
    $DomainNames
    3414257440.domain.com
    domain1.domain.com
    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

  • I am trying to make stationary in Mail and save it to Custom folder but Save As or Save as Stationary will not highlight so I can save it.

    I am trying to make custom stationary in Mail but it will not let me save it.

    Click the image , hold your mouse button, drag it and bring it to Firefox window from task bar below and release it into the body of your e-mail.Works on Gmail, Yahoomail , Hotmail....May not work on other e-mail service providers.

  • Trying to make in game purchases,settings are all on, keep's telling me purchase could not be completed

    Trying to make in game purchase. Keep's telling me purchase could not be made go to apple support

    Try here
    iTunes Store Support
    http://www.apple.com/emea/support/itunes/contact.html

  • PowerShell - List all users that have access to a particular SPLIstItem

    Hi there,
    In PowerShell - how to list all users that have access to a particular SPLIstItem?
    Thanks so much in advance.

    Hi frob,
    According to your description, my understanding is that you want to list all users who have access to a particular SharePoint list item via PowerShell.
    You can use the following PowerShell command:
    $web = Get-SPWeb http://sp/sites/First
    $list=$web.Lists["listV2"]
    $item=$list.Items | where {$_['ID'] -eq 1}
    $item | Select -ExpandProperty RoleAssignments |Select {$_.Member.DisplayName}, {$_.Member.LoginName}, RoleDefinitionBindings
    In the above command, you need to change the web URL to your site's URL, change “listV2” to the name of your list, and change the ‘1’ to the ID of the list item.
    The result looks like:
    Best Regards,
    Wendy
    Wendy Li
    TechNet Community Support

  • How do I make an iPhoto Library accessible to all users of one computer ?

    My wife and I use our new iMac, and we log in independently.  However it seems all the photos from our family album can be seen only by me - when she logs in, iPhoto says there are no photos stored.  How do we share these photos across both user accounts ?  Same question would go for music

    The point of having different log-ins is that you can keep your data - that's your photos and your music - separate. If you don't, why have separate log-ins? So, the easiest and most simple solution is to use the same log-in.
    Other than that: what do you mean by 'Share"?
    If you want the other user to be able to see the pics, but not add to, change or alter your library, then enable Sharing in your iPhoto (Preferences -> Sharing), leave iPhoto running and use Fast User Switching to open the other account. In that account, enable 'Look For Shared Libraries'. Your Library will appear in the other source pane.
    Any user can drag a pic from the Shared Library to their own in the iPhoto Window.
    Remember iPhoto must be running in both accounts for this to work.
    If you want the other user to have the same access to the library as you: to be able to add, edit, organise, keyword etc.
    Quit iPhoto in both accounts. Move the Library to the Users / Shared Folder (but note: some users find ongoing permissions issues with the Library in this location. It might be better to use an external HD set to ignore permissions, a Disk Image or even partition your Hard Disk.)
    In each account in turn: Double click on the Library to open it. (You may be asked to repair the Library Permissions.) From that point on, this will be the default library location. Both accounts will have full access to the library, in fact, both accounts will 'own' it.
    However, there is a catch with this system and it is a significant one. iPhoto is not a multi-user app., it does not have the code to negotiate two users simultaneously writing to the database, and trying will cause db corruption. So only one user at a time, and back up, back up back up.

  • HELP - Change cache location for ALL users.

    I am in desperate mode here, so I appreciate any help...
    I just installed 1.4.2_08 on my Citrix environment. I have a GPO that only allows 30mb of data to be saved in their profile and this is the max that I can make it. The problem is that the website created that uses this version of JRE creates a an 11mb file twice in the users profile. This blows up their session and they are no longer allowed to log off until I go in and clear it off. I've only had about 10 users that I have had to do this too, but I can see it's going to get a lot higher. Basically I want to change the cache location for all users, not just my profile, and redirect it to the users 'My Documents' folder. This way my GPO that then redirects the users 'My Documents' folder can have this folder on their home drive.
    Please, help! Thanks a bunch!!

    I had the same problem, but fixed it with this solution:
    I added [deployment.user.cachedir=c\:\\temp\\cache] to the deployment.properties file.
    (located at C:\Documents and Settings\<USER>\Application Data\Sun\Java\Deployment)
    Then i deleted the cache directory.
    Now i am making my one Transform file for the deployment of java 1.6.0_05.
    Does anyone knows how i can change the cache files etc in my transform file.
    Thanks a lot!!

  • Unable to change keyboard layout for all users on Windows Server 2012 R2

    Hi,
    I have a requirement where I need to support national keyboard layout for Danish for all users on that machine. When I ran the powershell with script Set-WinUserLanguageList
    -LanguageList da-DK it only sets the Danish keyboard layout to the specific logged in user.However the for other users its same English(US) keyboard which is not expected.
    Please help me how to set the Danish keyboard for all users on the machine. Its Urgent!Thanks

    Hi Mike,
    Thanks for reply.
    But I need to configure everything using powershell script. Is it possible to use powershell script to setting group policy/ adding logon script ?
    These are pretty basic administration tasks and almost always quicker to accomplish with the GUI. Why do you want to use a PowerShell script?
    EDIT: Here's some information on the topic however:
    https://technet.microsoft.com/en-us/library/cc781361%28v=ws.10%29.aspx
    http://blogs.technet.com/b/heyscriptingguy/archive/2011/01/06/use-powershell-and-group-policy-for-your-logon-script.aspx
    Don't retire TechNet! -
    (Don't give up yet - 13,225+ strong and growing)

  • I'm trying to buy ebooks from app store.I've just used old one before w/no prob downloading apps.  Never had much luck trying to make these changes.

    It keeps saying Invalid e-mail address.  Used new one &amp; it says the same thing.  Have Had New e-mail address For 6 months, but it never synced in App store.   Have downloaded apps before using old address w/no problem.   I wanted these books download by tomorrow since I won't have access to Internet for a week.

    That is priceless!!!  Thanks!  I sure needed a good laugh after spending/wasting hours & days trying to either get my c6280 to give up on its Ink System Failure fixation, or find a decent replacement.  Unfortunately I need the Smart Web Printing feature that I guess only HP has, or I'd try a different brand. And now even HP has very few models with that available.
     My error msg is a little different from those previously stated, but close:  0xc18a0201.  Even tho there were frustrations with my c6280, I did like several of its unique features which are hard to find now under $100.  I hate how HP (& I suppose other brands also) are CONSTANTLY changing models & then of course ink cartridges.
    Oh heavens, I've had the c6280 a whopping 2 1/2 years!   I'm sure they want us poor slobs to have to buy a new one every year & a day!  To say nothing of the exorbitant prices for ink.  And now if this one is really dead in the water, I have SIX unused #02 ink cartridges which I cannot return---I got them in a combo pack, & for some reason have wound up with THREE lite pink & THREE lite blue cartridges, while having to buy extras of the other colors, that ran out before the others!!!   Yeah, & what's with that not being able to print in BLACK if a color runs out????
    Anyway I really loved your essay!   It's a classic!  And says it all!  I hate that we have to be 'slaves' to the electronic 'wonders'!!!

  • I am using photoshop elements (8) for several years since I upgraded form (2). I am a mac user and just upgraded to yosimite.  Photoshop elements will not open.  I have tried to make the changes recommended by the Adobe website, but I can not locate them

    How can I get photoshop elements to work on my mac with Yosimite??

    Yes, that is correct. The organizer is just a database, so your photos are wherever you put them intially. Did you import from iphoto? In that case, organizer does make duplicates (to avoid writing into the iphoto library, which would be a Bad Thing to do). If you didn't specify a location, the copies that PSE uses will be inside subfolders in the Adobe folder in your Pictures folder.

  • Trying to added o365 licenses via powershell command line

    I am trying to add o365 licenses to current users in the cloud.  I am using the following command.
    Set-MsolUserLicense -UserPrincipalName
     (get-content c:\temp\o365.txt) -AddLicenses "companyName:ENTERPRISEPACK"
    Above statement works as long there is only 1 line in the o365.txt file.
    As soon as I add a second line.  I get the following error message.
    Set-MsolUserLicense : Cannot convert 'System.Object[]' to the type
    'System.String' required by parameter 'UserPrincipalName'. Specified method is
    not supported.
    At line:1 char:41
    + Set-MsolUserLicense -UserPrincipalName  (get-content c:\temp\o365.txt)
    -AddLicen ...
    +                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (:) [Set-MsolUserLicense], Para
       meterBindingException
        + FullyQualifiedErrorId : CannotConvertArgument,Microsoft.Online.Administr
       ation.Automation.SetUserLicense
    all help is appreciated.

    Hi
    Perhaps something like this:
    Set-MsolUserLicense -UserPrincipalName $UPN -AddLicense $AccountSKU -Licenseoptions $NeededSKU
    where $UPN is the variable which contains the list of user upn's
              $AccountSKU is the MSOLAccountSKU (domainname:ENTERPRISEPACK)
              $NeededSKU is the custom License options you created using new-MsolLicenseOptions command.
    Hope this helps. Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • Why can't Apple make 'publish changes only' for non .mac users?

    The recent iWeb update to 1.1 and the now increasingly obvious differential between .mac and non .mac features has prompted me to post here today.
    I can understand comments, passwords and search facilities being a .mac only experience because it requires server side technology. I can also understand that .mac users get enhanced features like slideshows as well.
    But why is the fundamentally *basic* option to 'publish the changes only' not available to non .mac users?
    I know uploading to .mac uses a different protocol to uploading via FTP, but I don't think it is about that. Obviously the software engine in iWeb 1.1 can now track the pages that have changed, and flag those for uploading. So if the facility to do this is not available with non .mac uploading, is this some form of crippleware? Can any software engineers comment on this or am I talking off the top of my head? [And please mods, don't delete this post - I use the word 'crippleware' in its harshest form, clearly I can still use iWeb to make fantastic websites - I am asking a technical question here.]
    Michael
    A Trusty Quicksilver G4 Dual 1GHz

    OK, from reading this thread:
    http://discussions.apple.com/thread.jspa?threadID=486335&tstart=0
    There is a pattern: An error occurred while publishing file “/blah/blah", while file "/blah/blah" seems to be random from one person to the next, but they all share one thing and that is communication protocol.
    For iWeb to be able to publish changes to .Mac, it has to:
    1. identify if the file exists
    2. do the following:
    2a. if not exists, copy it to .Mac
    2b. if exist, do some sort comparison - CRC checksum -
    2b1. if checksums match, don't copy
    2b2. if checksums don't match copy it to .Mac
    At least I think that's what going on, I don't have .Mac so that is best I can think of. Perhaps, some Apple SW engineers can jump in here.
    Now, the bad part is iWeb has to (and I'm assuming iWeb uses WebDAV):
    1. go thru each file locally
    2. crawl its way into .Mac (WebDAV is a slow protocol) to find the the counter part.
    3. when it finds a file that matches a client side file, it has to (some how) do checksum on-the-fly across the net work (which is slow and congested)
    #3 is I think where it failed, there are many factors here: 1) networks congestion 2) latency 3) protocol overhead 4) checksum calculation time etc...
    iWeb eventually times out because any/all of the above.
    It's nice that WebDAV can author to the host yada, yada, but it's so SLOOOOOW.
    What I would do is for every publishing, I would build a files and their checksums keep it on the host (or local, must be hidden).
    For subsequence publishing, I would (use a fast protocol like FTP) download this pre-built files/checksums list. Locally, do a full publishing, making checksum comparison, the result is delta changes; upload only those. Build a new files/checksums list upload that too.
    What I mean to say is offload everything that is possible to local machine, bandwidth is PREMIUM!

  • I'm trying to make different link styles, but they all match

    I'm trying to create different link styles for different kinds of links (like links in the navigation bar, a telephone link for cell phone users, and maybe an email link).
    All of these links will be different colors, against different colored backgrounds. So each of their normal states will need to be different colors.
    Problem is, when I set one up the way I want, then go on to the next one, it is automatically set up with the normal state color I just set.
    So I change it to the new normal state color I want for that item.
    Then I go back to the previous link I had set up before, just to make sure it didn't change, but it did change to the new normal state I just set up.
    Isn't there some way around this?

    Hello,
    In order to get it working, I would suggest you to create different Text link styles and apply them according to the requirement in the website.
    Please have a look at the video in the link below which might explain how to create and use them :
    http://trainingwebcom.worldsecuresystems.com/SachinFTP/2012-10-24_2314.swf
    Hope this helps.
    Regards,
    Sachin

Maybe you are looking for