Welcome to TechNet Blogs Sign in | Join | Help

I can never remember how to do this, so I always end up looking it up.  Therefore, I am posting it here partly for me as a reference, but also in case anyone else finds it useful :-)

 

Sometime the error codes that are returned by Microsoft Windows are accompanied by a rather cryptic message, or the message doesn’t quite offer enough information to be able to work out what has happened.  Well, if you follow the steps below you can look up what the message means to Windows, based on the error code that was returned.

 

  • Make note of the last four numbers of the hexadecimal error code, in this example it is 2AFC.

1

  • Open the Windows Calculator (calc.exe) and switch it to the Scientific mode (or Programmer mode if you are using Windows 7).  Select the Hex radio button, then enter the last four digits of the hexadecimal error number.

2

  • Select the Dec radio button, and you’ll see the hexadecimal number converted to a decimal one.

3

  • Open a command prompt (cmd.exe) and type the following command: “NET HELPMSG ” followed by the decimal number that appears in the calculator.  In this case, the command would be: “NET HELPMSG 11004”.  You will then be returned what is hopefully a more friendly version of the error message.

4

 

Note that this will only work for Win32 error codes that originate from Microsoft Windows, the codes will often start with 8007 but not always.  Also, if the net helpmsg command does not return a result it most likely means that the error either did not originate from Windows, or is not a valid Win32 process.

I have been asked twice this week if this is possible and if so how to do it, so I guess either the information is not readily available on the Internet, or the two people who asked me just couldn’t be bothered to look it up...!

 

I’m sure you’ve seen the below screen appear during the first boot of your computer or server after you have installed any updates in Windows 7 or Windows Server 2008 R2, it’s the screen that says “Completing stage X of Y”.

  updating

It is during this phase that, amongst other tasks, any files that were in use while the update was being applied are now copied into their right place and updated once the computer was rebooted.  On very rare occasions you might one day see that the computer has gotten stuck at the above screen, and the configuring of the update(s) never completes.  This creates a dilemma because you want to get access to the console so that you can work out what went wrong, but this will require a hard reset of the computer.  However, on the screen in clear text it is telling you not to turn off your computer.

This issue might occur for several different reasons, which are way outside my field of expertise so I won’t try to explain them here.  Thankfully, there is a solution for Windows 7 and Windows Server 2008 R2 that permits you to rollback the changes made by all the updates you applied during the last update.  Simply use the below steps to recover your non-booting system:

  • Boot the computer into the Windows Recovery Environment (WinRE) by either using the installation media or pressing F8 during boot (WinRE is built in to OS installations now).
  • Open a command prompt.
  • Navigate to the \Windows folder that you wish to repair.
  • Run the command: DISM /image:DRIVE LETTER OF WINDOWS DRIVE\ /cleanup-image /revertpendingactions

           An example of this command might be: DISM /image:C:\ /cleanup-image /revertpendingactions

A message should then appear saying

           Reverting pending actions from the image....

           The operation completed.  Any revert of pending actions will be attempted after reboot.”

When you restart the computer you will now see a different screen, this time saying "Reverting pending actions".  Once this process has completed, any changes that the previous update(s) made should now be reversed and you should be able to log on correctly.

As some of you may know, certain countries have personalisation packs for Windows 7 that are activated on during the installation of the operating system, depending on the regional settings you first set.  So, if you tell Windows 7 setup that you are in the United Kingdom, one of the wallpapers that will be available to you is a photo of Stonehenge.  But what if you want to see all the other wallpapers that are available in other regions?  Well, you can either go fetch them out of the Windows installation folder, or follow the below steps to make them appear in the desktop personalisation section of Control Panel!

 

  • Open Control Panel
  • Click Clock, Language, and Region
  • Click Region and Language
  • Click on the Location tab
  • Select the following locations, pressing Apply after each one:
    • Australia
    • Canada
    • South Africa
    • Spain
    • United Kingdom
    • United States
  • Reset the location back to the correct one, and press OK.

 

wallpapers

 

Now you can right click on the desktop and choose Personalise from the menu.  In the Desktop Backgrounds section, you’ll see some new backgrounds!  Note that not all countries have their own personalisation packs, the only ones I know of are the ones listed above.

I am probably the last Microsoft blogger to actually get round to writing something about this… but hey, I have been busy!

Microsoft recently released to the public their free anti-virus solution, Microsoft Security Essentials (MSE).  I had been trialling the beta versions for a few months on a Windows 7 computer and I was really pleased with it, so the fact that it has now been released as a final product is great!  Bizarrely, it even got the stamp of approval from my Anti-MS brother who told me that it consumes much less CPU and memory on his computer, and he has now gotten rid of his McAfee software completely (even though his paid for subscription has not expired).  Of course, then he finished the sentence with the usual “but it is from Microsoft so is bound to be full of security holes” nonsense he actually believes.

MSE

MSE2

The virus signature updates are automatically downloaded via the Windows Update service, so it is important that you have this feature enabled.  MSE is available in 32 or 64 bit and will run on Windows XP, Windows Vista and Windows 7, so go get it now!  There really is no excuse not to run an antivirus product on all your computers, especially because it is completely free – you just need to have a genuine license of Windows in order to be able to install it…  :-)

The download and more information is available here: http://www.microsoft.com/security_essentials/

There is a webcast this month that should be of interest to anyone interested in using application virtualisation, particularly if you are migrating to Windows 7.  The date of the webcast is Monday the 26th of October 2009 at 12pm, but be aware that the time zone is GMT-5.  To join the event, just click here.  And now here’s the blurb for the webcast!

 

Best Practices for Windows 7 Migrations Using Microsoft Application Virtualization

Many companies need to increase the manageability of their IT infrastructure and reduce help desk costs while boosting employee productivity. CDW, a leading provider of technology solutions for business, government and education, faced these challenges in their organization and evaluated Windows 7 and the Microsoft Desktop Optimization Pack (MDOP) as a way to solve these problems.
In this interactive one-hour video webcast, you'll hear about how CDW evaluated Windows 7 and found compelling reasons to upgrade their OS from Windows Vista. CDW also deployed Microsoft Application Virtualization (App-V), part of the Microsoft Desktop Optimization Pack (MDOP) to simplify the deployment of key applications. In addition, CDW will discuss:

    • Using Microsoft Application Virtualization (App-V) allowed them to separate applications from the OS and deliver new versions of applications quickly, without conflicts with other applications
    • Saving time on application testing, packaging, deployment using App-V enabled CDW to allocate resources to higher priority projects
    • Using Microsoft Deployment Toolkit and System Centre Configuration Manager allowed CDW to deploy new desktops 25% faster with 70% in cost savings due to the fact that Windows 7 runs on pre-existing hardware

Join the Event

I have gotten very used, very quickly, to the excellent tabbed browsing feature that was introduced with Internet Explorer 7.  This feature was tweaked a fair bit for Internet Explorer 8, but the most noticeable change is that now each tab opens in a separate memory process; this really is great because if the content of one of the tabs causes a crash in iexplore.exe, it won’t cause all the other tabs to crash meaning you lose everything that you had open.  The downside of course is that by having each tab in a separate process, more system memory is consumed – not a problem if you have plenty of memory to spare, but my Anti-MS brother always complains to me about how slow his computer is, even though it only has 128mb of RAM and runs Windows XP plus 300 other applications simultaneously.  Of course, his lack of RAM has nothing to do with the system performance, but rather it is the fault of the operating system – or so he insists (but then he actually believes that VMware ESXi is “just sexy”, so I don’t listen too much).

Anyway, if you want to reign in the memory usage of iexplore.exe a little, you can tweak some settings in the registry.  Changing these will cause, amongst other things, iexplore.exe not to start so many separate processes; a useful tip to save a bit of system memory if you are a bit short but at the cost of potentially losing all open tabs if the content of one of them caused a crash.

 

IEProcesses

 

I saw these tweaks over on the AskIE blog, where they do a pretty good job of explaining what each one does.   have included their explanation below:

 

HKCU\Software\Microsoft\Internet Explorer\Main - TabProcGrowth (string or dword)

Tab Process Growth : Sets the rate at which IE creates New Tab processes.  There are two algorithms used by Internet Explorer.

1. Context-based: By default, the context-based algorithm is used and the curve is chosen based on the amount of physical memory on the machine. In addition, the TabProcGrowth string registry value may be manually forced to:

  • small: Maximum 5 tab processes in a logon session, requires 15 tabs to get the 3rd tab process.
  • medium: Maximum 9 tab processes in a logon session, requires 17 tabs to get the 5th tab process.
  • large: Maximum 16 tab processes in a logon session, requires 21 tabs to get the 9th tab process.

2. The "Max-Number" algorithm: This specifies the maximum number of tab processes that may be executed for a single isolation session for a single frame process at a specific mandatory integrity level (MIC). Relative values are:

  • TabProcGrowth=0 : tabs and frames run within the same process; frames are not unified across MIC levels.
  • TabProcGrowth =1: all tabs for a given frame process run in a single tab process for a given MIC level.

Note: On Terminal Server, the default value is the integer of 1.

  • TabProcGrowth >1: multiple tab processes will be used to execute the tabs at a given MIC level for a single frame process. In general, new processes are created until the TabProcGrowth number is met, and then tabs are load balanced across the tab processes.

Note: that the frame process is no longer allowed to execute at low-MIC. If this is attempted, the process will exit.

You may select the Max-Number algorithm by specifying the registry value as an integer. The registry value may be a string value containing an integer (e.g., "5") or a DWORD value containing an integer (e.g., 5).

In general, you have to restart IE to use a different TPG value.

A very common request that clients make when starting a Windows deployment project is that we must reliably and accurately demonstrate that Windows Vista or Windows 7 is worth upgrading to from Windows XP, especially if the purchase of new hardware is not part of the project; often, and logically, clients will try to re-use their existing hardware platform whenever possible in order to save money.  Consequently, I am regularly asked to prove that the newer version of Windows will run equally as well as Windows XP on the same hardware.  Their reasoning being is that they won’t upgrade the operating system on the existing hardware if the end-user experience is worse in terms of performance – regardless of how good the new features of the operating system are.  The problem with this is two-fold, one is a technical issue and the other is pure fantasy...

 

Attempting to benchmark and compare two different operating systems (yes, I know that each version of Windows is an evolution of the previous one, but it is still complicated) and providing accurate results is an extremely complicated task.  Unless done right, the results can be often speculative and can be turned upside down purely on your point of view.  It is also dodgy territory to get into because of the sheer number of factors that need to be taken into account in order for the test to be of any value, and then trying to explain the results to a lay person can be even more tricky.  This is because benchmarking a computer is not simply about measuring the raw speed of the CPU, in the same way that the horsepower alone of a car cannot be used to gauge if one car is quicker than another – you need to consider other factors such as the weight, ratios of the gearbox and torque.

There are plenty of free tools that you can find on the Internet that will measure your computers speed, but more than a few are totally useless because they are simply measuring individual parameters such as CPU speed and RAM read/writes.  To benchmark a computer properly you need something that will measure hundreds of different aspects of the computer’s hardware and the operating system installed onto it, in order to produce an reliable result; even things such as the BIOS software can have a profound effect on the results from the benchmarking tests.

 

Because this is such a hot topic, and given that Windows 7 is around the corner, Microsoft published some benchmarking guides so that you can start measuring right now the performance of your systems with Windows 7.  I have included the link for the Windows 7 guide below, along with the (now defunct) Windows XP guide.  The Windows XP guide is there because, after all, the only real way to gauge the performance of your system is when you compare it to a different operating system running on the exact same hardware.

 

Benchmarking on Windows XP: http://www.microsoft.com/whdc/archive/benchmark.mspx

Performance Testing Guide for Windows: http://www.microsoft.com/whdc/system/sysperf/Win7Perf.mspx

 

Oh, and the “pure fantasy” I mentioned earlier...  Well, Windows Vista has had a somewhat “turbulent” life in terms of public perception.  I have always honestly told clients that my personal experiences with Windows Vista have been excellent, and it has always been fast for me.  Likewise, when I have worked on Windows Vista deployment projects this has also always been the case, the deployed computers always performed better than clients expectations.  However, often when clients talked about benchmarking Windows Vista they were very dubious of the results and tended to disregard them purely because they had it in their head that Windows Vista was/is a terribly slow beast.  Overcoming their personal views was actually extremely hard to do, regardless of how well benchmarking facts and statistics actually were.

A very common misconception that I am hearing regarding Windows 7 is that Microsoft has removed all of the problems that Windows Vista had caused with application compatibility.  While it is true that certain features of Windows 7 have been improved/tweaked, such as User Access Control (UAC), there will still be many applications that worked without problems on Windows XP but will experience issues when executed on Windows 7.

The difference between Windows XP and Windows Vista was huge, and since the release of Windows Vista some three years have passed; Windows 7 has evolved even further and incorporated many more changes.  A good portion of the compatibility problems can be fixed using various methods, but the fact remains that migrating from Windows XP to Windows 7 will not be a walk in the park.

Microsoft has up on its website a list of applications, along with their exact version numbers, that have been approved (by the developers, not Microsoft) for running correctly and as expected on Windows 7, check it out here: https://winqual.microsoft.com/member/SoftwareLogo/windows7list.aspx

If you are planning on migrating to Windows 7 then the best thing you can do right now is to consult the list and start talking to your application vendors in order to find out which of your applications are going to have problems when run on Windows 7.  Something I often saw when Windows Vista migration projects were planned is that application compatibility testing was often started too late in the project, or was not assigned enough resources simply because the problem was underestimated.  This caused delays, sometimes substantial, in the deployment of the operating system.

I stumbled across the below picture the other day and I think that it is so true that it is worth linking to here :-)

 

I have always said that it is amusing how big people’s egos (I was going to put something else here, but I censored it) can grow when they are cowering behind the glorious anonymity that the Internet extends them, it makes the perfect platform for them to spout their inane views of others and of the world.  It happens via email, forums, chat etc., but it is especially true when playing multiplayer games on systems such as the Xbox 360.  It is not that uncommon to receive a message from a player informing you of their intention to hunt you down and rape you in the anus just because you beat them at Gears of War 2, even though they have absolutely no idea who or what you are like; you could be a brutal serial killer who has a fetish for the blood of prepubescent teens for all they know.  Then, when you finally hear their voice, you discover that they haven’t even reached puberty yet and are only playing because they have finished all their homework!

Another common occurrence is the trash-talking that goes on before and after multiplayer  games start, it has gotten so irritating to me that I now refuse to play with the microphones turned on – just to avoid having to listen to all of their “you be-atch, I kicked your ass”, “I’ve got your momma here”, or other equally pointless insults that only a 12 year old would think of/find funny.  And what always amuses me the most is that they make all these threats because they know that they can get away with it simply because the whole platform is anonymous, and that there’s no way anyone could find out where the gamer “B4DA55_C0LdK1ll3R” lives.

 

dickwad-theory

 

So, if you have ever been anonymously insulted/dissed/threatened etc. like these, then you will understand the picture above perfectly!

 

Most importantly, please don’t pay any attention to the threats.  My current favourite threat that I have received is that I was going to tracked down and then torn in half barehanded because I had, apparently, been indulging in relationships with someone's 6 year old sister (or something to that effect, I just deleted the message before finishing it).  Oh, and please, if you are playing a game and a player insults, threatens or attacks you, file a complaint via your console immediately.  If enough people file feedback then these problems users will be removed from the system making it better for the rest.

For me, this is possibly one of the most overlooked, but invaluable, features of Internet Explorer 7 and 8.  I actually only discovered it a few days ago, but I now use it pretty much daily.

First introduced with Internet Explorer 7, the Instant Search box in the top right-hand corner of the browser allows you to search the indexes of pages, such as bing.com and yahoo.com, without visiting the pages first.  You enter your search terms into the box, initiate the search, and then the results page are displayed in the browser window.  You can quickly customise the list of possible search engines, or you can even make your own ones.

Just follow the steps detailed below to create a new search provider, which you can then easily adapt to possibly any website you want to search.

 

  • From Internet Explorer, open the drop-down menu that appears in the top-right of the window, next to the Instant Search box.  The menu is the one with the magnifying glass icon.  From this menu, choose Manage Search Providers

1

 

  • In the new window that appears, click the Find more search providers link at the bottom.

2

 

  • This will open up a new web page where you can add various other pre-configured search providers, such as eBay, or Amazon.com.  Scroll to the bottom of this webpage and click the link Create your own Search Provider

3

 

  • Clicking this link will open a different web page.  Without closing this page, open a new instance of your browser and go to the webpage you want to add as a search provider.  Using their search engine, search for the word TEST (make sure you enter it in uppercase) and wait for the results page to be displayed.  As you can see in the example below, I went to the BBC News webpage and searched their site with the word TEST.

Once the results are displayed, go to the address bar at the top (highlighted in the below image in the wider red box) and select all the text that appears and then copy this text to the clipboard (press CTRL + C on your keyboard if you are unsure).

ddd

 

  • Return to the previous window, as shown below, and paste (press CTRL + V on your keyboard) the previously copied text into the URL field.  Then, provide your own name for the search provider in the Name field.  Then, simply press the Install Search Provider button to configure it into your browser.

4

 

If you are curious, you can click on the View XML link at the bottom of the page in order to see what is going on behind the scenes, as shown in this image.5

 

 

  • You will be asked if you are sure you want to add the new search provider, and if you want it to be your default one.  Take your pick, and then press Add.

6

 

  • Once added, you’ll see it appear in the list of search providers in Internet Explorer.  You can now click on the close button to complete the process.  It is worth noting that no software whatsoever has been installed on your computer.  ALL that has happened is that Internet Explorer now has a cached copy of the XML file that you saw above, and uses this to provide the new search functionality.  This is not an add-on to the browser that has been installed.

7

 

  • To use the new search provider is simple!  Select it from the drop-down list in the top right of the browser window, input your search terms into the Instant Search box, and hit the Enter button on your keyboard!  The browser will then load the page and display the results you were looking for!

8

 

This feature is incredibly useful because it allows you to extend the search functionality of Internet Explorer to include pretty much any website that offers the search feature.  Importantly, this also includes any internal websites and portals that your company might have (using technologies such as Microsoft SharePoint for example), it doesn’t just have to be external sites.  And, you’ll find that it will work with the majority of sites, not just the popular ones.

 

p.s. Why is the word TEST used?  Well, this is simply so that Internet Explorer can then read the XML file and locate the part which is used for the search terms.  The word TEST is then simply substituted for the search terms you specify!

It always amazes me the sheer levels of SPAM emails that are sent (and I have the misfortune to receive), but thankfully Outlook 2007 does a pretty good job of filtering them all out for me so that all I need to do is just empty the Junk E-Mail folder in my Inbox every now and then.  Given the fact that SPAM is still a major problem, it clearly has to be generating some money for people otherwise the spammers would stop trying to get around the filters.  But what I don’t understand is why anybody, no matter how desperate, would even be slightly tempted to purchase something that has been advertised through a SPAM email.  I mean, you’d have to be seriously stupid or mentally eroded to buy medication (or anything else) that you might consume over the Internet from one of these SPAM emails, but it seems people do.

Anyway, as I went to empty my Junk E-Mail folder today, I accidently opened the folder instead of right clicking and then choosing delete from the menu.  I noticed this wildly bizarre claim that was being made that I find incredible, even though I’ve seen plenty of crazy SPAM emails in the past.  I mean, imagine if it was true what was being claimed and that by simply taking some medication that you purchased from a totally unknown, shady and unreliable source you could break down concrete walls like Superman with just the contents of your underpants???  It could pose a serious health risk to women.  It could even allow the creation of a new Police force, specialising in breaking through concrete barriers.

boner

The other thing I find unbelievable with this particular spammer is that they sent this email to an internal Microsoft mailing list that is used to send out notifications of job vacancies in the company.  I can understand that being out of work can be extremely worrying, but I can’t see how the offer made in the email can be of any benefit at all to those who have received it.

I have to confess that I never got to see any of the advertisements that Microsoft has been running (I saw a couple on YouTube out of curiosity, but never on TV) where they give something like $1500 to a person and tell them to buy the best computer that they can with that money.  The adverts take a dig at the colossal prices that Apple charges (dubbed the ‘Apple Tax’) for their computers because basically you can’t get an Apple computer for that same amount of money, but you can get a computer running Windows (and be a far better buy in my opinion).

Well, it seems that the advertisements irritated Apple somewhat because someone in their legal department called Microsoft complaining about them only two weeks after they started running.  Basically they asked Microsoft to stop running the ads because they were no longer true, they had lowered their prices.  All $100 of it…

Kevin Turner, who received the call, said:

"Two weeks ago we got a call from the Apple legal department saying, hey -- this is a true story -- saying, Hey, you need to stop running those ads, we lowered our prices." They took like $100 off or something. It was the greatest single phone call in the history that I've ever taken in business."

If you don’t believe me, read it here: http://www.microsoft.com/presspass/exec/elop/07-15-09WPC2009.mspx

To edit the settings of a virtual computer using Virtual PC in Windows 7 requires the opening of the Virtual PC console, selecting the virtual machine you wish to edit, and then pressing the ‘Settings’ button, as shown in the screenshot below.

image 

In order to reduce the number of required steps to do this (and assuming you know which file it is), you can edit a key in the registry that will add a new item to the Windows Explorer context menu that appears when right clicking on a file.  If you make the changes detailed below, you will be able to right click on the settings file for a virtual machine (files with the .vmc extension) and access directly the settings window, as shown below.

image

 

Copy and paste the text between the lines below into a text file, but save it with the .reg file extension.  Then double click on it to import it into the registry.

------------------------------------------------------------------------------------------------------

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Windows.VirtualPC.VMC\shell\Settings]
@=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,\
  00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,56,00,\
  4d,00,43,00,50,00,72,00,6f,00,70,00,65,00,72,00,74,00,79,00,48,00,61,00,6e,\
  00,64,00,6c,00,65,00,72,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,31,00,31,00,\
  30,00,00,00
"Icon"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,\
  00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,56,00,\
  4d,00,43,00,50,00,72,00,6f,00,70,00,65,00,72,00,74,00,79,00,48,00,61,00,6e,\
  00,64,00,6c,00,65,00,72,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,31,00,30,00,\
  30,00,39,00,00,00

[HKEY_CLASSES_ROOT\Windows.VirtualPC.VMC\shell\Settings\command]
@="vpcsettings.exe \"%1\""

------------------------------------------------------------------------------------------------------

As always, edit the registry at your own risk.  I can’t be responsible for anything…

Saving something seems to to be the big thing in I.T. at moment, which is never a bad thing.  The current big thing is the Green Computing initiatives, particularly with the prominence now of virtual computing and power saving features in new operating systems (hint, hint: Windows Vista and Windows 7).  Another very common one I see is the footer that a lot of people include on their emails, looks like this:

emailfooter

Well, a new one has appeared which on face value might seem a bit unbelievable, but the authors reckon that it actually really works.  An open-source font has been created that looks like Swiss cheese!

ecofont1

The creators claim that, because the font is full of holes, you will save around 20% of the ink in your printer; thus saving money and resources.  When I first saw it I was sceptical, but according to the website all those holes really do make a difference.  I’ll give it a try to see how useful it is.

Note that, if your document has a lot of bold text then all those little holes will pretty much disappear, as you can see below:

ecofont2

Also, although it is called EcoFont, it doesn’t actually appear in your font list under that name which was a little confusing.  It took me a while to find it (maybe this is in the documentation…) listed as Sprang eco sans.

ecofont3

You can get the font and read more about it here: http://www.ecofont.eu/splash_en_pro.html

 

Obviously, the better way to save ink in your printer (and paper as well) is to only print something when you absolutely have to.  Countless times I have been onsite with clients and they have printed ALL of their documentation for me to read, which is such a waste as I could just as easily read it on screen if they simply email it to me.  Also, when I submit documentation for review by customers, it is often printed out several times so people can go through it for reviewing; I know it is less comfortable to read off the computer screen, but still…

Seeing as PowerShell is included by default in Windows 7, and also because you get the PowerShell icon on your quick launch bar by default, I try to use that over the de rigueur cmd.exe command interpreter that we have all had since the dawn of time.  Although, without thinking, I still often run cmd.exe just through habit :-S.  I am only just starting out with PowerShell and I doubt I will ever achieve any success with the scripting, but you have to try!

 

PS

The PowerShell icon on the quick launch bar

 

Right from the start, I had problems running a script I had written.  Upon launching it I would get the below error returned:

File C:\Users\daniel\Desktop\copy.ps1 cannot be loaded because the execution of scripts is disabled on this system. Please see "get-help about_signing" for more details.
At line:1 char:19
+ C:\Users\daniel\Desktop\copy.ps1 <<<<

No matter what I tried, I just could not override the security settings that PowerShell had by default.  Frustration prevailed with me cursing the point of making a scripting environment and the blocking the execution of scripts for security reasons.  After hunting around, it turns out that this is simply a configurable option, and the default setting out of the box is the most secure one (as it should be).  Simply running the following commands will change the setting and thus allow you to execute your scripts.

 

To view your existing setting, run the command: Get-ExecutionPolicy

To allow the execution of your scripts, run the command: Set-ExecutionPolicy RemoteSigned 

 

Setting it to RemoteSigned means that you can run all of the scripts you write yourself, but not those downloaded from the Internet.  Alternatively, if you set the execution policy to AllSigned then all scripts, including those you write yourself, have to be signed by a trusted publisher if you want to execute them.  Otherwise, you can set it to Unrestricted and then all scripts will run, regardless of where they come from and whether or not they’ve been signed.  This last setting is not the recommended one as you can open yourself up to “a world of pain” (a great film).

 

And if you need help understanding the script signing, you can run the command: Get-Help About_Signing

More Posts Next page »
 
Page view tracker