Monday, July 20, 2009

Powershell Hyper-V

This is from: http://pshyperv.codeplex.com/Thread/View.aspx?ThreadId=62355

"these 2 links should help.

http://blogs.technet.com/softienerd/default.aspx
http://pshyperv.codeplex.com/Thread/View.aspx?ThreadId=35417

you can set the reg to unrestricted but set it back later..

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\powershell\1\ShellIds\Microsoft.powershell]
"ExecutionPolicy"="Unrestricted"

unzip the file.. say to z:\
the open powershell command
cd z:\
PS Z:\>
type . .\hyperv.ps1

notice the dot+space+dot+slash.

snippets.. from the links..

try to call . .\hyperv.ps1 ftom the folder the zip was extraced to. notice the dot+space+dot+slash.

Powershell Tip #1

In Powershell, type $profile.

PS C:\Program Files\Microsoft\AxFuzzer> $profile
C:\Users\mengli\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1

That points to where your profile is stored at. This is a powershell script that executes upon the start up of any powershell prompt for the current user. Go ahead and make the file. In my case, I made a new file at the location by typing this:

new-item $profile -itemtype file -force

Now, open the file and you can put in things like this:
set-executionpolicy unrestricted
.
\\meng\shared\powershell\hyperv.ps1
set-executionpolicy remotesigned

Every new powershell prompt that you"

Monday, July 06, 2009

DFSR on windows 2003 R2 servers.

  1. Start DFS management console on any Windows 2003 R2 server.
  2. Configure Replication (membership, connections and replicated folders). If you already have a previously shared folder what you want to replicate on other server - do not copy files, just replicate.
  3. After the replication is done configure a namespace.
  4. Publish the replicated folders to the namespace, and configure login script to access the published share.
  5. It is perfectly normal to have a staging file (..\..\DfsrPrivate\Staging) containing data "If the size of a staging folder is below 90 percent of configured capacity (the high watermark), then staged files are kept in the folder and can be used in case new members are added" - from http://technet.microsoft.com/en-us/library/cc782648(WS.10).aspx