Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Powershell code encapsulation into exe with dynamic parameters Expand / Collapse
Author
Message
Posted Tuesday, January 28, 2014 8:16 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Yesterday @ 7:34 AM
Points: 1,030, Visits: 358
Might be anyone could help with solution. I need to encapsulate powershell logic into exe. At the moment I am calling *.ps1 file using an agent job with passing to it parameter. Works fine, no issues. Unfortunately I need to deploy the script on client site. Due to company ethics need to hide the code. Any suggestion would be appreciated. Oh, and of course, I know, Powershell was created for task automation and configuration management framework.

~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
Brevity is the soul of wit.
Post #1535474
Posted Tuesday, January 28, 2014 1:13 PM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 10:16 AM
Points: 40,406, Visits: 37,611
AlexMcCo (1/28/2014)
Might be anyone could help with solution. I need to encapsulate powershell logic into exe. At the moment I am calling *.ps1 file using an agent job with passing to it parameter. Works fine, no issues. Unfortunately I need to deploy the script on client site. Due to company ethics need to hide the code. Any suggestion would be appreciated. Oh, and of course, I know, Powershell was created for task automation and configuration management framework.


PowerShell is so close to being C#, why not just have one of the team write a DLL for a CLR and call it a day?


--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

Helpful Links:
How to post code problems
How to post performance problems
Post #1535604
Posted Tuesday, January 28, 2014 1:36 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 11:11 AM
Points: 14,199, Visits: 37,119
... our ethics code requires us to prevent you from seeing what we are doing ...

Lowell

--
help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!
Post #1535619
Posted Tuesday, January 28, 2014 2:45 PM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 10:16 AM
Points: 40,406, Visits: 37,611
AlexMcCo (1/28/2014)
Might be anyone could help with solution. I need to encapsulate powershell logic into exe. At the moment I am calling *.ps1 file using an agent job with passing to it parameter. Works fine, no issues. Unfortunately I need to deploy the script on client site. Due to company ethics need to hide the code. Any suggestion would be appreciated. Oh, and of course, I know, Powershell was created for task automation and configuration management framework.


Shifting gears for a minute, I'd like to know what the basic purpose of this PoSH bit of code is.


--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

Helpful Links:
How to post code problems
How to post performance problems
Post #1535638
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse