Wednesday, December 23, 2009

Microsoft Release the PowerShell V2 SDK

Microsoft Release the PowerShell V2 SDK
"The Systems Development Kit, or SDK, is a download that the stuff you need to be able to develop applications around a particular technical area. The Windows SDK is huge and there are SDKs for almost every technology MS produces. Other vendors produce SDKs too.
Initially, Microsoft shipped a PowerShell SDK. Then some time ago this changed and the PowerShell SDK was subsumed into the Windows SDK – which meant finding just the PowerShell stuff was challenging. I saw any number of complaints around this in the newsgroups etc.
Well –the PowerShell team have just released the Version 2.0 SDK – as an independent (and small at 2.4mb!) SDK. The SDK contains the reference assemblies and 45 samples that help you to better understand how to use PowerShell. There appears to be no documentation (and the installation process doesn’t seem to add in any shortcuts or start menu items.
More holiday reading!"

Testing for PowerShell Remoting: Test-PsRemoting

Testing for PowerShell Remoting: Test-PsRemoting: "

When you’re writing a script that depends on PowerShell Remoting, it’s often helpful
to know that the remoting channel is open and will support the activities of your
PowerShell has a Test-WSMan command, but that only verifies that a WSMan connection
is possible. There are other scenarios you could be impacted by:
  • Not having permission on the remote machine
  • Misconfiguration of the PowerShell endpoint
  • Corrupted installation
  • (etc)
As you dig deeper, you realize that the only way to really test the viability of the
remoting channel is to just do something on it, and verify that you got the results
you expected to. Since the implementation was so simple, we didn’t write a cmdlet
for it. In retrospect, the concept is more difficult than the implementation, so we
probably should have written it anyways. Here’s an example function that tests the
remoting connection to a specific machine.
function Test-PsRemoting{
   [Parameter(Mandatory = $true)]
   $errorActionPreference = "Stop"
   $result = Invoke-Command -ComputerName $computername { 1 }
   Write-Verbose $_
   return $false
  ##I've never seen this happen, but if you want to be
  if($result -ne 1){
   Write-Verbose "Remoting to $computerName returned an unexpected result."
   return $false

The Lifehacker Guide to 64-bit vs. 32-bit Operating Systems [Windows]

The Lifehacker Guide to 64-bit vs. 32-bit Operating Systems [Windows]: "

You're probably aware that 64-bit and 32-bit versions of your operating system exist, but apart from ascribing to a bigger-is-better philosophy, you may have no idea what separates the two. The question: Should you use a 64-bit version of Windows, and why?

More and more frequently, users are installing the 64-bit version of their operating system of choice over the less capable 32-bit version. But most people don't really have a full understanding of what the difference really is. Below, we're taking a look at the most important differences so you can better understand what you gain (and potentially lose) if you upgrade to the 64-bit version of your OS. (The post focuses on Windows.)

We've already explained whether you really need 4 GB of RAM, a question that touches on the 64-bit issue, but now let's tackle it in more detail.

Which Version Do I Have?

To figure out which version of Windows you are running, just head into the System properties in Control Panel, or you can take the easy route and right-click on your Computer icon in the start menu or desktop, and choose Properties from the menu. Windows 7 or Vista users will be able to check the System type in the list, while the few XP users with 64-bit will see it on the dialog.

Keep in mind that your CPU must support 64-bit in order to be running a 64-bit operating system—if you're running a modern CPU you should be fine, but some of the budget PCs don't include a 64-bit processor.

Does 32-bit Really Have a Memory Limit?

In any 32-bit operating system, you are limited to 4096 MB of RAM simply because the size of a 32-bit value will not allow any more. On a 32-bit system, each process is given 4 GB of virtual memory to play with, which is separated into 2 GB of user space that the application can actually use at a time.

Savvy readers might point out that modern chips support PAE, a processor technology that allows the operating system to use a little bit more memory—up to 64 GB, but it also requires special application support that most applications don't have or necessarily need.

A common misconception is that this is a Windows-specific problem, when in fact 32-bit Linux and Mac OS X have the same limitations and the same workarounds. 32-bit Linux uses a mapping table to allow access to the extra memory, and OS X Snow Leopard actually ships by default with a 32-bit kernel that can't access all the memory on older systems, even though most of the rest of the OS runs 64-bit processes.

The 4 GB limit for Windows, at least, is also a factor of licensing—the home versions of 32-bit Windows, while technically being able to support PAE, have a hard limit of 4 GB for licensing and driver compatibility reasons.

More Problems with 32-Bit

Not only does 32-bit have a hard limit for the amount of memory it can address, there's also another problem: your devices, like your video card and motherboard BIOS take up room in that same 4 GB space, which means the underlying operating system gets access to even less of your RAM.

Windows expert Mark Russinovich found that a desktop running 32-bit Windows with 4 GB of RAM and two 1 GB video cards only had 2.2 GB of RAM available for the operating system—so the bigger and better your video cards get, the less of that 4 GB will be accessible on a 32-bit system.

What's Different About 64-Bit?

While 32 bits of information can only access 4 GB of RAM, a 64-bit machine can access 17.2 BILLION gigabytes of system memory, banishing any limits far into the future. This also means that your video cards and other devices will not be stealing usable memory space from the operating system. Windows 64-bit Home editions are still limited to 16 GB of RAM for licensing reasons, but the Professional and Ultimate versions can use up to 192 GB of RAM, so keep that in mind when building that killer system.

The per-process limit is also greatly increased—on 64-bit Windows, instead of a 2 GB limit, each application has access to 8 TB of virtual memory without any special API, a huge factor when you consider applications like video editing or virtual machines that may need to use enormous amounts of RAM.

On Windows, the 64-bit versions also come with a technology to prevent hijacking the kernel, support for hardware-enabled data execution protection, and mandatory digitally signed 64-bit device drivers. You also won't be able to use your 16-bit apps anymore, which hardly seems like a loss.

Do 32-bit Applications Work on 64-Bit?

The vast majority of your 32-bit applications will continue to work just fine on 64-bit Windows, which includes a compatibility layer called WoW64, which actually switches the processor back and forth between 32-bit and 64-bit modes depending on which thread needs to execute—making 32-bit software run smoothly even in the 64-bit environment.

There are some exceptions to that rule, however: 32-bit device drivers and low-level system applications like Antivirus, shell extensions that plug into Windows, and some media applications simply won't work without a 64-bit equivalent.

In practice, the vast majority of your favorite applications will either continue to work, or provide a 64-bit version you can use instead—but you should check to make sure.

Does 64-Bit Use Double the RAM?

A common misconception about 64-bit Windows is the amount of RAM that is actually used—some people seem to think it will use double the RAM, while others incorrectly assume a 64-bit system will be twice as fast as 32-bit.

While it's true that 64-bit processes will take a little extra memory, that is a result of the memory pointers being a little bigger to address the larger amount of RAM, and not an actual double in size. Imagine, if you will, an ancient library filing system that has a card to tell you where to find the book in the library—if you got a bigger box to hold the cards, the library would not double in size, you'd just be able to find the book you were looking for more easily.

What will increase with 64-bit Windows is the amount of drive space needed for the operating system—with a compatibility layer in place, the base OS will take up a few extra GBs of space, though with today's massive hard drives that should hardly be a concern.

The Bottom Line, Which Should I Use?

If you are ordering a new PC with 4 GB or more of RAM, you should probably be running a 64-bit version of Windows so you can use all of the available memory, especially if you want a rig with a large video card—just keep in mind that the Home versions only support 16 GB of RAM (for most people a 16GB limit won't be a problem, but it's worth keeping in mind).

If you're running Mac OS X, you don't need to worry about 32-bit vs 64-bit, and if you're running Linux, you probably know this stuff already.

What about you? Have you made the switch to a 64-bit operating system? Let's hear what you're using, and how long you've been living the 64-bit life, in the comments.

The How-To Geek has banished 32-bit operating systems entirely from his house. His geeky articles can be found daily here on Lifehacker, How-To Geek, and Twitter.


Tuesday, December 22, 2009

Blog to Support My Rants

I will be talking about new development projects. Using primarally Powershell, C#, IronPython and other cool technologies. I will review movies, games, and gadgets as they catch my eye. There will be times when I just use this as a place to vent things in windows and programming windows that just drive me nuts. Over all if it has a processor and a chipset its fair game. Good Times and Get-Command