|
66 | 66 | },
|
67 | 67 | "outputs": [
|
68 | 68 | {
|
69 |
| - "output_type": "stream", |
70 | 69 | "name": "stdout",
|
71 |
| - "text": "The PowerShell Gallery is trusted I will continue\nWe have the dbatools module already\nWe have the importExcel module already\n. {\n" |
| 70 | + "text": "The PowerShell Gallery is trusted I will continue\nWe have the dbatools module already\nWe have the importExcel module already\n", |
| 71 | + "output_type": "stream" |
72 | 72 | }
|
73 | 73 | ],
|
74 |
| - "execution_count": 2 |
| 74 | + "execution_count": 4 |
75 | 75 | },
|
76 | 76 | {
|
77 | 77 | "cell_type": "markdown",
|
|
102 | 102 | },
|
103 | 103 | "outputs": [
|
104 | 104 | {
|
105 |
| - "output_type": "stream", |
106 | 105 | "name": "stdout",
|
107 |
| - "text": "" |
| 106 | + "text": "", |
| 107 | + "output_type": "stream" |
108 | 108 | }
|
109 | 109 | ],
|
110 |
| - "execution_count": 5 |
| 110 | + "execution_count": 1 |
111 | 111 | },
|
112 | 112 | {
|
113 | 113 | "cell_type": "markdown",
|
|
124 | 124 | "cell_type": "code",
|
125 | 125 | "source": [
|
126 | 126 | "$ExcelDirectory = 'c:\\temp\\' # Alter this to the directory you want the file created\r\n",
|
127 |
| - "$SQlinstance = 'SQL2017N5' # Alter this for the SQL Instance you want to get permissions for\r\n", |
| 127 | + "$SQlinstance = 'localhost,15592' # Alter this for the SQL Instance you want to get permissions for\r\n", |
| 128 | + "$PSDefaultParameterValues = @{\r\n", |
| 129 | + " \"*Dba*:SQLCredential\" = New-Object System.Management.Automation.PSCredential ((Get-Secret -Name container-demo-sql-user -AsPlainText), (Get-Secret -Name container-demo-sql-pwd))\r\n", |
| 130 | + "}\r\n", |
128 | 131 | "Write-Output \"Processing $sqlinstance\"\r\n",
|
129 | 132 | "\r\n",
|
130 | 133 | "$InstanceName = $SQlinstance.Split('\\').Split('.').Split('\\').Split(',') -join '_'\r\n",
|
|
195 | 198 | ],
|
196 | 199 | "metadata": {
|
197 | 200 | "azdata_cell_guid": "9fdad48b-965e-45ed-81a4-d999699dfa88",
|
198 |
| - "tags": [ |
199 |
| - "hide_input" |
200 |
| - ] |
| 201 | + "tags": [] |
201 | 202 | },
|
202 | 203 | "outputs": [
|
203 | 204 | {
|
204 |
| - "output_type": "stream", |
205 | 205 | "name": "stdout",
|
206 |
| - "text": "Processing SQL2017N5\n FileName is c:\\temp\\\\SQL2017N5_Permssions_OneTab_2020-05-30.xlsx\n\nFinished Processing SQL2017N5\n ############### \n FileName is c:\\temp\\\\SQL2017N5_Permssions_OneTab_2020-05-30.xlsx \n ############### \n\n" |
| 206 | + "text": "Processing localhost,15592\n FileName is c:\\temp\\\\localhost_15592_Permssions_OneTab_2020-09-06.xlsx\n\nFinished Processing localhost,15592\n ############### \n FileName is c:\\temp\\\\localhost_15592_Permssions_OneTab_2020-09-06.xlsx \n ############### \n\n", |
| 207 | + "output_type": "stream" |
207 | 208 | }
|
208 | 209 | ],
|
209 |
| - "execution_count": 6 |
| 210 | + "execution_count": 15 |
210 | 211 | },
|
211 | 212 | {
|
212 | 213 | "cell_type": "markdown",
|
|
0 commit comments