Book a free callBook a call

PowerShell automation

The heavy lifting, scripted in PowerShell and counted item by item

When a migration or clean-up is too big, too unusual, or too tightly dated for a migration tool alone, we script it in PowerShell. Every item is counted in the source and the target, every run writes a line per item, and the same scripts run in testing and on the day.

SharePoint
2,551wiki pages rebuilt by our scripts, with no migration tool
PowerShell

One move, no migration tool2,551 pages and 3,540 files rebuilt by script; every unmatched link reported.

One move, no migration tool, all by script
  1. Read and countedEvery page, file, link, and image of the export, in a tracking database
  2. Rebuilt2,551 pages and 3,540 files, across 19 SharePoint sites
  3. Left behind on purpose498 pages and 509 files, still on the map
  4. Reported, not hiddenEvery link that did not match

From the MindTouch (NICE CXone) story: live on schedule, about three months after the first call.

One move, no migration tool, all by script
  1. Read and countedEvery page, file, link, and image of the export, in a tracking database
  2. Rebuilt2,551 pages and 3,540 files, across 19 SharePoint sites
  3. Left behind on purpose498 pages and 509 files, still on the map
  4. Reported, not hiddenEvery link that did not match

From the MindTouch (NICE CXone) story: live on schedule, about three months after the first call.

Countedevery item, source against target
Loggeda line per item, on every run
Repeatablethe same scripts in testing and on the day

Short answer: Scripting gives automation the most freedom and the most performance. A migration tool does what its makers planned for; a PowerShell script does what your content actually needs, at the pace SharePoint allows, and writes down everything it touched. We use licensed migration tools where they fit, and PnP PowerShell, the SharePoint REST API and our own scripts where they stop: for the count, the log, the unusual job, and the jobs no tool covers.

Is this you?

When scripting is the answer

Clients usually bring us one of these.

  • A platform being switched off, and no migration tool for it
  • A tenant too big for the usual tools to read
  • A date you cannot move, and no room for a surprise on the day
  • A fix across thousands of sites or libraries that nobody wants to click through
  • A migration that is called finished, and nobody can prove nothing is missing

Real project: A MindTouch (NICE CXone) wiki had no migration tool and a switch-off date. Our PowerShell read the export, rebuilt 2,551 pages and rewrote every link, and the company went live on schedule. Read the story →

How it works

From the first read to the last count

The timings shown are a typical shape for a scripted move; your own plan has your own dates.

  1. 1

    Read and count the source

    A script reads everything first: sites, libraries, pages, files, links and owners. You get the list, with counts, before anything moves, so decisions are made from facts.

    Typically week 1
  2. 2

    Run it against a test target

    The scripts run as often as needed against a test site or tenant. Each run is counted and logged, so the surprises turn up in testing, where they are cheap to fix.

    Typically weeks 1–4
  3. 3

    Run it for real, the same way

    Production runs use the same scripts and the same checks as the tests. Nothing new is tried on the day, which is how a hard date stays safe.

    On your date
  4. 4

    Count, report, and hand over

    Source against target, item by item, with anything unmatched reported, not hidden. You keep the scripts, the logs and the map.

    After every run, and at the end

What scripting gives you that a tool alone does not

Migration tools handle the common case well, and we resell and use them. The difference shows at the edges: the platform no tool supports, the tenant too big to read, the date that cannot move. That is where we write the script, and these are the results it has given our clients.

PowerShell script open in Visual Studio Code
Where the heavy lifting is written: a PowerShell script in Visual Studio Code.

Done means counted

Every library, list or table is counted in the source and in the target after each run. On one GCC High move a library of 167,030 items came back with 167,029, and the compare report found exactly which item, and why.

Test runs that protect the real date

The scripts are rehearsed against a test target until the runs come back clean. Barrett Firearms had several test rounds and a large-volume test before its go-live date; on the MindTouch move, a test that put links in the wrong folders was fixed in the code and both test sites were reimported that night.

A log line per item, and you keep it

Each run records what it created, what it skipped, and what it could not match. The MindTouch client kept those logs and a workbook mapping every old page and file to its new address, including what was left behind.

The jobs no tool covers

Barrett's Intelex system held SQL data, version history, attachments, approvals, reviews, and requests. Custom PowerShell extracted all of it, so 24,000 revisions and 35,500 approval actions arrived in SharePoint Online GCC High by the required go-live date.

Performance when the tenant is huge

On a 10,000-site tenant the first reporting script ran for hours and never finished. Rebuilt on lean SharePoint REST calls, our PowerShell read 5,000 items in 25 seconds instead of 81, with half the memory, and checked 14.3 million items in 36 minutes.

Questions

Questions about scripted work

Do you use migration tools or scripts?

Both. Licensed migration tools (we resell Quest) handle the common case well, and we use them where they fit. Scripts take over where a tool stops: a platform no tool supports, a tenant too big to read the usual way, and the count and the log at the end. On one GCC High move, Quest Content Matrix and PnP PowerShell ran side by side with our own scripts.

Do we keep the scripts and logs?

Yes. The logs, the counts and the map from old to new addresses are part of what you get, and so are the scripts we write for your job, documented, with a test mode you can run yourself.

Can you script fixes in our tenant without a migration?

Yes. Permission clean-ups, metadata and content types across many sites, and reports that read the whole tenant. On one 10,000-site tenant our scripts applied content types in 16 business-area jobs, and the client's IT team now runs the remaining sites with our configurations. The same rules apply: a preflight report first, a log line per item, and counts at the end.

We have a hard deadline. Does scripting help?

Yes, because a script can be rehearsed. We run it against a test target until it comes back clean, then run the same script on the day. A tight date does change the budget: we add people and work in parallel, so the estimate stays a range and the work runs on time and materials.

Not ready for a call?

PowerShell and migration guides, by email

How we count, log and rehearse a scripted move, and the PnP PowerShell setup we start from. Short guides, sent when we publish them.

Your email is used only for what you ask for. See our Privacy Policy.

Free 30-minute call

Talk to the people who would lead your scripted migration work

  • Free, 30 minutes, on Teams
  • Experienced SharePoint people, not a salesperson
  • A reply within 1 business day, normally within 4 hours
  • You leave with next steps, even if you never hire us
Book a free 30-minute callor call (866) 577-•••• · Monday–Thursday, 9:00 AM–5:00 PM Eastern
logoxferworx

Send your inquiries, service requests, and support needs.

Have questions or need assistance? Give us a call at (866) 577-7850 during business hours, and we'll be happy to assist you.

Monday to Thursday: 9:00 AM to 5:00 PM Eastern Friday, Saturday, and Sunday: Closed

XferWorx_Logo_NOArrows

EMAIL

Send your inquiries, service requests, and support needs.

PHONE

Have questions or need assistance?
Give us a call at (866) 577-7850 during business hours, and we'll be happy to assist you.

BUSINESS HOURS

Monday to Thursday: 9:00 AM to 5:00 PM Eastern
Friday, Saturday, and Sunday: Closed