[MSH] Profile.msh name and reloading
Windows Server Forum Index Windows Server
Server discussion on Windows platform.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web winserverhelp.com
[MSH] Profile.msh name and reloading

 
Post new topic   Reply to topic    Windows Server Forum Index -> Programming
Author Message
Keith Hill
Guest





Posted: Wed Nov 09, 2005 5:50 pm    Post subject: [MSH] Profile.msh name and reloading Reply with quote

Is there a way to reload your profile without have to restart MSH? I tried
dot executing it but I got errors. I having been customizing my profile a
lot lately and having to restart the shell is getting old.

Also, what's up with this name:
Microsoft.Management.Automation.msh_profile.msh? It is a bit much don't you
think? What's wrong with just a simple, short name like uh, say
"profile.msh"?

--
Keith
Back to top
Chris Warwick
Guest





Posted: Wed Nov 09, 2005 9:51 pm    Post subject: Re: [MSH] Profile.msh name and reloading Reply with quote

On Wed, 9 Nov 2005 09:50:07 -0700, "Keith Hill"
<r_keith_hill@no.spam.thank.u.hotmail.com> wrote:

Quote:
Is there a way to reload your profile without have to restart MSH? I tried
dot executing it but I got errors. I having been customizing my profile a
lot lately and having to restart the shell is getting old.

Also, what's up with this name:
Microsoft.Management.Automation.msh_profile.msh? It is a bit much don't you
think? What's wrong with just a simple, short name like uh, say
"profile.msh"?

Hi Keith,

Well, since it seems to be my day for giving out links to other
people's blogs... :-)

Check out Thomas Lee's "Under the Stairs" blog at
http://tfl09.blogspot.com/ - about half way down the (long!) page
there's a good explanation of the whole profile thing in an article
called, appropriately, "Customising Monad via Profile files". I found
it very useful and I'm now happy with the way I have my profile set up
configured :-)

Good luck
Chris
Back to top
James Truher [MSFT]
Guest





Posted: Wed Nov 09, 2005 9:51 pm    Post subject: Re: [MSH] Profile.msh name and reloading Reply with quote

We expect that there will be more than just one shell based on monad - we
wanted a way to have specific shells find specific profiles - so profile.msh
will get picked up by all shells but
microsoft.management.automation.msh_profile.msh will only get sourced by the
shell with $shellid -eq microsoft.management.automation.msh.

we know it's a handfull to type, so just use $profile ^_^

jim

--
James W. Truher [MSFT]
Monad Program Management
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.

"Keith Hill" <r_keith_hill@no.spam.thank.u.hotmail.com> wrote in message
news:OmSTl2U5FHA.4076@tk2msftngp13.phx.gbl...
Quote:
Is there a way to reload your profile without have to restart MSH? I
tried dot executing it but I got errors. I having been customizing my
profile a lot lately and having to restart the shell is getting old.

Also, what's up with this name:
Microsoft.Management.Automation.msh_profile.msh? It is a bit much don't
you think? What's wrong with just a simple, short name like uh, say
"profile.msh"?

--
Keith
Back to top
Keith Hill
Guest





Posted: Thu Nov 10, 2005 1:51 am    Post subject: Re: [MSH] Profile.msh name and reloading Reply with quote

"Chris Warwick" <news@remove.this.bit.nuney.com> wrote in message
news:6io4n1lo6cfpcea3k1npbfpds92og8fh1v@4ax.com...
Quote:
Check out Thomas Lee's "Under the Stairs" blog at
http://tfl09.blogspot.com/ - about half way down the (long!) page
there's a good explanation of the whole profile thing in an article
called, appropriately, "Customising Monad via Profile files". I found
it very useful and I'm now happy with the way I have my profile set up
configured :-)

That helps explain about the funky naming scheme but I don't see anything
about the issue of reloading your profile within the same shell.

Thanks,
Keith
Back to top
Jeff Jones [MSFT]
Guest





Posted: Thu Nov 10, 2005 9:50 pm    Post subject: Re: [MSH] Profile.msh name and reloading Reply with quote

What errors are you getting? Does your profile creates some constant or
readonly variables, aliases, or functions?

--
Jeff Jones [MSFT]
Microsoft Command Shell Development
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.


"Keith Hill" <r_keith_hill@no.spam.thank.u.hotmail.com> wrote in message
news:ubJyXCY5FHA.2628@TK2MSFTNGP11.phx.gbl...
Quote:
"Chris Warwick" <news@remove.this.bit.nuney.com> wrote in message
news:6io4n1lo6cfpcea3k1npbfpds92og8fh1v@4ax.com...
Check out Thomas Lee's "Under the Stairs" blog at
http://tfl09.blogspot.com/ - about half way down the (long!) page
there's a good explanation of the whole profile thing in an article
called, appropriately, "Customising Monad via Profile files". I found
it very useful and I'm now happy with the way I have my profile set up
configured :-)

That helps explain about the funky naming scheme but I don't see anything
about the issue of reloading your profile within the same shell.

Thanks,
Keith
Back to top
Chris Warwick
Guest





Posted: Thu Nov 10, 2005 9:50 pm    Post subject: Re: [MSH] Profile.msh name and reloading Reply with quote

On Wed, 9 Nov 2005 15:54:49 -0700, "Keith Hill"
<r_keith_hill@no.spam.thank.u.hotmail.com> wrote:

Quote:
"Chris Warwick" <news@remove.this.bit.nuney.com> wrote in message
news:6io4n1lo6cfpcea3k1npbfpds92og8fh1v@4ax.com...
Check out Thomas Lee's "Under the Stairs" blog at
http://tfl09.blogspot.com/ - about half way down the (long!) page
there's a good explanation of the whole profile thing in an article
called, appropriately, "Customising Monad via Profile files". I found
it very useful and I'm now happy with the way I have my profile set up
configured :-)

That helps explain about the funky naming scheme but I don't see anything
about the issue of reloading your profile within the same shell.

Thanks,
Keith


I've changed the default profile to dot-source my "real" profile in
another folder. To re-run the profile in the same session I just type
". path\profile.msh" - works fine
Back to top
Keith Hill
Guest





Posted: Fri Nov 11, 2005 1:50 am    Post subject: Re: [MSH] Profile.msh name and reloading Reply with quote

"Jeff Jones [MSFT]" <jeffjon@online.microsoft.com> wrote in message
news:eMs3V7i5FHA.140@TK2MSFTNGP10.phx.gbl...
Quote:
What errors are you getting? Does your profile creates some constant or
readonly variables, aliases, or functions?

I do this:

remove-item alias:dir

because I define my own dir function. It seems that it doesn't like to do
this again. So I changed it to:

remove-item alias:dir -ea SilentlyContinue

and it doesn't error. Although I notice the changes are additive only. If
I remove something from my profile that isn't reflected after I dot source
it - not that I would expect that to happen knowing how dot sourcing works.
It just makes me wonder if there is a "dump and reload" profile mechanism.
Just curious as dot sourcing gets me most of what I want.

--
Keith
Back to top
 
Post new topic   Reply to topic    Windows Server Forum Index -> Programming All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




New Topics Powered by phpBB