• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Where is profile located in Windows 7 powershell?

J

James Gentile

#1
I just upgraded to Windows 7, it's nice, but I can't figure out where to put
my profile.ps1, does anyone know? Thanks.
 

My Computer

V

Vadims Podans [MVP]

#2
your own profile you can create using this code:

new-item -itemtype file -path $profile -force
--
WBR, Vadims Podans
MVP: PowerShell
PowerShell blog - www.sysadmins.lv

"James Gentile" <l0ngr1fl3@xxxxxx> rakstija zinojuma
"news:uZTmmTlHKHA.4004@xxxxxx"...

> I just upgraded to Windows 7, it's nice, but I can't figure out where to
> put my profile.ps1, does anyone know? Thanks.
 

My Computer

K

Karl Mitschke

#3
Hello Vadims Podans [MVP]" vpodans,

> your own profile you can create using this code:
>
> new-item -itemtype file -path $profile -force
>
> "James Gentile" <l0ngr1fl3@xxxxxx> rakstija zinojuma
> "news:uZTmmTlHKHA.4004@xxxxxx"...
>

>> I just upgraded to Windows 7, it's nice, but I can't figure out where
>> to put my profile.ps1, does anyone know? Thanks.
>>
And, to find out where it will be, type $profile at your powershell prompt

Karl
 

My Computer

V

Vadims Podans [MVP]

#4
exactly. $profile variable always refers to your profile file, that is:
%mydocuments%\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
--
WBR, Vadims Podans
MVP: PowerShell
PowerShell blog - www.sysadmins.lv

"Karl Mitschke" <karlmitschke@xxxxxx> rakstija zinojuma
"news:d66cd4c2114348cbed369cc1d0ab@xxxxxx"...

> Hello Vadims Podans [MVP]" vpodans,
>

>> your own profile you can create using this code:
>>
>> new-item -itemtype file -path $profile -force
>>
>> "James Gentile" <l0ngr1fl3@xxxxxx> rakstija zinojuma
>> "news:uZTmmTlHKHA.4004@xxxxxx"...
>>

>>> I just upgraded to Windows 7, it's nice, but I can't figure out where
>>> to put my profile.ps1, does anyone know? Thanks.
>>>
>
> And, to find out where it will be, type $profile at your powershell prompt
> Karl
>
>
 

My Computer

U

uSlackr

#6
Isn't the profile different depending on whether you run in ISE or
command-line? In the ISE $profile gives me:

%mydocuments%\WindowsPowerShell\Microsoft.PowerShellISE_profile.ps1

"James Gentile" <l0ngr1fl3@xxxxxx> wrote in message
news:OQbLzDlIKHA.4668@xxxxxx

> Thanks to both of you.
 

My Computer

L

Larry__Weiss

#7
How do you get PS to display the unresolved definition of $profile as you show it?

- Larry

uSlackr wrote:

> Isn't the profile different depending on whether you run in ISE or
> command-line? In the ISE $profile gives me:
>
> %mydocuments%\WindowsPowerShell\Microsoft.PowerShellISE_profile.ps1
>
 

My Computer

Users Who Are Viewing This Thread (Users: 1, Guests: 0)