|
| 1 | +#Configuration settings to obtain system and user details from ppms Server |
| 2 | + |
| 3 | + |
| 4 | +## System Details ######################################################################################### |
| 5 | +$autoDetect = 1 #If enabled (1) find the name of the local PC and use it to search PPMS for name of instrument, otherwise ask the user to select from a list of ppms instruments |
| 6 | +$ignore = "" #if the autodetected local PC name includes this string at the start of the name, remove it before searching ppms for the instrument name |
| 7 | +###################################################### |
| 8 | +#PPMS Server details |
| 9 | +$ppmsURL = "" #PPMS Server URL |
| 10 | +$PF = " " #Default PPMS Core ID. Comment out or leave empty if you want to show a popup to select the Core. |
| 11 | +$pumapiKey = "" #PUMAPI key, must have user management turned on, You will need to create this in PPMS |
| 12 | +$apiKey = "" #API key, must have write mode turned on, You will need to create this in PPMS |
| 13 | +$ppmsTimeout = 10 #set timeout for ppms communications |
| 14 | +$unbookedLoginReport = #report # to get current unbooked sessions on this system |
| 15 | +$systemReport = #report # to get current list of ppms systems and their ID and Codes |
| 16 | +$projectsForUserReport = #Define the report number to retrieve list of projects for user or sessionID |
| 17 | +###################################################### |
| 18 | +#logging |
| 19 | +$logRoot = "C:\scriptLogs" #root path to store log files |
| 20 | +$logToFile = 1 #enable/disable (1/0) logging to file |
| 21 | +$logToConsole = 1 #enable/disable (1/0) logging to console |
| 22 | +###################################################### |
| 23 | +#settings URL for global flag location |
| 24 | +$getSettingsFromURLFlag = 1 #Enable/Disable Query URL table for global script settings |
| 25 | +$settingsURL = "" #URL for script settings table |
| 26 | +$settingsTableName = "Global Script Settings" #Table name to query for global enable/disable flags |
| 27 | +$fallbackFlag = $true #If website or setting isnt found, fallback to these values |
| 28 | +###################################################### |
| 29 | +$ppmsRegPath = "HKCU:\Software\Microscopy\PPMSscript" #current user reg path |
| 30 | +$LMRegPath = "HKLM:\Software\Microscopy\PPMSscript" #local machine reg path |
| 31 | +$LM_rootPath = "HKLM:\Software\Microscopy" #local machine reg path for shared settings |
| 32 | +###################################################### |
| 33 | +$taskname = "ppmsConfig" #name of task to create |
| 34 | +$taskPath = "Microscopy" #task sub-folder to create |
| 35 | +$scriptToRun = "runMe.vbs" #launch vbs script required for easy task scheduler opening of powershell files |
| 36 | +$atLogon = $true #run task once at user logon if true, else run every minute if false |
| 37 | +$asSystem = $false #run task as system if true, else run as Users |
| 38 | +$asAdmin = $false #if $true, run task with highest priveleges but as regular user |
| 39 | +###################################################### |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | +############################################################################################################ |
| 45 | +#Logoff Script settings |
| 46 | +$ppmsFlag = 1 #Is PPMS installed on the system? 1=Yes, 0=No |
| 47 | +###################################################### |
| 48 | +$lastSessionFlag = 1 #Show popup to warn current user if they are the last user on the system today, 1=Yes, 0=No, Only works if VMFlag = 0 |
| 49 | +$lastSessionWarning = 60 #How long in minutes after current session to check if theres a next session, if value = "-1", then check until midnight, modify logoff popup as required |
| 50 | +$VMFlag = 0 #If value = 1 (True) then dont allow shutdown of PC |
| 51 | +$logoffUserFlag = 0 #If enabled automatic Logoff of the user will occur, if disabled, the popup will indicate how long past the users booking they have remained logged in |
| 52 | +###################################################### |
| 53 | +#All PPMS Timer values in minutes |
| 54 | +$AlertLong = 240 #Value must be positive (-1 to disable). For bookings longer than 8hours, specify how many minutes before the end of their booking the dialog box appears to warn a user their booking is running out |
| 55 | +$Alert8 = 60 #Value must be positive (-1 to disable). For bookings less than or equal to 8hours, specify how many minutes before the end of their booking the dialog box appears to warn a user their booking is running out |
| 56 | +$Alert3 = 30 #Value must be positive (-1 to disable). For bookings less than or equal to 3hours, specify how many minutes before the end of their booking the dialog box appears to warn a user their booking is running out |
| 57 | +$Alert1 = 15 #Value must be positive (-1 to disable). For bookings less than or equal to 1hour, specify how many minutes before the end of their booking the dialog box appears to warn a user their booking is running out |
| 58 | +$Timer = 10 #Value must be positive. Specify how many minutes after the booking ends that the user is automatically logged off, also affects how long before a booking the user can stay logged in. |
| 59 | +$maxGap = 15 #Value must be positive. Specify the maximum gap between a single users two bookings so they arent logged off $Timer minutes after the first booking ends, probably just leave it at 15mins, which is the minimum booking in PPMS |
| 60 | +$maxExtension = 60 #Value must be positive. Specify the maximum number of minutes a user can extend/make a booking with the scripts extend booking button |
| 61 | +$emailTimer = -15 #Value must be less than $Timer and can be negative. Define when an email will be sent to the windows user, negative numbers indicate the email will be sent after the booking ends |
| 62 | +$adminTimer = 480 #Value must be positive. Define when an email will be sent to to the logged in Admin user to warn them they are still logged in. |
| 63 | +$extendComment = "Extended Booking" #Comment shown in PPMS when booking is extended |
| 64 | +##################################################### |
| 65 | +#PPMS Flags for toggling modes (1=True/0=False) |
| 66 | +$ignoreAdminFlag = 1 #If enabled dont show popup or logoff admin user |
| 67 | +$extendBookingFlag = 1 #If enabled users have the ability to extend bookings from the script using the extend button, the button dissappears when disabled |
| 68 | +$sameGroupFlag = 1 #If enabled allow users from the same group to share bookings |
| 69 | +$sameProjectFlag = 1 #If enabled allow users who share a project to share bookings |
| 70 | +$emailAdminFlag = 1 #If enabled allow emails to Admins when they are logged in for more than $adminTimer, resends the email on multiples of $adminTimer |
| 71 | +$pesterGoodFlag = 1 #If enabled show the "Stop pestering me" button during a booking to allow users to prevent popups |
| 72 | +$pesterBadFlag = 0 #If enabled show the "Stop pestering me" button outside of a booking to allow users to prevent popups |
| 73 | +$ignoreUserList = "Training,Workshop" #Dont show alert window popups or auto-logoff if there's a booking from anyone in this list, this will still track logged in users, separate ppms usernames with commas - useful for running workshops on analysis VMs etc |
| 74 | +###################################################### |
| 75 | +#web browser installed on windows Client PC #Select installed web browser |
| 76 | +#$browser = "chrome" |
| 77 | +$browser = "Firefox" |
| 78 | +###################################################### |
| 79 | +#email particulars |
| 80 | +$emailFrom = ' ' #Define email account in From address |
| 81 | +$secureEmailFlag = 1 #Does email server require a username and password? |
| 82 | +$emailUser = '' #Username for smtp account |
| 83 | +$emailPass = '' #Password for smtp account |
| 84 | +$smtpClient = "" |
| 85 | +###################################################### |
| 86 | +#PPMS Questionaire #Questionaire appears when users login |
| 87 | +$QuestionFlag = 0 #Questionaire enabled if true |
| 88 | +$QuestionRandom = 1 #Randomise how often the questions are asked if true |
| 89 | +$QuestionOccurence = 2 #Questionaire appears every nth login, If Random is false, If Random is true, a random number between 0 and $QuestionOccurence is generated and compared to Zero. |
| 90 | +$QuestionDrive = "" #Network Drive to mount for Questionaire |
| 91 | +$QuestionPath = "" #Path to Questionaire |
| 92 | +###################################################### |
| 93 | +$cpRefresh = 60000 #set refresh rate for control panel in milliseconds |
| 94 | +###################################################### |
| 95 | +$screenWidth = 500 |
| 96 | +$screenHeight = 500 |
| 97 | +###################################################### |
0 commit comments