Tag | Powershell Posts

When you generate an MSI you need to set at least Product Version Product Code Package Code Upgrade code is not mandatory but in reality it is also a must or you will not be able to create upgrade msi packages. One interesting thing about ProductVersion is that you can choose to set a 4 digit version like 1.1.1.0 but MSI will only use the first three digits for version checking. Its format is major.minor.build. This is important if you decide to create a update or upgrade package. Have a look for ...
If you have large files in a content source that is being indexed by Sharepoint you might run into the following error message: “The file reached the maximum download limit. Check that the full text of the document can be meaningfully crawled.” This is usually caused because SharePoint’s MaxDownloadSize setting is set lower than the size of the file you are attempting to index. You can increase this value, restart the service then kick off a full crawl in order to fix this issue, but SharePoint 2007 ...
If you would like to help me out, you can Tweet this story OR email Expedia and ask them to make things right for me and my wife. This is the story of how Expedia made my new bride cry. When Expedia followed up their failure with our honeymoon trip with a complete and total lack of acknowledgement of any responsibility for the problem and endless loops of explaining the issue over and over again - I swore that they would make it right. When they brought my new bride to tears, I got an immediate and ...
The approach takes advantage of the SP 2010 OOB Session Token handler and FBA claims provider implementation that during a period of token lifetime, if there is activity during the period of time that can be defined as "EW" in the image in the section "Background" below, that the SPSecurityTokenManager will, with the FBA provider, reissue a Session Token with new SessionToken ValidTo and ValidFrom times without forcing a re-challenge for user credentials (username and password). Additionally, it ...
This is to provide a little bit of explanation on the implementation of FBA authentication with SP 2010. There have been blog posts that indicate there are no sliding sessions, but with a little manipulation and understanding of some of the settings, there is somewhat of support for sliding sessions and re-issuance of tokens. The current model provides for a little trade-off on performance as re-requests to the FBA providers and also any SP Custom Claim providers can have impact on overall performance. ...
There are really 2 ways to get a SPClaimProvider registered – 1 via a Farm Feature activation. The other is via PowerShell. However, the documentation on how to remove is not that clear. The following code will remove it based upon a TypeName. Other identifiers can be used. In order to remove: Get-SPClaimProvider | ForEach-Object { Write-Host $_.TypeName IF ( $_.TypeName -eq "SimpleClaimsProvider.LVCla... { Write-Host "Found" $cp = $_ } } $cp.DisplayName Remove-SPClaimProvider $cp ...
This is a quick introduction to moving from our own internal assembly repository to using NuGet. It’s terse for a reason, just a note to self and those I work with: What we had One source of builds external to our code repository Didn’t check in external builds Used DVCS to share single feed Rake task to update and copy latest builds local checkout (this location is excluded from VCS) Automatic updates if changed in central repository and version not incremented Caused problems when changes were ...
With Microsoft’s recommendation to use server core for Hyper-V systems, I have been seeing a lot of server core lately. With that in mind, I am posting how I set up a Server Core system (after base OS install). 1. Login to you Windows Server 2008 R2 Server Core system 2. Run sconfig from the command line. This will bring up the Server configuration text user interface shown below. 3. From the Sconfig interface, set the following Network Settings (option 8) Date and Time (if needed) (option 9) Remote ...
Dears, I've just recently tried the new feature in SP2010 which is granular backup and restore. In my case, I wanted to backup a list with the data in it and restore to another sharepoint site with the same template and language. So, the steps are very simple: Go to central administration --> Backup and Restore --> Granular Backup --> and choose "Export a site or list" Then choose the list/site that you want to backup and write the path of the backup ".cmp" file, and you can choose to export ...
In my prior blog post on this topic, I showed how to use the PowerShell Start-Process command to initiate the rebuild of a Visual Studio solution using MSBUILD. With today's post, I'll show how I've wrapped this call into a PowerShell function to make it more PowerShell friendly. As I mentioned last time, the wrapper function's name is Build-VisualStudioSolution. I know, I know... "Build" is not an approved verb. I decided it was the most appropriate verb for this function given the intent and circumstances. ...
Late last week it came to my attention that in Exchange 2010 SP1, Microsoft made some major changes to the way we export mailboxes to PST files. While I usually say that I embrace change, I don't when it comes to applications I manage. For those familiar with Exchange 2007, the Export-Mailbox cmdlet was a nice and easy method to take some email and dump it into a PST. All you had to do was provide yourself full access to the mailboxes you were looking to export and run the cmdlet. Well goodbye Export-Mailbox, ...
After you install and configure Microsoft Forefront Protection 2010 for Exchange on your Exchange 2010 Hub Transport Servers, you can use the Exchange PowerShell Send-MailMessage cmdlet to test your Forefront configuration on one or more Hub Transport Servers without having to stop the Microsoft Exchange Transport service. Also, you can use the PowerShell cmdlet to test your file filters using different types of e-mail attachments to ensure Forefront is working as designed. Here are a couple of examples ...
I have recently been exploring the wonders of PowerShell. I also recently worked through some deployment / configuration issues and thought I would bring my newly acquired appreciation of PowerShell to the mix. I had never given PowerShell a second thought. I really had no idea what it was or how it was used. This is very surprising given my perl background. Once I gave it a chance, I loved it. One of the most exciting things about PowerShell is that unlike with regular scripting languages, you are ...
8:39 AM Supporting the Exchange and Lync communities. Exchange 2010 News Certification News: Microsoft Certified Master:Exchange 2010 Overview of the Cert FAQ Resources: Microsoft Exchange team blog Gary Siepser’s PowerShell examples Bhargav Shukla’s blog Jedi Hammond’s blog (exchangemaster.wordpress.com) Mike Pfeiffer’s blog (mikepfeiffer.net) C7 Solutions team blog (c7solutions.com) Tim McMichael’s blog Mike Lagase’s blog Pasted from <http://www.microsoft.co... ...
One of the several hats I wear at work is one of configuration manager for the internal data management application my employer uses. This app currently has 11 solutions of active code which need to be built whenever we release to the QA environment. The QA releases typically occur a minimum of 3 times per month and take approximately 30 minutes from source control "Get Latest" to the final step of the deployment onto the QA servers. A few years ago, my team automated the post-build deployment steps ...
You probably have already visited Channel 9, and if you have not I would recommend to definitely check it out. There are literally thousands of videos about development using Microsoft technologies (and more). You can watch the videos on the site using Silverlight player or you can use links on each video page for downloading. This usually works fine if you are interested in just one or a small number of videos, but it might become somewhat tedious if you want to download a bunch of them. I recently ...
With the recent demand to technologies that allow us to communicate better inside and outside our organization’s walls, comes the need to implement solutions like Microsoft Lync. Individuals are looking at expanding their skillset and therefore looking at training and certifications. Here are some resources that will help you prepare for the PRO: Microsoft Lync Server 2010, Administrator (70-665) Exam. Information for the Links in the Prep Guide come from TechNet Library and the info can be found ...
One thing that has become clear over the last couple of years is the inclusion of helpful tools and resources in every Administrator’s Toolbox. Gary Lapointe created a PowerShell Cheat Sheet (a one pager quick hit) http://bit.ly/kJVnGd PowerGUI PowerShell Quick Reference Card for SharePoint. http://www.powergui.org/ent... SharePoint Software Factory 2010 http://bit.ly/eC7efh SharePoint 2010 Operations Guides http://bit.ly/hq9UZy Marcy Kellar’s Branding and Customization ...
For the last couple of weeks I have been required to import a data log file (CSV) from a legacy SCADA system into my centralized data management system. It occured to me today that I might be able to use PowerShell to automate some of the importing steps which include import to a DEV, QA and Production system. I'm still working on this script, but in the process of developing it, I had a need to learn more about an exception that was occuring in the script. I had my try/catch block already specified, ...
Last weekend I went up to Iowa Code Camp in Cedar Rapids and had the opportunity to do two presentations, one on NuGet and one known as the Automation Tools Roundup. ICC is one of my favorite conferences every year. It is twice a year and I try to make it to at least one of them. The people that attend this conference really make it worth the money you spend in travel expenses. Definitely recommended. Automation Tools Roundup This is my favorite session to give because it requires crowd participation ...
First, let me clarify the “killing kittens” statement. A couple of years back, I had a chance of attending a sessions presented by Todd Klindt and Shane Young on SharePoint Installation and to raise awareness of how little control, and not to say the limitations, of installing in Standalone mode, they would state “Everytime a SharePoint Standalone Installation happens, God kills a kitten”. Ok, now on to the rest of the purpose of the post. Assumption: SQL Server 2008 R2 is already installed on the ...
I haven't posted a recap lately, because the Virtual Brown Bag recordings weren't being uploaded for a while. That was fixed two weeks ago, so I had a lot of meetings to catch up on. Here's an all-you-can-eat brown bag buffet… March 3 Guest presenter Jim Christopher - creator of StudioShell, a deeply integrated PowerShell host available inside of Visual Studio 2010 and 2008. StudioShell exposes many of Visual Studio’s extensibility points in a simple and consistent way, and it makes the Visual Studio ...
Imagina que tenemos una aplicación corporativa para completar tareas como el registro de los gastos del empleado por ejemplo. Todo parece indicar que esta aplicación va a utilizarse mucho durante la semana y poco durante el fin de semana. Se puede ahorrar bastante dinero en la factura mensual de Azure reduciendo el número de instancias en ejecución dependiendo del calendario. Esta clase de escalado es fácil de implementar en Azure utilizando cmdlets PowerShell y el programador de tareas incluido ...
I have to replace align=”right” to align=”left” of all <td> in all files in the whole project. Consider the following html <table> <tr> <td align="right" style="border: 1 solid black"> cell1 </td> <td style="border: 1 solid black" align="right"> cell2 </td> <td id="td01" align="right" style="border: 1 solid black"> cell3 </tr></table> Work breakdown: How to replace in single file how to replace in multiple files How to replace in single ...

Today I start learning powershell, maybe 2 years too late!

http://powershell.com/cs/

http://www.powergui.org/index.jspa

http://poshcode.org/

As I posted earlier on getting the Azure PowerShell CmdLts to install and such on Windows 7, working with the Azure MMC is also another item that requires a tad of a workaround to get it going. If you attempt to install, you will run into the first roadblock of the OS being a non-supported OS. The way around that is to find the working installation folder for Azure MMC (normally, C:\WindowsAzureMMC). Once there, then we need to look for the setup folder, inside the setup folder we will look for Dependencies.xml. ...
This is one of the very useful powershell scripts that I found for automatic content publishing and approval on sharepoint 2010. It's very useful that it can be recursive on all sub sites in your site collection and easy to use: .\PublishSPContent.ps1 -Url "http://Yoursite" -Recursive $true You can download it from here : http://publishspcontent.cod... ...
The below given powershell script will clear all items in a list. You should use powershell IDE to run this script. [System.Reflection.Assembly... Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9... $siteObj = new-object Microsoft.SharePoint.SPSite ( "http://yousiteurl" ) $SPweb = $siteObj.OpenWeb() "Web is : " + $SPweb.Title $oList = $SPweb.Lists["you list name"]; $oList.Title + " : Total Items Count is " + $oList.ItemCount $collListItems = $oList.Items; ...
I've been looking for a replacement for my powershell script used to ftp files. It currently uses the Windows ftp.exe application with a command file. Well the script has been causing problems and files have been truncated or lost. I decided to look into a replacement. I tried ftpwebrequest but when moving multiple files the login happens over and over. I found Alex FTPS Client on codeplex at http://ftps.codeplex.com/ Seems to do what I needed. Here is a Powershell script to use it to connect, list ...
Several users reported that they could not turn on or off their Out of Office reply using either Microsoft Outlook 2007 or 2010. They did not have any problems turning on or off their OOF reply using Microsoft Outlook Web App. When they attempted to turn on or off their Out of Office reply, they received a Your automatic reply settings cannot be displayed because the server is currently unavailable. Try again later. error message. If you are using Outlook 2007/2010, the first thing you need to do ...
Logparser in powershell One of the few examples how to use logparser in powershell is from the Microsoft.com Operations blog. This script is a good base to create more advanced logparser scripts: $myQuery = new-object -com MSUtil.LogQuery $szQuery = “Select top 10 * from r:\ex07011210.log”; $recordSet = $myQuery.Execute($szQuery) for(; !$recordSet.atEnd(); $recordSet.moveNext()) { $record=$recordSet.getRecor... write-host ($record.GetValue(0) + “,”+ $record.GetValue(1)); } $recordSet.Close(); Logparser ...
Here is a small Powershell script for creating a two-way forest trust. $localforest = [System.DirectoryServices.A... $strRemoteForest = ‘domain.local’ $strRemoteUser = ‘administrator’ $strRemotePassword = ‘P@ssw0rd’ $remoteContext = New-Object System.DirectoryServices.Ac... $strRemoteForest,$strRemote... $remoteForest = [System.DirectoryServices.A... $localForest.CreateTrustRel... ...
the following snippet can be used to add more than one user to the grantsendonbehalfto property with Powershell and the Exchange Management Shell get-mailbox dummy |set-mailbox -grantsendonbehalfto “testuser3? $a = get-mailbox testuser2 | select-object grantsendonbehalfto $b = get-mailbox dummy| select-object grantsendonbehalfto $a.grantsendonbehalfto += $b.grantsendonbehalfto[0] get-mailbox testuser2 |set-mailbox -grantsendonbehalfto $($a.grantsendonbehalfto) ...
[Source: http://geekswithblogs.net/E... Just a quick one this, but useful for mature BizTalk solutions, where over time the configuration settings can get confused, meaning Debug configurations building in Release mode, or Deployment configurations building in Development mode. That can cause issues in the build which aren't obvious, so it's good to fix up the configurations. It's time-consuming in VS or in a text editor, so this bit of PowerShell may come in useful - just substitute your ...
Like most developers, I prefer to not have to pick up the mouse if I don’t have to. I use the Executor launcher for almost everything so it’s extremely rare for me to ever click the “Start” button in Windows. I also use shortcuts keys when I can so I don’t have to pick up the mouse. By now most people know that the Package Manager Console that comes with NuGet is PowerShell embedded inside of Visual Studio. It is based on its PowerConsole predecessor which was the first (that I’m aware of) to embed ...
I installed the Azure SDK 1.4 while rebuilding my laptop and ran the installation for the Windows Azure Service Management PowerShell CmdLets. Kicked off the installation script for the WASM PowerShell CmdLets by locating the path to which WASM PowerShell CmdLets was deployed to. Double clicked the startHere command. It will then open the WASM installation dialog. Click Next. Click Next. Notice the red x next to the Azure SDK 1.3, the problem is I have SDK 1.4 Here is the workaround, I go back to ...
Over the last 2 weeks i was developing a tool to migrate Lotus notes data base to Share point. The mapping between Lotus notes schema and share point list schema was done manually in an xml file for out tool. To map the columns we wanted internal names of each field. There are quite a few ways to achieve this, have explained few below. If you want internal names for one or 2 columns you can do so by navigating to the list setting and clicking on the column name. Once you are in column's details, ...
This post is built upon the work of Mario Kosmiskas and David C. Chou’s prior postings – from here: http://blogs.msdn.com/b/mar... http://blogs.msdn.com/b/dac... As Mario points out in his post, when you need to have more control over the process that starts, it generally is better left to a RoleEntryPoint capability that as of now, requires the use of a CLR based assembly that ...
Ever work somewhere where processes dump files into folders to maintain an archive? Me too and Windows Explorer hates it. Very often I find myself needing to organize these files into subfolders so that I can go after files without locking up Windows Explorer and my answer used to be to write a program in something like C# to do the job. These programs will typically enumerate the files in a folder and move each file to a subdirectory named based on a datestamp. The last such program I wrote had ...
I am scheduled to share on NuGet (http://nuget.codeplex.com/) at the Deerfield Beach Coder’s Café on March 1st, 2011. My goal for this talk is to present demos and content covering how to leverage this new neat utility to easily “package” .Net-based binaries or tools and share them with others, who in-turn, can just as easy reference and readily use that same package in their Visual Studio 2010 .Net projects. Scott Hanselman has recently blogged in great detail on creating NuGet packages. For hosting ...
System Center Service Manager is a new product that Microsoft released last year to handle incident/problem/change management. Currently the latest version is System Center Service Manager SP1, and there is a Cumulative Update for SP1 that you should grab as well. A strong ecosystem is starting to spring up around this product, with tools and connectors that fill needs not build into the product. To find the latest list of these items, you need to do to the SCSM 2010 Downloads page. Here you can ...
Here is the simple function I added to my powershell profile: function create-tfstask ($desc) { tfpt workitem /new $workItemType /collection:$serverUrl /fields:"Title=$($desc);Ass... To=$assignee;AreaId=$areaId... } To find the AreaId and IterationId for your project/versions, just look at a bug you know is setup correctly: PS C:\> tfpt query /collection:http://3bs001vs... /wiql:"select AreaId,IterationId from workitems where ID = 879" Next I hooked this into ...
I’m trying to find time to update the Prairie Developer Conference 2011 website, and the sessions and speaker information will be up by this weekend including the registration page. For those that are wondering what the session and speaker list looks like, I wanted to give a sneak peak. We have a fantastic set of sessions by world class technologists! We’re covering .NET, Java, Ruby, SQL Server, Agile, User Experience, Mobile, Security, Azure, Office, SharePoint, and others. In fact, this year I’ve ...
At this week's Virtual Brown Bag meeting: JB showed off his new SpeakerRate Ruby gem Claudio alerted us to the Refactoring Manifesto We answered the question "How do I get started with Design Patterns?" Ever had to kill a frozen instance of Visual Studio? Yeah, I thought so. Claudio showed us how to do it with PowerShell. (It's faster) JB previewed his new CodeMav web site, which will be a social network for developers (integration with Speaker Rate, slide share, github, StackOverflow, etc.) For ...
You need to make scheduled nightly backups using powershell or stsadm. You would like to schedule regular backups using windows scheduled but how to create the batch files to run the powershell backup. I had the same problem and I am showing you how to solve this: PowerShell Command to backup SharePoint Site Collection backup-spsite -identity http://SPServer:10001/ -path C:\Backup\Backup.bak OR backup-spsite -identity http://SPServer:10001/ -path C:\Backup\Backup.bak –force (use force to overwrite ...
Managing Users and Client Access (20 percent) Objective Materials Configure user accounts http://technet.microsoft.co... Deploy and maintain clients http://technet.microsoft.co... Configure conferencing policies http://technet.microsoft.co... Configure IM policies http://technet.microsoft.co... Deploy and maintain Lync Server 2010 devices http://technet.microsoft.co... ...
It has been some time now since Windows Server 2008 R2 arrived, but the features and capabilities in many cases are just now starting to surface with company’s implementing or looking at using. Here is a link to the Survival Guide on TechNet: http://social.technet.micro... The other item that is coming stronger and stronger is PowerShell. I mentioned before the need to learn and get into using it as it is a great tool. http://social.technet.micro... ...
Actually, for snacks too, and it is nearly everywhere I turn. If I do Microsoft Exchange work, I know I will run into it. Active Directory, SQL Server, TFS, SharePoint, Azure and most recently Lync. All have provided a way to work with PowerShell and it has taken off (as it should). The question many will have is, How do I get started? A couple of ways are available. There are books, sites and blogs that will help you along the way. This will be the start of a series of posts that, my intention at ...

Having worked on MOSS 2007, I always wondered if I could find an article that would happen map Stsadm commands to powershell commandlets.  And then I found this: http://technet.microsoft.com/en-us/library/ff621084.aspx .

At the end of November 2010 we released a new version of the Windows Azure SDK which contains many new features driven by the great feedback of early adopters plus a shiny new portal. New Portal implemented in Silverlight: The new portal is implemented using Silverlight and replaces the (IMHO rather clunky) original HTML + JavaScript portal. It is 100% better although does still have a few bugs. Enjoy! P.S. You can if you wish still use the old portal: New runtime functionality: The following functionality ...