I would just like to share a couple of PowerShell scripts to find the size of your local OneDrive folder. Note that this just looks at folders structures and does not interact with the OneDrive sync client or the OneDrive service. First, a one-liner to show the total files, ...
Appending Parent Folder, Current Folder onto file name Appending to file, getting error file is being used by another process; Application installation via Powershell Apply inheritance to "This object and all descendant objects" from powershell Applying Multiple conditions for each row in CSV file A...
Name Used (GB) Free (GB) Provider Root --- --- --- --- --- User 75.76 24.24 FileSystem C:\Users\ExampleUser PowerShell Copy Test-UserDrivePath -Path 'User:\A_folder_that_does_not_exist' Output Copy True ValidateTrustedData validation attribute This attribute is us...
The command includes a format file with an additional view to display the total size in KB, MB, GB, or TB.PS C:\> Get-ChildItem D:\ -Directory | Get-FolderSizeInfo -Hidden | Where-Object TotalSize -gt 1gb | Sort-Object TotalSize -Descending | Format-Table -View gb Computername Path...
Windows PowerShell Tip: Determining the Size of a Folder Windows PowerShell Tip: Displaying a Message in the Notification Area Windows PowerShell Tip: Filtering Collections With Regular Expressions Windows PowerShell Tip: Finding All the Empty Folders in a Directory Tree Windows PowerShell Tip: Forma...
Of course, that’s not quite the information you were looking for; what you were really hoping to get back was the Name, CreationTime, and Length (size) of each file in the folder C:\Test. But, hey, 2 out of 3 ain’t bad, right? Wrong. Why settle for 2 out of 3 when you ...
TheRecurseparametertells PowerShell to run the cmdlet for the main folder and all its subfolders. TheRemove-Itemcmdlet also uses theRecurseparameter; if you apply it, the cmdlet will remove the files and the folders. To limit the command to just files, use theFileparameter onGet-ChildItem,...
Set-FileTime Sets a file or folder's created and last accessed/write times. FileVersionInfo Get-FileVersionInfo Gets a FileVersionInfo object for the specified path. ForegroundWindow Get-ForegroundWindow Returns the hWnd or handle of the window in the foreground on the current desktop. See also...
Note:ReplaceDwith the drive letter assigned to download folder of the Window 11 ISO file. Enter the following command to attach the Windows 11 ISO file to the VM: Get-VMDvdDrive-VMName"Windows 11 VM" Enter the following command to setup the boot order: ...
File (F): An absolute folder or file path where the logs should be written. If the file name is not specified, it will default toDCacheAdminTrace[<ProcessId>].log, where<ProcessId>is the number of the Windows PowerShell session's Windows process ID.".log"is appended to all file names...