{"action":"opened","issue":{"url":"https://api.github.com/repos/dahlbyk/posh-git/issues/228","labels_url":"https://api.github.com/repos/dahlbyk/posh-git/issues/228/labels{/name}","comments_url":"https://api.github.com/repos/dahlbyk/posh-git/issues/228/comments","events_url":"https://api.github.com/repos/dahlbyk/posh-git/issues/228/events","html_url":"https://github.com/dahlbyk/posh-git/issues/228","id":113365618,"number":228,"title":"dot-source issue","user":{"login":"nemchik","id":725456,"avatar_url":"https://avatars.githubusercontent.com/u/725456?v=3","gravatar_id":"","url":"https://api.github.com/users/nemchik","html_url":"https://github.com/nemchik","followers_url":"https://api.github.com/users/nemchik/followers","following_url":"https://api.github.com/users/nemchik/following{/other_user}","gists_url":"https://api.github.com/users/nemchik/gists{/gist_id}","starred_url":"https://api.github.com/users/nemchik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nemchik/subscriptions","organizations_url":"https://api.github.com/users/nemchik/orgs","repos_url":"https://api.github.com/users/nemchik/repos","events_url":"https://api.github.com/users/nemchik/events{/privacy}","received_events_url":"https://api.github.com/users/nemchik/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-26T14:18:42Z","updated_at":"2015-10-26T14:18:42Z","closed_at":null,"body":"I've run into an issue where there is a Group Policy enforced on my computer (at work) and somehow it doesn't like dot-source in PowerShell. I'm not even sure what would need to be changed in the GPO in order to resolve this, and I'm not in direct control of the GPO (but I can make requests).\r\n\r\nAnyway the issue I'm affected by is this error\r\n```\r\nC:\\tools\\poshgit\\dahlbyk-posh-git-fadc4dd\\profile.example.ps1 : Cannot dot-source\r\nthis command because it was defined in a different language mode. To invoke this\r\ncommand without importing its contents, omit the '.' operator.\r\nAt C:\\Users\\myusername\\Documents\\WindowsPowerShell\\Microsoft.PowerShell_prof\r\nile.ps1:3 char:1\r\n+ . 'C:\\tools\\poshgit\\dahlbyk-posh-git-fadc4dd\\profile.example.ps1'\r\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n    + CategoryInfo          : InvalidOperation: (:) [profile.example.ps1], NotSupp\r\n   ortedException\r\n    + FullyQualifiedErrorId : DotSourceNotSupported,profile.example.ps1\r\n\r\nRename-Item : Cannot rename because item at 'Function:\\Prompt' does not exist.\r\nAt C:\\Users\\myusername\\Documents\\WindowsPowerShell\\Microsoft.PowerShell_prof\r\nile.ps1:4 char:1\r\n+ Rename-Item Function:\\Prompt PoshGitPrompt -Force\r\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n    + CategoryInfo          : InvalidOperation: (:) [Rename-Item], PSInvalidOperat\r\n   ionException\r\n    + FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.Renam\r\n   eItemCommand\r\n```\r\n\r\nI've done a decent amount of Google-fu with no luck.\r\nSo I guess this issue has two possible resolutions;\r\n1) Can anyone point me in the right direction about what exactly needs to be changed in GPO to allow posh-git?\r\n2) Is it possible for posh-git to do its magic without dot-source?"}}