You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Runs Invoke-ScriptAnalyzer with the parameters and values specified in a Script Analyzer profile file.
389
-
Enter the path
390
-
to the profile file.
403
+
### -Settings
404
+
File path that contains user profile or hash table for ScriptAnalyzer
405
+
406
+
Runs Invoke-ScriptAnalyzer with the parameters and values specified in a Script Analyzer profile file or hash table
391
407
392
-
If the path, the file, or its content is invalid, it is ignored.
393
-
The parameters and values in the profile take
394
-
precedence over the same parameter and values specified at the command line.
408
+
If the path, the file's or hashtable's content are invalid, it is ignored. The parameters and values in the profile take precedence over the same parameter and values specified at the command line.
395
409
396
410
A Script Analyzer profile file is a text file that contains a hash table with one or more of the following keys:
397
411
-- Severity
@@ -411,13 +425,13 @@ For example:
411
425
@{ Severity = 'Error', 'Warning'}
412
426
413
427
```yaml
414
-
Type: String
428
+
Type: Object
415
429
Parameter Sets: (All)
416
-
Aliases:
430
+
Aliases: Profile
417
431
418
432
Required: False
419
433
Position: Named
420
-
Default value:Uses the parameters and values specified at the command line.
434
+
Default value:
421
435
Accept pipeline input: False
422
436
Accept wildcard characters: False
423
437
```
@@ -431,15 +445,33 @@ Unlike ScriptBlock parameters, the ScriptDefinition parameter requires a string
431
445
```yaml
432
446
Type: String
433
447
Parameter Sets: UNNAMED_PARAMETER_SET_2
434
-
Aliases:
448
+
Aliases:
435
449
436
450
Required: True
437
451
Position: 0
438
-
Default value:
452
+
Default value:
439
453
Accept pipeline input: False
440
454
Accept wildcard characters: False
441
455
```
442
456
457
+
### -SaveDscDependency
458
+
Resolve DSC resource dependency
459
+
460
+
Whenever Invoke-ScriptAnalyzer (isa) is run on a script having the dynamic keyword "Import-DSCResource -ModuleName <somemodule>", if <somemodule> is not present in any of the PSModulePath, isa gives parse error. This error is caused by the powershell parser not being able to find the symbol for <somemodule>. If isa finds the module on PowerShell Gallery (www.powershellgallery.com) then it downloads the missing module to a temp path. The temp path is then added to PSModulePath only for duration of the scan. The temp location can be found in $LOCALAPPDATA/PSScriptAnalyzer/TempModuleDir.
0 commit comments