Last active
November 14, 2019 16:05
-
-
Save SQLDBAWithABeard/bb0ecef8245f764151e018d09d38f9c5 to your computer and use it in GitHub Desktop.
meta powershell notebook
This file contains hidden or 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 PowerShell will create a PowerShell Notebook which will create a PowerShell Notebook! | |
# This serves no useful purpose :-) | |
$introCelltext = "# This notebook will create a notebook" | |
$SecondCelltext = "### Installation | |
You can install ADSNotebook from the PowerShell Gallery using `Install-Module ADSNotebook` " | |
$thirdcelltext = " `$introCelltext = ' # This notebook was created by a notebook ' | |
`$SecondCelltext = '### Installation | |
You can install ADSNotebook from the PowerShell Gallery using `Install-Module ADSNotebook` ' | |
`$thirdcelltext = 'Install-Module dbatools' | |
`$Intro = New-ADSWorkBookCell -Type Text -Text `$introCelltext | |
`$second = New-ADSWorkBookCell -Type Text -Text `$SecondCelltext | |
`$third = New-ADSWorkBookCell -Type Code -Text `$thirdcelltext | |
`$path = 'C:\temp\meta.ipynb' | |
New-ADSWorkBook -Path `$path -cells `$Intro,`$second,`$third -Type PowerShell | |
azuredatastudio.cmd `$path | |
" | |
$Intro = New-ADSWorkBookCell -Type Text -Text $introCelltext | |
$second = New-ADSWorkBookCell -Type Text -Text $SecondCelltext | |
$third = New-ADSWorkBookCell -Type Code -Text $thirdcelltext | |
$path = 'C:\temp\parent.ipynb' | |
New-ADSWorkBook -Path $path -cells $Intro,$second,$third -Type PowerShell | |
azuredatastudio.cmd $path |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment