« Write a simple object to and from XML using C# | Main

One thing you cannot achieve using command prompt but Windows PowerShell

I found it is not so special to run vbs (Visual Basic Script) in Windows PowerShell because most of the time you can do that using cscript with command prompt (cmd.exe).

But what I guarantee you cannot do is to change directory to a remote machine using command prompt for example,  as can see from the picture below I have a machine with IP address 192.168.1.26 so I can change the directory to c root of this machine by cd \\192.168.1.26\c$. I can perform other file operation directly in the remote machine such as make directory, copy file(s), delete directory and more.

In the past in order to manipulate files in between two or more machines you might need to map a network drive with a local drive letter. Windows Powershell gives me a better way to do this today.

powershell

In order to get to know more about Windows PowerShell go to script center :http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx.

Please feedback if you have other tips.

Comments (4)

Judy:

Hi, this is a nice feature for people who work on windows a lot. I have a question on the security/authentication related to the remote machine. If I log on to my local PC with my ID and to the remote with a different ID, am I able to specify my username/pswd (for remote login) in the command line as well (for wxample by "cd \\remotehostname\c$ -user myID2 -password mypswd" on unix)? Thank you in advance.

Jason:

Of course you can change the directory to a remote machine, you just use the pushd command to map a drive and then popd to unmap it.

You could also do netuse, but pushd is faster.

Nice app. Please come and see my blog and make me some money by clicking the ads, please I beg on you sir... please

js:

he's nut

Post a comment

About This Entry

This page contains a single entry from the blog posted on November 2, 2008 6:51 PM.

The previous post in this blog was Write a simple object to and from XML using C#.

Many more can be found on the main index page or by looking through the archives.

Top Tags

Powered by
Movable Type and Oracle