|
15 | 15 | },
|
16 | 16 | {
|
17 | 17 | "cell_type": "code",
|
18 |
| - "execution_count": 3, |
| 18 | + "execution_count": null, |
19 | 19 | "metadata": {
|
20 | 20 | "dotnet_interactive": {
|
21 | 21 | "language": "pwsh"
|
|
38 | 38 | },
|
39 | 39 | {
|
40 | 40 | "cell_type": "code",
|
41 |
| - "execution_count": 4, |
| 41 | + "execution_count": null, |
42 | 42 | "metadata": {
|
43 | 43 | "dotnet_interactive": {
|
44 | 44 | "language": "pwsh"
|
|
88 | 88 | },
|
89 | 89 | {
|
90 | 90 | "cell_type": "code",
|
91 |
| - "execution_count": 5, |
| 91 | + "execution_count": null, |
92 | 92 | "metadata": {
|
93 | 93 | "dotnet_interactive": {
|
94 | 94 | "language": "pwsh"
|
|
117 | 117 | },
|
118 | 118 | {
|
119 | 119 | "cell_type": "code",
|
120 |
| - "execution_count": 6, |
| 120 | + "execution_count": null, |
121 | 121 | "metadata": {
|
122 | 122 | "dotnet_interactive": {
|
123 | 123 | "language": "pwsh"
|
|
126 | 126 | "kernelName": "pwsh"
|
127 | 127 | }
|
128 | 128 | },
|
129 |
| - "outputs": [ |
130 |
| - { |
131 |
| - "name": "stdout", |
132 |
| - "output_type": "stream", |
133 |
| - "text": [ |
134 |
| - "\n", |
135 |
| - "\u001b[32;1mName \u001b[0m\u001b[32;1m Value\u001b[0m\n", |
136 |
| - "\u001b[32;1m---- \u001b[0m \u001b[32;1m-----\u001b[0m\n", |
137 |
| - "101 Error 101: Invalid parameter: {0}. Expected: {1}. Actual: {2}.\n", |
138 |
| - "500 An unexpected error occurred while executing the command: [{0}]. Er…\n", |
139 |
| - "\n" |
140 |
| - ] |
141 |
| - } |
142 |
| - ], |
| 129 | + "outputs": [], |
143 | 130 | "source": [
|
144 | 131 | "Get-RadErrorMessages"
|
145 | 132 | ]
|
|
157 | 144 | },
|
158 | 145 | {
|
159 | 146 | "cell_type": "code",
|
160 |
| - "execution_count": 7, |
| 147 | + "execution_count": null, |
161 | 148 | "metadata": {
|
162 | 149 | "dotnet_interactive": {
|
163 | 150 | "language": "pwsh"
|
|
188 | 175 | },
|
189 | 176 | {
|
190 | 177 | "cell_type": "code",
|
191 |
| - "execution_count": 8, |
| 178 | + "execution_count": null, |
192 | 179 | "metadata": {
|
193 | 180 | "dotnet_interactive": {
|
194 | 181 | "language": "pwsh"
|
|
227 | 214 | },
|
228 | 215 | {
|
229 | 216 | "cell_type": "code",
|
230 |
| - "execution_count": 9, |
| 217 | + "execution_count": null, |
231 | 218 | "metadata": {
|
232 | 219 | "dotnet_interactive": {
|
233 | 220 | "language": "pwsh"
|
|
270 | 257 | },
|
271 | 258 | {
|
272 | 259 | "cell_type": "code",
|
273 |
| - "execution_count": 11, |
| 260 | + "execution_count": null, |
274 | 261 | "metadata": {
|
275 | 262 | "dotnet_interactive": {
|
276 | 263 | "language": "pwsh"
|
|
308 | 295 | },
|
309 | 296 | {
|
310 | 297 | "cell_type": "code",
|
311 |
| - "execution_count": 12, |
| 298 | + "execution_count": null, |
312 | 299 | "metadata": {
|
313 | 300 | "dotnet_interactive": {
|
314 | 301 | "language": "pwsh"
|
|
346 | 333 | },
|
347 | 334 | {
|
348 | 335 | "cell_type": "code",
|
349 |
| - "execution_count": 13, |
| 336 | + "execution_count": null, |
350 | 337 | "metadata": {
|
351 | 338 | "dotnet_interactive": {
|
352 | 339 | "language": "pwsh"
|
|
395 | 382 | },
|
396 | 383 | {
|
397 | 384 | "cell_type": "code",
|
398 |
| - "execution_count": 14, |
| 385 | + "execution_count": null, |
399 | 386 | "metadata": {
|
400 | 387 | "dotnet_interactive": {
|
401 | 388 | "language": "pwsh"
|
|
440 | 427 | },
|
441 | 428 | {
|
442 | 429 | "cell_type": "code",
|
443 |
| - "execution_count": 15, |
| 430 | + "execution_count": null, |
444 | 431 | "metadata": {
|
445 | 432 | "dotnet_interactive": {
|
446 | 433 | "language": "pwsh"
|
|
489 | 476 | },
|
490 | 477 | {
|
491 | 478 | "cell_type": "code",
|
492 |
| - "execution_count": 16, |
| 479 | + "execution_count": null, |
493 | 480 | "metadata": {
|
494 | 481 | "dotnet_interactive": {
|
495 | 482 | "language": "pwsh"
|
|
543 | 530 | },
|
544 | 531 | {
|
545 | 532 | "cell_type": "code",
|
546 |
| - "execution_count": 18, |
| 533 | + "execution_count": null, |
547 | 534 | "metadata": {
|
548 | 535 | "dotnet_interactive": {
|
549 | 536 | "language": "pwsh"
|
|
588 | 575 | },
|
589 | 576 | {
|
590 | 577 | "cell_type": "code",
|
591 |
| - "execution_count": 19, |
| 578 | + "execution_count": null, |
592 | 579 | "metadata": {
|
593 | 580 | "dotnet_interactive": {
|
594 | 581 | "language": "pwsh"
|
|
623 | 610 | },
|
624 | 611 | {
|
625 | 612 | "cell_type": "code",
|
626 |
| - "execution_count": 20, |
| 613 | + "execution_count": null, |
627 | 614 | "metadata": {
|
628 | 615 | "dotnet_interactive": {
|
629 | 616 | "language": "pwsh"
|
|
675 | 662 | },
|
676 | 663 | {
|
677 | 664 | "cell_type": "code",
|
678 |
| - "execution_count": 21, |
| 665 | + "execution_count": null, |
679 | 666 | "metadata": {
|
680 | 667 | "dotnet_interactive": {
|
681 | 668 | "language": "pwsh"
|
|
710 | 697 | },
|
711 | 698 | {
|
712 | 699 | "cell_type": "code",
|
713 |
| - "execution_count": 22, |
| 700 | + "execution_count": null, |
714 | 701 | "metadata": {
|
715 | 702 | "dotnet_interactive": {
|
716 | 703 | "language": "pwsh"
|
|
745 | 732 | },
|
746 | 733 | {
|
747 | 734 | "cell_type": "code",
|
748 |
| - "execution_count": 23, |
| 735 | + "execution_count": null, |
749 | 736 | "metadata": {
|
750 | 737 | "dotnet_interactive": {
|
751 | 738 | "language": "pwsh"
|
|
780 | 767 | },
|
781 | 768 | {
|
782 | 769 | "cell_type": "code",
|
783 |
| - "execution_count": 24, |
| 770 | + "execution_count": null, |
784 | 771 | "metadata": {
|
785 | 772 | "dotnet_interactive": {
|
786 | 773 | "language": "pwsh"
|
|
811 | 798 | },
|
812 | 799 | {
|
813 | 800 | "cell_type": "code",
|
814 |
| - "execution_count": 25, |
| 801 | + "execution_count": null, |
815 | 802 | "metadata": {
|
816 | 803 | "dotnet_interactive": {
|
817 | 804 | "language": "pwsh"
|
|
847 | 834 | },
|
848 | 835 | {
|
849 | 836 | "cell_type": "code",
|
850 |
| - "execution_count": 26, |
| 837 | + "execution_count": null, |
851 | 838 | "metadata": {
|
852 | 839 | "dotnet_interactive": {
|
853 | 840 | "language": "pwsh"
|
|
893 | 880 | },
|
894 | 881 | {
|
895 | 882 | "cell_type": "code",
|
896 |
| - "execution_count": 27, |
| 883 | + "execution_count": null, |
897 | 884 | "metadata": {
|
898 | 885 | "dotnet_interactive": {
|
899 | 886 | "language": "pwsh"
|
|
930 | 917 | "source": [
|
931 | 918 | "## Next Steps\n",
|
932 | 919 | "\n",
|
933 |
| - "Now let's run a script that utilizes these functions. This script will import the RAD modules, enable the logger, and then run the various functions in this notebook. We will then look at the log file to see what was logged." |
| 920 | + "Now let's run a script that utilizes these functions. This script will import the RAD modules, enable the logger, and then run the various functions in this notebook. We will then look at the log file to see what was logged.\n", |
| 921 | + "\n", |
| 922 | + "Make sure that you are running the following cells out of the `samples` directory:" |
934 | 923 | ]
|
935 | 924 | },
|
936 | 925 | {
|
937 | 926 | "cell_type": "code",
|
938 |
| - "execution_count": 30, |
| 927 | + "execution_count": null, |
939 | 928 | "metadata": {
|
940 | 929 | "dotnet_interactive": {
|
941 | 930 | "language": "pwsh"
|
|
946 | 935 | },
|
947 | 936 | "outputs": [],
|
948 | 937 | "source": [
|
949 |
| - "Get-Location" |
| 938 | + "cd /workspaces/rad-powershell-cmdlets/errorhandling/samples" |
950 | 939 | ]
|
951 | 940 | },
|
952 | 941 | {
|
953 | 942 | "cell_type": "code",
|
954 |
| - "execution_count": 31, |
| 943 | + "execution_count": null, |
955 | 944 | "metadata": {
|
956 | 945 | "dotnet_interactive": {
|
957 | 946 | "language": "pwsh"
|
|
960 | 949 | "kernelName": "pwsh"
|
961 | 950 | }
|
962 | 951 | },
|
963 |
| - "outputs": [ |
964 |
| - { |
965 |
| - "data": { |
966 |
| - "text/plain": [] |
967 |
| - }, |
968 |
| - "metadata": {}, |
969 |
| - "output_type": "display_data" |
970 |
| - }, |
971 |
| - { |
972 |
| - "name": "stdout", |
973 |
| - "output_type": "stream", |
974 |
| - "text": [ |
975 |
| - "\u001b[31;1m.: \u001b[0m/workspaces/rad-powershell-cmdlets/errorhandling/samples/Show-AzResourcesWithoutTag.ps1:25\u001b[0m\n", |
976 |
| - "\u001b[31;1m\u001b[0m\u001b[36;1mLine |\u001b[0m\n", |
977 |
| - "\u001b[31;1m\u001b[0m\u001b[36;1m\u001b[36;1m 25 | \u001b[0m . \u001b[36;1m.\\Init.ps1\u001b[0m\n", |
978 |
| - "\u001b[31;1m\u001b[0m\u001b[36;1m\u001b[36;1m\u001b[0m\u001b[36;1m\u001b[0m\u001b[36;1m | \u001b[31;1m ~~~~~~~~~~\u001b[0m\n", |
979 |
| - "\u001b[31;1m\u001b[0m\u001b[36;1m\u001b[36;1m\u001b[0m\u001b[36;1m\u001b[0m\u001b[36;1m\u001b[31;1m\u001b[31;1m\u001b[36;1m | \u001b[31;1mThe term '.\\Init.ps1' is not recognized as a name of a cmdlet, function, script file, or\u001b[0m\n", |
980 |
| - "\u001b[31;1m\u001b[0m\u001b[36;1m\u001b[36;1m\u001b[0m\u001b[36;1m\u001b[0m\u001b[36;1m\u001b[31;1m\u001b[31;1m\u001b[36;1m\u001b[31;1m\u001b[36;1m | \u001b[31;1mexecutable program. Check the spelling of the name, or if a path was included, verify that\u001b[0m\n", |
981 |
| - "\u001b[31;1m\u001b[0m\u001b[36;1m\u001b[36;1m\u001b[0m\u001b[36;1m\u001b[0m\u001b[36;1m\u001b[31;1m\u001b[31;1m\u001b[36;1m\u001b[31;1m\u001b[36;1m\u001b[31;1m\u001b[36;1m | \u001b[31;1mthe path is correct and try again.\u001b[0m\n", |
982 |
| - "[21:47:58 INF] # GETTING AZURE RESOURCES WITHOUT TAG\n", |
983 |
| - "\u001b[31;1m.: \u001b[0m/workspaces/rad-powershell-cmdlets/errorhandling/samples/Show-AzResourcesWithoutTag.ps1:30\u001b[0m\n", |
984 |
| - "\u001b[31;1m\u001b[0m\u001b[36;1mLine |\u001b[0m\n", |
985 |
| - "\u001b[31;1m\u001b[0m\u001b[36;1m\u001b[36;1m 30 | \u001b[0m . \u001b[36;1m.\\Init-Logger.ps1\u001b[0m -DetailedOutput:$DetailedOutput -SilentMode:$Sile …\u001b[0m\n", |
986 |
| - "\u001b[31;1m\u001b[0m\u001b[36;1m\u001b[36;1m\u001b[0m\u001b[36;1m\u001b[0m\u001b[36;1m | \u001b[31;1m ~~~~~~~~~~~~~~~~~\u001b[0m\n", |
987 |
| - "\u001b[31;1m\u001b[0m\u001b[36;1m\u001b[36;1m\u001b[0m\u001b[36;1m\u001b[0m\u001b[36;1m\u001b[31;1m\u001b[31;1m\u001b[36;1m | \u001b[31;1mThe term '.\\Init-Logger.ps1' is not recognized as a name of a cmdlet, function, script file,\u001b[0m\n", |
988 |
| - "\u001b[31;1m\u001b[0m\u001b[36;1m\u001b[36;1m\u001b[0m\u001b[36;1m\u001b[0m\u001b[36;1m\u001b[31;1m\u001b[31;1m\u001b[36;1m\u001b[31;1m\u001b[36;1m | \u001b[31;1mor executable program. Check the spelling of the name, or if a path was included, verify\u001b[0m\n", |
989 |
| - "\u001b[31;1m\u001b[0m\u001b[36;1m\u001b[36;1m\u001b[0m\u001b[36;1m\u001b[0m\u001b[36;1m\u001b[31;1m\u001b[31;1m\u001b[36;1m\u001b[31;1m\u001b[36;1m\u001b[31;1m\u001b[36;1m | \u001b[31;1mthat the path is correct and try again.\u001b[0m\n", |
990 |
| - "[21:47:58 INF] Connecting to Azure\n", |
991 |
| - "[21:47:58 INF] Executing Command: [ Connect-AzAccount ]\n", |
992 |
| - "\u001b[93mWARNING: Interactive authentication is not supported in this session, please run cmdlet 'Connect-AzAccount -UseDeviceAuthentication'.\u001b[0m\n", |
993 |
| - "[21:47:58 INF] Command executed successfully.\n", |
994 |
| - "[21:47:58 INF] Getting Az Resources\n", |
995 |
| - "[21:47:58 INF] Executing Command: [\n", |
996 |
| - " $resources = Get-AzResource\n", |
997 |
| - "]\n", |
998 |
| - "\u001b[31;1mGet-AzResource: \u001b[0m/workspaces/rad-powershell-cmdlets/errorhandling/samples/Show-AzResourcesWithoutTag.ps1:39\u001b[0m\n", |
999 |
| - "\u001b[31;1m\u001b[0m\u001b[36;1mLine |\u001b[0m\n", |
1000 |
| - "\u001b[31;1m\u001b[0m\u001b[36;1m\u001b[36;1m 39 | \u001b[0m $resources = \u001b[36;1mGet-AzResource\u001b[0m\n", |
1001 |
| - "\u001b[31;1m\u001b[0m\u001b[36;1m\u001b[36;1m\u001b[0m\u001b[36;1m\u001b[0m\u001b[36;1m | \u001b[31;1m ~~~~~~~~~~~~~~\u001b[0m\n", |
1002 |
| - "\u001b[31;1m\u001b[0m\u001b[36;1m\u001b[36;1m\u001b[0m\u001b[36;1m\u001b[0m\u001b[36;1m\u001b[31;1m\u001b[31;1m\u001b[36;1m | \u001b[31;1mRun Connect-AzAccount to login.\u001b[0m\n", |
1003 |
| - "[21:47:59 INF] Command executed successfully.\n" |
1004 |
| - ] |
1005 |
| - }, |
1006 |
| - { |
1007 |
| - "ename": "Error", |
1008 |
| - "evalue": "Command failed: SubmitCode: ./samples/Show-AzResourcesWithoutTag.ps1", |
1009 |
| - "output_type": "error", |
1010 |
| - "traceback": [ |
1011 |
| - "Command failed: SubmitCode: ./samples/Show-AzResourcesWithoutTag.ps1" |
1012 |
| - ] |
1013 |
| - } |
1014 |
| - ], |
| 952 | + "outputs": [], |
1015 | 953 | "source": [
|
1016 |
| - "./samples/Show-AzResourcesWithoutTag.ps1" |
| 954 | + "./Show-AzResourcesWithoutTag.ps1" |
1017 | 955 | ]
|
1018 | 956 | }
|
1019 | 957 | ],
|
|
0 commit comments