blank slate

it is easier to remove than to add.  this will support -whatif, -comfirm, -verbose and -debug
<#
.SYNOPSIS
Get BB data and do something
.DESCRIPTION
Get contents of BB enroll file on bb-app72. Splits loads into hashtable comma
separated list of courses as value and student id as key. Calls get-dn function
for each key in hash and splits the value of the value and iterates over them
to putex into AD. Updated for 11FA
.PARAMETER none
.EXAMPLE
adsi/test5student.ps1
#>
[CmdletBinding(SupportsShouldProcess=$True)]
#—– functions ———–
function name {
params()
if ($PSCmdlet.ShouldProcess(“localhost”, “this might be a mistake”)) {
// code
}
}

$end= get-date
#—– main———–

$start= get-date
($end – $start)
Stop-transcript

Jeffery Hicks, in a webinar (citation here) shows how to extend the ISE.  Actually, he is showing some functions that he wrote – one of which is called “function Insert-Author” – which defines a text block that will be inserted into the editor when you run it.  The critical line of code is

$psise.CurrentFile.Editor.InsertText($text)

which of course could be all or parts of the above.  Next he suggests putting a menu option into PowerShell so that you can run the function from the menu instead of the command-line.

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.