What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

Force 64-bit PowerShell?

Votes:

0

I'm curious if there is a way to force 64-bit PowerShell to be used by PRTG?

32bit-to-64-bit powershell prtg

Created on Jan 29, 2011 1:55:37 AM



Best Answer

Accepted Answer

Votes:

3

Hello

After trying a lot in the syswow64 registry to work around this issue a colleague of mine told me about the sysnative folder. I don’t know what you are trying to do but for example I use the failoverclusters module this way.

Create a custom sensor that executes a .ps1 script that contains the following line: c:\windows\<sysnative>\windowspowershell\v1.0\powershell.exe -file "C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\yourpowershell64bitscript.ps1" Please replace <sysnative> either with "System32" when you want to use the 64bit Powershell or with "SysWOW64" for the 32bit version.

Then create the yourpowershell64bitscript.ps1 powershell script with the 64bit module you want to load and output the values in here. Something like:

<# 
This is handy for reading the logfile of the sensor so you will see the modules available that are not in the the 32 bit version of powershell
_#>
Get-Module –ListAvailable

Import-Module failoverclusters
$csv = Get-Cluster -Name fqdn.clustername
Write-Host $csv.id

When you execute the sensor you will see a powershell.exe *32 in your task manager. Because the sysnative folder is only available from a 32 bit powershell it executes the 64 bit powershell with the –file option. You will see a powershell.exe appear besides the powershell.exe *32.

Hope this gets you further.

PeterStamBam

Created on May 17, 2011 11:32:55 AM

Last change on Feb 9, 2012 3:07:51 PM by  Konstantin Wolff [Paessler Support]



4 Replies

Votes:

0

Hello,

I'm afraid that is not possible.

Best Regards.

Created on Jan 31, 2011 11:35:59 AM by  Torsten Lindner [Paessler Support]



Accepted Answer

Votes:

3

Hello

After trying a lot in the syswow64 registry to work around this issue a colleague of mine told me about the sysnative folder. I don’t know what you are trying to do but for example I use the failoverclusters module this way.

Create a custom sensor that executes a .ps1 script that contains the following line: c:\windows\<sysnative>\windowspowershell\v1.0\powershell.exe -file "C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\yourpowershell64bitscript.ps1" Please replace <sysnative> either with "System32" when you want to use the 64bit Powershell or with "SysWOW64" for the 32bit version.

Then create the yourpowershell64bitscript.ps1 powershell script with the 64bit module you want to load and output the values in here. Something like:

<# 
This is handy for reading the logfile of the sensor so you will see the modules available that are not in the the 32 bit version of powershell
_#>
Get-Module –ListAvailable

Import-Module failoverclusters
$csv = Get-Cluster -Name fqdn.clustername
Write-Host $csv.id

When you execute the sensor you will see a powershell.exe *32 in your task manager. Because the sysnative folder is only available from a 32 bit powershell it executes the 64 bit powershell with the –file option. You will see a powershell.exe appear besides the powershell.exe *32.

Hope this gets you further.

PeterStamBam

Created on May 17, 2011 11:32:55 AM

Last change on Feb 9, 2012 3:07:51 PM by  Konstantin Wolff [Paessler Support]




Votes:

0

Created on Nov 28, 2018 8:31:30 AM




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.