Powershell get default calendar name

Hi, I am working on a script for monitoring the permissions of mailbox calendar folders, the problem is we have a Multilanguage exchange environment. Some of the mailbox folder names are in EN and some are in Dutch.
So I thought in the first place I can get the language setting of the mailbox and based on that I can decide if it’s a Dutch or EN folder (Calendar or Agenda). But now I found out that some mailboxes got Dutch language but EN folder names
and vice versa.
I am searching for a way to get the name of the default calendar folder without checking the regional or language properties.
Do you guys have some ideas?
Bye,
Pouyan

Hi,
Try this and see if that suites your needs:
Get-mailbox | Get-MailboxFolderStatistics -FolderScope calendar | sort-object Name |ft Identity,Name
Martina Miskovic
...small improvement on this: If the User has several Calendars in Mailbox i've got multiple objects.
You must iterate through all of them, or filter them with 'where-object' to get just the default calendar.
$calname = Get-MailboxFolderStatistics -Identity $username  -FolderScope calendar | where-object {$_.FolderType -eq "Calendar"}$calandar= $username + ":\" + $calname.Name.toString()

Similar Messages

  • When I click SAVE PDF i need to get default dynamic name to save the PDF document.

    Hi All,
    When I click SAVE PDF option I need to get default dynamic name. In my case lets say Sales Order Number.pdf.
    Thanks,
    SP.

    Hi,
    I have created SAP Abobe Form for Patient Order.
    So when we execute we will see output as a PDF. If I want to save the PDF From, and click on the SAVE button, by default it comes up with my SAP FORM name, which I don’t want.
    What I want is when I click SAVE button by default it should come up with the Patient Number on the PDF Form, so that i can directely save without changing the name.
    For Example if I view the 101010 Patient Number then i should save the pdf from by 101010.pdf, same way if i view 202020 Patient number then i should save the pdf form by 202020.pdf.
    Please let us know is this possible.
    Thanks,
    SP

  • While installing CUCM 9.0.1.1000-37 on Vmware Workstation 8.0 m getting default gateway name/address is invalid or gateway is.

    Hi,
    while installing CUCM 9.0.1.1000-37  on Vmware Workstation 8.0 m getting  default gateway name/address is invalid or gateway is not properly configured. Can any1 help me to get out of this issue.
    Want to install  CUCM 9.0 on Vmware Workstation 8.0..

    Er... is there a chance your network is not properly configured? Can you please shed some light on the details of your network?
    By the way, I doubt that CUCM would ever be able to start up in VMWare Workstation.
    G.

  • How to get SUBSCRIBED calendars synched on iPhone/MobileMe

    Create, and place this Apple script in your Appliations folder
    Instructions follow the script...
    -- iCal Duplicator 2.0
    -- MobileMe Push Sync with iCal does not currently support susbcribed calendars. This has disappointed some like
    -- myself, who rely extensively on subscribed calendars. This kludgy solution copies events from a subscribed calendar
    -- to a local calendar. Set your calendar names in the script, then run the script on a weekly/daily basis or manually to
    -- update your local copy/copies based on the subscribed calendar.
    -- Support for copying from multiple calendars has been added. You'll need to enter the source and destination names as
    -- pairs. If you want multiple subscribed calendars copied into one local calendar, you can enter the local calendar names
    -- multiple times as I have for the "Combined - Local" calendar.
    -- Christian Lindemer, July 15th, 2008 {macosxhints (a) dethbunny (.) net}
    -- * * * Edit values to match actual calendar names * * *
    -- The subscribed calendars
    property sourceCalendarNames : {"Davidcopy", "Othercopy"}
    -- The blank local calendar(s) to copy in to, in the same order as the source calendars
    property destinationCalendarNames : {"Davidcopy", "Other"}
    -- how many days to go back - the more you add, the slower the script runs.
    property oldEntryDays : 1
    on run
    --make sure we have valid names.
    try
    tell application "iCal"
    repeat with testName in sourceCalendarNames
    --this throws an error if there is no calendar with the given name, thus checking the calendar's validity.
    set testCal to (the first calendar whose title is the testName)
    end repeat
    repeat with testName in destinationCalendarNames
    set testCal to (the first calendar whose title is the testName)
    end repeat
    end tell
    on error
    --if a name can't be found, alert user and halt.
    calendarNotFound(testName)
    return --this effectively quits the script
    end try
    repeat with destName in destinationCalendarNames
    clearEvents(destName)
    end repeat
    set calendarCount to 1
    --repeat through all calendar names
    repeat with sourceName in sourceCalendarNames
    --get the calendar names and pass them to the copyEvents function
    set destinationName to item calendarCount of destinationCalendarNames
    copyEvents(sourceName, destinationName)
    set calendarCount to (calendarCount + 1)
    end repeat --repeat through all calendar pairs
    end run
    on calendarNotFound(notFoundName)
    display alert "Calendar named " & notFoundName & " was not found in iCal. Please edit the script to match your calendars."
    end calendarNotFound
    on clearEvents(destCalName)
    tell application "iCal"
    --Clear the destination calendar
    set destCalendar to (the first calendar whose title is the destCalName)
    set calendarEvents to (events of destCalendar) -- get the destination calendar's event list
    repeat with myEvent in calendarEvents -- delete each existing event
    delete myEvent
    end repeat
    end tell
    end clearEvents
    on copyEvents(sourceCalName, destCalName)
    tell application "iCal"
    set sourceCalendar to (the first calendar whose title is the sourceCalName)
    set destCalendar to (the first calendar whose title is the destCalName)
    set calendarEvents to (events of sourceCalendar) -- get the calendar's event list
    repeat with myEvent in calendarEvents -- repeat for each item found in the source event list
    --Don't bother with old events
    if start date of myEvent > ((current date) - oldEntryDays * days) then --event is in future, or within prefs for old entries
    -- gather relevant details of event to create new event with
    set eventStart to start date of myEvent
    set eventEnd to end date of myEvent
    set eventAllDay to allday event of myEvent
    set eventSummary to summary of myEvent
    -- create event in destination calendar with details of subscribed event
    tell destCalendar
    make new event at end with properties {summary:eventSummary, start date:eventStart, end date:eventEnd, allday event:eventAllDay}
    end tell
    end if --if not older than 'oldEntryDays' days ago
    end repeat --iterate through entries in source calendar
    end tell
    end copyEvents
    Let's say you have a subscribed calendar named "David"
    Go into iCal and create a new calendar ("on my Mac") named "Davidcopy" with the same color as your subscribed calendar.
    Repeat for any other subscribed cals you want to sync to iPhone.
    Open the CopyCal script
    Edit the first line of (uncommented) code which starts with property sourceCalendarNames:
    Change the names of the cals in this list to match the subscribed cals you wish to copy
    Edit the list on the next line to match the NEW cals you created ("Davidcopy" etc)
    Next look at iCal and uncheck the subscribed cals.
    Run the script and watch the copying take place.
    Now to automate this, set up an event everyday (as often as you like). Preferably this can be in another calendar you don't publish - so everyone doesn't have it cluttering their view of your cal.
    For example I have events named "sync" at 9:30am and 5pm every weekday. For the alarm, use "Run Script" and choose the CopyCal.scpt.

    on copyEvents(sourceCalName, destCalName)
    tell application "iCal"
    set sourceCalendar to (the first calendar whose title is the sourceCalName)
    set destCalendar to (the first calendar whose title is the destCalName)
    set calendarEvents to (events of sourceCalendar) -- get the calendar's event list
    repeat with myEvent in calendarEvents -- repeat for each item found in the source event list
    --Don't bother with old events
    if start date of myEvent > ((current date) - oldEntryDays * days) then --event is in future, or within prefs for old entries
    -- gather relevant details of event to create new event with
    set eventStart to start date of myEvent
    set eventEnd to end date of myEvent
    set eventAllDay to allday event of myEvent
    set eventSummary to summary of myEvent
    set eventRecurrence to recurrence of myEvent
    -- create event in destination calendar with details of subscribed event
    tell destCalendar
    make new event at end with properties {summary:eventSummary, start date:eventStart, end date:eventEnd, allday event:eventAllDay, recurrence:eventRecurrence}
    end tell
    end if --if not older than 'oldEntryDays' days ago
    end repeat --iterate through entries in source calendar
    end tell
    end copyEvents

  • Get Rid of 'Would You Like to make iCal Your default calendar application'

    Since installing the Plaxo 'helper' / Pref Pane - I now get the following message every time I launch iCal (and Address Book) ...
    'Would you like to make iCal your default calendar application?'
    Even when selecting 'Make Default' it still asks the next time. Is there a setting in com.apple.ical.plist (or similar) that controls this that I can look at, or is there a terminal command to try setting this another way?
    I'm bothered a) why I get this at all - suspect Plaxo b) why I can't just set this the once. Any help gratefully received.
    If it is Plaxo monitoring and then setting/changing a flag on the fly it's soon going to be heading for the trash....

    OK, here I am answering my own question... It turns out there's another Discussion which has the following solution:
    I had the same message pop-up. I quite iCal and then went to ~/Library/Preferences and trashed the apple.ical preference [plist]. After that, I re-launched iCal and checked the box in the message box and it took that time.
    I tried this... we'll see if it works for me.

  • TotalVHDCapacity attribute is returning zero in "Get-SCVMTemplate | select Name, TotalVhdCapacity" powershell command though the Vhd capacity is 20 gb in size, vmm 2012 r2

    Hi All,
    TotalVHDCapacity attribute is returning zero in "Get-SCVMTemplate | select Name, TotalVhdCapacity" powershell command though the template has Vhd capacity is 20 gb in size, vmm 2012 r2. I can create VM using this template too.
    For other templates it is returning correct value though.
    Can anyone help us understanding the root cause and the solution too.
    Thanks in advance.
    Debabrata

    I booted this drive from another computer (Asrock M3A770DE mobo) and works fine, speed with dd was ~100MB/s
    I also update bios on my first computer with Intel D945GSEJT (there is selected AHCI mode) still the same transfers with dd (~10Mb/s)
    I have no idea what to do with it now
    EDIT:
    More tests with other hdd (Samsung HD502IJ), dd on mounted NTFS partition:
    Intel D945GSEJT booted from Archlinux iso:
    hdparm: ~75 MB/s
    dd: ~10 MB/s
    Intel D945GSEJT booted from Archlinux iso, HDD connected to PCI SATA controller (Promise 378):
    hdparm: ~60 MB/s
    dd: ~10 MB/s
    Asrock M3A770DE booted from Archlinux iso:
    hdparm: ~87 MB/s
    dd: ~76 MB/s
    Asrock M3A770DE booted from Archlinux iso, HDD connected to PCI SATA controller (Promise 378):
    hdparm: ~81MB/s
    dd: ~76 MB/s
    What is broken on D945GSEJT?
    Last edited by miskoala (2012-03-30 13:47:23)

  • Get default printer share name

    Can someone give a code snippet of how to get the default printer share name?
    I'm able to get the printer name with the following but can't get the share name.
        private void listClientPrinters(PrintService[] pServers) {
            for (int i = 0; i < pServers.length; i++) {
                javax.print.PrintService ps = pServers;
    write_message("Client Printer "+i+": "+ps.getName());
    }Thanks,                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    hi,
    Please refer the code elow..u should be able to crack this roblem..
      data: l_usr01 like usr01.
      CALL FUNCTION 'GET_PRINT_PARAM'
        EXPORTING
          I_BNAME = sy-uname
        IMPORTING
          E_USR01 = l_usr01.
      output_options-TDARMOD = '1'.
      output_options-TDDEST = l_usr01-spld.
      output_options-TDRECEIVER = sy-uname.
      output_options-TDCOPIES = '1'.
      output_options-TDIMMED ='X'.
      output_options-TDDELETE = 'X'.
      output_options-TDLIFETIME = 0.
      output_options-tdnoprev = 'X'.
      output_options-tdnoprint = space.
      output_options-tddelete = 'X'.
    Please, assign points, if u have found it useful..
    Thanks,
    Nivin

  • My ipad has stopped syncing my calendar. Both iPhone and ipad.  After going to the setting - mail, contacts,calendar my Ipad has no where under the calendar category for default calendar.  How can I get my calendar to sync between iPhone and ipad???

    Up until recently my calendar were syncing (between my iPhone 4 &amp; ipad mini). They are no longer synching.  I have searched and everything matches to all the resolutions, the problem is on my ipad under Calendars in the settings there is no option for "default calendar". Every other option matches to what is on my phone, just the default calendar option is missing.  The default email is the same for both.  Help!!!!
    Thank you
    Penelope190

    An interesting additional symtom is that items loaded in the PC (which immedialely duplicate to the iCloud calendar on eht PC - no worries, there) do not transpose the devices (as above) but, loading an item into the phone, it goes to the PC (which is fine, too).  But not to the iPad.  Interestingly, there fewer calendar display options on the iPad than on the phone.
    I talked to Apple a few months ago (after ISO 5) - mainly about the 6000 plus addresses that suddenly appeared in my Contacts - and his advice was do all contact and calendar actions on the PC.  "icloud is still faulty"
    So there we are!   I must have items and reminders in my PC - it is my main work station - and need them on my devices to avoid conflicts when away from my office.

  • How to get the Calendar and Holiday Name from ALBPM engine

    Hi,
    I want to fetch the Calendar Name and Holiday Name that are defined in ALBPM studio/engine.
    How to fetch these through fuego ?
    Bibhu

    Hi,
    Thanks for your help.
    I have executed the code but it did not give me the calendar name as fetchAll() gives me an array.
    I could not find any such method which will give me the Calendar Name.
    The above code give the following result:
    Total Calendar Count: 2 (OK, since I have two calendar in my workspace)
    Calendar Name : fuego.components.CalendarRule@677770 (Want the Calendar Name not this format)
    Calendar Name: fuego.components.CalendarRule@d293b7
    Bibhu

  • Setting the Mobileme calendar as the default calendar on my iPhone

    Guys, my question is quite simple. I have tried in many ways but I can't manage to set the Mobileme calendar as the default calendar in my iPhone. At the moment, the default is the iPhone calendar, which doesn't sync with my Mobileme account and consequently I have all my appointments only on my iPhone and not in my Macbook Pro or my PC.
    Any advice on the above will be much appreciated.
    Thanks in advance
    Fabio
    Message was edited by: Fabio Fabiani

    Sorry Fabio,
    I'm back even i have to sleep sometimes (3-4hours usually)
    Have you tried deleting and re-adding your MobileMe account on your iPhone?
    I have tried every way i can but can't get the iPhone to display a calendar other than that which is mirrored with MobileMe what i'll do is list what my settings for my phone are and you cansee if these mirror the one's on your iPhone oh and these are pretty much all my MM info so it does include some mail stuff as well
    Settings>Fetch New Data>Push "On"
    Settings>Fetch New Data>Fetch "Manually"
    Settings>Fetch New Data>Advanced>Mail, Contacts, Calendars>[email protected] (Contacts, Calendars) "Push"
    Settings>Fetch New Data>Advanced>Mail, Contacts, Calendars>[email protected] (Mail) "Push"
    Settings>Mail, Contacts, Calendars>Accounts>[email protected]>Mail "On"
    Settings>Mail, Contacts, Calendars>Accounts>[email protected]>Contacts "On"
    Settings>Mail, Contacts, Calendars>Accounts>[email protected]>Calendars "On"
    Settings>Mail, Contacts, Calendars>Accounts>[email protected]>Bookmarks "On"
    Settings>Mail, Contacts, Calendars>Accounts>[email protected]>Account Info>Name "xxxx"
    Settings>Mail, Contacts, Calendars>Accounts>[email protected]>Account Info>Adress "[email protected]
    Settings>Mail, Contacts, Calendars>Accounts>[email protected]>Account Info>Password "xxxx"
    Settings>Mail, Contacts, Calendars>Accounts>[email protected]>Account Info>Description "[email protected]"
    Settings>Mail, Contacts, Calendars>Accounts>[email protected]>Account Info>SMTP "smtp.me.com"
    Settings>Mail, Contacts, Calendars>Accounts>[email protected]>Account Info>SMTP>Primary Server>smtp.me.com "On"
    Settings>Mail, Contacts, Calendars>Calendars>Sync "All Events"
    Settings>Mail, Contacts, Calendars>Default Calendar "MM Calendar name"
    Are there any differences?

  • Tally meeting participants in non-default Calendar

    I would like to send a meeting request from a non-default Calendar, but get the message:  "This
    meeting is not in the Calendar folder for this account. Responses to this meeting will not be tallied."
    Numerous threads around this subject revolve around sending the request from the default calendar, but this is not what I wish to do. I have 2 separate calendars which split tasks for 2 different areas of work I do. Obviously one is the default calendar.
    I, however, wish to create a meeting in the second calendar and send a meeting request to various people for that meeting. I also wish for the attendees responses to be tallied in this second calendar. Creating and sending the request functions correctly,
    and I will even receive a response from the other party but Outlook doesn't capture that response in the calendar, saying that the request came from a calendar that is no longer there (although it is).
    Is it at all possible to achieve this in Outlook? If so, could someone advise me how? If not...well, I'll just have to accept this then.

    Hi,
    This is normal Outlook behavior. This warning occurs when you are using the non-default calendar to send a meeting request. Responses are only automatically processed when the meeting is in the default calendar.
    http://www.slipstick.com/outlook/calendar/response-meeting-request-tallied/
    If you want to change your default calendar to another calendar. We need to change your default Outlook data file with another calendar folder. To achieve it, please follow these steps:
    1.Go to File, Account Settings, Data Files.
    2.Click Add.
    3.Type in a name for the pst file and click OK.
    4.Select the new pst and click the Set as default button.
    5.Close and re-open Outlook.
    6. Click File > Account Settings > E-mail > Change Folder, and select the New pst file.
    7. Restart Outlook and all the new created PST file would be the default data file with a default calendar.
    Thanks,
    Winnie Liang
    TechNet Community Support

  • Get all calendars from root

    Hi guys,
    I am developing an integration with EWS based on php. I am using a library I found https://github.com/jamesiarmes/php-ews
    In my case users have various calendars hanging from the root, I get access to the default calendar by this:
    $request->ParentFolderIds->DistinguishedFolderId->Id = EWSType_DistinguishedFolderIdNameType::CALENDAR;
    $response = $ews->FindFolder($request);
    I also get access to shared calendars by this:
    $request->ParentFolderIds->DistinguishedFolderId->Id = EWSType_DistinguishedFolderIdNameType::PUBLIC_FOLDERS_ROOT;
    $response = $ews->FindFolder($request);
    But I am getting crazy to get all calendars hanging from the root. If I asked for all folders on the root I don't get those calendars. What service and params do I need to send to get all calendars from the root?
    Thanks!!

    If you make a FindFolder Request set the Traversal to Deep and use a restriction on the FolderClass to IPF.Appointment that should return all the Calendar folders in a mailbox eg
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="
    http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://sc
    hemas.microsoft.com/exchange/services/2006/types" xmlns:soap="http://schemas.xml
    soap.org/soap/envelope/">
    <soap:Header>
    <t:RequestServerVersion Version="Exchange2013_SP1" />
    </soap:Header>
    <soap:Body>
    <m:FindFolder Traversal="Deep">
    <m:FolderShape>
    <t:BaseShape>AllProperties</t:BaseShape>
    </m:FolderShape>
    <m:IndexedPageFolderView MaxEntriesReturned="1000" Offset="0" BasePoint=
    "Beginning" />
    <m:Restriction>
    <t:IsEqualTo>
    <t:FieldURI FieldURI="folder:FolderClass" />
    <t:FieldURIOrConstant>
    <t:Constant Value="IPF.Appointment" />
    </t:FieldURIOrConstant>
    </t:IsEqualTo>
    </m:Restriction>
    <m:ParentFolderIds>
    <t:DistinguishedFolderId Id="msgfolderroot" />
    </m:ParentFolderIds>
    </m:FindFolder>
    </soap:Body>
    </soap:Envelope>
    Cheers
    Glen

  • Sender Mail Adapter - default interface name

    Hi,
    I need to receive through one e-mail sender channel tree different kind of messages.
    In sender mail adapter I specify ecept other parameters "Default Interface Name". When I send a message with a same as defined in an interface the message is processed correctly.
    But when I send a different kind of message then I get an error : "Receiver could not be determined".
    Is any way around how through one sender e-mail adapter receive a different kinds of messages ?
    Thanks for any help,
    Marian

    Hello Marzian,
    have you find a solution for this problem?
    We're facing the same issue.
    thanks,
    -Peter Ha

  • How do i have multiple calendars on my default calendar setting?

    How do i get shared calendars onto my default calendar so i am able to view everything in one place? 

    The default calendar is the one that events are added to unless you specify something different. Their can be only one.
    What are you syncing your phone to for calendars? Gmail? Outlook? iCloud? Something else? Without knowing that, it's hard to give advice.

  • Itunes crashed in middle of outlook sync my calendar is left named _modcal is there a way to get my calendar renamed?

    iTunes coredumped in the middle of syncing my Outlook calendar and left my Calendar named "_ModCal74cb._ModCal3cfb.Calendar" (yes this has happened twice). Does anyone know a way to get back to the correct, original calendar name without losing all my calendar data????

    If you  have iTunes 11 turn on the Sidebar. Go to iTunes>View and click on Show Sidebar. You can also do a Crtl+S to show the sidebar. The sidebar is where Devices appears. and Control+B to show the Menu bar
    iOS: Device not recognized in iTunes for Mac OS X
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Restore from backup. See:                                 
    iOS: How to back up           

Maybe you are looking for

  • Mapping - Questions

    Hi,    I have few basic questions regarding mappings.    1)  I think we can do everything by using Graphical Mapping. Then what is the purpose for Java, XSLT and ABAP mapping? Please give me an example for this...    2) Which mapping will give better

  • [Desktop] Every grid view should have an option for a vertical listing

    For example the Artists screen under Your Music, and albums displayed on an artist page. Grid views are kind of pretty if you like colours. They're pretty awful for finding a particular thing by name. For example if I am looking for Infected Mushroom

  • Where is the run.bat file?

    Hi, I have downloaded beanbuilder-0_6-alpha from https://bean-builder.dev.java.net/ I am trying to install the bean builder going thru the readme file. I have extracted all the file but I cannot find "run.bat". Can anyone help me find this file. If t

  • How to install photoshop elements 12 without the CD.

    My new iMac doenst have a CD drive. How can I install the photoshop elements 12 i just purchased. Thank you

  • Comparison of Oracle, MySQL and PostgreSQL DBMS

    Hi, Wanted to share this article: http://www-css.fnal.gov/dsg/external/freeware/mysql-vs-pgsql.html Regards, Priyanka