Windows 10: PowerShell profile

Discus and support PowerShell profile in Windows 10 Network and Sharing to solve the problem; Hi I had a PowerShell profile that worked fine with Windows 7 (PS v3): <code> #CSOM first... Discussion in 'Windows 10 Network and Sharing' started by QWells_695, Apr 10, 2019.

  1. PowerShell profile


    Hi

    I had a PowerShell profile that worked fine with Windows 7 (PS v3):

    <code>

    #CSOM first

    [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client") | Out-Null

    [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client.Runtime") | Out-Null



    $LogCommandHealthEvent = $true

    $LogCommandLifeCycleEvent = $true



    Set-Alias rc Edit-PowershellProfile



    function Prompt

    {

    $mywd = (Get-Location).Path

    $mywd = $mywd.Replace( $HOME, '~' )

    Write-Host "PS " -NoNewline -ForegroundColor DarkGreen

    Write-Host ("" + $mywd + ">") -NoNewline -ForegroundColor Green

    return " "

    }



    function Edit-PowershellProfile

    {

    notepad $Profile

    }



    #Import-Module SkypeOnlineConnector

    </code>


    Moving to Windows 10 (PS v5.1), I find that same profile is not being read/interpreted - even if I directly invoke it.


    In what way do I need to change the profile document - if at all?

    How do I make sure it gets executed?


    Thanks in advance

    QW

    :)
     
    QWells_695, Apr 10, 2019
    #1

  2. CCC Profiles that disappear

    id suggest a spyware check
     
    eidairaman1, Apr 10, 2019
    #2
  3. kormath Win User
    Lost default photo viewer after profile rebuild


    Thanks Brink. I've tried those steps before i started searching Google. After the profile rebuild i don't have the Photo app listed to choose to make it default in either the system settings for default apps or the Open With option.

    I can't even find it doing a search. Seems to have been removed somehow with the profile rebuild, which doesn't make sense.

    Might be helpful to list what i've done PowerShell profile :) I've done the open with check, the choose default program in the system menu, tried that in device manager default programs also. I've checked the programs and features Turn windows features on/off and it's not listed there (never thought it was but that was a suggestion), searched the MS Store, it's not listed there either.

    I don't like playing in the registry unless i have defined steps and haven't found anything for this yet, just the Win7 version like in my OP.
     
    kormath, Apr 10, 2019
    #3
  4. Kursah Win User

    PowerShell profile

    PowerShell instead of Commandline in Creators Update

    Interestingly enough my personal laptop just got the update...and still has Command Prompt listed, not PowerShell...

    Edit: Not that it matters...I use both regularly. *Toast :toast:
     
    Kursah, Apr 10, 2019
    #4
Thema:

PowerShell profile

Loading...
  1. PowerShell profile - Similar Threads - PowerShell profile

  2. powershell have no access to my profile scripts

    in Windows 10 Gaming
    powershell have no access to my profile scripts: Hei people who are PS and Security expertsI noticed that PS anymore don't have access to my profile scripts - all folder Documents/Windows Powershell is access denied for user mode PS. But Admin mode PS have access. Documents are redirected and syncedI quess - is that some...
  3. powershell have no access to my profile scripts

    in Windows 10 Software and Apps
    powershell have no access to my profile scripts: Hei people who are PS and Security expertsI noticed that PS anymore don't have access to my profile scripts - all folder Documents/Windows Powershell is access denied for user mode PS. But Admin mode PS have access. Documents are redirected and syncedI quess - is that some...
  4. powershell $PROFILE, clink config, doskey, etc

    in Windows 10 Gaming
    powershell $PROFILE, clink config, doskey, etc: what are the best practices for securing these kinds of confs? at first i was thinking about maybe moving their locations so as not to be where they always are, but that seems like it doesnt really solve much if the fear is someone injecting an init into your profile. is...
  5. powershell $PROFILE, clink config, doskey, etc

    in Windows 10 Software and Apps
    powershell $PROFILE, clink config, doskey, etc: what are the best practices for securing these kinds of confs? at first i was thinking about maybe moving their locations so as not to be where they always are, but that seems like it doesnt really solve much if the fear is someone injecting an init into your profile. is...
  6. Powershell Profile disruption

    in Windows 10 Gaming
    Powershell Profile disruption: I am facing persistent issues with my PowerShell profile that significantly impact my workflow. Every time I boot up my system or launch certain applications like Brave Browser and VS-Code, I am prompted to "Set-alias" repeatedly. This issue persists at every startup and...
  7. Powershell Profile disruption

    in Windows 10 Software and Apps
    Powershell Profile disruption: I am facing persistent issues with my PowerShell profile that significantly impact my workflow. Every time I boot up my system or launch certain applications like Brave Browser and VS-Code, I am prompted to "Set-alias" repeatedly. This issue persists at every startup and...
  8. How to Properly Remove a AzureAD User Profile from a Windows computer with CMD or PowerShell?

    in Windows Hello & Lockscreen
    How to Properly Remove a AzureAD User Profile from a Windows computer with CMD or PowerShell?: What is the proper process to remove a AzureAD User Profile from a Windows computer without reimaging or disconnecting the device from Azure AD? With local & domain user accounts, removal of user profile data is simple, especially using "net user <USERNAME> /delete". Deleting...
  9. How to Properly Remove a AzureAD User Profile from a Windows computer with CMD or PowerShell?

    in Windows 10 Gaming
    How to Properly Remove a AzureAD User Profile from a Windows computer with CMD or PowerShell?: What is the proper process to remove a AzureAD User Profile from a Windows computer without reimaging or disconnecting the device from Azure AD? With local & domain user accounts, removal of user profile data is simple, especially using "net user <USERNAME> /delete". Deleting...
  10. How to Properly Remove a AzureAD User Profile from a Windows computer with CMD or PowerShell?

    in Windows 10 Software and Apps
    How to Properly Remove a AzureAD User Profile from a Windows computer with CMD or PowerShell?: What is the proper process to remove a AzureAD User Profile from a Windows computer without reimaging or disconnecting the device from Azure AD? With local & domain user accounts, removal of user profile data is simple, especially using "net user <USERNAME> /delete". Deleting...