Tag: PowerShell
-
PowerShell: foreach with a first and last item number
I wanted to work through 1000+ items in a PowerShell foreach loop, but I wanted to do it X at a time. I figured out the following foreach syntax to loop through all items after first and before last:
-
Using PowerShell to add a Contact to a CRM 2011 MarketingList (SOAP)
We had a user delete a Marketing List. I needed to recreate it. I went to a database backup and found the GUID of the deleted list. Then I used the following SQL query to find the GUIDs of all the members of that list: I saved the EntityId column to a text file, and…
-
PowerShell script to backup all SharePoint 2010 lists in all webs in all sites
More backups the better. I wanted a file level backup of every list. Below I used PowerShell to iterate through all the lists on the server and dump them into a folder
-
Install-SPSolution, Add-SPSolution and Update-SPSolution return error: not supported with version 4.0.30319.269 of the Microsoft .Net Runtime.
Just tried to install a soliution, and I received the error: Install-SPSolution : Microsoft SharePoint is not supported with version 4.0.30319.269 of the Microsoft .Net Runtime. I just installed the new PowerShell 3.0. To fix, launch a new powershell with -Version 2, and then run your command again: powershell -version 2 That is what I…
-
Run PowerShell as system
.\psexec -i -s Powershell.exe Found this from here:
-
PowerShell script to set the State of a record in Microsoft CRM 2011 (SOAP)
I wanted to mark a meeting/appointment as completed via code. I came up with the PowerShell script below. Maybe it will be of use to some one?
-
Use PowerShell to get Google Analytics data
I wanted to write a powershell script that will retrieve the number of visits for my site. I put the following script together. Note this uses Google’s ClientLogin for authentication, which is deprecated. I have not worked with OAuth 2 yet.
-
PowerShell script to create a SystemUser in Microsoft CRM 2011
I wanted to bulk create a bunch of users in CRM. PowerShell and the Microsoft CRM 2011 REST/OData endpoint make it easy. Here is a function to create a SystemUser via PowerShell
-
PowerShell script to create a contact in Microsoft CRM 2011 via REST/ODATA
Below is a PowerShell function to create a contact in CRM 2011. Hope it is helpful to some one.
-
PowerShell script to add an activity via OData/REST
I wanted to create some crm activities based on data in a spreadsheet. Looping thorough the csv file would be easy, the challenge came when I wanted to create new activities in Microsoft CRM 2011, specifically appointments. Below is a PowerShell function that I pieced together to create a new activity if you know GUIDs…
