Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
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
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Yesterday @ 6:00 AM
Points: 274, Visits: 219
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-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 1:13 AM
Points: 35,996, Visits: 30,290
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."

"Change is inevitable. Change for the better is not." -- 04 August 2013
(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

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 @ 2:53 AM
Points: 12,749, Visits: 31,108
... our ethics code requires us to prevent you from seeing what we are doing ...

Lowell

--There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son
Post #1535619
Posted Tuesday, January 28, 2014 2:45 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 1:13 AM
Points: 35,996, Visits: 30,290
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."

"Change is inevitable. Change for the better is not." -- 04 August 2013
(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

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

Add to briefcase

Permissions Expand / Collapse