Wednesday, December 15, 2010

Configuration of Windows Remote Management for PowerShell

1.   winrm quickconfig

PS C:\Windows\system32> Winrm quickconfig
WinRM already is set up to receive requests on this machine.
WinRM is not set up to allow remote access to this machine for management.
The following changes must be made:

Create a WinRM listener on HTTP://* to accept WS-Man requests to any IP on this machine.
Enable the WinRM firewall exception.

Make these changes [y/n]? y

WinRM has been updated for remote management.

Created a WinRM listener on HTTP://* to accept WS-Man requests to any IP on this machine.
WinRM firewall exception enabled.
PS C:\Windows\system32>

2.  winrm quickconfig -transport:https

PS C:\Windows\system32> winrm quickconfig -transport:https
WinRM already is set up to receive requests on this machine.
WinRM is not set up to allow remote access to this machine for management.
The following changes must be made:

Create a WinRM listener on HTTPS://* to accept WS-Man requests to any IP on this machine.
Configure CertificateThumbprint setting for the service, to be used for CredSSP authentication.

Make these changes [y/n]? y

WinRM has been updated for remote management.

Created a WinRM listener on HTTPS://* to accept WS-Man requests to any IP on this machine.
Configured CertificateThumbprint setting for the service.

3. Listener and WS-Management protocol Default Settings

winrm enumerates winrm/config/listener

4. Remote Admin IIS for TFS 2010 Builds

http://www.tadlockenterprises.com/2009/12/remote-admin-iis-for-tfs-2010-builds
http://msdn.microsoft.com/en-us/library/aa384372%28VS.85%29.aspx
http://blogs.msdn.com/b/powershell/archive/2008/05/10/remoting-with-powershell-quickstart.aspx

Enable IIS7 PowerShell snapin in PowerShell session


Installation: http://learn.iis.net/page.aspx/429/installing-the-iis-70-powershell-snap-in
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
Import-Module webadministration | Out-Null
Get-Website

http://www.iisworkstation.com/2009/06/troubleshooting-iis-powershell-module.html


P.S. PowerShell is installed by default on Windows Server 2008 R2

Tuesday, December 14, 2010

Set-ExecutionPolicy in PowerShell

To alllow all user to execute scripts in PowerShell:
Set-ExecutionPolicy -ExecutionPolicy Unrestricted

Wednesday, December 8, 2010

"Load needed DLLs for kernel": Windows recovery console example

Lately I read a lot of people are having this error which stops your system from booting.
This is a very awful error which is solved by Microsoft with the solution to do a in-place install from Windows XP. This is a lot of work and I have a much safer and fast solution.
Boot your system from the Windows XP Cdrom and choose to repair your system which will put you in the "Recovery Console" mode.

Now make the following steps:

CHKDSK (which will fix the error(s) on your disk)
BOOTCFG /rebuild (you will rebuild your boot configuration now, 
just give enters when it asked extra info).
FIXBOOT (to fix your current bootsector)
FIXMBR (to fix your current master boot record).
EXIT (leaves the recovery console and reboots your system).

All should be fine now, however sometimes it is possible that you have to choose which operating system needs to be booted every time you switch on your system.

This can be easily solved when you are in Windows XP:
Go to START > right mouse button on MY COMPUTER > click PROPERTIES > click ADVANCED tab > in startup recovery click SETTINGS > choose your default operating system which is Windows XP > uncheck TIME TO DISPLAY LIST OF OPERATING SYSTEMS > click OK > click OK again.
This is all, your system will boot normally again.


Features about some commands:


bootcfg /rebuild


This utility will scan all your hard drive for any windows xp installations
and then displays the result.


The first prompt asks Add installation to boot list (Yes/No/All)
This is the name of the operating system, for example, type Windows XP Home and press enter.


The final prompt will be Enter OS load options:
Type /Fastdetect and press enter.


Additional command could be helpful:


bootcfg /scan
bootcfg /add

Powered by Blogger.