I can never remember these, and now that I have posted them, I don’t have to! I will add more as I need them:
Get-HotFix | Where-Object {$_.HotFixId -eq "KB2823324"}
Get-HotFix | Sort-Object -Property InstalledOn
I can never remember these, and now that I have posted them, I don’t have to! I will add more as I need them:
Get-HotFix | Where-Object {$_.HotFixId -eq "KB2823324"}
Get-HotFix | Sort-Object -Property InstalledOn
I know this is everywhere, so this is more a note for myself. How to upload pictures to AD via PowerShell:
Import-RecipientDataProperty -Identity username -Picture -FileData ([Byte[]]$(Get-Content -Path .\username.jpeg -Encoding Byte -ReadCount 0))
We have been using a provisioning script that downloads the latest wordpress zip file, extracts into the right location it and sets up the DB connection. I wanted to take it a step further and eliminate the install.php page. The one that looks like this:
So i sat down to figure out how to “Install WordPress” via shell script. Here is that command:
SITENAME="blog"
DOMAINNAME="company.com"
PASSWORD="MySecurePassword"
wp_install_result=$(php -r 'define("WP_SITEURL", "http://'$SITENAME.$DOMAINNAME'");define("WP_INSTALLING", true);require_once("./wp-load.php");require_once("wp-admin/includes/upgrade.php");$response=wp_install("TITLE", admin, "[email protected]", false, null, "'$PASSWORD'");echo $response;')
After WordPress is “installed”, we can now activate plugins.
I needed to update my WordPress site provisioning script to download, install and activate a WordPress plugin. The download is the easy part (I just use wget). But how do I activate the plugin. This is what I cam up with:
result=$(php -r 'require_once("./wp-load.php");require_once("wp-admin/includes/admin.php");activate_plugin("hello.php");')
And to be complete, to deactivate:
result=$(php -r 'require_once("./wp-load.php");require_once("wp-admin/includes/admin.php");deactivate_plugins("hello.php");')
This is a simple function that I use to post a SOAP envelope to CRM 2011. Just pass the URL and the xml (you can create that with this function) and you should be good to go
function soapToCRM(URL, data) {
var returnValue
$.ajax({
type: "POST",
contentType: "text/xml; charset=utf-8",
datatype: "xml",
async: false,
url: URL,
data: data,
beforeSend: function (XMLHttpRequest) {
XMLHttpRequest.setRequestHeader("Accept", "application/xml, text/xml, */*");
XMLHttpRequest.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
XMLHttpRequest.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/xrm/2011/Contracts/Services/IOrganizationService/Execute");
},
success: function (data, textStatus, XmlHttpRequest) {
//alert("success");
var NewCRMRecordCreated = data["d"];
returnValue = true
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert("failure " + errorThrown);
returnValue = false;
}
});
return returnValue;
}
I have posted a bunch of PowerShell scripts to interact with CRM 2011, now I am going to put up similar javascript versions. I feel that there is a lot of javascript content out there for CRM 2011, but most of it is javascript inside the actual CRM interface. I don’t see a lot of content about using javascript from a different webpage/site with ajax, so I thought I would post some of the code I put together.
This is a function that I put together to build a SOAP envelope for creating an activity in CRM 2011. Credit for the template goes to Jamie Miley and this post. I took his template a little further and created a function for either email,Phone call or appointment. In addition this function allows for multiple contacts in an phone call’s to and multiple required contacts in a meeting.
I am working with a site where we could not UpdateUserExperience when moving to 2010. I wanted to check a users permissions, but the icon was missing. To check a users permissions in 2010 with out an updated user experience, you visit : /_layouts/chkperm.aspx
Not bad seeing as I was at 2K last year this time!
Visits Today 373 Yesterday 504 This month 10183 December 9085 November 9827 October 9427 September 9010 August 9440 July 9151 June 8171 May 7352 April 5027 March 3966 February 3160 January 2741