Skip to content

Commit 90f312b

Browse files
committed
missed the escape chars
1 parent 1472f63 commit 90f312b

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

snippets/PowerShell.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -267,51 +267,51 @@
267267
"\tThe functionality that best describes this cmdlet",
268268
"\t#>",
269269
"\t[CmdletBinding(DefaultParameterSetName = 'Parameter Set 1',",
270-
"\t\tSupportsShouldProcess = $true,",
271-
"\t\tPositionalBinding = $false,",
270+
"\t\tSupportsShouldProcess = \\$true,",
271+
"\t\tPositionalBinding = \\$false,",
272272
"\t\tHelpUri = 'http://www.microsoft.com/',",
273273
"\t\tConfirmImpact = 'Medium')]",
274274
"\t[Alias()]",
275275
"\t[OutputType([String])]",
276276
"\tparam (",
277277
"\t\t# Param1 help description",
278-
"\t\t[Parameter(Mandatory = $true,",
279-
"\t\t\tValueFromPipeline = $true,",
280-
"\t\t\tValueFromPipelineByPropertyName = $true,",
281-
"\t\t\tValueFromRemainingArguments = $false,",
278+
"\t\t[Parameter(Mandatory = \\$true,",
279+
"\t\t\tValueFromPipeline = \\$true,",
280+
"\t\t\tValueFromPipelineByPropertyName = \\$true,",
281+
"\t\t\tValueFromRemainingArguments = \\$false,",
282282
"\t\t\tPosition = 0,",
283283
"\t\t\tParameterSetName = 'Parameter Set 1')]",
284284
"\t\t[ValidateNotNull()]",
285285
"\t\t[ValidateNotNullOrEmpty()]",
286286
"\t\t[ValidateCount(0, 5)]",
287287
"\t\t[ValidateSet(\"sun\", \"moon\", \"earth\")]",
288288
"\t\t[Alias(\"p1\")]",
289-
"\t\t$Param1,",
289+
"\t\t\\$Param1,",
290290
"",
291291
"\t\t# Param2 help description",
292292
"\t\t[Parameter(ParameterSetName = 'Parameter Set 1')]",
293293
"\t\t[AllowNull()]",
294294
"\t\t[AllowEmptyCollection()]",
295295
"\t\t[AllowEmptyString()]",
296-
"\t\t[ValidateScript({ $true })]",
296+
"\t\t[ValidateScript({ \\$true })]",
297297
"\t\t[ValidateRange(0, 5)]",
298298
"\t\t[int]",
299-
"\t\t$Param2,",
299+
"\t\t\\$Param2,",
300300
"",
301301
"\t\t# Param3 help description",
302302
"\t\t[Parameter(ParameterSetName = 'Another Parameter Set')]",
303303
"\t\t[ValidatePattern(\"[a-z]*\")]",
304304
"\t\t[ValidateLength(0, 15)]",
305305
"\t\t[String]",
306-
"\t\t$Param3",
306+
"\t\t\\$Param3",
307307
"\t)",
308308
"",
309309
"\tbegin {",
310310
"\t\t#BeginCodeHere",
311311
"\t}",
312312
"",
313313
"\tprocess {",
314-
"\t\tif ($pscmdlet.ShouldProcess(\"Target\", \"Operation\")) {",
314+
"\t\tif (\\$pscmdlet.ShouldProcess(\"Target\", \"Operation\")) {",
315315
"\t\t\t#ProcessCodeHere",
316316
"\t\t}",
317317
"\t}",

0 commit comments

Comments
 (0)