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
| param( | |
| [switch]$pre = $false, | |
| [Parameter(Mandatory = $false)] $zipfilePath = 'C:\Projects\genbi.zip' | |
| ) | |
| $latestRelease = Invoke-WebRequest https://api.github.com/repos/seddryck/nbi/releases$(If (!$pre) {"/latest"}) -Headers @{"Accept"="application/json"} | |
| $json = $latestRelease.Content | ConvertFrom-Json | |
| write-host $json[0] | |
| write-host 'latest version:' $json[0].tag_name | |
| $url = $json[0].assets | ? { $_.Name -Match "Genbi" } | % browser_download_url | |
| write-host 'url:' $url |
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
| shared Character.FromHtmlEntity = (entity as text) => | |
| let | |
| list = | |
| { | |
| [Name="Agrave", Number=192] | |
| , [Name="Aacute", Number=193] | |
| , [Name="Acirc", Number=194] | |
| , [Name="Atilde", Number=195] | |
| , [Name="Auml", Number=196] | |
| , [Name="Aring", Number=197] |
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
| install: | |
| - ps: Start-FileDownload 'https://aka.ms/cosmosdb-emulator' -FileName 'c:\projects\cosmos-db.msi' | |
| - cmd: cmd /c start /wait msiexec /i "c:\projects\cosmos-db.msi" /qn /quiet /norestart /log install.log | |
| - ps: Start-Process "start-emulator.cmd" | |
| - ps: .\wait-connect-cosmosdb.ps1 |
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
| use [master]; | |
| go | |
| create server audit | |
| [Audit Login Changes] | |
| to file | |
| ( FILEPATH = N'N:\Trace\' | |
| , MAXSIZE = 1024 MB | |
| , MAX_FILES = 10 | |
| , RESERVE_DISK_SPACE = OFF |
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
| declare @LogFilePath varchar(255); | |
| select | |
| @LogFilePath=log_file_path | |
| from | |
| sys.server_file_audits | |
| where | |
| name='Audit Login Changes'; | |
| set @LogFilePath=@LogFilePath +'*.sqlaudit'; |