5/12/2006

MSH is now Microsoft PowerShell


I haven't played with Monad shell for a while, the next thing I know there is a new scripting language called "Microsoft PowerShell". At first, I thought it's a brand new language, but actually they renamed Monad and made it PowerShell.

After installation, I tried to run one of my earlier Monad scripts. Just like the previous updates of Monad, the default execution policy is "Restricted". Under this policy, you can use PowerShell interactively. No scripts are allowed. If you like to run your own scripts without signing, you need to change the execution policy. Now there is a cmdlet to change policy without using regedit. Here is the cmdlet to change the policy to RemoteSigned.


Set-ExecutionPolicy RemoteSigned

5/10/2006

Windows Hidden File Attribute

Recently, I used xcopy to backup all the files from a bad hard drive to another drive under Windows XP. After all the files got copied, the directory is hidden and cannot be seen. I tried to use attrib.exe to remove the hidden attribute, however the command warned me that the directory's system attribute is set and I cannot change it.


H:\>attrib -h enterprise
Not resetting system file - H:\enterprise

H:\>attrib -a enterprise
Not resetting hidden file - H:\enterprise

H:\>attrib -a -h enterprise
Not resetting system file - H:\enterprise


I then tried to read the online help. It turns out I need to specify the /s and /d switches, too. So, the command should be used like this.


H:\>attrib /s /d -s -h enterprise