Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8578633
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:26:07+00:00 2026-06-11T20:26:07+00:00

I have a module that includes a function with some private data that should

  • 0

I have a module that includes a function with some private data that should be secured. I don’t want the hassle of constantly compiling the whole module, if that is even possible.

I want to be able to call the function and get information out of it, but I need to put this script on a variety of machines where it might be accessed and the code read by someone who should not have the information used to derive the output.

I saw something about compiling PowerShell scripts. When compiled, can they be included as commands provided by a module?

How can I go about this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T20:26:08+00:00Added an answer on June 11, 2026 at 8:26 pm

    The basic answer is that PowerShell was never designed for obfuscation. There is no way, out of the box, to protect your code. To some degree, this is very intentional – we want people to read, validate and leverage/extend code to gain maximum re-usability.

    As Latkin suggests. the best way is to compile the code using c# – but even that can be viewed using reflection. http://blogs.msdn.com/b/ericgu/archive/2004/02/24/79236.aspx gives some hints on how to obfuscate the C# code.

    If your code is commercially sensitive, then you need to work out how sensitive and take action accordingly. Converting your code to C# is not that difficult (assuming you have VS and know C#!), although the suggestion of coding in C++ then using interop to invoke it seems hard work, but it all depends on the value of the code you are protecting. SO if the code really is sensitive, you have options, but they are not easy ones.

    Sorry if this is not quite the answer you wanted.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a class that I want to include in a GWT module. Unfortunately,
Suppose you have a module that you know is safe. You want to mark
I have this module pattern that stores a bunch of vars. I want to
I have created a drupal module which displays some reporting data. I would like
I'm trying to post some data to a function that will do a mysql
For some reason I have having an issue compiling a shared object that uses
i have a parent pom file that include 3 module... and there is difference
I have a rails module included for reference below that I have included using
I have module that implements custom content type via NodeAPI hooks ( hook_insert ,
I have a module that is being used to create only a few page

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.