WizTree - User Profiles

Published: Jan 17, 2022 by Bertland Hope

Uses WizTree to retrieve a list of user profiles and how large they are.

Please consider purchasing an Enterprise License for WizTree.

Requirements

WizTree must be installed on the target.

# Parameters
## Verbose
Enables Verbose log messages.

[CmdletBinding()]
param (
)

. '.\WizTree Functions.ps1'

# Make sure WizTree is installed.
Test-WizTree

# Run WizTree.
# https://wiztreefree.com/guide#cmdlinecsv
$ArgumentList = '"{0}" /export="{1}" /admin=1 /exportfiles=0' -f "$env:SystemDrive\Users", "$PWD\$WizTreeOutput"
Invoke-WizTree -ArgumentList $ArgumentList

# Define the CSV processing code that is unique to each script.
$ScriptBlock = {

	# Locate user profiles.
	if ( ($FileName -split '\\').Count -eq 4 ) {

		[PSCustomObject]@{
			'Profile' = $FileName
			'Size'    = $Size
		}

	}

}

# Process the CSV.
Read-WizTreeCsv -ScriptBlock $ScriptBlock | Sort-Object -Property 'Size' -Descending

Share

Latest Posts

Clean old spooled documents.
Clean old spooled documents.

Requirements:

Must run as administrator

Active Directory One-Liners
Active Directory One-Liners

FSMO Roles

ntdsutilroles Connections “Connect to server %logonserver%” Quit “selectOperation Target” “List roles for conn server” Quit Quit Quit [JDH: This is really a series of steps, not a single command expression]

Deploy Office 365 (for IT Pros)
Deploy Office 365 (for IT Pros)

To download 32bit office

networkSharePath\office\Office365> .\setup.exe /download Configuration-32.xml

create a file save it as add the content below download Configuration-32.xml

<Configuration>
<Add OfficeClientEdition=”32” Channel=”Current” SourcePath=”networkSharePath\office\Office365\86” AllowCdnFallback=”FALSE”>
<Product ID=”O365BusinessRetail”>
<Language ID=”en-us” />
</Product>
</Add>
<Property Name=”SharedComputerLicensing” Value=”0” />
<Property Name=”SCLCacheOverride” Value=”0” />
<Property Name=”AUTOACTIVATE” Value=”0” />
<Property Name=”FORCEAPPSHUTDOWN” Value=”FALSE” />
<Property Name=”DeviceBasedLicensing” Value=”0” />
<Updates Enabled=”TRUE” />
<RemoveMSI />
<Display Level=”None” AcceptEULA=”TRUE” />
</Configuration>

To Remove 32bit Office

networkSharePath\office\Office365> .\setup.exe /configure uninstall-Office365ProPlus-32.xml

create a file save it as add the content below download uninstall-Office365ProPlus-32.xml
<Configuration>
<Remove OfficeClientEdition=”86”>
<Product ID=”O365BusinessRetail”>
<Language ID=”en-us”/>
</Product>
</Remove>
<Display Level=”None” AcceptEULA=”TRUE”/>
</Configuration>

To install 32bit

networkSharePath\office\Office365> .\setup.exe /configure Configuration-32.xml

<Configuration>
<Add OfficeClientEdition=”32” Channel=”Current” SourcePath=”networkSharePath\office\Office365\86” AllowCdnFallback=”FALSE”>
<Product ID=”O365BusinessRetail”>
<Language ID=”en-us” />
</Product>
</Add>
<Property Name=”SharedComputerLicensing” Value=”0” />
<Property Name=”SCLCacheOverride” Value=”0” />
<Property Name=”AUTOACTIVATE” Value=”0” />
<Property Name=”FORCEAPPSHUTDOWN” Value=”FALSE” />
<Property Name=”DeviceBasedLicensing” Value=”0” />
<Updates Enabled=”TRUE” />
<RemoveMSI />
<Display Level=”None” AcceptEULA=”TRUE” />
</Configuration>