What’s in a manifest?

The last blog entry about script packages and elevation prompted Don Jones to ask if we consider adding a template to PrimalScript or even a manifest builder. Truth is, manifests are so simple that this hardly seems necessary. Here is…
Read More

Single quotes, not double

Use ‘single quotation marks’ around string literals unless you explicitly need variable expansion. In PowerShell, single quotes are not expanded into variables: $var = ‘Hello’ $result = ‘$var $var’ # $result contains ‘$var $var’ Double quotes are: $var = ‘Hello’…
Read More

Formatting in scripts

Develop a standard for formatting your scripts, and use indentation. Function MyFunction { # function code here } …or… Function MyFunction { # function code here }…
Read More

Don’t modify out-of-scope items

Scripts, functions, and other elements should NEVER modify the variables, aliases, PSDrives, or other items from parent scopes. Instead, return data to the parent scope using the pipeline. Changing parent scope items creates code which is much more difficult to…
Read More

How do I sign a Windows PowerShell script?

First you’ll need a code-signing certificate. If you purchase one, you’ll be looking for a “Class III” digital certificate of the “Microsoft Authenticode” variety. This will often come in two parts: An SPC file, which is the Software Publishing Certificate,…
Read More

Running command-line tools

These examples show how to run command-line tools from within a VBScript, capturing the tool’s output. ' ' ScriptingAnswers.com Essentials - by Don Jones ' ' Run cmdline tools ' This shows how to launch a command-line ' tool and…
Read More

RSS SAPIEN Info Center

Search

Enter any query and press enter
Advanced search operators:
+ ⟶ Term must appear
- ⟶ Term must not appear
"" ⟶ Exact string must appear
How do I use these?

Join our mailing list

Enter your email address to subscribe to our mailing lists for Monthly Blog Digests, Product Announcements and more (you can choose which you receive once you sign-up!)

Tags

Categories

Archives

Dashboard