Set storage quota on multiple mailboxes using PowerShell?
I need to set storage quota limits on multiple mailboxes using PowerShell. I understand I can create a .csv file with aliases and pipe that into a cmdlet, eg.,
Import-CSV "C:\temp\alias.csv" | % {Set-Mailbox -identity $_.alias -IssueWarningQuota 900mb -ProhibitSendQuota 950mb -ProhibitSendReceiveQuota 1gb -UseDatabaseQuotaDefaults $false
Is there any other way of doing this with a much more robust script?
Any help would be much appreciated.
Hi,
Is there any special attribute for these multiple mailboxes? such as they are from a specific OU or a distribution group etc.
If there is, we can direct use the filter to pick out these mailboxes instead of create .csv file for them. The following example can set storage quota for mailboxes in a distrobution group Group1:
Get-DistributionGroupMember -Identity Group1 | ForEach{ Set-Mailbox -identity $_.Name -IssueWarningQuota 900mb -ProhibitSendQuota 950mb -ProhibitSendReceiveQuota 1gb -UseDatabaseQuotaDefaults $false}
The following example is used to set storage quota for mailboxes from Exchange Department:
Get-Recipient | Where-Object {$_.Department -eq 'Exchange'} | ForEach{ Set-Mailbox -identity $_.Name -IssueWarningQuota 900mb -ProhibitSendQuota 950mb -ProhibitSendReceiveQuota 1gb -UseDatabaseQuotaDefaults $false}
Regards,
Winnie Liang
TechNet Community Support
Hi,
Is there any special attribute for these multiple mailboxes? such as they are from a specific OU or a distribution group etc.
If there is, we can direct use the filter to pick out these mailboxes instead of create .csv file for them. The following example can set storage quota for mailboxes in a distrobution group Group1:
Get-DistributionGroupMember -Identity Group1 | ForEach{ Set-Mailbox -identity $_.Name -IssueWarningQuota 900mb -ProhibitSendQuota 950mb -ProhibitSendReceiveQuota 1gb -UseDatabaseQuotaDefaults $false}
The following example is used to set storage quota for mailboxes from Exchange Department:
Get-Recipient | Where-Object {$_.Department -eq 'Exchange'} | ForEach{ Set-Mailbox -identity $_.Name -IssueWarningQuota 900mb -ProhibitSendQuota 950mb -ProhibitSendReceiveQuota 1gb -UseDatabaseQuotaDefaults $false}
Regards,
Winnie Liang
TechNet Community Support
Similar Messages
-
Creating multiple mailboxes using Powershell for users who already exist in AD
Hi there,
Wondering if anyone can help, I am wanting to use Powershell to run a command which references a CSV file to create a mailbox for a user who already exists in AD.
It needs to reference the username, to ensure the correct user has a mailbox created (as mentioned they exist already in the domain), place them on a specific database (e.g DB1) and assign them an email address as well as possibly an alias email address
too.
Can anyone provide me the headings of the CSV file which would be needed as well as the powershell command to run. It would be great too if I could also set the quota sizes for the user at the same time of creating the mailbox, but if not possible or complicated
I can run a script afterwards to do this. I would only want to warn them when their mailbox is 1.5GB in size and stop them sending when it reaches 2GB.
ThanksSo create a csv file with the following headers and data
UserID, Alias
UserID should be the user SamAccountName, and the Alias is the Mailbox Alias that you want to set. Supposing that the csv file is named users.csv and located under C:\ , open the Exchange Management Console and run:
$users = Import-Csv c:\users.csv
Foreach ($user in $users) {
Enable-Mailbox -Identity $user.UserID -alias $user.alias -database 'DB1'
Set-Mailbox -Identity $user.UserID -IssueWarningQuota 1.5gb -ProhibitSendQuota 2gb
Please Mark As Answer if this helps
ammarhasayen -
Split large .pptx file to multiple files using PowerShell
Hi.
I'm not a programmer and I have the task to split big .pptx file(>100 slides) to multiple .pptx files with 4 slides in each one and save them into SP library. It should be done on PowerShell.
Thanks for any help!Hi,
For splitting PowerPoint files into multiple parts, I would suggest you post this question to Office forum, you will get more help and confirmed answers there:
http://social.technet.microsoft.com/Forums/office/en-US/home
For uploading files to SharePoint Library using PowerShell, here are some links with script demos provided for your reference:
http://social.technet.microsoft.com/wiki/contents/articles/19529.sharepoint-2010-upload-file-in-document-library-using-powershell.aspx
http://spfileupload.codeplex.com/
Best regards
Patrick Liang
TechNet Community Support -
Set user inherit permissions check box using powershell
Hi All,
How can I set the the "include inherit permissions from this objects parent" propertiy in Active Directory user object to a list of users using powershell.
This option is not checked for some of my users and I'll like to set it using a powershell script.
Thanks
Simon
MCSA, MCSE, MCITP:SA, MCITP:EA, MCITP:Enterprise Messaging Administrator 2010, CCNAdownload Quest Active Directory:
Get-QADUser -SizeLimit 0 | ? {$_.DirectoryEntry.ObjectSecurity.AreAccessRulesProtected} | Set-QADObjectSecurity -UnLockInheritance
or
Get-QADUser -SizeLimit 0 | ? {$_.security.PermissionInheritanceLocked} | Set-QADObjectSecurity -UnlockInheritance
or
$user = [ADSI]"LDAP://cn=kazun,ou=test,dc=contoso,dc=com"
$acl = $ouser.objectSecurity
$isProtected = $false # allows inheritance
$preserveInheritance = $true # preserve inherited rules
$acl.SetAccessRuleProtection($isProtected, $preserveInheritance)
$user.commitchanges()
I had this issue and using both of Kazun's methods worked. A mod should mark this as the answer.Paul Frankovich -
Install multiple hotfixes using powershell
Guys,
I need help in installing multiple hot fixes using powershell on our domain controllers. i searched a little on google/bing but was unable to find the solution may be i am searching wrong :) . The solution should install multiple
hotfixes and don't restart . restart can be done manually.My understanding is most Microsoft hotfixes should use the
Windows Installer Tool (msiinstaller). If you have a list of hotfixes to deploy you could put them all in a folder and have your script run each of them.
If you run the hotfix in quiet mode (/q[n|b|r|f]), it looks like it
returns error code 3010 to indicate a reboot is required but doesn't reboot the machine (see also on TechNet List of error codes and error messages for Windows Installer processes in Office 2003
products and Office XP products which should apply to most hotfixes that use the Windows Installer Tool).
You could track each hotfix for this error and if it's returned use
Restart-Computer to restart the machine only once completed.
Jason Warren
@jaspnwarren
jasonwarren.ca
habaneroconsulting.com/Insights -
SQL Agent jobs status for multiple servers using Powershell.
Hi All,
I am following website link:
http://www.toadworld.com/platforms/sql-server/b/weblog/archive/2013/09/17/powershell-script-to-monitor-a-service-on-a-group-of-servers-html-formatted-email-output.aspx
I require to gather status details about all the SQL Agent jobs in the environment on multiple SQL Servers.
I tried to edit the script using:
[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SMO")
$sqlServerName = 'localhost\developer'
$sqlServer = New-Object Microsoft.SqlServer.Management.Smo.Server($sqlServerName)
foreach($job in $sqlServer.JobServer.Jobs)
$job | select Name, OwnerLoginName, IsEnabled, LastRunDate, LastRunOutcome, DateCReated, DateLastModified
but SQL Agent jobs are not reflecting in the mail output...
requesting help...!!
Thanks in Advance.
HuntI've created a new script for you. Let me know if you've any questions
Create the function
Function Get-SQLJobHTMLReport
param(
[String]$ComputerList,[string]$Outputfile,[String]$To,[String]$From,[string]$SMTPMail
New-Item -ItemType file $Outputfile -Force
# Function to write the HTML Header to the file
Function writeHtmlHeader
param($fileName)
$date = ( get-date ).ToString(‘yyyy/MM/dd’)
Add-Content $fileName “<html>”
Add-Content $fileName “<head>”
Add-Content $fileName “<meta http-equiv=’Content-Type’ content=’text/html; charset=iso-8859-1′>”
Add-Content $fileName ‘<title>Service Status Report </title>’
add-content $fileName ‘<STYLE TYPE=”text/css”>’
add-content $fileName “<!–”
add-content $fileName “td {“
add-content $fileName “font-family: Tahoma;”
add-content $fileName “font-size: 11px;”
add-content $fileName “border-top: 1px solid #999999;”
add-content $fileName “border-right: 1px solid #999999;”
add-content $fileName “border-bottom: 1px solid #999999;”
add-content $fileName “border-left: 1px solid #999999;”
add-content $fileName “padding-top: 0px;”
add-content $fileName “padding-right: 0px;”
add-content $fileName “padding-bottom: 0px;”
add-content $fileName “padding-left: 0px;”
add-content $fileName “}”
add-content $fileName “body {“
add-content $fileName “margin-left: 5px;”
add-content $fileName “margin-top: 5px;”
add-content $fileName “margin-right: 0px;”
add-content $fileName “margin-bottom: 10px;”
add-content $fileName “”
add-content $fileName “table {“
add-content $fileName “border: thin solid #000000;”
add-content $fileName “}”
add-content $fileName “–>”
add-content $fileName “</style>”
Add-Content $fileName “</head>”
Add-Content $fileName “<body>”
add-content $fileName “<table width=’100%’>”
add-content $fileName “<tr bgcolor=’#CCCCCC’>”
add-content $fileName “<td colspan=’4′ height=’25′ align=’center’>”
add-content $fileName “</td>”
add-content $fileName “</tr>”
add-content $fileName “</table>”
# Function to write the HTML Header to the file
Function writeTableHeader
param($fileName)
Add-Content $fileName “<tr bgcolor=#CCCCCC>”
Add-Content $fileName “<td width=’10%’ align=’center’>ServerName</td>”
Add-Content $fileName “<td width=’50%’ align=’center’>Name</td>”
Add-Content $fileName “<td width=’10%’ align=’center’>OwnerLoginName</td>”
Add-Content $fileName “<td width=’10%’ align=’center’>IsEnabled</td>”
Add-Content $fileName “<td width=’10%’ align=’center’>LastRunDate</td>”
Add-Content $fileName “<td width=’10%’ align=’center’>LastRunOutcome</td>”
Add-Content $fileName “<td width=’10%’ align=’center’>DateCReated</td>”
Add-Content $fileName “<td width=’10%’ align=’center’>DateLastModified</td>”
Add-Content $fileName “</tr>”
Function writeHtmlFooter
param($fileName)
Add-Content $fileName “</body>”
Add-Content $fileName “</html>”
Function writeDiskInfo
param($filename,$Servername,$name,$OwnerLoginName,$IsEnabled,$LastRunDate,$LastRunOutcome,$DateCReated,$DateLastModified)
Add-Content $fileName “<tr>”
Add-Content $fileName “<td bgcolor=’#FF0000′ align=left ><b>$servername</td>”
Add-Content $fileName “<td bgcolor=’#FF0000′ align=left ><b>$name</td>”
Add-Content $fileName “<td bgcolor=’#FF0000′ align=left ><b>$OwnerLoginName</td>”
Add-Content $fileName “<td bgcolor=’#FF0000′ align=left ><b>$IsEnabled</td>”
Add-Content $fileName “<td bgcolor=’#FF0000′ align=left ><b>$LastRunDate</td>”
Add-Content $fileName “<td bgcolor=’#FF0000′ align=left ><b>$LastRunOutcome</td>”
Add-Content $fileName “<td bgcolor=’#FF0000′ align=left ><b>$DateCReated</td>”
Add-Content $fileName “<td bgcolor=’#FF0000′ align=left ><b>$DateLastModified</td>”
Add-Content $fileName “</tr>”
writeHtmlHeader $Outputfile
Add-Content $Outputfile “<table width=’100%’><tbody>”
Add-Content $Outputfile “<tr bgcolor=’#CCCCCC’>”
Add-Content $Outputfile “<td width=’100%’ align=’center’ colSpan=8><font face=’tahoma’ color=’#003399′ size=’2′><center><strong> SQL Server Agent Job Details</strong></font></td>”
Add-Content $Outputfile “</tr>”
writeTableHeader $Outputfile
#Change value of the following parameter as needed
Foreach($ServerName in (Get-Content $ComputerList))
$sqlServer = New-Object Microsoft.SqlServer.Management.Smo.Server($ServerName)
foreach($item in $sqlServer.JobServer.Jobs)
Write-Host $sqlServer $item.name $item.OwnerLoginName $item.IsEnabled $item.LastRunDate $item.LastRunOutcome $item.DateCReated $item.DateLastModified
writeDiskInfo $Outputfile $sqlServer $item.name $item.OwnerLoginName $item.IsEnabled $item.LastRunDate $item.LastRunOutcome $item.DateCReated $item.DateLastModified
Add-Content $Outputfile “</table>”
writeHtmlFooter $Outputfile
Function sendEmail
param($from,$to,$subject,$smtphost,$htmlFileName)
[string]$receipients=”$to”
$body = Get-Content $htmlFileName
$body = New-Object System.Net.Mail.MailMessage $from, $receipients, $subject, $body
$body.isBodyhtml = $true
$smtpServer = $smtphost
$smtp = new-object Net.Mail.SmtpClient($smtphost)
$smtp.Send($body)
write-output “Email Sent!!”
$date = ( get-date ).ToString(‘yyyy/MM/dd’)
sendEmail -from $From -to $to -subject “Service Status – $Date” -smtphost $SMTPMail -htmlfilename $Outputfile
Get-SQLJobHTMLReport -ComputerList f:\powersql\server.txt -SMTPMail hq.abc.com -To [email protected] -From [email protected] -Outputfile F:\Powersql\jobs.htm
--Prashanth -
SP2013 Set default views across multiple site collections (powershell)?
I am the editor for a large SharePoint 2013 publishing site with approximately 130+ subsites. Based on our most popular content types, I've create two diffferent default views that will come in handy as we move to a distributed authorship model. (I'm thinking
specifically about the Quick Edit/Excel-like feature to make quick changes to page/document metadata.)
The authors/content owner/editors have NO experience with SharePoint, so while the usual benefit of using views is that they can be tailored to individual needs, I'd like to start them off with something that is VERY easy to change on the fly using Ribbon >
Library > Quick Edit. It's either that or, as just a power user in the CMS, go to each individual page and document library and change it manually, which could take days, if not longer. The ideal solution would look for all subsite of layout/content type
foo and change the default views within the page libraries to a set of 17 metadata.
Any help would be greatly appreciated!
Ryan D WattersHi Ryan,
As I understand, you would like to change default view for page/document libraries via powershell.
Firstly, you need to get all page/document libraries in the site, then add columns to default view.
Here are some articles for your reference:
1.Get all document libraries:
http://www.sharepoint-journey.com/get-all-document-libraries-in-a-site-collection.html
2.Managing List Views:
https://nkelkar.wordpress.com/2011/06/21/powershell-create-lists-add-columns-set-new-default-view/
http://get-spscripts.com/2012/02/managing-creating-and-deleting.html
Regards,
Rebecca Tu
TechNet Community Support -
Remove-Mailboxes using Powershell from CSV file
hello all ,
I encountered in problem with my exchange Server 2010
I have a mission to delete closed 150 Mailboxes in my organization
I tried a lot times to use the command "Remove-mailbox " and i anytime got error
I would appreciate the help of one of you maybe guide me because is very important for me to resolve this problem
so meantime i did export of mailbox from exchange server with content "Userpricplename" to CSV file after than export does success i did filtering and tried to perform this commad :" import-csv c:\Mailboxes.csv | foreach {Remove-Mailbox -userprincipalname
$_.Emailadress }
please see the errors below :
excel content :
website: www.PelegIT.co.ilHi ,
If we set -Confirm:$false EMS will not prompt for yes or no option while executing commands in shell.
If we set -Confirm:$true EMS will prompt for yes or no option while executing commands in shell.
Thanks & Regards S.Nithyanandham -
Set Reply-To for Shared Mailbox Using Existing Address?
We have a shared mailbox named [email protected] Is there a way to set the reply-to email address for that shared mailbox to [email protected] if [email protected] is an existing mailbox?
No, unfortunately you can not have same Reply-To or Primary SMTP address to two different mailboxes.
Alternatively you can create a transport rule forward a mail to [email protected] if it is addressed to [email protected] or you could set forwarder on mailbox level too...
Blog |
Get Your Exchange Powershell Tip of the Day from here -
Best practice for setting up iCloud with multiple devices using a single AppleID
Hi there
Me and my wife have an iPhone each, and are looking at getting both of us using iCloud. The problem is that we only use one Apple ID for our music library.
Is getting a separate Apple ID necessary for each device on iCloud, or can multiple devices have seperate settings/photos/music, etc.?Using different Apple ID for iCloud is not necessary, but in most cases it is recommended.
You can however choose to use separate Apple IDs for iCloud and continue to use the same Apple ID for iTunes, thereby being able to share all your purchases of music, apps and books. -
Perform setting OOP ALV for multiple reports using Field Symbols
Hi, Abapers ... i try to write a programme which using ONE oop ALV but 2 different structure internal table. the last result should be 2 radio button. first button is r_wbs and 2ns r_kpi. r_wbs will display 4 column answer and r_kpi will display 10 columns answer with different column name. i successfully implemented using FIELDS SYMBOLS but the problems i failed to perform customized setting forALV (report's tittle, column name, different layout etc) for 2 different reports. this is the programme. Please Give Opinion, simple example will be more helpful. Thanks You Very Much
*&this report experimental how to print into ONE alv
*&with 2 diffrent structure internal table
REPORT zfiroopalv.
SELECTION-SCREEN BEGIN OF BLOCK mode WITH FRAME TITLE text-002.
PARAMETERS r_wbs RADIOBUTTON GROUP mode DEFAULT 'X'.
PARAMETERS r_kpi RADIOBUTTON GROUP mode.
SELECTION-SCREEN END OF BLOCK mode.
CLASS lcl_main DEFINITION.
PUBLIC SECTION.
CLASS-DATA: md_wbs TYPE c LENGTH 1.
METHODS: process,
write.
DATA: mdo_data TYPE REF TO data.
TYPES: BEGIN OF st_wbs,
rsnum TYPE zmeime002a-rsnum,
rspos TYPE zmeime002a-rspos,
a TYPE zmmgitab01-menge,
b TYPE zmeime002a-bdmng,
c TYPE zmeime002a-bdmng,
d TYPE zmeime002a-bdmng,
e TYPE zmeime002a-bdmng,
f TYPE zmmgitab01-menge,
g TYPE zmmgitab01-menge,
END OF st_wbs.
TYPES: BEGIN OF st_kpi,
regio TYPE zmeime002a-regio,
gsber TYPE zmeime002a-gsber,
gtext TYPE zmeime002a-gtext,
x TYPE zmmgitab01-menge,
y TYPE zmmgitab01-menge,
z TYPE zmmgitab01-menge,
END OF st_kpi.
CLASS-DATA: it_wbs TYPE TABLE OF st_wbs,
wa_wbs LIKE LINE OF it_wbs.
CLASS-DATA: it_kpi TYPE TABLE OF st_kpi,
wa_kpi LIKE LINE OF it_kpi.
PRIVATE SECTION.
DATA: set_display_setting TYPE REF TO cl_salv_table.
DATA: display_settings TYPE REF TO cl_salv_display_settings.
DATA: salv_table TYPE REF TO cl_salv_table.
DATA: error TYPE REF TO cx_root.
DATA: errtext TYPE string.
ENDCLASS.
CLASS lcl_kpi DEFINITION INHERITING FROM lcl_main.
PUBLIC SECTION.
METHODS: process_kpi.
PRIVATE SECTION.
ENDCLASS.
* C.L.A.S.S lcl_main D.E.F.I.N.I.T.I.O.N
CLASS lcl_wbs DEFINITION INHERITING FROM lcl_main.
PUBLIC SECTION.
METHODS: process_wbs.
PRIVATE SECTION.
ENDCLASS.
* m.a.i.n. .p.r.o.g.r.a.m.
START-OF-SELECTION.
DATA: o_main TYPE REF TO lcl_main.
DATA: p_wbs TYPE c.
CREATE OBJECT o_main.
CASE 'X'.
WHEN r_wbs.
o_main->md_wbs = 'X'.
WHEN r_kpi.
o_main->md_wbs = ' '.
ENDCASE.
o_main->process( ).
o_main->write( ).
CLASS lcl_main IMPLEMENTATION.
*ENDMETHOD.
METHOD process. " NOTE: public method
DATA: o_main TYPE REF TO lcl_main,
o_wbs TYPE REF TO lcl_wbs,
o_kpi TYPE REF TO lcl_kpi.
CREATE OBJECT: o_wbs,o_kpi.
IF ( me->md_wbs = 'X' ).
CALL METHOD o_wbs->process_wbs( ). " NOTE: private method
GET REFERENCE OF me->it_wbs INTO me->mdo_data.
ELSE.
CALL METHOD o_kpi->process_kpi( ). " NOTE: private method
GET REFERENCE OF me->it_kpi INTO me->mdo_data.
ENDIF.
ENDMETHOD.
METHOD write.
FIELD-SYMBOLS:
<lt_outtab> TYPE table.
ASSIGN me->mdo_data->* TO <lt_outtab>.
cl_salv_table=>factory(
EXPORTING
list_display = if_salv_c_bool_sap=>false
IMPORTING
r_salv_table = salv_table
CHANGING
t_table = <lt_outtab>
salv_table->display( ).
ENDMETHOD.
ENDCLASS.
CLASS lcl_kpi IMPLEMENTATION.
METHOD process_kpi.
*********** run some select statement into it_kpi*******
ENDMETHOD.
ENDCLASS.
CLASS lcl_wbs IMPLEMENTATION.
METHOD process_wbs.
*********** run some select statement into it_wbs*******
ENDMETHOD.
ENDCLASS.Hi,
I had similar requirement wherein I was supposed to display different data using 2 different internal tables on a subscreen area.
The screen consists of two parts: 1) selection-screen with few input fields and two buttons 2) Subscreen area where the report need to be displayed. This report is displayed based on the button that the user is selecting. For this I have done the following things:
1. Capture the sy-ucomm when user is clicking on any of the two buttons in PAI. Then perform data fetch operation.
MODULE USER_COMMAND_9003 INPUT.
CASE OK_CODE.
WHEN 'DETAIL'.
GV_RPT = OK_CODE.
PERFORM F_GET_DETAIL_DATA.
WHEN 'REPORT'.
GV_RPT = OK_CODE.
PERFORM F_GET_REPT_DATA.
ENDCASE.
ENDMODULE. " USER_COMMAND_9003 INPUT
2. Declare two different ALV's with the fieldcat similar to 2 internal tables respectively. Use the above sy-ucomm PBO to call appropriate ALV.
MODULE DISPLAY_ALV OUTPUT.
IF GV_RPT EQ 'DETAIL'.
PERFORM F_FIELDCAT_DETAIL.
PERFORM F_LAYOUT_DETAIL.
PERFORM F_EXCLUDE_TOOLBAR_DETAIL.
PERFORM F_DISPLAY_ALV_DETAIL.
ELSEIF GV_RPT EQ 'REPORT'.
PERFORM F_FIELDCAT_REPT.
PERFORM F_LAYOUT_REPT.
PERFORM F_EXCLUDE_TOOLBAR_REPT.
PERFORM F_DISPLAY_ALV_REPT.
ENDIF.
ENDMODULE. " DISPLAY_ALV OUTPUT
3. Before displaying ALV you need to free the container and ALV.
FORM F_DISPLAY_ALV_DETAIL .
IF GC_CONTAINER_ES IS NOT INITIAL.
CALL METHOD GC_CONTAINER_ES->FREE
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
IF GC_ALV_GRID_ES IS NOT INITIAL.
CALL METHOD GC_ALV_GRID_ES->FREE
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
IF GC_CONTAINER_TB IS NOT INITIAL.
CALL METHOD GC_CONTAINER_TB->FREE
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
IF GC_ALV_GRID_TB IS NOT INITIAL.
CALL METHOD GC_ALV_GRID_TB->FREE
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
CREATE OBJECT GC_CONTAINER_ES
EXPORTING
CONTAINER_NAME = 'CC_9003'
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
CREATE_ERROR = 3
LIFETIME_ERROR = 4
LIFETIME_DYNPRO_DYNPRO_LINK = 5
OTHERS = 6.
CREATE OBJECT GC_ALV_GRID_ES
EXPORTING
I_PARENT = GC_CONTAINER_ES
EXCEPTIONS
ERROR_CNTL_CREATE = 1
ERROR_CNTL_INIT = 2
ERROR_CNTL_LINK = 3
ERROR_DP_CREATE = 4
OTHERS = 5.
CALL METHOD GC_ALV_GRID_ES->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
IS_LAYOUT = GS_LAYOUT_ES
IT_TOOLBAR_EXCLUDING = GT_TOOLBAR_ES
CHANGING
IT_OUTTAB = GT_ES_REPT
IT_FIELDCATALOG = GT_FIELDCAT_ES
EXCEPTIONS
INVALID_PARAMETER_COMBINATION = 1
PROGRAM_ERROR = 2
TOO_MANY_LINES = 3
OTHERS = 4.
ENDFORM. " F_DISPLAY_ALV_DETAIL
Similarly define the FORM F_DISPLAY_ALV_REPT.
Hope this will be useful for you. If you have any more queries let me know. -
How can I seperate one string into multiple strings using PowerShell?
New to PowerShell...how can I read/separate parts of a file name? For instance if I have a file name like "part1_part2_part3_part4.xls", how to separate this file name to four different parts? So I basically want to go from that file name,
to four different strings like part1, part2, part3, and part4...as four separate strings. How can I get this done in PowerShell?
ThanksYou can try something like this
PS> (Get-ChildItem part1_part2_part3_part4.xls).BaseName.Split('_') -
Synchronisation problem with multiple mailboxes
We have a user who has Microsoft Outlook set up to show multiple mailboxes. It seems that if he moves something from his inbox to another folder within his own mailbox, then this move is synchronised down to the BB fine, but if he moves it from within his own mailbox to another mailbox, then the move isn't noticed, and the item sits in the inbox on his BB indefinitely.
Two questions:
1) Any idea how to fix this?
2) Is there any way to force a full resync of the mailbox to get it back in step?
Solved!
Go to Solution.Hi and Welcome to the Forums!
You did not say, but I guess that you are on BES rather than BIS/OWA. As such, you should investigate activating Hard Deletes:
KB04853How to enable hard deletes on the BlackBerry Enterprise Server
Good luck!
Occam's Razor nearly always applies when troubleshooting technology issues!
If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
Join our BBM Channels
BSCF General Channel
PIN: C0001B7B4 Display/Scan Bar Code
Knowledge Base Updates
PIN: C0005A9AA Display/Scan Bar Code -
How to set Current quota template dropdownto 50 GB using powershell script
In central administrator under Application Management -> Configure quotas and locks we have Current quota template drop down. I want to set drop down value to 50 GB using powershell . Is it possible and it if it possible then How ? Please
let me know
Thanks in Advance
Regards
Subhash
Hi Sub_84,
A quota template consists of storage limit values that specify the maximum amount of data that can be stored in a site collection. When the storage limit is reached, a quota template can also trigger an e-mail alert to the site
collection administrator. You can create a quota template that can be applied to any site collection in the farm. The storage limit applies to the sum of the content sizes for the top-level site and all subsites within the site collection.
You can create quota template using powershell, ojbect module and sharepoint UI.
Create new Quota template using powershell:
$newQuotaTemplate = New-Object Microsoft.SharePoint.Administration.SPQuotaTemplate
$newQuotaTemplate.Name = "New Quota Template"
$newQuotaTemplate.StorageMaximumLevel = (150 * 1024) * 1024
$newQuotaTemplate.StorageWarningLevel = (100 * 1024) * 1024
$newQuotaTemplate.UserCodeMaximumLevel = 300
$newQuotaTemplate.UserCodeWarningLevel = 300
$contentService =[Microsoft.SharePoint.Administration.SPWebService]::ContentService
$contentService.QuotaTemplates.Add($newQuotaTemplate)
$contentService.Update()
Check the link which can guide you how
http://www.c-sharpcorner.com/uploadfile/anavijai/quota-templates-in-sharepoint-2010/
Please mark the Answer and vote me if you think that above solution can help you to resolve the issue -
How to use Powershell to set delegate for user mailbox in Exchange 2010 and Office 365
Hello,
Can you please tell me if I can set delegate for user mailbox in Exchange 2010 or Office 365 using Powershell?
If I can, then how can I do that? (which Powershell commands for setting the delegate?)
Many thanks, and have a good day!Hi,
If you wanted to add a delegate to possiblly a large number of users or you do this during mailbox provisioning. So the following script will use
impersonation to access another users mailbox and add a delegate.
$mbtoDelegate = "[email protected]"
$delegatetoAdd = "[email protected]"
$dllpath = "C:\Program Files\Microsoft\Exchange\Web Services\1.0\Microsoft.Exchange.WebServices.dll"
[void][Reflection.Assembly]::LoadFile($dllpath)
$service = new-object Microsoft.Exchange.WebServices.Data.ExchangeService([Microsoft.Exchange.WebServices.Data.ExchangeVersion]::Exchange2007_SP1)
$windowsIdentity = [System.Security.Principal.WindowsIdentity]::GetCurrent()
$sidbind = "LDAP://<SID=" + $windowsIdentity.user.Value.ToString() + ">"
$aceuser = [ADSI]$sidbind
$service.AutodiscoverUrl($aceuser.mail.ToString())
$service.ImpersonatedUserId = new-object Microsoft.Exchange.WebServices.Data.ImpersonatedUserId([Microsoft.Exchange.WebServices.Data.ConnectingIdType]::SmtpAddress,
$mbtoDelegate);
$mbMailbox = new-object Microsoft.Exchange.WebServices.Data.Mailbox($mbtoDelegate)
$dgUser = new-object Microsoft.Exchange.WebServices.Data.DelegateUser($delegatetoAdd)
$dgUser.ViewPrivateItems = $false
$dgUser.ReceiveCopiesOfMeetingMessages = $false
$dgUser.Permissions.CalendarFolderPermissionLevel = [Microsoft.Exchange.WebServices.Data.DelegateFolderPermissionLevel]::Editor
$dgUser.Permissions.InboxFolderPermissionLevel = [Microsoft.Exchange.WebServices.Data.DelegateFolderPermissionLevel]::Reviewer
$dgArray = new-object Microsoft.Exchange.WebServices.Data.DelegateUser[] 1
$dgArray[0] = $dgUser
$service.AddDelegates($mbMailbox, [Microsoft.Exchange.WebServices.Data.MeetingRequestsDeliveryScope]::DelegatesAndMe, $dgArray);
Hope this helps.
Maybe you are looking for
-
interview questions on abap objects?
-
How to bind DatagramSocket to second NIC?
I need to bind a DatagramSocket to a second "IPv6-enabled" NIC. Binding to the main "IPv4" NIC works fine but I'm being incapable to change to a different NIC. These are my network settings: eth0 Link encap:Ethernet HWaddr 00:11:43:c8:bd:1c
-
HT4993 my iphone just stopped working
My iPhone has died on me what do I do?
-
Runtime Error C++ etc..
Hi. Frustrated. Ive been using Premier Elements 11 for sometime now. Maybe 6 months. All has been good. Loaded the program onto my new computer, all has been better. http://www.toshiba.com/us/computers/laptops/qosmio/X70/X75-A7298?src=ANEM&cm_mmc=SF_
-
Installing CS2 on Mac running Mountain Lion?
So, I purchased a new/unopened copy of this locally just to start learning Illustrator. Didn't know that I would be unable to install it due to Mac support issues. So, is it possible for me to upgrade to CS6 without having to buy a full-blown vers