#PSVersion
Explore tagged Tumblr posts
Text
Crear, compilar, generar y ejecutar un JAR de Java que ejecuta un cmdlet de PowerShell utilizando Runtime
Crear, compilar, generar y ejecutar un JAR de Java que ejecuta un cmdlet de PowerShell utilizando Runtime
import java.io.*; public class CrearJava { public static void main(String[] args) { FileWriter fichero = null; PrintWriter pw = null; try { fichero = new FileWriter("EjecutarPowerShell.java"); pw = new PrintWriter(fichero); pw.println("import java.io.IOException;"); pw.println("import java.io.BufferedReader;"); pw.println("import java.io.IOException;"); pw.println("import…
View On WordPress
#IOException#Java#java.io.BufferedReader#java.io.InputStreamReader#java.io.IOException#PSVersion#PSVersionTable#stdout#System.out.println
0 notes
Text
300+ TOP PEOPLESOFT Objective Questions and Answers
PEOPLESOFT MULTIPLE CHOICE Questions :-
1. Where are definitions used to create fields on a page in the user interface and columns in application data tables stored? a. PSFIELD b. PSRECFIELD c. PS_DBFIELD d. PSDBFIELD ans:d 2. Where are the definitions that make up a PeopleSoft Application stored? a. SYSTEM CATALOG b. PEOPLETOOLS TABLES c. APPLICATION TABLES d. PEOPLETOOLS CATALOG ans:b 3. Where is the Application Data Cached? a. Application server b. Web server c. Batch server d. Browser Cache e. None ans:e 5. What is the record field property that should be set to validate dates for 30 days? a. Setting %Date as constant b. Required c. Specifying Default using Record and Field values d. Reasonable date e. Validate date ans:d 6. Prompt Tables always validate against the underlying Record? a. TRUE b. FALSE ans:b 7. What are the requirements of an effective dated table? a. Define EFFDT b. Define EFF_STATUS c. Define EFFDT as key, in ascending order d. Define EFFDT, EFF_STATUS e. Define EFFDT as key, in descending order ans:e 8. EFFDT cannot occur at what occurs levels? a. 0 b. 1 c. 2 d. 3 e. 4 ans:a 9. What type of a field can have Auto Update? a. CHAR b. LONG CHAR c. DATE d. IMAGE e. NUMBER ans:c 10. PeopleSoft tracks object changes using a system table. Which PeopleTools System table is used to track object changes? a. SYSRELEASE b. SYSOBJECTS c. PSRELEASE d. PSOBJECTS e. PSVERSIONS ans:c
PEOPLESOFT MCQs 11. Selecting Search Edit from Record Field Properties? a. Validates a field for Data to be entered on save of search dialog. b. Allows to edit the search key. c. Searches Edit fields for some values. d. Option available only for Alternate Search Keys ans:a 12. When can a value be added in the underlying table? a. Prompt Table with Edit b. Translate Table Edit c. Yes/No Edit d. Prompt Table with No Edit e. All of the above ans:d 13. Which of the following record definitions is NOT stored on the database and is therefore NOT required to be built? a. View b. SQL Table c. Derived/Work Record d. Sub Record e. Query View ans:d,e 15. Which of the following programs is NOT used in PS SA system? (a) Crystal (b) Cobol (c) SQR (d) Powerbuilder Answer: (d) Powerbuilder 16. Which of the following BEST describes the differences between running a process on Client and on Server? (a) Client runs locally, whereas Server runs off PSUNX server (b) Client runs off main server, whereas Server runs locally (c) Client runs for reports, whereas Server runs for processes (d) Client runs for interfaces, whereas Server runs for online transactions Answer: (a) Client runs locally, whereas Server runs off PSUNX server 17. Which of the following demonstrates the sequential flow in generating a Statement of Account? (a) Create Billing Request -> Print Crystal Bill -> Process Bill Request (b) Create Billing Request -> Process Bill Request -> Print Crystal Bill (c) Print Crystal Bill -> Process Bill Request -> Create Billing Request (d) Print Crystal Bill -> Create Billing Request -> Process Bill Request Answer: (b) Create Billing Request -> Process Bill Request -> Print Crystal Bill 18. Which of the following fields needs to be populated when creating a billing request? (a) Address Usage (b) Item Due Info Term (c) Class Schedule (d) Aid Term From Answer: (a) Address Usage 19. Which of the following fields does NOT exist on the Student Bank Information panel? (a) Bank Code (b) Branch Code (c) Bank Account Number (d) Bank Account Type Answer: (d) Bank Account Type 20. Which of the following is the equivalent term to Actual Day of Debit (i.e. date where bank processes the GIRO deduction)? (a) Value Date (b) Value Day (c) Value Month (d) Value Period Answer: (a) Value Date 21. What is the frequency of running SingPost interface? (a) Twice a day (b) Once a day (c) 4 times a week (d) Once a fortnight Answer: (b) Once a day 22. Which of the following processes is NOT run as a batch? (a) Tuition Calculation (b) Accounts Payable (c) Quick Posting (d) Group Posting Answer: (c) Quick Posting 23. Which role in ITE has access to Payment Reversal panel? (a) CPM (b) EA/FA Dept (c) Section Heads (d) EA/IDS Dept Answer: (a) CPM 24. What process is required prior to performing a charge reversal? (a) Verify student’s account (b) Verify student’s academic program status (c) Verify student’s last date of attendance (d) Verify student’s CCA participation Answer: (a) Verify student’s account 25. Special Students’ Assistance Scheme (SSAS) is only for (a) EDU Local Malay (b) EDU Local Chinese (c) CET Local Malay (d) CET Local Chinese Answer: (b) EDU Local Chinese 26. When SSAS panel is saved, how many records are inserted into Student Groups record? (a) 1 (b) 2 (c) 3 (d) 5 Answer: (b) 2 27. What is the flow of roles involved when an EDU student wants to withdraw from term? (a) Student -> Class Advisor -> Counter Staff -> Section Head (b) Student -> Class Advisor -> Section Head -> Counter Staff (c) Student -> Section Head -> Class Advisor -> Counter Staff (d) Student -> Counter Staff -> Section Head -> Class Advisor Answer: (b) Student -> Class Advisor -> Section Head -> Counter Staff 28. Which of the following roles does NOT use Third Party Contracts? (a) Admissions Officer / ITEHQ (b) CET Program Officer / ITEHQ (c) IDS Officer / ITEHQ (d) FAO / ITEHQ Answer: (d) FAO / ITEHQ 29. When is a Refund Service Indicator being used? (a) To allow special refunds (b) To refund students who have bad service indicators (c) To prevent refund temporarily (d) To cancel refund Answer: (c) To prevent refund temporarily 30. Which of the following is NOT an External Organisation ID? (a) RCB Number (b) ROS Number (c) MOE School Code (d) Trade Union Code Answer: (d) Trade Union Code 31. Which of the following is NOT covered in Student Financials? (a) Waivers, Sponsorship, Grants (b) Defaulted Payments (c) Billing of companies (d) Raising and printing a payment voucher Answer: (d) Raising and printing a payment voucher 32. What is the process that interfaces the refund entries from PS SA system to PS Financials system? (a) Accounts Payable Interface (b) General Ledger Interface (c) SingPost Interface (d) Payment Interface Answer: (a) Accounts Payable Interface 33. What is credit history used for? (a) Track debtors (b) Track GIRO applicants (c) Track EDU students (d) Track students who have refunds Answer: (a) Track debtors 34. Which of the following is NOT an acceptable payment mode? (a) GIRO (b) Credit Card (c) SAM (d) Internet Cash Card Answer: (b) Credit Card 35. Which of the following BEST describes refunds processing? (a) Refunds are initiated by Class Advisors (b) Refunds are due date driven and triggered by events (c) Refunds are approved by Section Heads (d) Refunds are reasons driven and triggered by events Answer: (b) Refunds are due date driven and triggered by events 36. Who is responsible for the fee configuration in ITE? (a) MAO (Management and Accounting Officer) (b) FAO (Finance and Accounting Officer) (c) TSO (Technical Support and Operations Officer) (d) HAU (Head of Administrative Unit) Answer: (b) FAO (Finance and Accounting Officer 37. What is the use of setting up Adjustment Calendars? (a) Holds the refund policy of an organisation (b) Holds the calculation rules of an organisation (c) Holds the payment reversal rules of an organisation (d) Holds the due dates of an organisation Answer: (a) Holds the refund policy of an organisation 38. What is the flow of configure a term fee? (a) Due Date Calendar -> Adj Calendar -> Criteria -> Term Fee (b) Due Date Calendar -> Adj Calendar -> Term Fee -> Criteria (c) Term Fee -> Criteria -> Adj Calendar -> Due Date Calendar (d) Criteria -> Term Fee -> Adj Calendar -> Due Date Calendar Answer: (a) Due Date Calendar -> Adj Calendar -> Criteria -> Term Fee 39. Which of the following is NOT an interface in Student Financials? (a) SingPost (b) GIRO (c) AP (d) Student Groups Answer: (d) Student Groups 40. Which of the following is NOT an action resulting in a refund? (a) Term Withdrawal (b) Career Change (c) Drop Module (d) Add Module Answer: (d) Add Module 41. Which of the following is NOT a payment mode starting Apr 2002? (a) vPOST (b) GIRO (c) SAM (d) Counter Service at SingPost Answer: (a) vPOST 42. Which of the following is NOT a ITE EDU charge? (a) Supplementary Fee (b) Locker Fee (c) Course Fee (d) Examination Fee Answer: (b) Locker Fee 43. Which of the following BEST describes Term Start Date? (a) Date when enrolment completes (b) Date when term activation begins (c) Date when term activation ends (d) Date when enrolment starts Answer: (c) Date when term activation ends 44. Which of the following is NOT a variable when defining criteria? (a) Academic Program (b) Academic Plan (c) Enrolment Date (d) Campus Answer: (c) Enrolment Date 45. Which of the following program fees is NOT charged by credit unit? (a) F0ELE (b) C2ACR (c) T8COS (d) F5BVT Answer: (d) F5BVT 46. How many tuition groups are defined in PS SA system? (a) 1 (b) 5 (c) 8 (d) 10 Answer: (c) 8 47. What is Quick Post NOT used for in ITE? (a) Waiver – ITE Sponsored Staff (b) Charge – OAP Module (c) Payment (d) Refund Answer: (d) Refund 48. Which of the following is NOT a student group in CET career? (a) SSAS (b) ITE Alumni (c) ITE Sponsored Staff (d) ITE Local Malay Answer: (a) SSAS 49. Online tuition calculation is used when (a) A top up student matriculates, enrolls and pay over the counter (b) Student drops module over the web (c) Student submits term withdrawal request over the web (d) An EDU student matriculates over the counter Answer: (a) A top up student matriculates, enrolls and pay over the counter 50. What is the printout that follows quick posting? (a) Payment Slip (b) Receipt (c) Payment Acknowledgement Slip (d) Invoice cum Receipt Answer: (c) Payment Acknowledgement Slip PEOPLESOFT Objective type Questions with Answers 51. When a balance is positive, what does it mean? (a) Student has credited account (b) Student has an outstanding charge balance (c) Student has refund amount (d) Student has overpaid Answer: (b) Student has an outstanding charge balance 52. Which of the following is NOT a waiver? (a) Q2Pass Holders (b) BEST above 40 (c) ITE Alumni (d) TRN Sponsored students Answer: (d) TRN Sponsored students 53. Which of the following is NOT a type of fee set up in PS SA system? (a) Term Fee (b) Module Fee (c) Module Sub Fee (d) Module List Fee Answer: (c) Module Sub Fee 54. Which of the following fee is NOT refundable? (a) Supplementary (b) Registration (c) Examination (d) Course Answer: (b) Registration 55. What is the proper flow in creating a student’s account? (a) Quick Admit -> Quick Enroll -> Tuition Calculation (b) Quick Enroll -> Tuition Calculation -> Quick Admit (c) Quick Admit -> Tuition Calculation – > Quick Enroll (d) Tuition Calculation -> Quick Enroll -> Quick Admit Answer: (a) Quick Admit -> Quick Enroll -> Tuition Calculation 56. Which of the following payment mode is NOT transacted over the counter? (a) NETS (b) Cash Card (c) Cheque (d) GIRO Answer: (d) GIRO 57. Which type of PeopleSoft database Table is PSRECDEFN? a) Database Metadata b) PeopleTools c) System Catalog d) PeopleSoft Application Data Ans:b 58. What should a user alter to change a password or create a hint for a forgotten password? a) Access Profile b) User Profile c) Permission List d) Role e) Symbolic ID Ans:b 59. Which action requires a two-tier connection to PeopleSoft 8? a) Running an upgrade/copy in Application Designer b) Updating a user profile in Maintain Security c) Setting the default database type in Configuration Manager d) Executing a query defined in PeopleSoft Query e) Updating the personal data record for an employee Ans:a 61. Which three PeopleCode events are associated with Record Field locations? (Choose three) a) SaveEdit b) RowSave c) FieldEdit d) RowDelete e) ScrollEdit Ans:a,c,d 62. You have made customizations in the development database and need to move them to the production database. Which tool should you use to move the customizations? a) Upgrade Assistant b) Application Designer c) Application Engine d) Import Manager e) SQR Ans:b 63. Given this URL: http://localhost/psp/HRDEV/EMPLOYEE/PSFT_TRN/c/PSU_TRN.PSU_STUDENT.GBL What is the Portal? a) PSU_TRN b) HRDEV c) PSFT_TRN d) EMPLOYEE e) PSU_STUDENT Ans:d 64. According to PeopleSoft recommendations, you apply a newly acquired Application Designer Project from an update or a fix into which database? a) Application update b) Development c) Demo d) Production Ans:c 65. The Connect ID is used to _____. a) Maintain a JOLT connection between the Web Server and Application Server b) Create a direct connection to the Batch Server c) Create a direct connection to the Web Server d) Create a shared ID used to connect directly to the database e) Connect to an external Ans:d 66. Where are the query definitions stored in the PeopleSoft Internet Architecture? a) A File Server directory b) The Database Server as an object c) A file on the Web Server d) The client machine in the browser cache e) The Application Server cache Ans:b 67. A client has completed a PeopleTools upgrade and is now testing Query. The client notices that one SQL query is taking one hour to complete when it completed in two minutes in the previous environment. What should you do to solve this problem? a) Set the JVM Heap size so that the Java Garbage Collector will not be invoked frequently b) Delete the Process Scheduler cache c) Re-create the index for the record that the query is running against d) Bounce the Application Server e) Reconfigure the PSAPPSRV.cfg file Ans:c 68. The Application Engine (AE) state record _____. a) Passes values to the PeopleSoft Process Scheduler b) Passes values from one Action to another c) Stores AE source code d) Stores application data Ans:b 69. You create a PeopleSoft Menu Definition for a Page and then grant access to users to view the Page. Which class or classes of database tables are impacted by this step? a) The PeopleTools Tables and System Catalog Tables b) The System Catalog Tables only c) The PeopleTools Tables only d) The Application Data Tables only e) The System Catalog Tables and Application Data Tables Ans:c 70. You must view a Business Process Map when a client asks you to _____. a) Change the mapping of the data b) Create a report with data from multiple tables c) Add a field to a table d) Change a corporate logo on a page e) Tell the client what to do after terminating an employee Ans:e 71. A user logs in to PeopleTools 8.4 Application Designer, which points to an HCM database in 3-tier mode. The user tries to navigate to the Workforce Administration menu but cannot see it. Why can the user NOT get to the Workforce Administration menu? a) The user does not have the appropriate permissions. b) PeopleSoft applications are no longer accessible in 3-tier mode. c) The Application Server is down. d) The Configuration Manager was set up incorrectly. Ans:b 72. A client wants to use new images with the newly implemented PeopleSoft 8 HRMS module. Where should you store the images? a) File Server b) Application Server c) Batch Server d) Web Server e) Database Server Ans:e 73. When referring to security and privileges granted to a user, what is the behavior of multiple Roles and the privileges granted by them? a) All access is rolled up to the maximum allowable privilege. b) All access is rolled down to the lowest level of privilege. c) Access privileges are defaulted to Dynamic Roles. d) Access privileges are defaulted to the Primary Role. e) Multiple Roles are not allowed. Ans:a 74. Where is the default style sheet specified for system-wide access to PeopleSoft using the portal or PeopleSoft Internet Architecture servlets? a) In Configuration Manager b) In Application Designer c) In PeopleTools Options on the PeopleTools Utilities menu d) In Setup > Security Links on the Maintain Security menu e) On the Web server in the Web root directory Ans:c 75. A customer wants to apply only a critical fix to resolve an application error that is halting production. The company is three months behind in applying all the posted patches and fixes and there are numerous prerequisites to applying each fix. How can you guarantee that a prerequisite will NOT be missed? a) Apply the patches only for modules that the client uses b) Apply the latest PeopleSoft patch only c) Upgrade or install to the most current PeopleTools release d) Apply the patches for licensed modules only e) Apply all applicable PeopleSoft service packs Ans:e 76. After the Component Processor updates the database, which PeopleCode event is fired? a) SaveEdit b) SavePostChange c) SavePreChange d) SearchSave Ans:b 77. What is the data retrieval method for a query to be displayed in Oracle? a) Explain Plan b) Execution Plan c) Retrieval Plan d) Access Path e) Query Plan Ans:a 78. How many message nodes can a database have defined within it? a) Up to 10 b) As many as 1,000 c) An unlimited number d) Only 1 Ans:c 79. Which statement about PeopleSoft Internet Architecture is true? a) PeopleSoft 8 is accessed from a browser running on a PC or a Macintosh computer b) PeopleSoft 8 can be accessed by a cellular phone only if the wireless service provider uses PeopleSoft Internet Architecture c) PeopleSoft 8 is only accessed via a browser running on a PC with Windows d) PeopleTools can be installed on a Macintosh computer e) PeopleTools must be installed on the client’s computer to access PeopleSoft 8 Ans:a 80. A client has multiple Application Servers and wants to use three Application Servers for failover. Where should you make the customization? a) Application Designer b) Configuration.properties file c) Configuration Manager d) Psappsrv.cfg file e) Psprcs.cfg file Ans:b 81. To enable JOLT failover and load balancing in the PIA using BEA WebLogic, you must edit the configuration.properties by entering multiple Application Server domains to _____. a) Psserver b) AuthTokenDomain c) Pswebservername d) EnableReportRepository Ans:a 82. What resource is available to PeopleSoft partners who want to obtain implementation documentation for an upcoming project? a) Partner Connection b) Partner Alliance c) PeopleSoft University d) Alliance Connection e) PeopleSoft Connect Ans:d 83. To which two file formats can you download query results? (Choose two) a) XLS b) CSV c) EXL d) TXT e) DOC Ans:a,b 84. What is a benefit of the PeopleSoft Internet Architecture browser-based deployment? a) It offers a robust, scalable, client-centric architecture. b) It is a PeopleTools Windows client built to run on the Internet. c) It moves some of the code from the client to an Application Server. d) It lowers training time because it operates like Windows. e) It features an intuitive Web look and functions like Yahoo. Ans:e 85. Which statement about navigating PeopleSoft 8 applications is true? a) The client workstation must be using Windows NT b) A user profile must be set up prior to signon c) PeopleSoft 8 must be installed on the client d) Internet Explorer must be used to access PeopleSoft 8 e) The client workstation must be mapped to the Application Serve Ans:b 86. What are two valid ways to comment code in the PeopleCode editor? (Choose two) a) // code b) c) COMMENTS code d) ! Code e) /* code */ Ans:b,e 87. When defining the properties of a Menu Item, what are Menu type options? a) Separator, PeopleCode, or MenuGroup b) Component, MenuBars, or MenuGroup c) Page, BarItem, or MenuGroup d) Page, MenuLabels, or MenuGroup e) Component, PeopleCode, or Separator Ans:e 88. On which three RDBMS platforms does PeopleSoft support Unicode? (Choose three) a) Oracle b) IBM DB2 MVS c) Microsoft SQL Server d) Informix e) IBM DB2/UDB Ans:a,c,e 89. Which statement about deferred processing is true? a) It has no impact on performance for PeopleSoft applications accessed using the PeopleSoft Internet Architecture b) It can be selectively enabled or disabled for any field on a page, regardless of whether or not it is enabled on Page and Component Definitions c) It is effectively disabled if the attribute is not set in the Component Definition, regardless of the page (and Page Field) settings d) It can be disabled only by turning off the attribute on all Component and Page Definitions e) It is relevant only to PeopleSoft applications accessed via the Windows client Ans:c 90. What are two valid values for the Optimizer mode in Oracle? (Choose two) a) STATISTIC b) COST c) RULE d) DATA_DIST Ans:b,c 91. Which two Web service solutions function only as proxy servers? (Choose two) a) Microsoft IIS b) IBM WebSphere c) Apache d) BEA WebLogic Ans:a,c 92. Which BEA product does PeopleSoft use to manage database transactions? a) WebLogic b) RDMS c) JOLT d) SQL e) Tuxedo Ans:e 93. Which topics are covered by PeopleTools PeopleBooks? a) Integration Broker, Process Scheduler, PeopleCode Developers guide, and Query b) Data Mover, Query, Application Engine, and Developer’s Portal c) Application Designer, PS/nVison, Customer Connection, and Administration Tools d) Workflow, Upgrade Assistant, Compass Methodology, and Tree Manager e) Security, PeopleTools Global Technology, Component Interfaces, and Payroll Ans:a 94. Given this URL: http://webhost/psp/hrms/EMPLOYEE/HRMS/c/PROCESS_SCHEDULER.PRCSTYPEDEFN.GBL What is the name of the Component Definition in the URL? a) EMPLOYEE b) PROCESS_SCHEDULER c) PRCSTYPEDEFN.GBL d) psp e) HRMS Ans:c 95. Which topic is contained in the PeopleTools PeopleBook? a) Managing Workforce Data b) PeopleSoft Table Loading Sequence c) PeopleSoft Enterprise Warehouse d) PeopleSoft General Ledger e) PeopleSoft Upgrade Assistant Ans:e 96. What allows you to get a single result set from two or more separate queries at the same time? a) Multiple Select b) Union c) Inner Join d) Outer Join e) Dynamic Where Ans:b 97. Where are definitions used to create fields on a page in the user interface and columns in application data tables stored? a) PSFIELD b) PSRECFIELD c) PS_DBFIELD d) PSDBFIELD Ans:d 98. Where are the definitions that make up a PeopleSoft Application stored? a) SYSTEM CATALOG b) PEOPLETOOLS TABLES c) APPLICATION TABLES d) PEOPLETOOLS CATALOG Ans:b 99. PeopleSoft has its own naming convention for system and non-system tables. In the list below, RECORDNAME refers to the name of any table or record. Referring to the above information, which one of the following identifies the naming convention PeopleSoft uses for system tables? a) PS_RECORDNAME b) SYSRECORDNAME c) PS$RECORDNAME d) PSRECORDNAME e) SYS_PSRECORDNAME Ans:d 100. Where is the Application Data Cached? a) Application server b) Web server c) Batch server d) Browser Cache e) None Ans:e PEOPLESOFT Questions and Answers Pdf Download Read the full article
0 notes
Text
PowerShell Azure Functions lessons learned
Lately I’m playing with PowerShell Azure Functions and I learned there are some things I needed to learn and that’s why I want to share some more info about this topic.
What are Azure Functions?
Azure Functions is an event driven, compute-on-demand experience that extends the existing Azure application platform with capabilities to implement code triggered by events occurring in virtually any Azure or 3rd party service as well as on-premises systems. Azure Functions allows developers to take action by connecting to data sources or messaging solutions, thus making it easy to process and react to events. Azure Functions scale based on demand and you pay only for the resources you consume. (from Github)
On the Github page about Azure Functions you can find all the info to get started.
PowerShell Azure Functions
Azure Functions enables you to create scheduled or triggered units of code implemented in various programming languages. PowerShell is one of those programming languages.
A good starting point is a blog post from David O’Brien Azure Functions – PowerShell.
If you look at an example from David you see a special variable being used ‘$res’. At first it was not clear to me where this variable was being defined. To find out more I started to create a Function using the Get-Variable cmdlet.
Use the following PowerShell script in your Function to retrieve the automatic variables available in Azure PowerShell functions.
[sourcecode language='powershell' padlinenumbers='true'] write-Output 'Getting variables' $result = Get-Variable | out-string [/sourcecode]
If you run this in your Azure PowerShell function you will see the following in your logs section.
[sourcecode language='powershell' ] 2017-01-29T16:01:51.538 Function started (Id=6528a25c-61cc-4d16-90ad-4869e47dc599) 2017-01-29T16:01:51.867 Getting variables 2017-01-29T16:01:51.898 Name Value ---- ----- $ ? True ^ args {} ConfirmPreference High ConsoleFileName DebugPreference SilentlyContinue Error {} ErrorActionPreference Continue ErrorView NormalView ExecutionContext System.Management.Automation.EngineIntrinsics false False FormatEnumerationLimit 4 HOME Host System.Management.Automation.Internal.Host.Int... input System.Collections.ArrayList+ArrayListEnumerat... InvocationId 6528a25c-61cc-4d16-90ad-4869e47dc599 MaximumAliasCount 4096 MaximumDriveCount 4096 MaximumErrorCount 256 MaximumFunctionCount 4096 MaximumHistoryCount 4096 MaximumVariableCount 4096 MyInvocation System.Management.Automation.InvocationInfo NestedPromptLevel 0 null OutputEncoding System.Text.ASCIIEncoding outputFile D:\local\Temp\Functions\Binding\6528a25c-61cc-... PID 9936 ProgressPreference Continue PSBoundParameters {} PSCommandPath PSCulture en-US PSDefaultParameterValues {} PSEmailServer PSHOME D:\Windows\SysWOW64\WindowsPowerShell\v1.0 PSScriptRoot PSSessionApplicationName wsman PSSessionConfigurationName http://ift.tt/2g2ttdZ... PSSessionOption System.Management.Automation.Remoting.PSSessio... PSUICulture en-US PSVersionTable {PSVersion, WSManStackVersion, SerializationVe... PWD D:\Windows\system32 req D:\local\Temp\Functions\Binding\6528a25c-61cc-... REQ_HEADERS_ACCEPT application/json, */* REQ_HEADERS_ACCEPT-ENCODING gzip, deflate, peerdist REQ_HEADERS_ACCEPT-LANGUAGE en-US, en-GB; q=0.8, en; q=0.6, nl-NL; q=0.4, ... REQ_HEADERS_CONNECTION Keep-Alive REQ_HEADERS_DISGUISED-HOST stsfunctionappdemo.azurewebsites.net REQ_HEADERS_HOST stsfunctionappdemo.azurewebsites.net REQ_HEADERS_MAX-FORWARDS 10 REQ_HEADERS_ORIGIN http://ift.tt/1MC1oPy REQ_HEADERS_REFERER http://ift.tt/2g2o1rE... REQ_HEADERS_USER-AGENT Mozilla/5.0 (Windows NT 10.0; Win64; x64) Appl... REQ_HEADERS_WAS-DEFAULT-HOS... stsfunctionappdemo.azurewebsites.net REQ_HEADERS_X-ARR-LOG-ID b61667f6-86d8-4bd1-a67c-bc0821ee2170 REQ_HEADERS_X-ARR-SSL 2048|256|C=US, S=Washington, L=Redmond, O=Micr... REQ_HEADERS_X-FORWARDED-FOR 217.122.212.62:4004 REQ_HEADERS_X-FUNCTIONS-KEY EOm0H6fRai398YoJRGKkjzAZ7SV2E/zgnOjTaCOVs55W8h... REQ_HEADERS_X-LIVEUPGRADE 1 REQ_HEADERS_X-ORIGINAL-URL /api/HttpTriggerPowerShellDemo?code=fYnNjQpSyo... REQ_HEADERS_X-P2P-PEERDIST Version=1.1 REQ_HEADERS_X-P2P-PEERDISTEX MinContentInformation=1.0, MaxContentInformati... REQ_HEADERS_X-SITE-DEPLOYME... stsfunctionappdemo REQ_METHOD GET REQ_QUERY_CODE fYnNjQpSyoUtXrR3fJ/vXn/L252RcTrzaeVFGP5vsMG6aa... res D:\local\Temp\Functions\Binding\6528a25c-61cc-... result {System.Management.Automation.PSVariable, Syst... ShellId Microsoft.PowerShell StackTrace true True VerbosePreference SilentlyContinue WarningPreference Continue WhatIfPreference False 2017-01-29T16:01:52.976 Function completed (Success, Id=6528a25c-61cc-4d16-90ad-4869e47dc599) 2017-01-29T16:03:40 No new trace in the past 1 min(s). [/sourcecode]
An interesting variable is “res” if we look at the value of this res variable we see that the value in my Azure Function is D:\local\Temp\Functions\Binding\677636fe-4384-42d2-94a4-55d14101ac99\res
But I was still wondering where this variable was configured because in the examples I often saw the variable being used to output the result.
Example where $res variable is being used:
[sourcecode language='powershell' ] $Result = $psversiontable | ConvertTo-Json Out-File -encoding Ascii -FilePath $res -inputObject $Result [/sourcecode]
It turned out this variable is being configured in the integration configuration section of the Azure Function.
So in above example the output result being show when the Azure Http Trigger PowerShell Function is being called stores the output of the Result variable in a file defined in the res variable. Hope this clarifies the $res variable seen in many examples on the internet about Azure PowerShell functions.
If you are also interested in the available environment variables within Azure PowerShell functions you can use the following PowerShell script in your Azure Function:
[sourcecode language='powershell' ] write-Output 'Getting environment variables' $result = ls env: | out-string write-output $result [/sourcecode]
I hope you have learned some new things about Azure PowerShell functions and you are interested to get started.
References:
Azure Function on Github
Azure Functions Get Started
David O’Brien Azure Functions – PowerShell
from Stefan Stranger's Weblog – Manage your IT Infrastructure http://ift.tt/2jKSbNt via IFTTT
0 notes
Text
Compilar y ejecutar una clase de Java que ejecuta un cmdlet de PowerShell utilizando Runtime
Compilar y ejecutar una clase de Java que ejecuta un cmdlet de PowerShell utilizando Runtime
Clase de Java que ejecuta PowerShell (la clase tiene que ser compilada) import java.io.IOException; import java.util.concurrent.TimeUnit; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class EjecutarPowerShell { public static void main(String[] args) throws InterruptedException { Runtime runtime = Runtime.getRuntime(); try { Process process =…
View On WordPress
#IOException#Java#java.io.BufferedReader#java.io.InputStreamReader#java.io.IOException#java.util.concurrent.TimeUnit#PSVersion#PSVersionTable#stdout#System.out.println
0 notes
Text
Crear, compilar y ejecutar una clase de Java que ejecuta un cmdlet de PowerShell utilizando Runtime
Crear, compilar y ejecutar una clase de Java que ejecuta un cmdlet de PowerShell utilizando Runtime
Crear, compilar y ejecutar una clase de Java que ejecuta un cmdlet de PowerShell utilizando Runtime import java.io.*; public class CrearJava { public static void main(String[] args) { FileWriter fichero = null; PrintWriter pw = null; try { fichero = new FileWriter("EjecutarPowerShell.java"); pw = new PrintWriter(fichero); pw.println("import java.io.IOException;"); pw.println("import…
View On WordPress
#IOException#Java#java.io.BufferedReader#java.io.InputStreamReader#java.io.IOException#PSVersion#PSVersionTable#stdout#System.out.println
0 notes
Text
Ejecutar una clase de Java que ejecuta un cmdlet de PowerShell utilizando Runtime
Clase de Java que ejecuta PowerShell import java.io.IOException; import java.util.concurrent.TimeUnit; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class EjecutarPowerShell { public static void main(String[] args) throws InterruptedException { Runtime runtime = Runtime.getRuntime(); try { Process process = runtime.exec("powershell.exe…
View On WordPress
#IOException#Java#java.io.BufferedReader#java.io.InputStreamReader#java.io.IOException#java.util.concurrent.TimeUnit#PSVersion#PSVersionTable#stdout#System.out.println
0 notes