Tag | Powershell Posts

Today was .NETwork usergroup second gathering. The usergroup is the first and only large/effective "offline" usergroup in Egypt (although there're many others in INETA). They had a great success in their first gathering when they brought Steven Forte to talk about SQL Server 2008 new features for developers and ASP.NET MVC design pattern. I had a detailed post about it in my GWB blog at that time. Check it out for details. Background: First To Second Gathering (Warning: Boring Part!!) The .NETwork ...
Countdown till the 2008 launch in Belgium and the start of the TechDays summit has started. Proud to see loads of great Belgian speakers here. Here a list speakers I like, collegeas, community (visug) friends, Microsoft.be guys and other certified trainers and people I met at other Microsoft events. Gill Cleeren : A collegea at Ordina, MVP, SilverLight geek presenting Next Generation Web Applications. Dandy Weyn : A Redmond based SQL Guru with Belgian roots has multiple sessions on SQL 2008. Peter ...
The Question is why and the answer is: Please be better than Vista! Notice how much it still looks like Vista however you would have to expect that. Start Menu PowerShell Display Properties Control Panel Desktop Welcome Center System Tray. LiveJournal Tags: Windows 7, Windows Milestone1, mikedopp, mikedopp.com, Leaked, Screenshots, happiness, Windows, Vista BuzzNet Tags: Windows 7, Windows Milestone1, mikedopp, mikedopp.com, Leaked, Screenshots, happiness, Windows, Vista Flickr Tags: Windows 7, Windows ...
FREE - 4th Annual South Florida Code Camp - Register Now - Spaces are going fast! To attend this free, all day .NET Developer mini-conference register at: http://www.clicktoattend.co... ! The Code Camp will be held on Saturday 2/2/2008 and include breakfast, lunch, giveaways, valuable raffle items and of course lots of great content! The sessions are now listed on the agenda page. A big thanks to all the speakers that have stepped forward and volunteered to come speak at their own expense. ...
The Code Camp will be held on Saturday 2/2/2008 and include breakfast, lunch, giveaways, valuable raffle items and of course lots of great content! The sessions are now listed on the agenda page. A big thanks to all the speakers that have stepped forward and volunteered to come speak at their own expense. We have already scheduled 70 of 72 sessions. There will be something for everyone... from the person who is new to .net to advanced architecture and software process sessions. For the second year ...
/n software's NetCmdlets is available for free for non-commercial use. Check out the NetCmdlets hobbyist license here. Update! The ordering process does not require a credit card unless you request a physical cd shipment. For electronic download, just be sure to enter your name and email address! Technorati Tags: NetCmdlets, PowerShell ...
As I've mentioned countless number of times, one of the best benefits of the Partner Program is training. In this case it's free training. Two days full of instructor led training for free, however right now it's only in 3 cities. Topics covered: IIS 7 PowerShell and MMC 3.0 Software Licensing and Protection Services (SLP Services) - one of the more interesting topics rarely heard about WCF (Windows Communication Foundation) or WWF (Windows Workflow Foundation) Dates are as follows: (whomever in ...
There was a comment recently on the post where I annouced the release of powerSSAS, asking if you could export the information from the PowerShell Analyzer Provider Explorer. While I don't think you can do it from the Provider Explorer, but you can use the Export-Csv cmdlet that is built-in to PowerShell. Something like the following would export a list of dimensions to a .csv file. add-PSSnapin powerssas new-PSDrive ssas powerssas localhost cd ssas: cd "Databases\Adventure Works DW\Dimensions" # ...
One of the nicest things in Exchange 2007 is the way the installation and support interface has been improved. So much has been written about PowerShell but I am a big fan of the way they continue to improve the GUI experience as well. First of all, the subtle use of providing PowerShell syntax with every wizard execution is a great way to make beginners more comfortable with the command line. The second is the feedback you get upon installation of Exchange server. In days past you would get some ...
Microsoft released the beta 3 version of this kit at http://www.microsoft.com/do... Brief Description The Windows Server 2008 Developer Training Kit includes a set of hands-on-labs and presentations for technologies such as IIS7, Management, WCF, WF, Windows CardSpace, Windows PowerShell, Virtualization and the Transactional File System (TxF) ...
I just signed up the Philly.net Code camp. Did you? There are only 400 seats available! Here are the details: Our first installment of the 2008 Code Camp series will be held at the DeVry University campus in Fort Washington, PA on Saturday, January 12 from 8:00-5:30. Please register on our web site.-->Detailed directions are on the DeVry web site. Lots of code, just say no to slides! 9 hours 48 sessions (8:00, 9:30, 11:00, 1:00, 2:30, 4:00) 8 tracks 400 seats with tables (laptops welcome) Free breakfast, ...
param( [string] $optionalparam1, #an optional parameter with no default value [string] $optionalparam2 = "default", #an optional parameter with a default value [string] $requiredparam = $(throw ""requiredparam required."), #throw exception if no value provided [string] $user = $(Read-Host -prompt "User"), #prompt user for value if none provided [switch] $switchparam; #an optional "switch parameter" (ie, a flag) ) Technorati Tags: PowerShell ...
More on MOSS... In order to build our MOSS application we have decided to make the application as loosly-coupled from SharePoint as possible primarily because of the performance problems trying to develop on a Virtual Machine. So, how do we do it most effectively? With the help of some sound design patterns and a little PowerShell, it becomes pretty simple. Let's begin with the design pattern. First we need to create a standard ASP.NET website project. Then we need to create a "SolutionBuilder" project ...
I was reading Vidas Matelis' recent post on the metadata rowsets in SSAS 2008 and this got me to thinking about a discussion that Chris Webb and I had recently about the new "DMV" functionality is SSAS 2008. And that it basically that they are simply gives you an easier way to access information that is available through XMLA discover commands. And that you could already get to this information relatively easily through the Discover() function in the Analysis Services Stored Procedure (ASSP) project. ...
Anyone who has been reading this blog for a while will know that I was quite taken with PowerShell when it was released and was even playing with it back when it was only known by it's code name of "Monad". Well, back when it was still known as Monad, I started experimenting with writing a provider for Analysis Services. It was one of those side projects that I was toying with in my spare time and I kept telling myself that I just need to add one or two more features and then it would be ready for ...
Judging by my limited experiences with Vista the "security" sounds like it might be a case of how much security you need to turn off until your Server actually communicates with the other devices and runs the Applications correctly? Other than that I'm looking forward to seeing just how much can be accomplished with Power Shell, it's certainly got my Brother excited ;-) 10 things to consider when making a Windows Server 2008 upgrade decision Windows Server 2008 is expected to officially launch in ...
I was setting up Cruise Control the other day and trying to figure out why it wasn't working on a certain source control folder. I noticed a strange error in the cruise control log about there being an invalid character in the path, so I decided to take advantage of the fact that it is an open source project and download the source code so I could step through it in the debugger and see what the exact problem was. It wasn't long before I discovered the source of the error, which was a newline character ...
Inspired by Brian Button's presentation at the St. Louis .NET User Group and Scott Hanselman's dnrTV! episode, I'm starting to look into PowerShell. Scott Dorman had a link to a free introductory PowerShell e-book a while ago. I haven't actually read the e-book yet, but when I printed it, I noticed a nice PowerShell Cheat Sheet at the end of the book, which looks like it might be very useful ...
I've been experimenting with the Server Core version of Windows Server 2008 for a project I'm working on. You may be aware that Win2K8 ships with this great new streamlined "Server Core" mode that you can select during setup. Installation is lightining-fast, just 10 minutes on my Core 2 Duo machine. (And that's including the 2 reboots, hardware detection, and everything!) You end up with only a very minimal set of GUI tools, including notepad and regedit. The thing is lean and mean, and can run very ...
I attended the Florida.net at Citrix Ft Lauderdale on 10/02/2007 and have seen all the talented “GEEKS” successfully presented their codes: Steve Potter - Cache Register Jonas Strawski - SQL Server as Document Repository Lou Yovin - Volume Shadow Copy Tim Corbett - System Tray App Louis Datz - dashCommerce Martin Anderson - XML Schemas and powershell Max Trinidad - Powershell script to create CSV Shervin Shakibi, Dave Noderer, and Jeff Barnes of Microsoft who were Judges and Mc as well. As all of ...
All the code Idols did a great job. In the end, mostly by popular vote, Steve Potter won the "Top Geek" title. I'm sure we will see more of Steve as he is very interested in presenting at future meetings! Thanks to the code idol contestants: Steve Potter - Cache Register Jonas Strawski - SQL Server as Document Repository Lou Yovin - Volume Shadow Copy Tim Corbett - System Tray App Louis Datz - dashCommerce Martin Anderson - XML Schemas and powershell Max Trinidad - Powershell script to create CSV ...
Had the opportunity to see first hand at Microsoft Headquarters last week the new RTM for System Center Virtual Machine Manager (SCVMM). Event Name: Creating and Managing a Virtual environment on the Microsoft Platform Location: Microsoft Ltd Room: Chicago 1&2 City: Reading Event Overview In this session, we move away from tradition, and bring you a new style of TechNet event; one driven by powerful product demo’s and bleeding edge technology. We will start by explaining the environment we will ...
If you work with PowerShell and don't already have PowerTab installed, take a few minutes to download and install it now. It's a painless setup, especially if you just keep hitting enter at the prompts to accept the defaults, and the ansi-art intellisense magic just starts working everywhere without you having to learn anything. If you're still not convinced, take a minute to watch this quick flash demo. I made the mistake of thinking that I had to master the basics in PowerShell before experimenting ...
It looks like I'll have a chance to test out the10/20/30 rule of PowerPoint by Guy Kawasaki next Tuesday at the next KC .NET User Group meeting where I will be giving a presentation on PowerShell. I was only recently introduced to this rule, which states that PowerPoint presentations should contain only ten slides, last no more than 20 minutes, and use no smaller than 30 point font. However, since I naturally have a small attention span when it comes to presentations that aren't concise, I was immediately ...
We have seven potential Code Idol's lined up to compete in the first Ft Lauderdale Code Idol. The judges will be there to harrass and judge the contestants who will be competing for valuable prizes and bragging rights for "Top Geek". Shervin Shakibi, Dave Noderer and a mystery guest will be judging! REGISTER HERE! Each contestant will have ~ 10 min. to present their content. And the contestants are: #1 - Steve Potter Description: “Operation Controller”. I would describe it as an object that handles ...

Of course the day after I posted the NetCmdlets Cheat Sheet for PowerShell and then went on Vacation to the Outer Banks, the website where the cheat sheet was hosted went down.  Doh!  Its back up now!

Since Rails, everybody has turned to see what Ruby looks like, why was it the language that had such a great framework built in top of. For most .NET developers including me, that wasn't so easy, while we are already surrounded with new stuff coming to our paradigm. Now that everything is almost stable, .NET 3.0 has turned into a normal part of our applications in certain situations, C# 3.5 seems to be getting the final touches and so is .NET 3.5/VS2008, I tend to believe it's time for checking different ...
Last winter, Ben Pearce put together a little PowerShell Cheat Sheet. I printed it out and I keep it handy at my desk. It occurred to me that a NetCmdlets cheat sheet would be useful too, so I borrwed Ben's style and did just that. NetCmdlets Cheat Sheet - .docxNetCmdlets Cheat Sheet - .doc If you see something missing or if there are mistakes, let me know and I will update here. Technorati Tags: PowerShell, NetCmdlets ...
Following up from my recent post on Powershell, I have updated the Powershell provider for Analysis Services that I wrote back when Powershell was still known by its code name of "Monad", so that it works with the released version of Powershell. I have a few more features that I would like to add to it, but it is quite functional in its current state and I am thinking of putting it up on codeplex in its current form. My main issue now is what to call the thing. The project is currently called AmoPsProvider ...
Jesse Orosz posted some interesting sample code recently on how to remove partitions with a certain prefix using AMO. I thought it would be an interesting comparison to see what similar code would look like in PowerShell. There is definitely not anything wrong with Jesse's code, it's obviously part of a much larger framework. It's more that I think PowerShell is a really good tool for doing these sort of admin tasks and it's an interesting exercise to take someone else's code from .net and re-implement ...
The userAccountControl attribute is used to control the access of a user account. This value can be set to the bitwise OR of a set of flag values, documented here: Property flag Value in hexadecimal Value in decimal SCRIPT 0x0001 1 ACCOUNTDISABLE 0x0002 2 HOMEDIR_REQUIRED 0x0008 8 LOCKOUT 0x0010 16 PASSWD_NOTREQD 0x0020 32 PASSWD_CANT_CHANGE Note You cannot assign this permission by directly modifying the UserAccountControl attribute. For information about how to set the permission programmatically, ...
Shay Levi played off my mac address retreival code yesterday and shared his own PowerShell script to retrieve a mac address. Here's another PowerShell script to retrieve a mac address using get-snmp from NetCmdlets: ## Retrieves the MAC address of an snmp-enabled device ## Returns a hex string that is the MAC address ## ## usage: get-mac [-agent] <string> ## param( [string] $agent = "10.0.1.11" ) #a function to convert an octetstring into a hex string function get-hex($octectstring) { $len ...
The question often comes up, how do you find out the MAC address of a remote machine, given its IP address? There are a few ways to do it, but here are two: The first way is to use SNMP. Use whatever SNMP library you like, or create your own. Here are the steps you'll need to take, as well as an example showing how to implement these steps using IP*Works! or IPWorks Secure SNMP. Get the number of interfaces on the device (ifEntryNum - 1.3.6.1.2.1.2.1) For each interface, get the MAC address (ifPhysAddress ...
PS C:\> get-ldap -server testboy -cred $mycred -dn dc=JUNGLE -searchscope wholesubtree -search "(&(objectclass=user)(o... Again, there's no need for dozens of LDAP cmdlets. The two LDAP cmdlets included in NetCmdlets, get-ldap and set-ldap, are all you need for most tasks. The above command shows how you would search for disabled user accounts with the get-ldap cmdlet. Technorati Tags: PowerShell, LDAP, Active directory, ...
When given a choice between style and substance in software, I usually opt for what I consider to be substantive qualities such as speed, functionality, usability, and cost. Since I never saw a sentence about Vista without the phrase "eye candy", I casually dismissed Microsoft's long-awaited OS release as fluff when it first came out and was in no hurry to jump aboard the upgrade band-wagon. Well despite my valiant effort at indifference, I am ashamed to admit that I have finally succumbed to the ...
In my previous posts about LDAP group membership, I've talked about how to get a list of groups, how to search for a particular groups members, and how to search for what groups a particular user belongs to. Up next: how to change group membership. To add or remove a user from a group, you need to modify the "member" attribute of the group itself. To do this we'll use the set-ldap cmdlet of NetCmdlets. Add a user to a group: To add a user to a group, set the DN parameter of set-ldap to the DN of ...
In the last LDAP series post, I mentioned how to search for the members of a group. Now the opposite, here's how to search for what groups a particular user is a part of: To do this search, all I do is form a search filter that is searching for all groups that has a particular member in it. So really this is a slight alteration of the search for all groups. PS C:\> get-ldap -server testboy -cred $mycred -dn dc=JUNGLE -searchscope wholesubtree -search "(&(member=CN=Lance Robinson,CN=Users,DC=JUNGLE... ...
More with the ldap cmdlets in NetCmdlets, here's how to list the members of a particular group. I used the get-ldap command shown in the last post to get a list of all my admin groups, and save it in a $groups collection: PS C:\> $groups = get-ldap -server myserver -cred $mycred -dn dc=JUNGLE -searchscope wholesubtree -search "(&(objectclass=group)(... PS C:\> $groups Host DN ---- -- testboy CN=Administrators,CN=Builti... testboy CN=Schema Admins,CN=Users,DC=JUNGLE testboy ...
If you decide to run a marathon, one of the first things you have to do is choose a training program. Training programs prescribe incremental steps that you'll need to take in order to attain your goal. In running, this usually involves gradually increasing your weekly mileage and long distance runs for several months before the race. Training programs are usually categorized as beginning, intermediate, or advanced based on your experience and goals. After giving my first presentation on Powershell ...
Yesterday I posted about adding whatIf functionality to a PowerShell script. Less than 24 hours later I had a comment from Jeffrey Snover of the PowerShell team. This isn't the first time that I have noticed hits to my blog from Microsoft addresses after posting on one subject or another. I find the fact that the product teams are keeping an eye on the community reassuring. Keep up the good work guys ...
NetCmdlets doesn't have a long list of Active Directory cmdlets for PowerShell. Instead, it has 2. And they aren't AD specific - they just implement the LDAP protocol itself so they can work with any LDAP server, Active Directory or not. Two cmdlets are all that is needed to make common tasks simple. One for setting values (set-ldap), and one for getting values (get-ldap). Here's how I can retrieve a list of all the "admin" groups: PS C:\> get-ldap -server myserver -cred $mycred -dn dc=JUNGLE ...
In a previous post I described a PowerShell script that I created for renaming image files. The other day I mistakenly put in an incorrect value for one of the command line parameters. At that point I realized that maybe my script needed the same capability that many of the PowerShell cmdlets have. It is a parameter called "whatIf". whatIf is a parameter that cmdlets with a destructive nature make available in order to allow you to verify that your script will work as you intended before committing ...
If you are a PowerShell developer, or are just interested in learning more about Windows PowerShell, be sure to check out this 44 page e-book from Microsoft Switzerland (yes, it's in English). The associated demos are also available ...
One of my goals for the next six months was to contribute to an open source project and I think I've chosen one. I downloaded and installed the PowerShell Community Extensions (a.k.a. pscx) from codeplex a while ago, but I just now got around to really tinkering with the cmdLets and reviewing the source code and scripts. I have to say I'm impressed. Keith Hill and his team of volunteer developers did a first rate job of supplementing version one of Powershell with some really useful cmdlets. I can't ...
Anything that can be done with ADO.NET is possible in PowerShell through a call to Assembly::Load and the New-Object cmdLet, but that doesn't mean that the resulting code will seem very shell-like or practical. Two approaches to database access that definitely do seem compelling to me, however, are the sample SQL Provider recently demoed by the PowerShell team and Dan Sullivan's PowerSMO script, which is really just a thin wrapper around the SQL Management Objects found in the Microsoft.SqlServer.Managem... ...
Rodney Vinyard has written a good post on some topics which are very closely related to .Net Interview Questions. Paul Whitaker has written a good post on Serialize and deserialize objects as Xml using generic types in C# 2.0. Russell Ball has written a good post on Disk Space Management with Powershell. Tim Hibbard has written a good post on Becoming a better developer. Scott Dorman has written a good post on Using Garbage Collection in .NET. Dave Caddick has written a good post on Linux desktop ...
The more I work with powershell, the more I start seeing everything that lives on the computer as part of a giant database that I can query. When used in conjunction with the pipeline and get-member -type property to discover the available properties on an object, the where-object, sort-object, select-object, and group-object cmdlets can be strung together to answer some very sophisticated questions. We often seem to run out of space on our development sql servers, so one tedious question that I ...
One of my hobbies is photography. Naming image files so that they are useful can take a significant amount of time. Personally I like to name them by subject and by date so that they sequence nicely in Windows Explorer. I'm sure there are hundreds of application that already have this feature, but being a geek and wanting to lean something new I decided to figure out how to perform the task in PowerShell. The first thing I needed to figure out was how to select a group of files. I found that the ...
I have been trying to learn PowerShell so I went to a book store with the initials BN to see what I could find. Call me old fashioned, but I still prefer to have hard copies of books. While I was there I wanted to look for books on my hobbies of photography and astronomy. This particular store only had one PowerShell book in a very small computer section. It had no astronomy books in its even smaller science section. I got so frustrated I forgot to look for the photography books. You would think ...