Tag | Powershell Posts

"Virtual Brown Bag" anagrams: Roving Tuba Brawl Lawn Bug Vibrator Rubbing Two Larva Vulgar Rabbi Town A Vibrant Grub Owl Blurting a Bar Vow At this week's Roving Tuba Brawl Virtual Brown Bag meeting: Claudio Lassala asked "What does your work environment look like?" He and several others shared pictures. George Mauer talked about NuGet, .NET's answer to Ruby Gems, and PoshCode, a PowerShell code repository Claudio showed how he uses CodeRush templates to quickly generate unit test code Alan Stevens ...
Today I had to change the title of several pages in several publishing sites. You can find the powershell script below. Notice that you have to access the pages as PublishingPage and not SPListItem,otherwise you will not be able to modify the Title field ("Title" is ReadOnly). Also, you have to go through the same procedure as in the UI: checkout, change property, checkin and publish (and maybe approve if the library requires it). Add-PSSnapin "Microsoft.SharePoint.Power... -ErrorAction SilentlyContinue ...
Recently for a customer with a rather large exchange environment, we implemented multiple CAS Arrays across various sites in the network. The customer decided that all external access to OWA would come into once Internet entry point and that Array would proxy OWA request to the other CAS Arrays to retrieve the user mailbox. We found out quickly that this does not work straight off. When you create a new CAS array in PowerShell, it repopulates all the local URLs for the web services, autodiscover, ...
SharePoint 2010 is released and available in 3 Editions. They are Microsoft SharePoint Foundation 2010 Microsoft SharePoint Server 2010 Standard Edition Microsoft SharePoint Server 2010 Enterprise Edition Before start implementing Sharepoint, its must to select the right edition for given requirement. When we recommend SharePoint to customers, they first ask what's the cost? Well, it's based on what for SharePoint is going to be used. 1. Microsoft SharePoint Foundation 2010 MSF 2010 is the least ...
You are reading an old version of my weblog. Please update your bookmarks to http://www.timmykokke.com If you often use open source libraries you probably have a large library with various tools, like I do. NuGet is an extension for visual studio that enables you to install, uninstall and upgrade open source packages into your application very easily. Say for example you want to use MvvmLight or Ninject in your project, with NuGet it’s nothing more that tell it to add the package to your project. ...

Powershell is , well, as its name implies, very powerful.

Regardless its power, I think it should be used carefully,  I have seen projects using powershell heavily. My question is, does that worth it? I think it doesn't.

UPDATE: with the release of NuGet 1.0 RTM, this script has some breaking changes. For an updated version, see this post by Jon Galloway: Downloading a local NuGet repository with PowerShell. NuGet is simply awesome. Despite its relative infancy, it has already established itself as the standard for .NET package management. You can easily add packages from the public feed or even from a local directory on your machine. Phil Haack already has an excellent post describing how you set up a local feed. ...
I put the following function in my PowerShell profile so that I can just bring up my PowerShell console and type myself a quick “todo” note that automatically gets emailed to me for later. There are several things of note in this tiny script: 1. Note the use of the $args variable to effectively allow the user to enter $msg parameter without quotes even if it contains whitespace. 2. In this particular example I’m sending the email through Gmail. smtp.gmail.com, port 587, SSL and authentication required. ...
[Source: http://geekswithblogs.net/E... You can actually use this to check for correct deployment of any .NET stack where you want to verify that assemblies and dependencies in the GAC are correctly deployed. Mostly I use it for troubleshooting when BizTalk can't load maps or schemas. With PowerShell you can instantiate any .NET object, and if there are any issues in loading the assembly or its dependencies, you'll see the whole error message, which might otherwise be truncated or buried ...
As I continue to explore ASP.Net MVC 3, I decided to share a little on NuPack Tools, a recently released Visual Studio 2010 extension. There are a few nice blog entries on NuPack already which you can access here. Figure 1 - NuPack Tools shown as a Visual Studio 2010 Extension What is NuPack Tools? NuPack Tools is a Visual Studio 2010 Extension installed along with ASP.Net MVC 3 and also available as a stand-alone install. It provides a friendly interface that automates the retrieval and installation ...
It has been over a year since the last time I updated my list of Florida technical communities and a lot has changed since then. Joe Healy, our Florida Microsoft Developer Evangelist, maintains a list for each of the main areas in Florida, but this only covers the .NET-focused groups. Taking what he has started, I have put together a similar list (based on the information Joe maintains) that covers the other technical communities that I know of. If you are part of a technical user group community ...
As you can see, creating users only takes a minute or two, so creating a handful of accounts during a trial is no big deal. But when the time comes to start bringing dozens or hundreds of accounts over, you’re going to want a more automated approach. In the Users / Overview subtab, you’ll find an “Import users from a file” link under Actions. The file in question must be in CSV format. There’s no need to reinvent the wheel here. Simply download Microsoft’s offered .csv file template or file (or both) ...
I have blogged before about using Powershell as a web testing harness before, but recently I started doing something a little different that has made it even more useful and simple before: jQuery. Powershell gives you access to the HTML DOM from IE, but as we all know this is a bit primitive. Essentially, if there are objects on the page with which you want to interact and those objects do not have an id associated with them, you're writing some fragile, painful looping code to traverse the DOM sometimes. ...
I was playing around with some scripts today while I was working on an upgrade. I didn’t want to individually write out the names of files in a batch file and I wanted to create a quick Powershell Script. If you are using SharePoint 2010 you can use these lines of code in the Powershell Manager to deploy only .wsp files to your SharePoint 2010 Web Applications: $dir = [directory] $list = Get-ChildItem $dir | where {$_.extension -eq ".wsp"} foreach($my_file in Get-ChildItem $list){Add-SPSolution -LiteralPath ...
Here’s a TruncateAtWhitespace function that takes an incoming parameter value and an incoming max length, and returns a substring broken at a whitespace position. This way if you have “Lance has a blog” and you need to truncate it to 8 characters or less, you get “Lance” instead of “Lance ha”. function TruncateAtWhitespace{ param( [string]$value, [int]$maxlength=200 ) $maxlength-=3; #allow for "..." suffix if ($value.Length -le $maxlength) { return ($value + "..."); } $closestwhitespaceindex = [int]$value.Substring(0, ...
One of the benefits of using WCF is that you're not required to host it in IIS. Most people create console hosts during development and then just use windows service in production. This is a quick and very easy way of hosting WCF services especially if you just have 2 or 3 services. However, when the number of wcf services gets too high, controlling them using the mmc snap-in (services.msc) can get a bit tedious (maybe not if your powershell or WMI kung fu skills are quite good). However, if you're ...
And the day is Today. Today Tellago launches its new sister company “Tellago Studios” which focuses on developing Enterprise Software’s. The basic motive of the company is to convert the lessons we learn in our day to day life working with our customers while providing them Enterprise Software Solutions into new Enterprise Software. Many times using current technologies we feel that something is missing. What if we can also do this with this technology. We at Tellago, have this passion for innovation ...
In a previous post I mentioned how I was going to show you how UppercuT (UC) has the ability to make gems stupid simple to create and publish. You ask if gems can get any easier and to that I answer, “Why YES, they can!” How about just filling out the information for the gemspec, running a build and having a nice, shiny new gem ready for publishing? Rock The Gems Basically you want to get the latest release of UppercuT. You can download it or grab the source and compile. There are already instructions ...
A while back it was clear: Roses are red, violets are blue … if you are a dev you use Visual Studio. Now: Roses are blue, violets can be red … if you do SharePoint,Visual Studio is the right tool for you. I am not a poet, nor do I pretend to be one on TV. But I have invested time in fine tuning virtual machines and physical deployments in figuring out what goes where and what is needed. We see dependencies of every type, in every place and every product pretty much. If you are doing SQL Server 2008 ...
Today I put out a new release for PowerSSAS. This release adds the following new cmdlets: backup-ASDatabase clear-ASCache get-ASConnection get-ASRole restore-ASDatabase It also includes a Powershell v2 .psd1 module file and includes the option to just download a zip file which can be copied into a folder your modules folder. So you can now install PowerSSAS without needing to have admin privileges. There are instructions on installing PowerSSAS as a v2 module here. I have also done some preliminary ...
I was at a client location the other day and there was a need to configure PowerShell to back-up the SharePoint 2010 Farm after getting my commands ready and executing them it boomed out on me with the following errors Verbose: [Database_Name] SQL command timeout is set to 1.00 hours. Warning: [Database_Name] Cannot open backup device 'e:\etekglobalinc\backups\s... Operating system error 3(The system cannot find the path specified.). The path seemed right but the .bak file didn’t ...
If you see any Critical Permissions inheritance block on Exchange server object entries listed in the Exchange Pre-Deployment Analyzer report for your Exchange environment, it is highly recommended that you fix these Critical entries before you install your first Exchange 2010 server. If you do not fix these Critical entries, you may encounter the following error messages when you run the Exchange Management Console or run specific Exchange PowerShell commands to view public folder information. Please ...
When publishing SharePoint 2010 Portal you encounter the following error “The form cannot be rendered. This may be due to a misconfiguration of the Microsoft SharePoint Server State Service. For more information, contact your server administrator. “ This issue is caused by lack of Session State Service which usually is a result of farm being configured manually. To fix the issue power up your PowerShell on the SharePoint Server and run the following commands, these commands will create a State Service ...
After we built a new Exchange 2010 Client Access Server and added the new server to the Client Access Server array, several Outlook users started receiving a Security Alert dialog box with a The name on the security certificate is invalid or does not match the name of the site error message when they logged into Outlook. After investigating, we noticed that we forgot to change the InternalUrl name for the Exchange Web Services virtual directory. By default, the Client Access Server name is part of ...

Going over all the w3wp processes in task manager is frustrating if you wanna do this frequently :). So here it is.

taskkill /F /IM w3wp.exe /T

Works in the command line and PowerShell as well.

While i was trying to setup some reports on a SPF 2010 site. After trying to add a Sql Reporting Webpart i get the error: Session state has been disabled for ASP.NET. The Report Viewer control requires that session state be enabled in local mode I never came across that error before when using RSWebaprts in Sharepoint 2007:) But i think is related to ASP.NET sessions state:( Any to fix it you would have to start to make sure the SharePoint Server ASP.NET Session State Service is enabled. Unfortunately ...
When you’ve just gone through a setup of AppFabric and you’ve got some WF/WCF things happening, if you start looking at the Dashboard and you see nothing, it might be as simple as restarting SQL Agent. I generally don’t reboot my system for several days and after installing AppFabric the SQL Agent jobs didn’t start firing right away. Yes, even running a boot to VHD, you can still put the machine to sleep (just logoff and click on Sleep)… So, after spending time looking through the SQL monitoring ...
Wow, two posts on the same day. I was working on a quick DLL project to do some web scripting using the awsome power of Watin. In the past I use to create a vbscript as the test handler to call the DLL but lately I got a Powershell bug to call .NET DLLs. When I tried to debug the Watin call I received: The CurrentThread needs to have it's ApartmentState set to ApartmentState.STA to be able to automate Internet Explorer. I couldn't find a quick google answer to powershell apartmentstate . Apparently ...
We're a little more than half way through TechEd 2010 in New Orleans and I am having a hard time finding interesting breakout sessions to attend. Laura Chappell has completed all of her sessions, and Andy Malone is almost done. Laura's sessions on Wireshark have been amazing. Andy is always entertaining and informative. I did sit through a session this afternoon on IPv6 that was interesting. I will spend the final day in the Hands on Labs area working through some PowerShell, and Communication Server ...
Today while moving mailboxes between Exchange 2003 and Exchange 2010, I hit an issue with a couple of mailboxes. These mailboxes all popped access denied errors or more exactly: Insufficient Access Rights to perform the operation. The cause was similar to the mail flow issue in that inheritable permissions were not turned on for the user object in Active Directory. This also presented it’s own unique problem in that since the initial move request failed because of permissions, it had to be cleared ...
I'm new to powershell. I'm trying to write an error handler to wrap around my script. Part of the error handler is dumping out some variable settings. I spent a while trying to do this and couldn't google a complete solution so I thought I'd post something. I want to display the $myinvocation variable. In powershell you can do this PS C:\> $myInvocation for my purpose I want to create a stringbuilder object and append the $myinvocation info. I tried this $sbOut = new-object System.Text.Stringbuilder ...
You can reach this page anytime at http://tools.michaelcrump.net Thanks to everyone that has contributed so far, we are getting several thousands hits from all sorts of developers a day. Recent Contributors include: Deependra Solanky, Grant, Klaus, James, BlueCollarCritic and Bob Koehn Tweet this list! Add a link to my site! Add me to twitter! This is a list of the tools/utilities that I use to do my job/hobby. I wanted this page to load fast and contain information that only you care about. If I ...
I was asked by someone at work the other day, if it was possible in Sharepoint to create a set of top level folders in one document library based on the set of folders in another library. One document library has a set of top level folders that is basically a client list and we needed to create the same top level folders in another library. I knew that it was possible to open a Sharepoint document library in explorer using a UNC style path and that you could map a drive using a technique like this ...
Here are a few one-liners that use NetCmdlets. Some of these I've blogged about before, some are new. Let me know if you have questions, which ones you find useful, or how you altered these to suit your own needs. Send email to a list of recipient addresses: import-csv users.csv | % { send-email -to $_.email -from lance@nsoftware.com -subject "Important Email" –message "Hello World!" -server 10.0.1.1 } Show the access control list for a specific Exchange folder: get-imap -server $mymailserver -cred ...
Although Microsoft Commerce Server 2009's architecture is built upon Microsoft SQL Server, and has the full power of the SQL Full Text Indexing Search Platform, there are time however when you may require a richer or alternate search platform. One of these scenarios if when you want to implement a faceted (refinement) search into your site, which provides dynamic refinements based on the search results dataset. Faceted search is becoming popular in most online retail environments as a way of providing ...
I checked on the status of voting on the Codestock (www.codestock.org) site this week. I was surpised to see that none of the Powershell sessions were among leaders in voting. Now, I confess that I am somewhat biased (my session is on Powershell), but that said, I thought it odd. I was under the impression that Powershell had a strong following and that many people were using it. I suppose the voting reflects a stronger developer community that might not make use of Powershell to degree some others ...
Part 1 After I explained my motivation for using YAML instead of XML for my data, I got a lot of people asking me what type of tooling is available in the .Net space for consuming YAML. In this post, I will discuss a nice tooling option as well as describe some small modifications to leverage the extremely powerful dynamic capabilities of C# 4.0. I will be referring to the following YAML file throughout this post Recipe: Title: Macaroni and Cheese Description: My favorite comfort food. Author: Brian ...
An updated release of the Windows Azure Service Management (WASM) Cmdlets for PowerShell is now available. These cmdlets enable developers to effectively automate and manage all services in Windows Azure such as: Deploy new Hosted Services Upgrade your Services Remove your Hosted Services Manage your Storage accounts Manage your Certificates Configure your Diagnostics Transfer your Diagnostics Information More details can be found at http://blogs.msdn.com/windo... Anish Technorati Tags: Anish ...
If you're like me and feel comfortable/more productive using a command-line, you've probably already installed Windows PowerShell. If you're UBER (again, like me) you've probably installed Cygwin to get that delicious Bash shell and all it's *nix friends. The only problem with Cygwin is that it runs in the dusty old Windows Command shell, which was designed originally for, oh-let's-see, 8-bit color and 640x480 displays. However, we can easily run Cygwin in PowerShell so that we can take advantage ...
I've been extremely fortunate to work at /n software, but after more than 9 years, the time has come for me to say "goodbye". This Friday will be my last day. The people behind the amazing machine that is /n software are great, hard working people, and I'll be a fan for life. Most importantly though, I'm looking forward to new experiences and new challenges. I'll be joining an exciting new online marketing startup in Chapel Hill (more about them later!). My new work will be as a C# developer, but ...
Arguably, one of the most powerful features of UppercuT (UC) is the ability to extend any step of the build process with a pre, post, or replace hook. This customization is done in a separate location from the build so you can upgrade without wondering if you broke the build. There is a hook before each step of the build has run. There is a hook after. And back to power again, there is a replacement hook. If you don’t like what the step is doing and/or you want to replace it’s entire functionality, ...
For those out there that are a little curious as to whether SAF is any use to your organisation, please read this FAQ. What is SAF ? SAF is free to use. SAF is the "SharePoint Action Framework", it was built by myself and Hugo (plus a few others along the way). SAF is written entirely in C# code, available from : http://saf.codeplex.com. SAF is a way to automate SharePoint configuration changes. An Action is a command/class/task/script written in C# that performs a unit of execution against SharePoint ...
The Velocity team has announced Beta 2 of the Windows Server AppFabric release. Among the improvements are: More PowerShell cmdlets for better control of the AppFabric clusters; The service now logs to two Event Tracing for Windows channels – the Admin channel (on by default) and the Operational channel (off by default), and Cache service throttling, by far I think this is the most significant change in this beta. It is a “slick” feature allowing higher service scalability by denying all “write” ...
[Switch to "Elastic Layout" to see this properly.] I get a lot of mileage using Web Services inside an intranet. I sometimes need to cross operating systems and languages to take advantage of pre-written services. One issue I've run across is the need to find the correct syntax in different languages that will generate a correct result. Some implementations are really easy and others require some delicate, precision work in order for them to respond correctly. Once written, however, they are consistent ...
On recommendation from a buddy, I have submitted a session for Codestock. I've never been to it, but I've heard great things about it. I sure hope mine gets selected. I am thinking I'd like to do a session on using Windows Powershell as a testing platform for web-based applications. It's a much overlooked part of your Windows 7 install. I have built a few very lightweight test harnesses out of it, and I like it a lot. If you structure it right, it becomes far more manageable than you'd think, encourages ...
I am a powershell user. I use it in testing apps, mostly to either actually work with IE (automated testing) or to configure environments for testing (this can save tons of time and is very repeatable). Powershell is incredibly handy. I was nodding my head very excitedly when I heard Windows 7 would ship with it standard on some versions. “Perfect!” thought I. I got my Windows 7 and installed it at work (I actually paid for this) b/c it seems to me that XP 64 isn't supported very well and Windows ...
I've been meaning to post this for a little while, and a recent post on the SSAS forum at ssas-info.com prompted me to finally get around to it. Basically the small Powershell script below will attach to the specified SSAS server and script all of the databases out to an XMLA file. In this example I also add a timestamp in the form of YYYYMMDD to the end of the file. $serverName = "localhost\sql08" $outputFolder = "C:\data\" ## load the AMO and XML assemblies into the current runspace [System.Reflection.Assembly... ...
Action Description Example AddLookupColumnToList Creates a new <b>list</b>-scoped lookup column pointing to an existing list. Download Quickstart AddSiteColumnToContentType Adds a site column to an existing content type. Download Quickstart AddSiteColumnToList Adds a site column to an existing SharePoint list. Download Quickstart CreateLookupColumn Creates a new <b>site</b>-scoped lookup column pointing to a field in an existing list. Download Quickstart EnsureSiteColumn Adds ...
Right after you install SP2010 (Foundation or Server), even on a completely updated Windows Server 2008 SP2, when you go to start the SharePoint 2010 Management Shell (the recommended PowerShell interface for working with SharePoint), you get a real ugly looking error: Exception setting "ThreadOptions": "This property cannot be changed after the Runspace has been opened." At C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONF IG\POWERSHELL\Registration\... char:48 ...

Already for the iPhone we have desktop remoting apps.

Microsoft think around some of the following:

1. SCOM Monitor for iPad

2. BAM dashboard for iPad

3. Silverlight for iPad….another nail in the Flash coffin!!!

4. Powershell App for iPad

5. Expression suite app for iPad