If you have something boring/repetitive to do then Powershell is your friend! I needed to do this for a client that’s replacing their Office365/Azure AD MFA (Multi Factor Authentication) with Duo.
Solution
Connect to your Microsoft Services Online, i.e. Office365/Azure, using your administrative credentials with the following command;
[box]
Connect-MsolService
[/box]
Then (Note: I’ve got more than 1000 users so I need to add the MaxResults switch).
With Windows 7 (and earlier versions) you could simply find the startup folder from the start menu, now you don’t have one, (and its NOT on the Windows Key+X replacement menu either).
To open Your users Startup folder > Windows Key+R > shell:startup {Enter}.
To open the All users Startup folder > Windows Key+R > shell:common startup {Enter}.
This works because the startup folder is listed as a ‘Special Folder’. There are a LOT of special folders you can open in that way, They are all listed in the following registry key:
[box]HKLM > Software > Microsoft > Windows > CurrentVersion > Explorer > FolderDescriptions[/box]
AddNewProgramsFolder Administrative Tools AppData AppUpdatesFolder Cache CD Burning ChangeRemoveProgramsFolder Common Administrative Tools Common AppData Common Desktop Common Documents Common Programs Common Start Menu Common Startup Common Templates CommonDownloads CommonMusic CommonPictures CommonRingtones CommonVideo ConflictFolder ConnectionsFolder Contacts ControlPanelFolder Cookies CredentialManager CryptoKeys CSCFolder Desktop Device Metadata Store DocumentsLibrary Downloads DpapiKeys Favorites Fonts Games GameTasks History ImplicitAppShortcuts InternetFolder Libraries Links Local AppData LocalAppDataLow LocalizedResourcesDir MAPIFolder MusicLibrary My Music My Pictures My Video MyComputerFolder NetHood NetworkPlacesFolder OEM Links Original Images Personal PhotoAlbums PicturesLibrary Playlists PrintersFolder PrintHood Profile ProgramFiles ProgramFilesCommon ProgramFilesCommonX86 ProgramFilesX86 Programs Public PublicGameTasks Quick Launch Recent RecordedTVLibrary RecycleBinFolder ResourceDir Ringtones SavedGames Searches SearchHomeFolder SendTo Start Menu Startup SyncCenterFolder SyncResultsFolder SyncSetupFolder System SystemCertificates SystemX86 Templates User Pinned UserProfiles UserProgramFiles UserProgramFilesCommon UsersFilesFolder UsersLibrariesFolder VideosLibrary Windows
Related Articles, References, Credits, or External Links
A client asked this morning if there was a way he could see each users mailbox size, this is pretty simple to do see here. But he wanted to see each individual folder, and see a breakdown on the sizes of these folders.
Solution
Display Folder Sizes For an Individual User
From the Exchange Management Shell, execute the following command;
[box] Get-MailboxFolderStatistics pete | Select Identity,Name,FolderSize,ItemsinFolder | Export-Csv C:Petes_Folder_Size.csv[/box]
This will export to a CSV file in the location specified above.
Display Folder Sizes For All Users
From the Exchange Management Shell, execute the following command;