Wednesday, November 24, 2010

Article I read after a Big Fight at Home

Love in the time of despair

Juhi Dua | August 10, 2005


Relationships can be challenging, exciting, fulfilling and blissful, but during natural calamities such as earthquakes and floods, they are tested and can either be strengthened or scarred.
The rains that led to intense waterlogging in Mumbai on July 26 scripted engaging stories of romance and disillusionment, negligence and concern, togetherness and separation, longing and realisation for many couples in the city. 
Some grew closer, some felt uncared for and read indifference in their partner's behaviour.
Some couples realised they were in love. Here were some of the reactions:
We became closer
Nami, 28, a jewellery designer, says, "It was heart-stirring to see my husband come all the way from our home in town (south Mumbai) to the suburbs (north Mumbai) to pick me up. He got badly drenched and had to wade through high water to reach me. Eventually we got stuck in my office for the whole night but he kept saying it was much better to be stuck together anywhere than be separate and worry about each other. I feel our relationship has grown overnight."
Aakaash, 31, a management consultant from a leading bank who is in a live-in relationship, says, "My girlfriend and I left for home together in the evening and got stuck on the way. We walked all night and waded through chest deep water to reach home only to realise our house was flooded and almost everything we owned was damaged.
"Trying to put the house back in order again is quite an ordeal but knowing you have this someone really special dong it with you makes it less stressful. So much stress, so much trauma, we managed to handle it all only because we knew we have each other to depend on.
"We feel emotionally stronger and so much closer post this traumatic experience."
We grew apart
Radha, 29, an editor in a production house, has been going steady for three years; she has a different story to tell.
"I was stranded in my office for two days and all I got was a call each day to figure if I was okay. He was happily drinking and chilling with his friends at home. I am upset because I know he could have picked me up the next morning if he really wanted to. Just saying nice things on the phone and having a good time together is fine but if there is no concern and caring, I don't know if this relationship is worth the effort." 
Anurag, 26, a journalist, experienced a similar unconcern. "The floods have made me realise my partner is really quite selfish and self-centred. I am very hurt with her insensitive attitude and wonder if I will ever be able to rebuild that bond again," he says.
Post-floods, a reality check
Before playing the blame game and getting hurt about your partner's seeming unconcern, be sure to get your facts right.
~ Did they try to reach you?
The intensity of floods was high and it was next to impossible to reach anyone anywhere. Phone networks were affected, so were all other sources of communication.
For all you know, your partner might have tried desperately to get in touch with you and not succeeded. Believe him/ her if they say they care. 
~ Did they miscalculate the intensity of the calamity?
Not everyone realised the seriousness of the situation in Mumbai. It's only later, when the water-logging intensified in many parts of the city, that the intensity of Nature's fury and the ineptitude of Mumbai's municipal corporation came through.
Maybe your partner did not realise the gravity of the situation in time. Give him/ her the benefit of doubt. After all, it may be worth it.
~ Did they have other responsibilities?
Your partner's parents, siblings or other dear ones may have needed him/ her more than you did.
If so, be understanding and do not overreact to the situation.
Mending the fences
A relationship is a beautiful bond and quitting it because of any one incident might be foolish and amateur. Besides, many such incidents can be damage-controlled.
iInstead of arguing, discuss feelings of hurt, expectations and points of conflict openly and do not argue
Give the other person a fair chance to defend his/ her case. Sometimes, what seems like indifference can have unavoidable causes. Sorting out 'stuff' can prove to be a lifesaver for your relationship.
ii. Be optimistic and open-minded about taking steps to revive your bond
Agreed, you have been hurt and disillusioned. But do remember the next stage is either erasing the hurt and getting rid of the disillusionment or leaving the relationship scarred forever. Choose wisely and maturely. 
iii. Once you have talked it out, do not repeatedly taunt your partner about it
This will just refresh pain in your mind and irritate your partner. 
iv. Doing things together can be a great way to get back to normalcy
If your/ your partner's house has suffered damage, put it back in shape together. Be patient and generous with your time together on this occasion. 
v. Try alternative healing methods
They can prove very effective in the process of re-bonding and getting over anguish and hurt.

"Reiki, meditation, yoga and pranic healing are often seen with scepticism but can contribute significantly in erasing hurt and cementing relationships," says psychiatrist Mansi Sharma. 

"Many marriages have been saved through these healing methods as they discard negative energies and instil love and optimism. Meditation and yoga are especially effective and are relatively easy to learn and practise.
"Couples can attend these workshops together and then continue practising at home. It helps them to heal and connect with each other at a more intense, intimate level."
vi. Take a vacation together to heal and rejuvenate
Make it a bonding trip where just the two of you get to spend time together and do things you like doing.
vii. Go over your vows together
Mean it when you say you love the person. Show it in your actions and you will be back to where you were sooner than you think.
Natural calamities call for inner and emotional strength. Support each other. Hold hands and walk through the troubled phase with perseverance and all will not be lost.
Remember that love is difficult to find so do not lose it at the hands of circumstantial hurt. Hang in there and give your partner another chance. Make 'heal and reconnect' your mantra; it works!

Season for Jingle Bells

Jingle Bells : Lyrics and Music

Dashing through the snow
In a one horse open sleigh
O'er the fields we go
Laughing all the way
Bells on bob tails ring
Making spirits bright
What fun it is to laugh and sing
A sleighing song tonight

Oh, jingle bells, jingle bells
Jingle all the way
Oh, what fun it is to ride
In a one horse open sleigh
Jingle bells, jingle bells
Jingle all the way
Oh, what fun it is to ride
In a one horse open sleigh

A day or two ago
I thought I'd take a ride
And soon Miss Fanny Bright
Was seated by my side
The horse was lean and lank
Misfortune seemed his lot
We got into a drifted bank
And then we got upsot

Oh, jingle bells, jingle bells
Jingle all the way
Oh, what fun it is to ride
In a one horse open sleigh
Jingle bells, jingle bells
Jingle all the way
Oh, what fun it is to ride
In a one horse open sleigh yeah

Jingle bells, jingle bells
Jingle all the way
Oh, what fun it is to ride
In a one horse open sleigh
Jingle bells, jingle bells
Jingle all the way
Oh, what fun it is to ride
In a one horse open sleigh 


How to save enough money, age no bar

I found this article pretty interesting about saving money.

How to save enough money, age no bar

Veena Venugopal with Kayezad E. Adajania | December 19, 2007

You might have read W. Somerset Maugham's classic short story, The Ant and the Grasshopper. In the story, Maugham, the master storyteller, turns the wisdom from an Aesop's Fable on its head.
The fable talked of how an ant that labours through the summer preparing for winter ends up a winner instead of the grasshopper who does nothing to prepare for the harsh months ahead. In Maugham's short story, Tom, the carefree but proverbial black sheep of his family, constantly gets into trouble only to be bailed out by his hardworking brother George.
Tom beats his brother's predictions of ending up in a gutter when he marries a rich lady, who, on death, leaves him a fortune, making him a winner and his brother a perpetually sulking loser. When it comes to real life, especially saving for the future, we all know that it is the fable's moral that works. The boring, but diligent, Georges triumph in the end.
How much should you save?
Whether you save regularly or irregularly, a question often comes visiting: "Am I saving enough?" Saving the right amount is crucial for at least two major reasons.
First, it is only when you save money that you can invest in options such as fixed deposits, public provident fund, stocks, mutual funds, real estate and gold to create a future income for meeting small and large requirements, such as the education and marriage of your children and your retirement.

At the same time, you need to step up savings as you move on in life. At the beginning of your work life, you do well to even cover your expenses. At this point, a small but consistent amount of savings is crucial. Often, taking some practical steps is all it needs.
By the time you get married, your income has risen, but so have the costs, as you get down to setting up your own establishment, which, among other things, often involves taking loans for big-ticket items such as cars and consumer durables.
This stage typically lasts till your mid-30s or early 40s, after which your income simply pulls away from your expenses. The reason is that expenses don't grow as fast at this stage and, in many cases, the growth slows down. This is also the time when your savings should be the maximum and get invested.
In your 50s, you could have to bear big expenses such as higher education and marriage of children, besides relocation preparations for retirement. But the rise in your income with salary increments and investment income will let you continue saving.
You can also step on the gas when the big-ticket expenses get over and reinvest the residual savings.
Why saving enough is half the job done
You can save a lot and yet be forced to be miserly when you need money. This slip between the cup and the lip can happen if you haven't invested your savings in the appropriate order to give it the right opportunity to grow.
On an average, Indians are saving more, but the savings are getting invested in lower risk-lower return options such as FDs and mandatory retirement funds such as provident fund and life insurance. Some investments of this sort happen by default. Employees' Provident Fund is a case in point, where 12 per cent of your basic pay gets stashed away every month.
Besides, the risk averseness of many Indian investors, lack of awareness of options that bring higher returns, absence of quality financial advice and, sometimes, simply lethargy makes people invest money in their savings account in fixed deposits of the same bank.
This is despite the fact that equities have been found to be providing the best returns among all asset classes -- 18 per cent compounded annual growth rate (CAGR) since 1979. For instance, if Rs 1 lakh (100,,000) was invested in the Sensex, a PPF and a 5-year bank fixed deposit in 1982, today you would get Rs 55.12 lakh (5.512 million), Rs 7.69 lakh (769,000) and Rs 15.07 lakh (1.507 million), respectively.
Thumb rules for equity investing
Thumb rule No. 1: (100 minus your age). If equity is the best bet for brisk growth of our savings, then the logical question is how much should we invest in them either directly or via mutual funds?
The standard rule of thumb to determine your ideal equity exposure is a simple formula that suggests you subtract your age from 100. For example, if you are 35, then 100-35 or 65 per cent of your portfolio should be exposed to equity.
While this can be taken as an indicative formula, it would not, of course, be applicable to everybody at every point in their lives. For example, if you are a 30-year-old and part of a double income family with one young child, you could put in 70 per cent of your investments into the market.
Thumb rule No. 2: Keep debt-equity proportion constant. If the age-based thumb rule does not apply to you, use a tactical allocation thumb rule. Here, you start off by investing, say, 60 per cent in equities and 40 per cent in debt, and continue keeping the ratio constant at all times.
If you find at the end of the year that equities have done well, you should trim your equity exposure in the next year, the assumption being that there is likelihood of a market downturn. However, in times of a long-running bull market, like the one we have been witnessing, this strategy may not be ideal.
Thumb rule No. 3: Factor in the trend. This thumb rule on trend-based asset allocation is the opposite of the previous one. The assumption in this one is that if the stockmarkets are going up, then that is the trend of the cycle, and you should enhance your equity exposure for the next year. Of course, trends could change and you might be trapped with a high equity exposure in a falling market.
How to follow the thumb rules. Since the thumb rules tend to contradict each other, you can adopt the following approach. Use the '100 minus age' formula if there is nothing exceptionally different in your profile and the assumptions fit you.
Keep that as the guiding number, and tweak it upwards or downwards depending on your specific circumstances. If you are in your mid-30s and single, you could invest more than 70 per cent in equities. If you are 60 and do not see yourself retiring for another eight years, you could invest more than 40 per cent.
How many mutual funds are enough?
Once you decide how much money you should place in equity, you need to figure out how much to keep in equity mutual funds and how much in stocks, if at all. Then, you will also have to figure out how many equity funds and stocks to buy.
The truth is that there is no magic number, though the number of funds in your portfolio should give you adequate diversification without making your returns suffer. Let's first examine mutual funds and then stocks.
How many mutual funds? You can target up to about 10 equity mutual funds. Apart from 10 being an easy number to track, academicians like J.L. Evans and S.H. Archer have shown in their research that most of the risk reduction due to diversification takes place in an aggregation of 8-10 securities.
Which categories of mutual funds? Typically, if you're venturing into equities for the first time, you can start with an exchange-traded fund (ETF). ETFs are low-cost cousins of index funds and invest in all the securities that lie in their benchmark index in the same proportion in which the index has them.
ETFs don't have risks associated with fund managers. They aim to give you returns in line with the market, so you don't lose or gain more than what the market does. Says Mumbai-based financial planner Jayant Pai: "It's not possible for active funds to outperform the market on a continuous basis. ETFs ensure that your returns are at least in line with the market." One ETF tracking a large-cap index like Nifty or Sensex should do fine.
Diversified equity funds. One ETF in your equity portfolio can be supplemented by a couple of diversified mutual funds, including equity-linked savings schemes. This will form the core of your portfolio and provide a baseline of expected growth.
As diversified equity funds invest in around 30-50 or in an even higher number of scrips, chances are the same scrip will feature in more than one fund if you have too many funds in your portfolio. Also, ensure that these schemes are different in styles. For instance, Franklin India Bluechip and SBI [Get Quote] Bluechip are similar in objectives, so it does not make sense to have both in your portfolio.
Mid-cap funds and thematic funds. You can supplement your core funds with higher growth investment options. One of them is mid-cap funds. Though there are 26 mid-cap funds in the market, almost all of them target the same universe of stocks and there are negligible differences among them.
Then, there are thematic funds that invest according to a theme, such as infrastructure. You can invest in one mid-cap and one thematic fund.
How many stocks are enough?
After gaining equity experience through equity mutual funds, you can invest directly in stocks. Financial planners believe there isn't much merit in holding top-line equities as they would be anyway present in your mutual funds.
"Target some good, small companies that your funds may not have," says Pai. Although Nifty has 50 scrips and Sensex has 30 scrips, you don't need to hold as many, as tracking would be a problem then. Here, too, 10 sounds like a decent number. "Ensure that these 10 scrips are from different sectors," adds Pai.
Winning the savings game is about succeeding in providing for the future without losing out on your present. It is here that thumb rules serve as great guideposts. They show a happy middle path that lies between the ways of the ant and the grasshopper. In the end, you still win.

Thursday, October 28, 2010

Restore Database from .bak file after terminating all connections

To enable or disable an user
--ALTER LOGIN emsdba ENABLE;
--ALTER LOGIN emsdba DISABLE;


To create a login for a DB User
EXEC sp_change_users_login 'Update_One', 'emsdba', 'emsdba';

Reset the password for a particular login
ALTER LOGIN emsdba WITH PASSWORD = 'emsdba$1';

To find the current logins
sp_who

To restore it is preferred to have a SINGLE_USER Connection from MULTI_USER Connection. Now this can be tricky as the current login needs to be the admin itself to prevent being locked out of the DB.

To get the logical names from the backup file
Restore FILELISTONLY from DISK ='C:\proto_db_201010270217.BAK'

Results from this above command is:

EMSMAIN d:\MSSQL\DATA\proto\emsmain.mdf D PRIMARY 52428800 35184372080640 1 0 0 00000000-0000-0000-0000-000000000000 0 0 0 512 1 NULL 1285000001202200041 EF9BAB6E-7891-4971-818A-4FE27166952B 0 1
EMSDATA1 d:\MSSQL\DATA\proto\emsdata1.ndf D EMSDATA1 78643200 35184372080640 3 0 0 00000000-0000-0000-0000-000000000000 0 0 0 512 2 NULL 1285000001202200041 EF9BAB6E-7891-4971-818A-4FE27166952B 0 1
EMSDATA2 d:\MSSQL\DATA\proto\emsdata2.ndf D EMSDATA2 518062080 35184372080640 4 0 0 00000000-0000-0000-0000-000000000000 0 0 0 512 3 NULL 1285000001202200041 EF9BAB6E-7891-4971-818A-4FE27166952B 0 1
EMSDATA3 d:\MSSQL\DATA\proto\emsdata3.ndf D EMSDATA3 623312896 35184372080640 5 0 0 00000000-0000-0000-0000-000000000000 0 0 0 512 4 NULL 1285000001202200041 EF9BAB6E-7891-4971-818A-4FE27166952B 0 1
EMSDATA4 d:\MSSQL\DATA\proto\emsdata4.ndf D EMSDATA4 263454720 35184372080640 6 0 0 00000000-0000-0000-0000-000000000000 0 0 0 512 5 NULL 1285000001202200041 EF9BAB6E-7891-4971-818A-4FE27166952B 0 1
EMSINDX1 d:\MSSQL\DATA\proto\emsindx1.ndf D EMSINDX1 52428800 35184372080640 7 0 0 00000000-0000-0000-0000-000000000000 0 0 0 512 6 NULL 1285000001202200041 EF9BAB6E-7891-4971-818A-4FE27166952B 0 1
EMSINDX2 d:\MSSQL\DATA\proto\emsindx2.ndf D EMSINDX2 151519232 35184372080640 8 0 0 00000000-0000-0000-0000-000000000000 0 0 0 512 7 NULL 1285000001202200041 EF9BAB6E-7891-4971-818A-4FE27166952B 0 1
EMSINDX3 d:\MSSQL\DATA\proto\emsindx3.ndf D EMSINDX3 100073472 35184372080640 9 0 0 00000000-0000-0000-0000-000000000000 0 0 0 512 8 NULL 1285000001202200041 EF9BAB6E-7891-4971-818A-4FE27166952B 0 1
EMSINDX4 d:\MSSQL\DATA\proto\emsindx4.ndf D EMSINDX4 59768832 35184372080640 10 0 0 00000000-0000-0000-0000-000000000000 0 0 0 512 9 NULL 1285000001202200041 EF9BAB6E-7891-4971-818A-4FE27166952B 0 1
EMSLOG d:\MSSQL\DATA\proto\emslog1.ldf L NULL 1073741824 35184372080640 2 0 0 00000000-0000-0000-0000-000000000000 0 0 0 512 0 NULL 0 00000000-0000-0000-0000-000000000000 0 0



-- Restore database
RESTORE database FFocus from disk ='C:\proto_db_201010270217.BAK'
with replace,move 'emsmain' to 'C:\OLDFFocus\emsmain.mdf',
move 'emsdata1' to 'C:\OLDFFocus\emsdata1.ndf',
move 'emsdata2' to 'C:\OLDFFocus\emsdata2.ndf',
move 'emsdata3' to 'C:\OLDFFocus\emsdata3.ndf',
move 'emsdata4' to 'C:\OLDFFocus\emsdata4.ndf',
move 'emsindx1' to 'C:\OLDFFocus\emsindx1.ndf',
move 'emsindx2' to 'C:\OLDFFocus\emsindx2.ndf',
move 'emsindx3' to 'C:\OLDFFocus\emsindx3.ndf',
move 'emsindx4' to 'C:\OLDFFocus\emsindx4.ndf',
move 'emslog' to 'C:\OLDFFocus\emslog1.ldf'

Wednesday, October 6, 2010

Loop through values from a LINQ ResultSet and post the file stored in a database

To iterate through a data retrieved from LINQ

SPDDataDataContext dataObj = new SPDDataDataContext();
    ISingleResult<SelectBidTab4ViewResult> selectObj = null;
protected void Page_Load(object sender, EventArgs e)
    {
        string clerkId = Session["Clerk_ID"].ToString();

        selectObj = dataObj.SelectBidTab4View(clerkId);
        BidTabView.DataSource = dataObj.SelectBidTab4View(clerkId); ;
        BidTabView.DataBind();

    }
    public void BidtabViewCommand(Object sender, GridViewCommandEventArgs e)
    {
        SPDDataDataContext dataObj = new SPDDataDataContext();
        byte[] buffer = null;
        string urlStr = "";
       
        if (e.CommandName == "Download")
        {
            int index = Convert.ToInt32(e.CommandArgument);
            string fileNUm = BidTabView.DataKeys[index].Value.ToString();
            GridViewRow selectRow = BidTabView.Rows[index];
            Label lblDesc = selectRow.FindControl("LabelDesc") as Label;
            string fileDesc = lblDesc.Text.ToString();
            string fileType = "";

            foreach (var dr in selectObj)
            {
                if(dr.File_Identity.ToString() == fileNUm)
                {
                    string fileContent = dr.FileName.ToString();
                    if (dr.FileName.ToString() != "")
                    {
                        buffer = dr.SPD_File.ToArray();
                        fileType = dr.File_Type.ToString();
                    }
                    else
                    {
                        urlStr = fileDesc;
                    }
                }
            }

            if (fileType != "")
            {
                if (fileType == "doc")
                {
                    Response.ContentType = "Application/msword";
                }
                else if (fileType == "pdf")
                {
                    Response.ContentType = "Application/pdf";
                }
                else if (fileType == "xls")
                {
                    Response.ContentType = "Application/x-msexcel";
                }
                else if (fileType == "html")
                {
                    Response.ContentType = "text/HTML";
                }
                else if (fileType == "gif")
                {
                    Response.ContentType = "image/GIF";
                }
                else if (fileType == "jpeg")
                {
                    Response.ContentType = "image/JPEG";
                }

                Response.AddHeader("content-length", buffer.Length.ToString());
                Response.BinaryWrite(buffer);
            }
            else
            {
                Response.Redirect(urlStr);
            }
        }//e.CommandName == "Download"
}

Tuesday, October 5, 2010

Install MSMQ 3.0 in Windows 2003 Server

To install the MSMQ 3.0 in Windows Server 2003 follow these quick ad easy steps:

1. Open Control Panel and Add and Remove Programs.
2. Choose the Add/Remove Windows Components.
3. Choose the Application Server and Click Details button.
4. Check the Messaging Queue in the list and click OK -> Next -> Finish.
5. Now Open the Administrative Tools -> Computer Management.
6. In the Services and Applications Node - > Pick the Services and this opens all the Services.
7.Pick the Message Queuing Services -> Right Click and choose Properties.
8.In Recovery Tab for First failure, Second Failure and Subsequent Failure choose Restart the Service
and Choose OK

Note: Don't choose the Message Queuing Folder for this setup.

Tada!! and you have installed the MSMQ on Windows 2003.

Monday, August 23, 2010

Really Cool Network Commands




Really simple to use and useful network commands at command prompt
NET [ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | HELP | HELPMSG | LOCALGROUP | NAME | PAUSE | PRINT | SEND | SESSION | SHARE | START | STATISTICS | STOP | TIME | USE | USER | VIEW ]
NET ACCOUNTS
Adjust account settings.
[/FORCELOGOFF:{minutes | NO}] [/MINPWLEN:length]
[/MAXPWAGE:{days | UNLIMITED}] [/MINPWAGE:days]
[/UNIQUEPW:number] [/DOMAIN]
NET COMPUTER
Add other networked computers with Windows Domain Controller.
\\computername {/ADD | /DEL}
NET CONFIG
Displays your current server and/or workgroup settings.
[SERVER | WORKSTATION]
NET CONTINUE
Continues the use of service.
[service]
NET FILE
Display opened shared files on the server.
[id [/CLOSE]]
NET GROUP
Add, delete, view, and otherwise manage network workgroups.
[groupname [/COMMENT:"text"]] [/DOMAIN]
groupname {/ADD [/COMMENT:"text"] | /DELETE} [/DOMAIN]
groupname username [...] {/ADD | /DELETE} [/DOMAIN]
NET LOCALGROUP
Add, delete, view, and otherwise manage network groups.
[groupname [/COMMENT:"text"]] [/DOMAIN]
groupname {/ADD [/COMMENT:"text"] | /DELETE} [/DOMAIN]
groupname name [...] {/ADD | /DELETE} [/DOMAIN]
NET NAME
Create or delete name used for messaging.
[name [/ADD | /DELETE]]
NET PAUSE
Pause the specified network service.
[service]
NET PRINT
Manage network print jobs.
\\computername\sharename
[\\computername] job# [/HOLD | /RELEASE | /DELETE]
NET SEND
Sends messages to other users, computers, or messaging names on the network. The Messenger service must be running to receive messages.
You can send a message only to an name that is active on the network. If the message is sent to a username, that user must be logged on and running the Messenger service to receive the message.
{name | * | /DOMAIN[:name] | /USERS} message
NET SESSION
Display all sessions connected to the computer and deletes them if specified.
[\\computername] [/DELETE]
NET SHARE
Create and manage a local network share.
sharename
sharename=drive:path [/USERS:number | /UNLIMITED]
[/REMARK:"text"]
[/CACHE:Manual | Documents| Programs | None ]
sharename [/USERS:number | /UNLIMITED]
[/REMARK:"text"]
[/CACHE:Manual | Documents | Programs | None]
{sharename | devicename | drive:path} /DELETE
NET START
Start the specified network service.
[service]
NET STATISTICS
Display network statistics of the workstation or server.
[WORKSTATION | SERVER]
NET STOP
Stop the specified network service.
service
NET TIME
Display the time and date of another network computer.
[\\computername | /DOMAIN[:domainname] | /RTSDOMAIN[:domainname]] [/SET]
[\\computername] /QUERYSNTP
[\\computername] /SETSNTP[:ntp server list]
NET USE
Connects or disconnects your computer from a shared resource or displays information about your connections.
[devicename | *] [\\computername\sharename[\volume] [password | *]]
[/USER:[domainname\]username]
[/USER:[dotted domain name\]username]
[/USER:[username@dotted domain name]
[/SMARTCARD]
[/SAVECRED]
[[/DELETE] | [/PERSISTENT:{YES | NO}]]

NET USE {devicename | *} [password | *] /HOME

NET USE [/PERSISTENT:{YES | NO}]
NET USER
Displays users on the computer and/or domain.
[username [password | *] [options]] [/DOMAIN]
username {password | *} /ADD [options] [/DOMAIN]
username [/DELETE] [/DOMAIN]
NET VIEW
Displays a list of computers in a specified workgroup or the shared resources available on a specified computer.
[\\computername [/CACHE] | /DOMAIN[:domainname]]
NET VIEW /NETWORK:NW [\\computername]
Examples
net use z: \\computer\folder
Map the Z: drive to the network path //computer/folder.
net send mrhope "There is hope!"
Send a text message to the computer with a host name of mrhope the message There is hope!. Note: This command only works for Windows versions that support this command.
Note: Many computers today have also disabled the messenger service, if this service is disabled you will be unable to send/receive net send messages. Additional information about how this service is disabled can be found on document CH0000519. If you need this service enabled, follow the instructions on this page and choose to enable the service instead of disabling it.
net send * "There is hope!"
The above command would send There is hope! to all users in your current domain. This command should be used with caution since if you're on a school or work network many of the computers on that network if not all well be sent a message if the messenger service is enabled on the computers.
net config workstation
Display additional information about the network such as the computers name, workgroup, logon domain, DNS, and other useful information.
net view \\hope
View the available computers and their shared resources you may use either of the below commands. The first example displays available computers. The last command would display the shared resources on the hope computer.
net localgroup
Display all groups currently setup on the computer you're running the command on.
net share
Display all network shares on your computer.
net share hope=c:\hope\files
Create a share called "hope" for the "c:\hope\files" directory.