-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from AzureAD/preview
Promote Preview
- Loading branch information
Showing
31 changed files
with
1,179 additions
and
442 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
// See http://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations. | ||
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp | ||
|
||
// List of extensions which should be recommended for users of this workspace. | ||
"recommendations": [ | ||
"ms-vscode.powershell" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
// PowerShell Code Formatting | ||
"powershell.codeFormatting.addWhitespaceAroundPipe": true, | ||
"powershell.codeFormatting.alignPropertyValuePairs": true, | ||
"powershell.codeFormatting.autoCorrectAliases": true, | ||
"powershell.codeFormatting.newLineAfterCloseBrace": true, | ||
"powershell.codeFormatting.newLineAfterOpenBrace": true, | ||
"powershell.codeFormatting.openBraceOnSameLine": true, | ||
"powershell.codeFormatting.pipelineIndentationStyle": "NoIndentation", | ||
"powershell.codeFormatting.preset": "Stroustrup", | ||
"powershell.codeFormatting.trimWhitespaceAroundPipe": true, | ||
//"powershell.codeFormatting.useConstantStrings": true, | ||
"powershell.codeFormatting.useCorrectCasing": true, | ||
"powershell.codeFormatting.whitespaceAfterSeparator": true, | ||
"powershell.codeFormatting.whitespaceAroundOperator": true, | ||
"powershell.codeFormatting.whitespaceBeforeOpenBrace": true, | ||
"powershell.codeFormatting.whitespaceBeforeOpenParen": true, | ||
"powershell.codeFormatting.whitespaceBetweenParameters": true, | ||
"powershell.codeFormatting.whitespaceInsideBrace": true | ||
|
||
// Editor Settings | ||
//"editor.formatOnSave": true, | ||
//"editor.formatOnSaveMode": "modificationsIfAvailable" | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,40 @@ | ||
param | ||
( | ||
# Module to Launch | ||
[Parameter(Mandatory = $false)] | ||
[string] $ModuleManifestPath = ".\src\*.psd1", | ||
# ScriptBlock to Execute After Module Import | ||
[Parameter(Mandatory = $false)] | ||
[scriptblock] $PostImportScriptBlock, | ||
# Paths to PowerShell Executables | ||
[Parameter(Mandatory = $false)] | ||
[string[]] $PowerShellPaths = @( | ||
'pwsh' | ||
'powershell' | ||
), | ||
# Import Module into the same session | ||
[Parameter(Mandatory = $false)] | ||
[switch] $NoNewWindow #= $true | ||
) | ||
|
||
if ($NoNewWindow) { | ||
Import-Module $ModuleManifestPath -PassThru -Force | ||
if ($PostImportScriptBlock) { Invoke-Command -ScriptBlock $PostImportScriptBlock -NoNewScope } | ||
} | ||
else { | ||
[scriptblock] $ScriptBlock = { | ||
param ([string]$ModulePath, [scriptblock]$PostImportScriptBlock) | ||
## Force WindowsPowerShell to load correct version of built-in modules when launched from PowerShell 6+ | ||
if ($PSVersionTable.PSEdition -eq 'Desktop') { Import-Module 'Microsoft.PowerShell.Management', 'Microsoft.PowerShell.Utility', 'CimCmdlets' -MaximumVersion 5.9.9.9 } | ||
Import-Module $ModulePath -PassThru -ArgumentList @{ | ||
'ai.instrumentationKey' = 'f7c43a96-9493-41e3-ad62-4320f5835ce2' | ||
} | ||
Invoke-Command -ScriptBlock $PostImportScriptBlock -NoNewScope | ||
} | ||
$strScriptBlock = 'Invoke-Command -ScriptBlock {{ {0} }} -ArgumentList {1}, {{ {2} }}' -f $ScriptBlock, $ModuleManifestPath, $PostImportScriptBlock | ||
#$strScriptBlock = 'Import-Module {0} -PassThru' -f $ModuleManifestPath | ||
|
||
foreach ($Path in $PowerShellPaths) { | ||
Start-Process $Path -ArgumentList ('-NoExit', '-NoProfile', '-EncodedCommand', [Convert]::ToBase64String([System.Text.Encoding]::Unicode.GetBytes($strScriptBlock))) | ||
} | ||
} | ||
param | ||
( | ||
# Module to Launch | ||
[Parameter(Mandatory = $false)] | ||
[string] $ModuleManifestPath = ".\src\*.psd1", | ||
# ScriptBlock to Execute After Module Import | ||
[Parameter(Mandatory = $false)] | ||
[scriptblock] $PostImportScriptBlock, | ||
# Paths to PowerShell Executables | ||
[Parameter(Mandatory = $false)] | ||
[string[]] $PowerShellPaths = @( | ||
'pwsh' | ||
'powershell' | ||
), | ||
# Import Module into the same session | ||
[Parameter(Mandatory = $false)] | ||
[switch] $NoNewWindow #= $true | ||
) | ||
|
||
if ($NoNewWindow) { | ||
Import-Module $ModuleManifestPath -PassThru -Force | ||
if ($PostImportScriptBlock) { Invoke-Command -ScriptBlock $PostImportScriptBlock -NoNewScope } | ||
} | ||
else { | ||
[scriptblock] $ScriptBlock = { | ||
param ([string]$ModulePath, [scriptblock]$PostImportScriptBlock) | ||
## Force WindowsPowerShell to load correct version of built-in modules when launched from PowerShell 6+ | ||
if ($PSVersionTable.PSEdition -eq 'Desktop') { Import-Module 'Microsoft.PowerShell.Management', 'Microsoft.PowerShell.Utility', 'CimCmdlets' -MaximumVersion 5.9.9.9 } | ||
Import-Module $ModulePath -PassThru -ArgumentList @{ | ||
'ai.instrumentationKey' = 'f7c43a96-9493-41e3-ad62-4320f5835ce2' | ||
} | ||
Invoke-Command -ScriptBlock $PostImportScriptBlock -NoNewScope | ||
} | ||
$strScriptBlock = 'Invoke-Command -ScriptBlock {{ {0} }} -ArgumentList {1}, {{ {2} }}' -f $ScriptBlock, $ModuleManifestPath, $PostImportScriptBlock | ||
#$strScriptBlock = 'Import-Module {0} -PassThru' -f $ModuleManifestPath | ||
|
||
foreach ($Path in $PowerShellPaths) { | ||
Start-Process $Path -ArgumentList ('-NoExit', '-NoProfile', '-EncodedCommand', [Convert]::ToBase64String([System.Text.Encoding]::Unicode.GetBytes($strScriptBlock))) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.