Here’s a bit about us:
Don Jones has more than a decade of professional experience in the IT industry. He’s the author of more than 30 IT books, including Windows PowerShell: TFM; VBScript, WMI, and ADSI Unleashed; Managing Windows with VBScript and WMI; and many more. He’s a top-rated and in-demand speaker at conferences such as Microsoft TechEd and TechMentor, and writes the monthly Windows PowerShell column for Microsoft TechNet Magazine. Don is a multiple-year recipient of Microsoft’s “Most Valuable Professional” (MVP) Award with a specialization in Windows PowerShell. Don’s broad IT experience includes work in the financial, telecommunications, software, manufacturing, consulting, training, and retail industries and he’s one of the rare IT professionals who can not only “cross the line” between administration and software development, but also between IT workers and IT management.
Greg Shields is a professional author, speaker, and IT consultant. With nearly 15 years in information technology, Greg has developed extensive experience in systems administration, engineering, and architecture specializing in Microsoft, remote application, and virtualization technologies. Greg is a Contributing Editor for TechNet Magazine, and is the author of six books, including Windows Server 2008: What’s New / What’s Changed. He is the Resident Editor for the Realtime Windows Server community and edits the Windows Administration in Realtime eJournal. He is well known for his skills in relating highly technical concepts with a drive towards fulfilling business needs. Greg is also a highly sought-after instructor and speaker, speaking regularly at conferences like TechMentor Events, and producing computer-based training curriculum for companies like CBT Nuggets. Greg is a recipient of Microsoft “Most Valuable Professional” award with a specialization in Windows Terminal Services.
Mike Danseglio has worked in the IT field for more than 18 years. Starting at the bottom allowed Mike to build experience in all aspects of the computer industry. He is an award-winning author, public speaker, and instructor on a variety of technology topics including security, virtualization, computer hardware, data centers, cloud computing, and operating system operation and deployment. Mike’s presentations and writing projects have won numerous awards and been cited throughout the technology and security industries. His security work has included protecting militaries, government agencies, and private industry around the world. Mike's infrastructure work includes data centers and services that scale to over two million concurrent users with no service impact.
]]>In other TechNet Magazine news, I seem to have the most articles online (36 - three years of columns, plus a feature on Mac interop) of any author! That makes "Windows PowerShell" one of the magazine's longest-running columns.
]]>Also, don't forget that we're all (Don, Mike, and Greg) headed to TechMentor in Orlando next week. Come say "hi" if you're there, and if not, we'll be posting slide decks, sample scripts, and assorted whatnot shortly after we return home. They'll appear under the "Conference Slide Decks" menu item right here - although you MUST be logged in in order to access them (we do that just to protect our bandwidth consumption a bit).
See you again after the conference!
]]>Hints: One of these isn't technically a code name as it is used in the final product.
Have a great weekend!
]]>Note that this is a bring-your-own laptop class, and there are some requirements for the OS you need to be running (although a virtual machine is fine). If you're not comfortable installing Windows Server on a laptop or in a VM, this isn't the right class for you :).
Don't delay - sign up today. SAPIEN and I both like to keep class sizes pretty small, so you'll get lots of hands-on time as well as face time with me. It's a great way to learn, ask lots of questions, and leave with some really solid skills under your belt. I make sure you're ready to go back to work and start using PowerShell right away, for real tasks.
]]>Unfortunately, my admin workstation runs Windows Server 2008, and I did not want to rebuild it just to be able to use the new AD cmdlets. I copied the module from one of our W2K8 R2 DCs to my admin machine and tried to use "Import-Module", but this failed. After that, I tried to manually register the required assemblies into the GAC (like Microsoft.ActiveDirectory.Management), and that worked except that my PowerShell did not find any Domain Controller with the AD Web Services running. To solve that, I had to install hotfix 967574, and after that (and a reboot), the ActiveDirectory module runs just fine on my Windows Server 2008 machine - nice!
So - one of my colleagues pointed out that this procedure might violate Microsoft's End User Licence Agreement. Do you have any insight on that?
]]>new-aduser -SamAccountName bob -Name 'bob' -PassThru |Set-ADAccountPassword -reset -NewPassword (ConvertTo-SecureString -asplaintext 'Newpass#2' -force) -PassThru | Enable-ADAccount
I have tried different things but can't get the account to enable on the one command line.
Thanks
]]>For now, we can only hope.
]]>If you're an old-fashioned kind of guy like me, you're probably just not...yet...ready to wrap your mind around Microsoft's new "Libraries" feature in Windows 7. I'll get there, I promise. But for now, when I click on that explorer link in the Start Bar, I want it to take me to My Computer rather than the Libraries folder. Michael found this little gem of a tip that shows you how to reset the link so it opens in this different location:
I found this tip in a list of 70 Windows 7 tricks (many of them already work for Vista). The Explorer in Windows 7 opens by default from the Libraries folder. If you want to start the Explorer with the My Computer page, you have to replace the shortcut target with %SystemRoot%\explorer.exe /root,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}. Note that you can also open any other folder by just adding the corresponding path as a parameter to the launch command. For example, if you want Windows Explorer to start in C:\Program Files, the target for the Windows Explorer icon would look like this: %SystemRoot%\explorer.exe “C:\Program Files”
Don's "Concentrated Guide to Being an Independent Contractor" is full of tips that we've both learned over the years that help us be successful with our freelancing businesses. But one thing that's missing are the actual warm-fuzzy calculations that tell you you're charging the right amount of money.
To help, I found a really nice "Hourly Rate Calculator" that asks you a relatively long series of questions to help determine what your break-even and ideal hourly rate should be. Remember that freelancing is a business, and one that is successful when it supports the lifestyle you want to live. Calculators like this help give you a measuring stick to know when you're meeting the financial needs of that lifestyle.
]]>This is easily the most comprehensive PowerShell v2 book on the market. It not only teaches you all the v1 stuff you may have missed, forgotten, or never had, but it also covers absolutely every administrator-focused feature in v2 - up to and including full cmdlet development in Visual Studio (which I guess technically is more a dev topic)! You've got remoting, background jobs, data language, internationalization, new cmdlets, new operators, WMI, Active Directory, XML, connecting to databases, writing Advanced Functions, and tons more. My co-author, Jeff Hicks, and myself spent months revamping, reorganizing, and updating the content, making sure everything was covered. Major topics are accompanied by full-length, practical, real-world examples that reinforce concepts and give you a useful tool right from the get-go.
I can't wait 'til it starts shipping - but put yourself in for a copy today, to ensure you have one on day 1!
]]>Today, Greg got an e-mail which said, in part:
Hello Greg – if you would like to learn more about the new paradigm in backup and disaster recovery—Backup 2.0, Vizioncore CTO Jason Mattox is hosting a live webinar exclusively for bloggers in the virtualization community. The webinar info appears below.
It goes on to say:
Traditional backup methods, referred to as Backup 1.0, are reaching their technology end-of-life. These methods were designed more than two decades before the existence of current data center infrastructures. Backup 1.0 uses use inefficient file-level backup methods for data collection and transmission, and they offer limited recovery options. Backup 1.0 is also dependent on its own set of complex infrastructures that include backup agents, servers, networks, and storage systems. This complexity adds cost and administrative burden to already over-burdened environments. Ultimately, traditional Backup 1.0 methods are too costly to operate and maintain, with insufficient recovery options. By using images, Backup 2.0 reinvents how data is collected, transmitted and recovered. Image-based backup collects and protects more types of data, transmits and stores it more efficiently, and offers faster recovery at more frequent points in time. Backup 2.0 solutions also dramatically simplify data protection infrastructure: backup agents and servers are eliminated, lowering costs and simplifying operations.
Which is a nice paraphrasing of the main themes of my book, especially the core concepts from the first chapter. Well, needless to say I'm completely flattered! And it turns out Vizioncore has even done some math, claiming a $15-to$1 return on investment for Backup 2.0-style solutions. Neat-o. I'm hoping Vizioncore will contact me someday to talk about Backup 2.0; I'd love to find out how they've interpreted the theme and what they're doing with it. Heck, maybe their next announcement can even use a few (properly-attributed, of course) quotes from the book!
]]>Both Don and I will be attending again this year, with the both of us operating as Conference Chairs. In addition to us, also attending are industry heavy-weights like Mark Minasi, Rhonda Layfield, Peter Bruzzese, and others. Best of all, we've reformatted the content for this year to ensure that every minute of time is immediately applicable information you can use in your network immediately.
My reason for posting this announcement has to do with the soon-to-end Early Bird pricing for the conference. Ending February 3rd, you'll soon lose a $200 discount on your conference pass or hotel+conference pass. Be aware that TechMentor has listened to the needs of our attendees-with-difficult-purchasing-departments and created a single SKU for both conference and hotel this year. This means you only need get a single expense approved, rather than two for hotel and the conference fee.
Drop by www.techmentorevents.com for more info. You'll be glad you did. And you'll absolutely enjoy the world's best IT conference at TechMentor 2010.
See you there!
]]>First, some background: You may be aware that Win7 and Win2008R2 can use a new ActiveDirectory module, which includes cmdlets for managing AD. These cmdlets are pretty cool and pretty effective. However, the cmdlets ONLY run on Win7 or Win2008R2.
The cmdlets can manage any domain controller running Win2008R2, Win2008RTM, or Win2003; Win2008RTM and Win2003 need a free Management Gateway Service installed, but you DO NOT need any Win2008R2 domain controllers in your environment.
Of course, you can get Windows PowerShell v2 for WinXP, Win2008RTM, Win2003, and Vista, but having PowerShell v2 still doesn't necessarily mean you can run the AD cmdlets. Or does it?
Do this: Get at least one Win7 or Win2008R2 machine in your environment. Win7 will need the remote administration pack, because that contains the AD cmdlets. Set up WinRM and Windows Remote Shell - you can do this via Group Policy, or by running Set-WSManQuickConfig on the Win7 or Win2008R2 computer. Finally, get Windows PowerShell v2 running on an older version of Windows - WinXP or Vista, for example. Launch Windows PowerShell v2 on the older machine - this will be your "client." The Win7 or Win2008R2 machine, where the AD cmdlets exist (in c:\windows\system32\windowspowershell\v1.0\modules) is the "remote machine."
On your client, run:
$session - new-pssession -computername remote-machine-name
This creates a remote shell session and saves it in the $session variable. Next, run this on your client:
invoke-command -command { import-module activedirectory } -session $session
This tells the remote machine to load the ActiveDirectory module into its runspace. Then, again on your client:
export-pssession -session $session -commandname *-AD* -outputmodule RemoteADCommands - allowclobber
This creates a module named RemoteADCommands in /Documents/WindowsPowerShell/Modules, on your local client. The above steps only need to be done once. From now one, whenever you open the shell on your client, just run:
import-module RemoteADCommands -prefix Rem
This will make all of the AD cmdlets from the remote machine available on your local machine. Now, the commands will NOT execute locally - although it looks like they're doing so. You haven't "installed" the cmdlets locally; you've created "pointers" to the cmdlets on the remote machine. To help distinguish them, the "Rem" (for "Remote") prefix has been added to the cmdlets' noun. So now instead of:
New-ADUser
You would run - on your client:
New-RemADUser
Once you run the first command, your local shell will re-establish the remote session. At that point, you'll be able to ask for help on the remote commands:
Help New-RemADUser
This is a crazy powerful technique. It means you can literally reach out and run commands that don't - or even can't - exist on your local computer, so long as you have at least one computer in your environment that CAN host the cmdlets, and so long as you have configured PowerShell remoting.
]]>As long-time readers will know, Clear launched in Las Vegas, Portland, and Atlanta this summer. They're now in 27 markets, primarily markets where Spring (who owns 51% of Clear) has a pre-WiMax 4G presence (XOHM), and is converting those old customers. At the launch, I noted how Clear was delivering reliable 6Mbps service at the launch site, a shopping mall near my home - but that I was only getting 1Mbps service at home, about a mile away. Clear's service is highly dependent on distance from the tower, not unlike DSL.
Fast forward a few months. Clear resellers - like the kiosk at the aforementioned mall - have access to an app that shows actual tower locations. So every so often, I stop by and check things out. Recently, I discovered that a couple of towers were now bracketing my house. Well, a friend had just bought Clear and was happy with it, so I borrowed his router/modem and brought it over to the house. Some experimentation led me to discover that a high shelf in the garage, of all places, was getting 4-5 bars of signal! Fortunately, the garage has Ethernet cabling (hey, built the house - every room has cabling), so I could easily put the modem there.
Right now, Clear is offer a killer deal: A home wireless modem and a mobile USB modem, both with independent unlimited service, both at the 6Mbps rate (bursts to 10), for $50/month total - for life. I pay that now for my Spring 3G modem. Sure, Clear isn't fully national yet - but it will be by the end of 2010; they're rolling to over 40 markets total this year. I'm willing to deal with spotty out-of-town service in exchange for a sweet lifetime price. So I took the plunge. Clear offers a 7 day money-back guarantee, so I figured I'd try it.
Right now, I still have the Spring 3G service - my contract runs through June, so I'll keep it until then. But I'm reliably getting 3-4Mbps service at my house, which is what my CenturyLink DSL line was delivering. Now, I can cancel DSL. Saving me $40 a month.
It's always irritated me that CentryLink's cheapest phone line is like $20 a month - you can't get anything but a bundle of features, and the only thing I use the landline for these days is my home's alarm system. My new insurance agent (don't even get me started on the necessity of shopping your insurance coverage every few years - I'm saving 50% now) suggested a different local security monitoring company. Turns out he can convert my alarm system to wireless monitoring and charge me $9 less per month than my existing landline monitoring. Boom, $9/mo savings, drop the phone line for $20/mo savings - I'm up to almost $80/mo now by switching to clear.
So I call Century Link. Right now, they bill me for my Dish Network service, and I wanted that unbundled and sent back to Dish, since I'll be dropping everything else from Century Link. Dish looks at my service and tells me they've re-jiggered their bundles, so I can drop the $10/mo "Platinum HD" add-on because I'll get those channels free anyway. $90/mo savings. That's like a pretty decent dinner out once a month!
Two weeks on Clear now, and I'm delighted with it. There are a couple of downsides: The Motorola CPE is a very simple device. Two plugs: Ethernet and power. Not even an external antenna port, which was kinda stupid. It also can't operate in "bridge" mode - it's only a router. So that kills my ability to use the "Back to My Mac" feature of my iMac, because that feature depends on my actual Airport Extreme having a real IP address; right now I'm essentially doing double NAT. That's okay - I've recently switched to a laptop, so I don't need Back to My Mac as much, and for the other iMac in the house we can use GoToMyPC or LogMeIn if we decide we need the remote access capability.
The only other downside is that I had an old CradlePoint PHS-300 portable hotspot. You plug a USB 3G/4G modem into it, and it turns that into a WiFi hotspot. Very convenient for hooking up 2-3 computers in an airport or hotel room. The PHS-300 has a battery and is good for 2-3 hours of runtime, even. Well, Clear offers a branded version of this thing, and CradlePoint has firmware upgrades, so I thought "awesome - I can use my existing PHS-300 with my new Clear USB modem!" Er, no - you need the v2 hardware and I only have v1.1 hardware. So the old PHS-300 is up for sale on eBay, and I'll pick up a new one when and if I decide I need it.
Neat fact: Clear advertises their USB modem as working with Mac 10.5, but not the latest 10.6 Snow Leopard; their support page, however, has a driver listed as compatible with 10.6 and I can assure you it works perfectly. It also works with Windows 7, if you're interested. So I can use the USB modem directly on all of my laptops, which makes a new portable hotspot less of a priority.
It's a little tough to get used to a town that's literally blanketed in DSL-grade wireless. Interestingly, while Clear and Sprint are leading the charge on this (Sprint's 4G service is just Clear, repackaged under the Sprint or Nextel brand), 4G is the first "converged" wireless standard, meaning that when Verizon and AT&T and everyone roll it out, it'll be the same technology. It's also the same technology overseas, leading to great opportunities for spending vast sums of money to roam :).
Oh, and for all you cable broadband folks - yeah, I get it, 10Mbps or more to your desktop. We don't have cables in the ground where I live, though, so it is literally not an option. Nor do we have FiOS, because we're not a Verizon region. My choices are literally 5Mbps DSL or 5-6Mbps Clear. I don't even live close enough to a CO to get CenturyLink's 10Mbps DSL service, or I might well have that instead of Clear.
]]>I've been given a project to report on the current connection speed of every server we own (800 +). The only thing I've found is a .net command of:
[System.Net.NetworkInformation.NetworkInterface]::GetAllNetworkInterfaces()
The problem is, I can't figure out how to make it work on a remote computer. Can someone point me in the right direction please.
Thanks.
]]>Leave a comment; give me an idea of how many humans are in the office (round numbers are awesome), and what kind of connection the office has to the big ol' world.
Anyone still using T1s? They're kinda pokey by DSL and cable modem standards, and pricey too, although they're synchronous. What about ISDN? I hated working with that stuff when I was at Bell - could they possibly have come up with any MORE configuration parameters? Does anyone use aDSL or sDSL for an office connection? What about cable modems - lotsa bandwidth, but cable providers aren't really known for their business services, are they?
If you've got multiple offices and have private WAN bandwidth between them, tell me what that looks like to, if you don't mind.
Thanks!
]]>This is pretty cool - CBT Nuggets has a free iPhone/iPod Touch app that includes a bunch of their training videos. Now this is free, so don't expect the entire library... but I do know they're re-encoding the entire library to work with these devices, so a purchase option might be in the future. The videos are obviously smaller - roughly 50% full-size, I'd say - but they're remarkably clear. As you probably know, both Greg and I have done a slew of training for this company - you can find a list of our videos on the front page of the site, at the bottom - and I'm excited to see them in the mobile market, now.
If you don't know, CBT Nuggets sells "series" of videos. A single series might consist of around 15-25 videos, each about 15-30 minutes in length. So you get to learn in chunks... "nuggets," if you will. They sell individual videos on disc, but you can also get an all-you-can-eat streaming subscription (around $1500/year, discounts if your company buys multiple streams), and they sell an "archive appliance," which is basically all of their videos on a server that plus into your network.
The videos are filmed as if you're sitting right there next to the instructor. There's a white board, but very little in the way of slides - it's about 95% demo in all the videos I've done, for example. We walk you through everything you need to know. You get to see us make little mistakes and then recover from them, which helps YOU recover from those same mistakes if you ever run into them on your own.
They're really a great company, and frankly $1500 is what you'd pay for a one-week classroom course... to get an infinite amount of video training for the same money is pretty awesome. There are topics focused on certification exams (which are useful for learning the product even if you don't plan to take the test), and "on the job" series that cover stuff that doesn't line up to a specific test. Most of what I've done is in the "on the job" category. Want to learn PowerShell? The SQL language? How to support a Mac in a Windows world? There's a nugget for that... and now there's an app for that, too!
]]>
[CmdletBinding()]
param
(
[string]$AParm,
[switch]$Verbose,
...
Then I get an error indicating that Verbose is already defined. This is a common parameter, so that makes sense to me. However, if I pass the script "-verbose" and then I test for $Verbose in the subsequent script, it is not $true. How can I check for a set switch on a common parameter?
I know I could drop the CmdletBinding attribute, because then it works, but if I use a mandatory parameter, it seems to force CmdletBinding anyway.
Thanks!
]]>But VMWare... these guys are not bright.
First, the vSphere 4 client doesn't run on Windows 7. Not only did they write this thing in .NET - tying themselves forever to their freaking competitor and meaning you can't have the vSphere client on Unix or Mac, it's called JAVA folks, look into it - they took hard dependencies on certain Framework DLLs, which any Framework programmer will tell you is a stupid idea. So when Win7 shipped, vSphere Client stopped working unless you hacked a copy of the old DLL in, set a development environment variable, and did other nastiness. I'm sure VMWare blames Microsoft, but VMWare is in this case wrong, wrong, wrong.
So this week a vSphere 4.0 Update 1 comes out, which alleges to fix the problem. Well, that only took a few months.
So I get on VMWare.com and try to download it. Ah, it tells me, you're not registered to have this. You can either register, or buy a copy. Of the vSphere Client. Which is only useful if you own VMWare software. And which is free with ESX anyway. WTF?
NO sweat, though - I have a serial number for ESXi. So I register it. No, it tells me, that's already registered to you. But you still can't have the vSphere Client Update.
F-U.
My recourse? I have to go to Dell, download an ISO for the full ESXi Server Update - not just the client, mind you. Burn the ISO. Stick it in my server. Now, this does NOT get me the client update - for that, following the procedure, I have to hack my existing client so it will actually run. I have to connect it to the updated server, so the client can see that a client update exists. Then the client downloads the updated client from the server and installs it.
This is brain-damaged. Seriously, VMWare needs a couple of five year-olds on staff because even they would tell you how brain-damaged this is. In fact, calling it "brain-damaged" is insulting to people who are seriously brain damaged, because even they wouldn't be so brain damaged.
This is the sort of irritation that makes me start looking at putting Hyper-V onto an SD card and sticking it into the server. Microsoft, at least, makes their freakin' management tools available as free downloads without even Windows Genuine or whatever annoyance THEY came up with. VMWare, pay attention: It doesn't take much to tick off customers, and if you can't come up with a better solution to management tool distribution than jumping through infinite hoops, then you're ultimately not going to be in business. There are too many competitors eager to take that business away from you, and your technology isn't so vastly superior that people will endlessly tolerate crap customer service.
]]>My question is about:
Function CreateHomeFolder {
Param($userinfo)
$server1 = 'a','b','c','d'
$server2 = 'e','f','g','h'
Switch ($userinfo['samAccountName'].
substring(0,1).tolower()) {
{ $server1 –contains $_ }
{ $homeserver = '\\homeserver1\'; break; }
{ $server2 –contains $_ }
{ $homeserver = '\\homeserver2\'; break; }
}
Mkdir ($homeserver + '\$Homes\' + $userinfo['samAccountName'])
}
I think that there is a problem somewhere after "Switch". Can you verify? Also, is this series of atricles applicable to PS v2?
]]>There are a lot of great PowerShell tool developers out there - SAPIEN, Idera, Quest, and more. I think all of them are missing a fantastic opportunity. Check out this screen shot from a Mac tool called Automator:

This is essentially a graphical, drag 'n' drop "macro editor" for building automation workflows. Yeah, pretty much exactly what PowerShell is for, too. Imagine that the actions on the left-hand column are snap-ins and cmdlets. You drag a cmdlet over to the right-hand pane, where they "connect" together (almost in a pipeline, if you will). You set various options (a la parameters), and then click run. Items (okay, "objects") are output from one action ("cmdlet") to the next.
Why is this such a good idea? Because, unlike a command-line-based shell, this GUI helps you more easily discover what actions - er, cmdlets - are available to you, and it exposes their various options (call 'em "parameters" from here on out) more visibly. However, because the resulting "graphical pipeline" isn't really that different from the command-line shell, you're still learning PowerShell - everything on the screen has a one-to-one correlation to something in the command-line. So you're not going to use this as a crutch forever - it's helping you learn how to use the text-based version of the shell also.
The best thing is that this is all practical. PowerShell v2 now has cmdlets expose enough information about themselves that a developer could construct this display dynamically, with whatever cmdlets you happened to have on-hand. Given PowerShell's robust and modular help system, this GUI display could also provide per-parameter help whenever needed, without making you parse through an entire text help file yourself.
I've actually shown this to bunches of PowerShell tool developers without getting much interest. So, if you think this is a tool you'd like to have, indicate that you "like" this item (you'll need to log in; use the "Contact Us" link at the bottom of the page if you have trouble doing so in this new software). We'll see if we can spur some interest!
The fix? Power down the VM. Remove the NIC in the VM's settings. Add a new NIC of the VMNET type, not E1000. Start the VM; make sure the VMWare tools gets installed/updated so the VMXNET driver is installed, and you're good to go.
]]>