Making sure PowerShell scripts run in 32-bit

Making sure PowerShell scripts run in 32-bit

Dealing with 32-bit Dependencies in a 64-bit Environment If you are using code that can only run in a 32-bit environment (i.e. using old database drivers or COM objects), here is a solution that will re-launch the script in a 32-bit PowerShell when it is launched in a...

Making sure PowerShell scripts run in 32-bit

Configuring WSMan Remotely for multiple computers

When working remotely in a peer-to-peer or cross-domain scenario, you will have to add all the computers you'd like to communicate with into the trusted hosts list. Overwriting Issue When Adding Trusted Hosts Unfortunately, when you try this, any new entry will...

Making sure PowerShell scripts run in 32-bit

Getting Process Based On Window Title

Identifying a Process by Window Title It isn't always easy to pick the right process because the process ID or process name may not be known or ambiguous. If the process has a window and you can see the window title, all you need to do is search for a keyword in that...

Making sure PowerShell scripts run in 32-bit

Checking Whether Hash Table Contains Key

Understanding the Limitation of Hash Tables Compared to Switch Statements In the previous tip, you used a hash table to translate input values. However, unlike Switch-statements, Hash Tables have no "default" so all values need to be present in the hash table. Check...

Making sure PowerShell scripts run in 32-bit

List Hidden Files

Did you notice that Dir, ls or Get-ChildItem do not return hidden files? Use the -Force Parameter to Reveal Hidden Files To see hidden files, you need to specify the -force parameter: Dir $env:windir -force Filter to Show Only Hidden Files But what if you just wanted...

Making sure PowerShell scripts run in 32-bit

Calling VBScript From PowerShell

Sometimes, you may have an existing VBScript that already does just what you want. You can easily incorporate any VBScript into PowerShell because PowerShell can call just about anything that is executable, including VBScript. The tricky part is that you mainly want...

Making sure PowerShell scripts run in 32-bit

Returning Text Information From PowerShell To VBScript

In a previous tip, you learned how to call PowerShell statements and read their return value. Return values are somewhat limited because they can only be numeric. There is an easy way to do this if you'd like to read more structured information from a PowerShell call...

Making sure PowerShell scripts run in 32-bit

Encrypting PowerShell Scripts

Why Hide PowerShell Script Code? Sometimes, you may want to hide the code of your PowerShell script in order to protect passwords contained within the code. One way to safely encrypt PowerShell script is by converting it into a secure string. You must first create a...

Making sure PowerShell scripts run in 32-bit

Converting ASCII and Characters

Convert ASCII value to a character To convert the ASCII value to a character, use type casting like this: [char]65 Convert a character to ASCII value To do the opposite and convert a character to its ascii value, use this: [int][char]'A' Here, the letter "A" is first...

Making sure PowerShell scripts run in 32-bit

Validating a URL

Validating User Input as a URL Using System.URI To make sure user input is a valid URL, you can use the System.URI type. Try to convert the raw string into this type. If it works, the string is a valid URI. You can then further examine the converted result to limit...

Making sure PowerShell scripts run in 32-bit

Assigning Multiple Variables

Aqua Data Studio is running out of memory. How do I increase it? Response Jonathan Powers over 11 years ago Memory Allocation in Aqua Data Studio If Aqua Data Studio crashes, becomes unresponsive, or displays no output when querying for a large amount of data, it has...

Making sure PowerShell scripts run in 32-bit

Converting Hash Tables to Objects

Hash Tables are convenient but are not true objects. This is bad because you are unable to output the hash content to formatting cmdlets or export cmdlets. With a short function, you can easily convert a Hash Table to an object, providing all the flexibility you need...

1 13 14 15