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. 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...
  3. 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...
  4. 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...
  5. Powershell Set-NetConnectionProfile -IPv4Connectivity 'Internet' not setting profile but...

    in Windows 10 Software and Apps
    Powershell Set-NetConnectionProfile -IPv4Connectivity 'Internet' not setting profile but...: My Wifi connection randomly disconnects from the internet. Using PowerShell Get-NetConnectionProfile, I found that the IPv4Connectivity attribute on the network profile changes from Internet to LocalNetwork when my internet disconnection happens.Name :...
  6. Powershell Set-NetConnectionProfile -IPv4Connectivity 'Internet' not setting profile but...

    in Windows 10 Network and Sharing
    Powershell Set-NetConnectionProfile -IPv4Connectivity 'Internet' not setting profile but...: My Wifi connection randomly disconnects from the internet. Using PowerShell Get-NetConnectionProfile, I found that the IPv4Connectivity attribute on the network profile changes from Internet to LocalNetwork when my internet disconnection happens.Name :...
  7. Powershell Set-NetConnectionProfile -IPv4Connectivity 'Internet' not setting profile but...

    in Windows 10 Gaming
    Powershell Set-NetConnectionProfile -IPv4Connectivity 'Internet' not setting profile but...: My Wifi connection randomly disconnects from the internet. Using PowerShell Get-NetConnectionProfile, I found that the IPv4Connectivity attribute on the network profile changes from Internet to LocalNetwork when my internet disconnection happens.Name :...
  8. Add Open Windows Terminal in Command Prompt, PowerShell profile context menu items

    in Windows 10 News
    Add Open Windows Terminal in Command Prompt, PowerShell profile context menu items: Windows Terminal can let you open multiple Command Prompt, Windows PowerShell, etc., tabs in one window, and you can open it from the right-click context menu. However, as the default option opens the default startup profile, you can add an expandable menu to open any profile...
  9. Powershell script that allows you to mirror the groups of an Active Directory profile...

    in Windows 10 Ask Insider
    Powershell script that allows you to mirror the groups of an Active Directory profile...: For example you have a new person who is going to be a tester. You need them to be in the same groups as other tester. So a script is needed to make a person to mirror them based off of. Also to be able to set email and overseeing manager submitted by /u/Xx255q [link]...
  10. Loop through all mail profiles using powershell

    in Windows 10 Software and Apps
    Loop through all mail profiles using powershell: Hi all, I have found a powershell script that loops through outlook registry key and searches for outlook profiles. I'm trying to find out if any users in the organization may have added any external mailboxes. This could either be in Outlook 2016 or older versions of...