Learn PowerShell Toolmaking in a Month of Lunches Don Jones instant download
Learn PowerShell Toolmaking in a Month of Lunches Don Jones instant download
https://ebookname.com/product/learn-powershell-toolmaking-in-a-
month-of-lunches-don-jones/
https://ebookname.com/product/learn-sql-in-a-month-of-lunches-
meap-v13-jeff-iannucci/
https://ebookname.com/product/learn-electronics-with-arduino-1st-
edition-don-wilcher/
https://ebookname.com/product/intellect-and-character-in-
victorian-england-mark-pattison-and-the-invention-of-the-don-1st-
edition-h-s-jones/
https://ebookname.com/product/spiritually-oriented-
psychotherapy-1st-edition-len-sperry/
European Military Law Systems Georg Nolte (Editor)
https://ebookname.com/product/european-military-law-systems-
georg-nolte-editor/
https://ebookname.com/product/morgellon-s-syndrome-1-pap-cdr-
edition-david-conroy/
https://ebookname.com/product/sound-visualization-and-
manipulation-1st-edition-yang-hann-kim/
https://ebookname.com/product/shared-identities-medieval-and-
modern-imaginings-of-judeo-islam-1st-edition-aaron-w-hughes/
https://ebookname.com/product/jojo-s-bizarre-adventure-
part-1-phantom-blood-vol-1-hirohiko-araki/
Learn PowerShell Toolmaking
in a Month of Lunches
Learn PowerShell Toolmaking
in a Month of Lunches
DON JONES
JEFFERY HICKS
MANNING
Shelter Island
For online information and ordering of this and other Manning books, please visit
www.manning.com. The publisher offers discounts on this book when ordered in quantity.
For more information, please contact
Special Sales Department
Manning Publications Co.
20 Baldwin Road
PO Box 261
Shelter Island, NY 11964
Email: orders@manning.com
Many of the designations used by manufacturers and sellers to distinguish their products are
claimed as trademarks. Where those designations appear in the book, and Manning
Publications was aware of a trademark claim, the designations have been printed in initial caps
or all caps.
Recognizing the importance of preserving what has been written, it is Manning’s policy to have
the books we publish printed on acid-free paper, and we exert our best efforts to that end.
Recognizing also our responsibility to conserve the resources of our planet, Manning books are
printed on paper that is at least 15 percent recycled and processed without the use of elemental
chlorine.
ISBN 9781617291166
Printed in the United States of America
1 2 3 4 5 6 7 8 9 10 – MAL – 17 16 15 14 13 12
brief contents
PART 1 INTRODUCTION TO TOOLMAKING ........................................1
1 ■ Before you begin 3
2 ■ PowerShell scripting overview 9
3 ■ PowerShell’s scripting language 15
4 ■ Simple scripts and functions 27
5 ■ Scope 39
v
vi BRIEF CONTENTS
vii
viii CONTENTS
5 Scope 39
5.1 What is scope? 39
5.2 Seeing scope in action 41
5.3 Working out of scope 41
5.4 Getting strict with scope 42
5.5 Best practices for scope 43
5.6 Lab 43
CONTENTS ix
9 Writing help 80
9.1 Comment-based help 80
9.2 XML-based help 84
x CONTENTS
10 Error handling
10.1
88
It’s all about the action 88
10.2 Setting the error action 90
10.3 Saving the error 90
10.4 Error handling v1: Trap 91
10.5 Error Handling v2+: Try…Catch…Finally 92
10.6 Providing some visuals 95
10.7 Coming up next 97
10.8 Labs 97
Lab A 97 ■
Lab B 98 ■
Lab C 99 ■
Standalone lab 100
subobjects 208
20.5 Lab 208
CONTENTS xiii
xv
about this book
Most of what you’ll need to know about this book is covered in chapter 1, but there
are a few things that we should mention up front.
First of all, if you plan to follow along with our examples and complete the hands-
on exercises, you’ll need a virtual machine or computer running Windows 8 or Win-
dows Server 2012. We cover that in more detail in chapter 1. You can get by with Win-
dows 7, but you’ll miss out on a few of the hands-on labs.
Second, be prepared to read this book from start to finish, covering each chapter
in order. Again, this is something we’ll explain in more detail in chapter 1, but the
idea is that each chapter introduces a few new things that you will need in subsequent
chapters. You shouldn’t try to push through the whole book—stick with the one chap-
ter per day approach. The human brain can only absorb so much information at
once, and by taking on PowerShell in small chunks, you’ll learn it a lot faster and
more thoroughly.
Third, this book contains a lot of code snippets. Most of them are quite short, so
you should be able to type them easily. In fact, we recommend that you do type them,
since doing so will help reinforce an essential PowerShell skill: accurate typing!
Longer code snippets are given in listings and are available for download at http://
Morelunches.com (just click on this book’s cover image and look for the “Down-
loads” section).
That said, there are a few conventions that you should be aware of. Code will
always appear in a special font, just like this example:
Get-WmiObject –class Win32_OperatingSystem
➥ –computerName SERVER-R2
xvi
ABOUT THIS BOOK xvii
That example also illustrates the line-continuation character used in this book. It indi-
cates that those two lines should actually be typed as a single line in PowerShell. In
other words, don’t hit Enter or Return after Win32_OperatingSystem—keep right on
typing. PowerShell allows for very long lines, but the pages of this book can only hold
so much.
Sometimes, you’ll also see code font within the text itself, such as when we write
Get-Command. That lets you know that you’re looking at a command, parameter, or
other element that you would type within the shell.
Fourth is a tricky topic that we’ll bring up again in several chapters: the backtick
character (`). Here’s an example:
Invoke-Command –scriptblock { Dir } `
-computerName SERVER-R2,localhost
The character at the end of the first line isn’t a stray bit of ink—it’s a real character
that you would type. On a U.S. keyboard, the backtick (or grave accent) is usually near
the upper left, under the Escape key, on the same key as the tilde character (~). When
you see the backtick in a code listing, type it exactly as is. Furthermore, when it
appears at the end of a line—as in the preceding example—make sure that it’s the
very last character on that line. If you allow any spaces or tabs to appear after it, the
backtick won’t work correctly, and neither will the code example.
NOTE Frankly, it’d be easier to just download the code samples and not
worry about typing them in. They’re posted at http://MoreLunches.com—
just click on this book’s cover image and head for the Downloads section.
You can also download the code from the publisher’s website at www.manning.com/
LearnPowerShellToolmakinginaMonthofLunches.
Finally, we’ll occasionally direct you to Internet resources. Where those URLs are
particularly long and difficult to type, we’ve replaced them with Manning-based short-
ened URLs that look like http://mng.bz/S085 (you’ll see that one in chapter 1).
Author Online
The purchase of Learn PowerShell Toolmaking in a Month of Lunches includes access to a
private forum run by Manning Publications where you can make comments about the
book, ask technical questions, and receive help from the authors and other users. To
access and subscribe to the forum, point your browser to www.manning.com/
LearnPowerShellToolmakinginaMonthofLunches and click the Author Online link.
This page provides information on how to get on the forum once you are registered,
what kind of help is available, and the rules of conduct in the forum.
Manning’s commitment to our readers is to provide a venue where a meaningful
dialogue between individual readers and between readers and the authors can take
place. It’s not a commitment to any specific amount of participation on the part of
the authors, whose contribution to the book’s forum remains voluntary (and
xviii ABOUT THIS BOOK
unpaid). We suggest you try asking the authors some challenging questions, lest
their interest stray!
The Author Online forum and the archives of previous discussions will be accessi-
ble from the publisher’s website as long as the book is in print.
about the authors
DON JONES is a multiple-year recipient of Microsoft’s prestigious Most Valuable Profes-
sional (MVP) Award for his work with Windows PowerShell. He writes the Windows
PowerShell column for Microsoft TechNet Magazine, blogs at PowerShell.org, and
authors the “Decision Maker” column and blog for Redmond Magazine. Don is a pro-
lific technology author and has published more than a dozen print books since 2001.
Don is a Senior Partner and Principal Technologist for Concentrated Technology
(ConcentratedTech.com), an IT education and strategic consulting firm. Don’s first
Windows scripting language was KiXtart, going back all the way to the mid-1990s. He
quickly graduated to VBScript in 1995 and was one of the first IT pros to start using
early releases of a new Microsoft product code-named “Monad”—which later became
Windows PowerShell. Don lives in Las Vegas and travels all over the world delivering
IT training (especially in PowerShell) and speaking at IT conferences.
xix
acknowledgments
Books simply don’t write, edit, and publish themselves. Don would like to thank every-
one at Manning Publications who decided to take a chance on a very different kind of
book for Windows PowerShell, and who worked so hard to make this book happen.
And Jeff would like to thank Don for inviting him along for the ride, as well as the
PowerShell community for their enthusiasm and support.
We are both grateful to Manning for allowing us to continue the “Month of
Lunches” series with this next book in the line-up.
Thanks also to the following peer reviewers who read the manuscript during its
development and provided feedback: Bryan Clark, Chad McAuley, Christoph
Tohermes, David Smith, Karl Mitschke, Manuel Ruf, Marc Johnson, Mark Schill, Mike
Stevenson, Nathan Shelby, and Thomas Lee. Special thanks to James Berkenbile for
his technical proofread of the final manuscript shortly before we went to press.
xx
Part 1
Introduction to toolmaking
B efore you can dive into PowerShell scripting and toolmaking, you need to
know exactly what those entail—and you need just a crash course in Power-
Shell’s scripting language. That’s what we’ll accomplish in this part of the book.
If the material in this part seems high level and brief, it’s okay. That’s our
intent: At this point, all of these foundation topics are a bit conceptual and
abstract, so we’re going to try to get them out of the way quickly. Stick with it,
because we’ll be revisiting all of them later, when we can do so in a more real-
world and meaningful context. If you’re looking for more complete coverage,
grab a copy of Learn PowerShell in a Month of Lunches, 2nd edition. Or if you feel
like going all in, pick up PowerShell in Depth, also from Manning Press.
Before you begin
Windows PowerShell is an interesting product. It’s one of the few Microsoft prod-
ucts that were explicitly designed for several different audiences. Within those
audiences will be beginners, intermediate users, and experts, but in many cases
there’s little crossover between the audience categories. Folks who use the shell as
a command-line interface—tool users, in our terminology—aren’t always interested
in approaching the shell in any other way. Folks who use the shell to create tools—
toolmakers, as we would call them—might use the shell as a development tool most
of the time and only rarely use PowerShell as an interactive command-line inter-
face. This book is for people—primarily administrators—who are getting started in
that second, toolmaking audience.
3
4 CHAPTER 1 Before you begin
and more on making a reusable, packaged tool that can complete that task—and doing
so in a way that enables the tool to be handed down to the tool users, who can consume
the tool in their own, simpler scripts.
Sure, there’s crossover. Today, Bob might be focused on getting a bunch of new
users provisioned in Active Directory. After doing that manually for a while, Bob
might think, “You know, I bet I could put this all into a script that someone from
Human Resources could run, and get this off of my plate entirely.” Bob has just set
himself up to become a toolmaker: using PowerShell not to accomplish a task directly
but instead enabling someone else—often someone less technically proficient—to
accomplish the task themselves.
We use the term toolmaking instead of scripting in order to highlight what we believe
is a key difference between the two. For us, a script is something you make for your-
self. It might be a bit ugly, but you’re the only one who’ll know. You can make a lot of
assumptions about how it will be run, because you’ll be the one running it. Scripts are
often quick and dirty, and although they might be long and complicated, they’re just a
way for you to automate something that only you will ever do. For a tool, on the other
hand, you can make fewer assumptions. You’re going to be handing it over to some-
one else, and you won’t be around to babysit it. Your tool needs to be more structured
and more resilient to errors. You need to check the input your tool is given to make
sure it’s correct and usable. Your tool needs to be a bit more professional, and a bit
more robust, than something that you’d only ever run yourself.
Toolmaking is a step below full-on software development. Toolmakers still operate
entirely within PowerShell, rather than moving into, say, Visual Studio and a .NET
Framework language like C#. Toolmakers still need to exhibit some of the discipline
and maturity of a developer—anticipating and handling errors, validating user input,
and so forth—but toolmakers work in a simpler environment than developers and
often produce less-complex tools. Developers often tap into broad portions of the
.NET Framework; PowerShell toolmakers rely more heavily on PowerShell commands
and may not directly access the Framework at all or may do so only minimally. We
admit that it’s a fine line; in the end, it becomes more about the person. If Visual Stu-
dio just ain’t your cup of tea, and you’d rather stick with a simpler, scripting-like envi-
ronment, then you’re a toolmaker. Welcome aboard.
VII
VIII
Thus, then, in all the various ways described in this chapter did
Miss Nightingale labour, but especially in the cause of the British
Army. The rôle of the Soldiers' Friend which she had filled in the
Crimea was enacted on a conspicuous stage. Her work was now all
done behind the scenes; and done, as I have already described,
under heavy physical disability. Much of the work was, moreover, dull
and even uncongenial; but she fed her soul on higher things:—
My strength has failed more than usually of late. And I don't think I
have much more work in me—not, at least, if it is to continue of this
harassing sort. God called me to Hospital work (as I fondly thought, for
life)—but since then to Army work—but with a promise that I should go
back to Hospital—as I thought as a Nurse, but as I now think, as a
Patient. But St. Catherine of Siena says: “Et toutesfois je permets cela luy
advenir, afin qu'il soit plus soigneux de fuyr soi mesme, & de
venir & recourir à moy … et qu'il considère que par amour je luy donne le
moyen de tirer hors le chef de la vraye humilité, se reputant indigne de la
paix & repos de pensée, comme mes autres serviteurs—& au contraire se
reputant digne des peines qu'il souffre,” etc.
My sister and her family come to spend here two or three nights
occasionally to see friends. But I was only able to see her for ten minutes,
and my good brother-in-law, who is one of the best and kindest of men,
not at all—nor his children.… I sent you back St. Francis de Sales, with
many thanks. I liked him in his old dress. I like that story where the man
loses his crown of martyrdom, because he will not be reconciled with his
enemy. It is a sound lesson. I am going to send you back S. Francis
Xavier. His is a life I always like to study as well as those of all the early
Jesuit fathers. But how much they did—and how little I do.… Ever my
dearest Revd. Mother's loving and grateful, F. N.
Miss Nightingale never lost sight of the end in the means. She was
doing “God's work” in the “War Office.” She thought it was “little”
that she did, for it is often the hardest workers who thus deem
themselves the most unprofitable servants. And the work was often
drudgery; yet through it all she had inspiration from her memories of
heroism in the Army, for whose “salvation” she was working. “I have
seen to-day [from my window],” she wrote to her mother in 1863,
“the first Levée, since all are dead whom I wished to please. A
melancholy sight to me. Yet I like the pomp and pageant of the old
veterans covered with well-earned crosses. To me who saw them
earned, no vain pageant. It is like the Dead March in Saul—to me,
who heard it on the battle-field, no vain sound, but full of deep and
glorious sadness.”
CHAPTER V
II
The pressure of work during these years caused Miss Nightingale
to close her doors resolutely. She did indeed see her father often;
her mother and sister occasionally, though she did not press them to
come. Other relations and many of her friends felt aggrieved that
she would not accept help which they would have liked to give. But
she had a rule of life to which she adhered firmly. There was so
much strength available, likely enough (as she still supposed) to be
ended by early death; there was so much public work to be done;
there was no strength to spare for family or friends, except in so far
as they helped, and did not hinder, the public work. She saw nurses
and matrons from time to time: they were parts of her life-work. She
saw Lady Herbert and Mrs. Bracebridge: they were parts of her work
in the past. She never omitted to write to Lady Herbert on the
anniversary of Lord Herbert's death, though their friendship lost
something of its former intimacy when in 1865 Lady Herbert joined
the Church of Rome. Other friends were seldom admitted. Letters to
an old friend, who was sometimes received and sometimes turned
away, explain Miss Nightingale's point of view:—
(To Madame Mohl.) 115 Park Street, July 30 [1864]. You will be doing
me a favour if you come to me. August 2 is a terrible anniversary to me.
And I shall not have my usual solace, for Mrs. Bracebridge has always
come to spend that day with me, and I am sure she would have come this
year, but I could not tell whether I should be able to get Sir John
Lawrence's things off by that time. It does me good to be with you, as
with Mrs. Clive, because it reduces individual struggles to general
formulæ. It does me harm, intensely alone as I am, to be with people
who do the reverse. But it is incorrect to say, as Mrs. Clive does, that “I
will not let people help me,” or, as others do, that “no one can help me.”
Any body could have helped me who knew how to read and write and
what o'clock it is.
Miss Nightingale, we may safely infer, did not inspire Garibaldi with
divine fervour for sanitary reform or any merely administrative
progress. Administration in any sort was foreign to his genius. But
she felt, after the interview no less than before, that it was a great
occasion to her. The interview took place at 115 Park Street, a house
belonging to the Grosvenor Hotel, and she presented the Hotel with
a bust of Garibaldi as a memento of the occasion.
Another of her heroes was Abraham Lincoln, of whom she wrote
this appreciation[64]:—
34 South Street, June 20 [1865]. Dear Sir—I have not dared to press in
with my feeble word of sympathy upon your over-taxed time and energy,
when all Europe was pouring in upon you with its heartfelt sympathy. My
experience has been infinitesimally small. Still, small as it is, it has been of
historical events. And I can never remember the time—not even when the
colossal calamity of the Crimea was first made known to us,—not even
when we lost our own Albert (and our Albert was no common hero—
remember that it was no Sovereign, but it was Washington, whom he held
up as an example to himself and his)—I can never remember the time
when so deep and strong a cry of feeling has gone up from the world, in
all its length and breadth, and in all its classes, as has gone up for you
and yours—in your great trial: Mr. Lincoln's death. As some one said of
him, he will hold “the purest and the greatest place in history.” I trust and
believe that the deed which will spring up from that[92] noble grave will
be worthy of it. I will not take up your time with weak expression of a
deep sympathy. Sincerely yours, Florence Nightingale.
At home, the political event which most moved her was the death
of Lord Palmerston:—
(Miss Nightingale to Dr. Farr.) 34 South Street, Oct. 19 [1865] Ld.
Palmerston is a great loss. I speak for the country and myself. He was a
powerful protector to me—especially since Sidney Herbert's death. I never
asked him to do anything—you may be sure I did not ask him often—but
he did it—for the last nine years. He did not do himself justice. If the right
thing was to be done, he made a joke, but he did it. He will not leave his
impress on the age—but he did the country good service. Except L.
Napoleon, whose death might be the greatest good or the greatest evil, I
doubt whether there is any man's loss which will so affect Europe.… He
was at heart the most liberal man we had left. I have lost, in him, a
powerful friend. I hear spoken of as his successors—Clarendon, Russell,
Granville. Ld. Clarendon it is said the Queen wishes—and she has been
corresponding with him privately—perhaps by Ld. Palmerston's own
desire. But I believe the real question is, under which (if any) of these,
your Mr. Gladstone will consent to remain in office and be Leader of the
Ho. of C. Not one of these men will manage the cabinet as Ld. Palmerston
did. But I daresay you have more trustworthy information than I have. I
would Ld. Palmerston had lived another Session. We should have got
something done at the Poor Law Board, which we shall not now.[65] Ld.
Russell is so queer-tempered. I quite dread his Premiership, if it comes.
III
IV
“Dear Miss Nightingale,” wrote Mr. Jowett (Oct. 28), “I shall always
regard the circumstance of having given you the Communion as a
solemn event in my life which is a call to devote myself to the
service of God and men (if He will give me the power to do so). Your
example will often come before me, especially if I have occasion to
continue my work under bodily suffering. There is something that I
want to say to you which I hardly know how to express.” And then
followed the first of what became a long series of spiritual
admonitions. Mr. Jowett had, it is clear, a very high opinion of Miss
Nightingale's genius, the most sincere admiration for her self-
devotion, and a deep affection for her. But he thought that she was
in some ways not using her life to the best advantage, and that her
state of physical and mental suffering was in some measure the
result of a too impetuous temper. In letter after letter, full of a
beautiful and delicate sympathy, he whispered into her ears counsels
of calm, of trust, of moderation. She seems to have kept him
informed of every move in her crusades, and he was constantly
afraid that she would fight too fiercely or even (in this case a quite
needless fear) come out into the open. “The gift of being invisible,”
he wrote (April 22, 1863), “is much to be desired by any one who
exercises a good influence over others. Though Deborah and Barak
work together, Sisera the Captain of the Host must not suspect that
he has been delivered into the hands of a woman.” “I hope” (March
1865) “that you won't leave your incognito. It would seriously injure
your influence if you were known to have influence. (Did you know
the Baron Stockmar whom Sir Robert Peel called one of the most
influential persons in Europe? Hardly any one in England excepting
Kings and Queens knew of his existence. That was a model for that
sort of life.) If you answer (anonymously, as I hope, if at all), may I
beg you to answer with facts only and without a trace of feeling?”
When he applauds some stroke, he urges her to find rest and
comfort in the victory. “All this,” he wrote (Feb. 26, 1865), “I firmly
believe would not have been accomplished but for your clearness of
sight and intensity of purpose. Is not this a thing to thank God
about? I was reading in Grote an account of an attempted Spartan
revolution in the times of Agesilaus. One of the great objects of the
Ephori was to keep the Spartan youth from getting under the
influence of a woman (name unknown) who was stirring the
rebellion. Do you not think that woman may have been you in some
former state of existence?” Miss Nightingale, perhaps in some
justification for her eagerness in action, opened her heart fully to
Mr. Jowett about her sense of loss in Sidney Herbert's death;
explaining her loneliness in work, and yet her overmastering desire
to complete, while strength was still granted to her, the “joint work”
of her friend and herself. “I have often felt,” he replied (Aug. 7,
1865), “what a wreck and ruin Lord Herbert's death must have been
to you. You had done so much for him and he had grown so rapidly
in himself and in public estimation that there seemed no limits to
what he might have effected. He might have been one of the most
popular and powerful Prime Ministers in this country—the man to
carry us through the social and ecclesiastical questions that are
springing up. And you would have had a great part in his work and
filled him with every noble and useful ambition. Do not suppose that
I don't feel and understand all this. (And you might have made me
Dean of Christ Church: the only preferment that I would like to have,
and I would have reformed the University and bullied the Canons.)
But it has pleased God that all this should not be, and it must please
us too, and we must carry on the struggle under greater difficulties,
with more of hard and painful labour and less of success, still never
flinching while life lasts.” Never flinching, but never fretting or
fuming: that was the burden of Mr. Jowett's exhortations. “I
sometimes think,” he had written (July 9, 1865), “that you ought
seriously to consider how your work may be carried on, not with less
energy, but in a calmer spirit. Think that the work of God neither
hastes nor rests, and that we should go about it in the spirit of order
which prevails in the world. I am not blaming the past (who would
blame you who devote your life to the good of others?). But I want
the peace of God to settle on the future. Perhaps you will feel that in
urging this I really can form no notion of your sufferings. Alas, dear
friend, I am afraid that this is true. Still I must beg you to keep your
mind above them. Is that motive vain of being made perfect through
suffering?” It is an idle speculation to wonder whether persons who
have done great things in the world would have done as much or
more or better if they had been other than they were. Calm is well;
but it is not always the spring of action. If Miss Nightingale had been
less eager and impetuous, she might, after her return from the
Crimea, have done nothing at all. But perhaps already, in moments
of weariness during the battle, and increasingly as the shadows
lengthened into the pensive evening of her days, she may have felt
that there was some truth in the soothing counsels of Mr. Jowett's
friendship.
Thirty years after the date at which we have now arrived (1866),
Miss Nightingale read through the hundreds of letters she had
received and kept from Mr. Jowett. She made copious extracts from
them in pencil, and sent several to his biographers. Many of his
letters to her were included in his Life, though the name of the
recipient was not disclosed. She was jealous in her life-time of the
privacy of her life. She rebuked Mr. Jowett once for accepting a copy
of her cousin's statuette of her. He explained that he had placed it
where it would not be observed. “I consider you,” he had already
written, “a sort of Royal personage, not to be gossiped about with
any one.” The letters to her, hitherto published, were selected to
throw light upon his views. In this Memoir, in which it has been
decided to give (if it may be) a truthful picture of her life and
character, I select rather those letters which show the influence of
his character upon hers. The following was noted by Miss
Nightingale as “one of the most beautiful, if not the most beautiful,
of the whole collection”:—
Askrigg, July [1864]. I am afraid that hard-working persons are very bad
correspondents, at least I know that I am, or I should have written to you
long ago, which I have always a pleasure in doing. But Plato, who is either
my greatest friend or my greatest enemy, and has finally swelled into
three large volumes (you will observe that I am proud of the size of my
baby), is to blame for preventing me. This place, at which I shall be
staying for about five weeks longer, is at the head of Wensleydale, high
among mountains in a most beautiful country,[102] and what, I think,
adds greatly to the charm of the country, very pleasing for the simplicity
and intelligence of the people. Among the enjoyments which I have here,
which notwithstanding Plato are really very great, I cannot help
remembering you at 115 Park Street. I wish you would venture to see
something more of the sights and sounds of nature. You will never
persuade me that your way of life is altogether the best for health any
more than I could persuade you into Mr. Gladstone's doctrine of the
salubrity of living over a churchyard.
As to the rest, I have no doubt that you could not be better than you
are. I don't wish to exaggerate (for you are the last person to whom I
should think of offering compliments), but I certainly believe that it has
been a great national good that you have taken up the whole question of
the sanitary condition of the soldier and not confined yourself to hospitals.
The difficulties and stupidities would have been as great in the case of the
hospitals, and the object really far inferior in importance. Besides you
could never have gained the influence over medical men with their
professional jealousies that you have had over the War Office and the
Indian Government. Also, if your life is spared a few years longer, a great
deal more may be done. There are many resources that are not yet
exhausted. Therefore never listen to the voice that tells you in a moment
of weariness or pain that you ought to have adhered to your old vocation.
I suppose there have been persons who have had so strong a sense of
the identity of their own action with the will of God as to exclude every
other feeling, who have never wished to live nor wished to die except as
they fulfil his will? Can we acquire this? I don't know. But such a sense of
things would no doubt give infinite rest and almost infinite power. Perhaps
quietists have been most successful in gaining this sort of feeling, but the
quietists are not the people who have passed all their lives rubbing and
fighting against the world. But I don't see why active life might not
become a sort of passive life too, passive in the hands of God and in the
fulfilment of the laws of nature. I sometimes fancy that there are
possibilities of human character much greater than have been realized,
mysteries, as they may be called, of character and manner and style
which remain to be called forth and explained. One great field for thought
on this subject is the manner in which character may grow and change
quite late in life.… [The rest of the letter is about the politics of the day.]
The passages which I have printed in italics are those which Miss
Nightingale had specially marked. “Can we help one another,” he
wrote in the following year (March 5, 1865), “to make life a higher
and nobler sort of thing—more of a calm and peaceful and never-
ending service of God? Perhaps—a little.” The marked passages
show in what way Miss Nightingale found in Mr. Jowett's friendship a
source of comfort, and a fresh inspiration towards her own spiritual
ideals. In her meditations of later years, a greater “passivity in
action” was the state of perfection which she constantly sought to
attain.
Mr. Jowett, as will have been noted, sought to reassure her about
her concentration for the most part upon work for the Army and for
India. And indeed she was herself intensely devoted to it, nor was it
ever deposed from a principal place in her thoughts and interests.
Yet there were times, as shown in a letter already quoted (p. 82),
when she felt that this work, insistently though it appealed to her,
though it was bound up with some of her fondest memories, was all
the while, if not a kind of desertion, yet at best only a temporary
call. Her first “call from God” had been to service in another sort,
and she was anxious to make peace with “those first affections.” In
January 1864 she sent these instructions to Mrs. Bracebridge, who
directed that if Miss Nightingale should survive her they were to be
handed on to Mrs. Sutherland:—
You know that I always believed it to be God's will for me that I should
live and die in Hospitals. When this call He has made upon me for other
work stops, and I am no longer able to work, I should wish to be taken to
St. Thomas's Hospital and to be placed in a general ward (which is what I
should have desired had I come to my end as a Hospital matron). And I
beg you to be so very good as to see that this my wish is accomplished,
whenever the time comes, if you will take the trouble as a true friend,
which you always have been, are, and will be. And this will make me die
in peace because I believe it to be God's will.
It was not so to be. But we shall find, on opening the next Part in
the story of Miss Nightingale's long life, that she was presently to
have time for helping forward the movement, which she had
promoted as a Reformer of Hospitals and as the Founder of Modern
Nursing, into a new and a wider field.
CHAPTER VI
NEW MASTERS
(1866)
The year 1866 was one of stirring events both at home and abroad.
It saw the downfall of the Whig Administration which, with a brief
interval (1858–59), had held office under different chiefs since
December 1852. In March Mr. Gladstone, now leader of the House of
Commons, introduced a Reform Bill, of which the fortunes were
uncertain owing to the dissent of the Adullamites under Mr. Lowe.
On April 27 the second reading was carried by a majority of five
only. On June 18 the Government was defeated in Committee on
Lord Dunkellin's amendment, and resigned. On the day before Lord
Russell's Government was defeated war was declared between
Austria and her allies on the one side, and Prussia and Italy on the
other. Prussia, armed with her new breech-loading gun, quickly
defeated Austria. The foundation of the future German Empire under
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebookname.com