I am trying to figure how to change the "BookingWindowInDays" value for a room (resource mailbox) in Exchange 2013 via Powershell.
I do not find the command to achieve this as Get-MailboxCalendarSettings seems obsolete (Exchange 2K3/2K7).
The command Get-MailboxCalendarConfiguration does not help me either.
Can someone please tell me What powershell command can achieve this on Exchange 2013 ?
Found it:
Set-CalendarProcessing -Identity *<room id>* -BookingWindowInDays *<n_days>*
Set-CalendarProcessing -Identity <MailboxIdParameter> -BookingWindowInDays <Int32>
Default BookingWindowInDays is 180 days and I changed it to 1080 days:
Set-CalendarProcessing -Identity "Meeting Room Name" -BookingWindowInDays "1080"
Related
I have installed PySNMP (version 4.4.6) and am attempting to call the following function (part of a larger class):
def walk(self):
#Walks OID to scavenge for information.
oids={}
for (errorIndication,
errorStatus,
errorIndex,
varBinds) in nextCmd(SnmpEngine(),
CommunityData(self.cs),
UdpTransportTarget((self.device.split(".")[0], 161), timeout=60, retries=0),
ContextData(),
ObjectType(ObjectIdentity("1.3.6.1.4.1.14179.1.2.5.5"))):
print((errorIndication,
errorStatus,
errorIndex,
varBinds))
and repeatedly receive the following output:
(RequestTimedOut('No SNMP response received before timeout',),
I have triple-checked to make sure that my community string, SNMP version, device name, port, and OID are correct. I have altered the Transport timeout variable 60 seconds with no luck. My first thought was that it might be a firewall issue, but then I tried to run the simple example included in the documentation:
from pysnmp.hlapi import *
g = getCmd(SnmpEngine(),
CommunityData('public'),
UdpTransportTarget(('demo.snmplabs.com', 161)),
ContextData(),
ObjectType(ObjectIdentity('SNMPv2-MIB', 'sysDescr', 0)))
print(next(g))
And receive the exact same output. Does anyone know what might be causing this? Unfortunately I'm on a server with few admin rights, so I can't go digging through module files changing anything. Thanks in advance for the help!
Your code looks good. For as long as you get the right hostname/IP out of self.device.split(".")[0].
May be you are not getting response from your SNMP agent for one reason or the other. I'd try public SNMP agent:
$ snmpwalk -v2c -c public demo.snmplabs.com 1.3.6
SNMPv2-MIB::sysDescr.0 = STRING: Linux zeus 4.8.6.5-smp #2 SMP Sun Nov 13 14:58:11 CDT 2016 i686
...
To make sure you do not have connectivity/firewall problems. Consider trying snmpwalk against your local SNMP agent as well. If you can't have Net-SNMP installed, consider trying snmpclitools for conducting this experiment.
I am trying to assign issues to epics using Jira's python API. From the documentation, I found there is an add_issues_to_epic method in the GreenHopper class, but it doesn't seem to work for me. I have the following so far
from jira.client import JIRA
from jira.client import GreenHopper
jira = JIRA(options, basic_auth=(username, password))
greenhopper = GreenHopper(options, basic_auth=(username, password))
epicLink = 'IR-345'
issuesToAdd = ['IR-1459']
greenhopper.add_issues_to_epic(epicLink, issuesToAdd)
But that gives me the error that add_issues_to_epic is not found for class GreenHopper. I've tried jira.add_issues_to_epic(epicLink, issuesToAdd), but that gives me the same error.
What am I doing wrong?
I just had to upgrade to the new version of the API.
As of January 2022, add_issues_to_epic is not supported for next-gen projects (you'll get this error: "Jira Agile Public API does not support this request").
https://ecosystem.atlassian.net/browse/ACJIRA-1634 explains how to do it now:
Move issues to epic - Edit the issue and set the parent field. Example: {"fields":{"parent":{"id":"11111"}}}
Code example:
issue = jira.create_issue(project='PRJ',
summary='Heisenbug',
description='Can't reproduce it.',
issuetype={'name': 'Bug'})
issue.update(fields={'parent': {'id': epic.id}})
AX 2012 R2 Class Application startupPost method customized code error abort AX client.
How to enter AX again? i can't login again to correct the wrong coding because of this fatal error.
"Microsoft Dynamics AX client has stopped working.
A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available."
I cannot enter my AX anymore! Why?
because i put a wrong code in Class Application StartupPost method
// No SYS code must exist in this method
// If you need the startup command, look in the class SysStartupCmd
void startupPost()
{
// <GTH>
Args args = new Args();
#isoCountryRegionCodes
if (hasGUI()
&& isRunningMode()
&& !SysModelStore::isInstallMode()
&& SysCountryRegionCode::isLegalEntityInCountryRegion([#ISOTH])
&& isConfigurationkeyEnabled(configurationKeyNum(TaxThailandGovCertification)))
{
TaxThaiGovCertificationHelper::promptSysAboutForm(false);
}
// </GTH>
new MenuFunction(MenuItemDisplayStr(RBMT_Main),MenuItemType::Display).run(Args);
}
my problem code is
*new MenuFunction(MenuItemDisplayStr(RBMT_Main),MenuItemType::Display).run(Args);*
yeah i should have put it in an 'if (curUserId() == "me")'
yeah i should have ...
it should have never been there.
i modified in the USR layer. Tried to login again but the AX client can't enter into AX so i can't modify anything. Tried to login in lower layer but still i can't come in.
tried to use Visual Studio 2010 Application Explorer to save class to XPP and open notepad to modify and reload to application explorer, but still can't login.
I am unwelcome.
Is there a way in to AX without going through Class Application startupPost method?
it's like i can't enter my home even if i got my keys.
more problem is i have 2 other developer mates who can't login so they're really pissed, they need their codes too.
Please anybody knows how to overpass Class Application startupPost method?
I can't get in my AX!
Thanks very much.
ElanG.
its solved by using a Configuration command to run at kernal startup: -NOAUTO
1.) Open Microsoft Dynamics AX Configuration Utility.
2.) in Tab [General], the entry field "Configuration command to run at kernel startup"
3.) type the command -noauto
4.) run MS Dynacmics AX
Thanks.
:)
In case you do not need the usr layer anymore you can just delete/uninstall the usr model. Provided you left it on the standard model. Then try again. Anyway I hope you have daily backups so if deleting the usr layer is not an option for you or if it did not solve your problem you can just restore a backup right?
How do you pull code based on a build label from Team Foundation Server in CruiseControl.NET.
<sourcecontrol type="vsts" autoGetSource="true" applyLabel="true">
<server>http://tfs.internal.com:8080/</server>
<username>*********</username>
<password>*********</password>
<domain>corp</domain>
<project>$/Code</project>
<workingDirectory>D:\BuildServer\Lane1\SourceCode\</workingDirectory>
<cleanCopy>false</cleanCopy>
</sourcecontrol>
According to the documentation for CruiseControl.NET TFS plugin (from codeplex):
<sourcecontrol type="vsts" autoGetSource="true" applyLabel="true">
<server>http://my_team_foundation_server:8080</server>
<username>my_user</username>
<password>my_password</password>
<domain>my_domain</domain>
<project>$/Foobar</project>
<workingDirectory>c:\projects\Foobar</workingDirectory>
<cleanCopy>false</cleanCopy>
<workspace>my_workspace_name</workspace>
<deleteWorkspace>false</deleteWorkspace>
</sourcecontrol>
I do not see this as an option.
I did look at the general TFS sourcecontrol block documentation here and you may be able to use as a way to passing the label as a parameter to the executable. I have not ever tried that with Visual Studio but maybe you can figure out what if you can use dynamicValues as a parameter for specifying your label against the compiler. If not, I do not think CruiseControl.NET can support these TFS features.
Often I'd like to use a previous commit comment (and edit e.g. just one word) for check-in.
I'm used to eclipse, where this feature works quite well.
Is it also available for TFS? I didn't find it yet (despite quick Web search), am I blind?
(I'm currently using TFS 2010 with VisualStudio 2010)
Best regards, Mayoares
I don't think there is anything in VS to help here (except cut and paste via change history).
However a little PowerShell with PSCX (PowerShell community Extensions) and the TFS PowerToys PowerShell snapin will do this, with the current folder set to the solution root:
(Get-TfsItemHistory . -recurse -stop 1).Comment | Set-Clipboard
will put the comment in the clipboard. Using the NuGet powershell session in TFS, this could likely be automated completely (left as exercise).
Not to take away from #Richard for providing the crux to the solution--I have already upvoted his answer--but there is just a bit more to say here.
The OP was just slightly ambiguous: the title leaned toward the capability of selecting some recent commit message while the body was more suggesting to retrieve the most recent commit message. Richard addressed the latter perfectly, but I think it is worth commenting on the former as well.
Consider this function, which uses the same Get-TfsItemHistory from TFS 2013 Power Tools that Richard mentioned:
function Get-TfsComment([string]$pattern = ".*", [string]$Path = ".")
{
Get-TfsItemHistory $Path -Recurse | ? { $_.Comment -match $pattern }
}
With that in place try:
# Get all comments
Get-TfsComment
# Get 10 latest comments
Get-TfsComment | Select -First 10
# Get all comments containing "bug" and "fix"
Get-TfsComment "bug.*fix"
# Get all comments in your tests folder containing "support"
Get-TfsComment -path .\tests -pattern support
The output of this function produces a collection of Microsoft.TeamFoundation.VersionControl.Client.Changeset objects; the list of default properties it displays are typically all you need:
Changes Owner CreationDa Comment
etId te
------- ----- ---------- -------
1187 MYDOMAIN\fred 3/13/2014 Bug fixes for xyz...
1118 MYDOMAIN\wilma 3/7/2014 New features 139 and 448
1076 MYDOMAIN\barney 2/28/2014 Who remembers this...?
. . .
(Note that if you pipe the output to FormatTable -AutoSize that will take care of the poorly optimized line-wrap in the column headers.)