powershellscripts.com

PowerShell Logo


90 results found for the Storage Category in about 0.016 seconds
A process which adds rights to a Archive location

http://gallery.technet.microsoft.com/A-process-which-adds-c860d5b0

Add DIR Capabilities to the Get-ChildItem Cmdlet

http://gallery.technet.microsoft.com/9fdb628b-d493-4c55-a3b1-247987a902ca

Apply Quota based on AD Group
Apply a quota template based on AD group membership on a FSRM server.
http://gallery.technet.microsoft.com/8fcd9a90-5a3d-40a4-aff7-53d4919e322a

Check a location for a specific ACL
Check a file location for acl's containing a group name.Just log if an acl is present for the group I'm searching for. You could easily add code to the ACL not found section but I wanted to keep it basic to help others follow.Just update $DirectoryList for the location and $Group
http://gallery.technet.microsoft.com/Check-a-location-for-a-414e74f2

Clean-Temp
Cleaning the temp folder
http://gallery.technet.microsoft.com/9b198835-8d25-4bdb-a92c-cb210ebd3269

Close Open Files with Windows Powershell
Leverage HANDLE.EXE from Sysinternals to AUTOMATICALLY search and close files in Windows. Supports Piping
http://gallery.technet.microsoft.com/79e3a8d3-fe68-4e6a-b41e-1fd22539e264

Compare Directories of Files
Take specific file types in two directories and compare their contents
http://gallery.technet.microsoft.com/b1b1a4d1-c349-4b58-b083-89ff26acdce2

Convert byte counts to Bytes/KB/MG/GB/TB with selectable precision
Automatically formats a byte count as Bytes, KB, MB, GB or TB, with selectable decimal precision.
http://gallery.technet.microsoft.com/6a656d34-3e8f-4473-ad1b-c8d4ae8a47ca

Copy a File Using Windows PowerShell

http://gallery.technet.microsoft.com/1769e33f-7905-41ef-9a59-4002abfbd97a

Crawl directory structure looking for blocked or changed inheritance
Crawls a directory structure looking for blocked or changed permission inheritance or missing direcory permissions.
http://gallery.technet.microsoft.com/719bda46-6ce3-4783-b128-6224bd245467

Create a Folder Using Windows PowerShell.

http://gallery.technet.microsoft.com/cc94d4ab-44c6-45a4-abf4-3e28b0429f15

Create a Share and Set Permissions
Add a new share using PowerShell and WMI.  Also initially sets the share security.  The default is to set the share to "Read" and to the current user.This code was migrated from PowerShell V1 version as an Advanced Function/Script.  It supports -verbose and -debug as well as help
http://gallery.technet.microsoft.com/Create-a-Share-and-Set-eb177a79

Create folders from a csv file
This is a basic script to create folders from a csv file. It reads teh contents of a file into an array and then does a for each to create the follders. I plan to add set-acl to the script later so I can set permissions.
http://gallery.technet.microsoft.com/472300a7-9706-44df-a2a1-a85c4e6ebd13

Delete All Files in a Several Directorys Older than a Specified Number of Days
Delete all files in several directorys that you don't need to keep after a specified number of days. Using PowerShell.
http://gallery.technet.microsoft.com/8a814d04-4cf7-4ec6-9a78-3fe0a01db6c1

Delete All the Subfolders of a Folder
Windows PowerShell script that deletes all the subfolders in a specified folder.
http://gallery.technet.microsoft.com/29746cd1-4257-41e4-81a4-10ae0f590c57

Disconnect-FileSessions
Allows the ability to remotely or locally disconnect active or inactive file sessions on a system.
http://gallery.technet.microsoft.com/b3d5b48c-42f3-4e5a-a8ac-d1410de9404d

Disk Space Report - Reports only disks that are below a threshold - HTML output.
I have created a Powershell script to report on a list of server's disks space.  Unlike most reports out there, this one only reports on those disks that are below the set thresholds.  My previous attempt at this saved the results to a CSV file, attached to an email and sent out
http://gallery.technet.microsoft.com/Disk-Space-Report-Reports-98e64d65

Disk Usage Analyser
This script will simulate Sysinternal's DU.exe.  Disk Usage Analyser will list all directories below the one you specify, and summarize them, giving you the total size, folder count, and the file count for each sub-directory found. You can filter on file type for reports.
http://gallery.technet.microsoft.com/Disk-Usage-Analyser-e4b05c1d

Drive Space Warnings Across Network
Script will read from a text file a list of computers which you want to identify the amount of free disk space on various logical volumes then email the report to an address you specify. Only test on XP and Server 2003 but should also work for Vista, 2008, and 7
http://gallery.technet.microsoft.com/538b87f3-6d8b-47ac-a940-30d0d6dad117

Export and Import Fileshares
Export and Import File Shares and set Share Permissions
http://gallery.technet.microsoft.com/Export-and-Import-84d4fce1

File cleanup/rotation
General purpose file rotation and deletion. Handles multiple cleanup jobs, logs and alerts on run results and errors, and does "whatif" modeling to see what effect a job configuration will have on a directory.
http://gallery.technet.microsoft.com/b50347d4-6f60-4716-87ba-ee4166359fa1

File Replication Validation Utility
A handy validation tool for checking the health of your file replication implementation.
http://gallery.technet.microsoft.com/File-Replication-0036f618

FIleManagement.ps1
A collection of functions to work with files.
http://gallery.technet.microsoft.com/6c817b11-0c33-4444-93e5-0a8a51a06c64

Find Large Space Consuming Folders on your System
This script finds large folders on your system, and displays the amount of space being consumed by them.
http://gallery.technet.microsoft.com/36bf0988-867f-45be-92c0-f9b24bd766fb

Folder Size Calculation
The script shows you the TOP 5 folders by size for a folder on your windows server or a UNC share. It can also list you the TOP 5 folders for any specific extensions.
http://gallery.technet.microsoft.com/5af60ffd-05c4-463d-bac9-63183347148f

Get Disk Drive Function
This is an advanced powershell function that returns size, free space, percent free space, page file status, and other information about a disk drive.
http://gallery.technet.microsoft.com/b0495304-90eb-4909-8079-1f38d4c20e05

Get File MetaData
Displays a files meta data. This includes custom properties associated with Word, Excel, ETC. types of files.
http://gallery.technet.microsoft.com/c3d0ea6c-64a1-4716-a262-bcd71c9925fc

Get Share permissions and Share NTFS permissions
Contains two functions that can be used together to view the Share permissions and the NTFS permissions on each share on a server or servers.
http://gallery.technet.microsoft.com/a231026a-3fdb-4190-9915-38d8cd827348

Get Share Users
This script, is discussed in detail on the Hey Scripting Guy blog. It is discussed on the Saturday November 26, 2011 article, "Use PowerShell to find out who has permissions to a share." There are three variables that will need to be modified: $cred, the user credentials, $share,
http://gallery.technet.microsoft.com/Get-Share-Users-3866a711

Get Share Users (rev2)
This function returns the user name and sid of people who have permissions to a share. It works locally or remotely. When working remotely, it will accept alternate credentials. This function is an advanced function, and therefore it accepts pipelined input. I use splatting to de
http://gallery.technet.microsoft.com/Get-Share-Users-rev2-6b84f5aa

Get-DFSRBacklog
PowerShell script that uses Windows Management Instrumentation (WMI) to retrieve DFSR backlog for replication groups of the targeted server. All of this information is returned in an array custom objects, that can be later processed as needed.
http://gallery.technet.microsoft.com/dac62790-219d-4325-a57b-e79c2aa6b58e

Get-FreeDiskSpace

http://gallery.technet.microsoft.com/a8ac6909-1425-4288-8088-2bc315bb7320

Get-PathType
Determine if a path is a file or a folder.
http://gallery.technet.microsoft.com/0740ec9d-61f1-4643-88f7-cd1d1f95106e

Get-VolumeFreeSpace
Here is an example function to return free space remaining on a volume with associated details.  Usage Examples:Get-VolumeFreeSpace|ftGet-VolumeFreeSpace|Select ComputerName,Name,MountPoint,FreeSpaceGiB|ftGet-VolumeFreeSpace|Where-Object {!$_.SystemVolume}|Select ComputerName,Nam
http://gallery.technet.microsoft.com/Get-VolumeFreeSpace-82f4387e

hard drive report to html
This script will get a list of computers and output the hard drive information to a pretty html file. You can also just specify the computer(s) on the command line or use a list of computers. Browser will open with the report when completed. drivereport.htm file saved to same lo
http://gallery.technet.microsoft.com/hard-drive-report-to-html-b8fbecb8

Is CHKDSK Dirty Bit Set on a server

http://gallery.technet.microsoft.com/57076851-97fb-4af6-8c5c-1e34156ceab4

Items Rotator
The Function Make-ItemRotate allow to rotate items in specific location that name start like specific prefix. It have a simple versioning system for hold old copies based on the last write date, or simply numbering the next version.
http://gallery.technet.microsoft.com/Items-Rotator-9a22d8db

List All the Folders on a Computer
Returns a list of all the folders on a computer. This can take 15 minutes or more to complete, depending on the number of folders on the computer. This script requires both Window
http://gallery.technet.microsoft.com/826b1a8c-9a64-4ea0-96a6-00f5c2964111

List AutoChk Settings on a Computer
Lists information about how Autochk has been configured on a computer. This script requires both Windows PowerShell and the corresponding version of the .NET Framework. For more
http://gallery.technet.microsoft.com/6113848c-cf76-4714-aebf-a57efdaf9a7a

List CD-ROM Properties
Returns information about all the CD-ROM drives installed on a computer. This script requires both Windows PowerShell and the corresponding version of the .NET Framework. For mor
http://gallery.technet.microsoft.com/292ee5d7-047d-4bf6-990f-3d0fdf081107

List Disk Partition Properties
Lists the properties of all the disk partitions on a computer. This script requires both Windows PowerShell and the corresponding version of the .NET Framework. For more informat
http://gallery.technet.microsoft.com/a4f06bed-65ee-426a-9aaa-a21a4b04c963

List Disk Quota Entries
Enumerates disk quota information (including user name, warning and quota limits, and disk space used) for each disk quota entry on a computer. This script requires both Windows P
http://gallery.technet.microsoft.com/e99fa3d8-78c3-4911-b7f0-e78d4f17e23a

List Disk Quota Settings
Enumerates the disk quota settings for each drive on a computer. This script requires both Windows PowerShell and the corresponding version of the .NET Framework. For more inform
http://gallery.technet.microsoft.com/81de763e-72e1-4c47-a06b-d6e6d0f7e876

List Floppy Controller Information
Retrieves information about all the floppy drive controllers found on a computer. This script requires both Windows PowerShell and the corresponding version of the .NET Framework
http://gallery.technet.microsoft.com/554ce3fe-0fb5-49d1-8198-9d557c5a91c6

List Floppy Drive Information
Returns information about all the floppy disk drives installed on a computer. This script requires both Windows PowerShell and the corresponding version of the .NET Framework. Fo
http://gallery.technet.microsoft.com/043f22d3-be9d-489d-9228-de4082111705

List IDE Controller Information
Retrieves information about all IDE controllers found on a computer. This script requires both Windows PowerShell and the corresponding version of the .NET Framework. For more in
http://gallery.technet.microsoft.com/1ca9026b-66f1-4bbb-a7e4-af02445812d3

List Logical Disk Drive Properties
Lists the properties for all the logical disk drives on a computer. This script requires both Windows PowerShell and the corresponding version of the .NET Framework. For more inf
http://gallery.technet.microsoft.com/7586af00-784f-4a06-ab0d-a3c972019826

List Mapped Network Drives
Retrieves information about mapped network drives. The information returned is similar to that available through the Win32_LogicalDisk class, which retrieves information about the
http://gallery.technet.microsoft.com/04ccf01f-429c-4607-804c-c68f0aa674c7

List Network Shares
Lists all the shared folders on a computer. This script requires both Windows PowerShell and the corresponding version of the .NET Framework. For more information on downloading
http://gallery.technet.microsoft.com/4bfd63e3-1352-43fa-bcd1-25c752cb0a1c

List Physical Disk Properties
Retrieves the properties for all the physical disk drives installed on a computer. This script requires both Windows PowerShell and the corresponding version of the .NET Framewor
http://gallery.technet.microsoft.com/feb9341a-fd0a-47af-adff-e3ae33071a22

List SCSI Controller Information
Returns information about all the SCSI controllers found on a computer. This script requires both Windows PowerShell and the corresponding version of the .NET Framework. For more
http://gallery.technet.microsoft.com/4fce3464-80e2-42b5-bfe1-9a80d08d3ddb

List Share Permissions
This little script will enumerate all the shares on a computer, and list the share-level permissions for each share.  It uses WMI to retrieve the shares, and to list the permissions.  Thanks to Michal Gadja for his input (via the Library).
http://gallery.technet.microsoft.com/List-Share-Permissions-83f8c419

List Tape Drive Information
Lists information about all the tape drives installed on a computer. This script requires both Windows PowerShell and the corresponding version of the .NET Framework. For more in
http://gallery.technet.microsoft.com/508cf491-9cc7-48f6-a835-29a3a8559138

List the Files in a Directory Using Windows PowerShell

http://gallery.technet.microsoft.com/e789e7f7-41ef-4314-977c-51d98bde5234

List the Five Most-Recently Modified Files in a Folder
Lists the five most-recently modified files in a folder.
http://gallery.technet.microsoft.com/645332d8-e3fa-45b0-a5fa-56d436f65922

List the free space of all drives for several machines
List for several machines all drives with size, free size and the percentage of free space. Optional you can send the result as html or plain text report by smtp e-mail.
http://gallery.technet.microsoft.com/List-for-several-machines-1baf6df0

List USB Controller Information
Returns information about all the USB controllers found on a computer. This script requires both Windows PowerShell and the corresponding version of the .NET Framework. For more
http://gallery.technet.microsoft.com/fc2d92ce-a241-47bf-a5ea-3395d301559e

List USB Hub Information
Returns information about all the USB hubs found on a computer. This script requires both Windows PowerShell and the corresponding version of the .NET Framework. For more informa
http://gallery.technet.microsoft.com/5e2b2a59-84ec-4df2-a61d-70a6bf739578

Logical Drive Information
You can use this PowerShell script to collect logical disk space information from remote computers.
http://gallery.technet.microsoft.com/e7abddb7-4714-46dc-9386-bdd796139a92

Mount Point Free Space

http://gallery.technet.microsoft.com/30f4de57-004d-4555-bb52-9e63d57b969c

Move-UserFolders
A function for moving user folders to an archive or old folder.
http://gallery.technet.microsoft.com/de977f8a-fe55-4111-b8ba-fade0f98f8e0

New-IscsiDriveMaps.ps1
This script originally appeared on this blog (http://blogs.technet.com/b/mpsc_dynamic_it/archive/2010/01/30/using-powershell-remoting-iscsicli-exe-to-connect-your-clustered-shared-volumes.aspx).This script will map an iSCSI target to one or more servers based on a spreadsheet tha
http://gallery.technet.microsoft.com/New-IscsiDriveMapsps1-36cd237f

Organize Photo Directories
Organize photos and videos using Live Gallery and PowerShell
http://gallery.technet.microsoft.com/14b6b4c0-0b42-4311-971a-28d737a4f5ae

pirate
pirate
http://gallery.technet.microsoft.com/b5b413f2-c93e-4dde-acf7-c9592bc1d4c9

Powershell 'Map' utility to display drive information
This function, called 'Map', will report on all logical drives on the local or remote computer, in text format. 
http://gallery.technet.microsoft.com/Powershell-Map-utility-to-444c1c95

POWERSHELL - DISKSPACE GUI TOOL
Powershell Diskspace GUI Tool.
http://gallery.technet.microsoft.com/5a8c5f1d-a2ab-4479-badb-3a5ca41eb74b

Powershell Disk Space of your Servers Web HTML (Espace disque WMI)

http://gallery.technet.microsoft.com/d5ef53ad-4906-4d16-a33a-634c84b6d4f2

Powershell DiskSpace HTML Report - Module

http://gallery.technet.microsoft.com/d1c6b44e-060e-421a-8d9e-7ffcbe1be11d

Powershell FileSystemWatcher
This script uses the .net FileSystemWatcher class to subscribe to 'create', 'change' and 'delete' events on files or folders in the NTFS filesystem.It can be used to monitor a folder or folders, and can be modified to perform any action upon the triggering of these events. 
http://gallery.technet.microsoft.com/Powershell-FileSystemWatche-dfd7084b

Powershell Script to Calculate and compare filehashes for DFSR Pre-Staging

http://gallery.technet.microsoft.com/1de44cc1-ce79-4e98-9283-92548fc02af9

PowerShell: Take the structure of a directory and its files to xml file
This simple script prompts the user to select a folder and browse through to take the files and folders to create an XML with the folder structure and files.Este simple script solicita al usuario que seleccione una carpeta y navega a traves de el para tomar los archivos y carpeta
http://gallery.technet.microsoft.com/PowerShell-Take-the-240be7ed

PS Shared Session Manager
The PSSharedSession module allow you to manage session on File Serwer. It allow to list session to shared folders and open files on shared location. Additionally script allow to basic close session and opened files – this solution is not perfect but it should suffice.
http://gallery.technet.microsoft.com/PS-Shared-Session-Manager-d94fbf5d

Remotely scan disk

http://gallery.technet.microsoft.com/Remotely-scan-disk-dd4fc267

Remove old files from directories [Update]

http://gallery.technet.microsoft.com/Remove-old-files-from-053499f9

Remove Specific User's Share Permission
Remove specific user from share folder's share permission list
http://gallery.technet.microsoft.com/f5af9db4-da0c-414a-b422-8e727652e550

Remove-EmptyFolders (Powershell function)
This function will remove all folders that are completely empty.  If a folder has no files, but has sub-folders with files, the parent folder will not be deleted.  Only completely empty folder chains will be deleted.
http://gallery.technet.microsoft.com/Remove-EmptyFolders-0452ea91

Rename a Set of Folders Based on Information in a Spreadsheet

http://gallery.technet.microsoft.com/0ad32fbc-4174-43a7-af20-82417bf8fd3e

Repair Profile Store
This is a script to repair my profile store - as both the profile folder and the username match I was a little lazy but hey it worked for me ;o) I have found using takeown and icacls but easyier than using get-acl and set-acl so I external call those programs to take ownership, r
http://gallery.technet.microsoft.com/Repair-Profile-Store-076cb750

Report file system disk space usage for multiple machines
Report file system disk space usage of one or multiple computers using WMI. Reported data contains machine name, caption, label, capacity, used space and percentage free per volume. Output can be filtered to display only volumes w/ less than x% free space.
http://gallery.technet.microsoft.com/da3fee00-e79d-482b-91f2-7c729c38068f

Script to check file properties
 This script grabs a list of server names from a text file and pings those machines. It then searches for a file on the computers listed in the input file and writes the machinename, filename, filesize, file/productversion and last write time to a .csv. Log file is auto-generated
http://gallery.technet.microsoft.com/Script-to-check-file-c86b0379

Script to fix issues described in KB947222 (PowerShell)
This Windows PowerShell script will modify the file permission, and fix fix issues described in KB947222.
http://gallery.technet.microsoft.com/Script-to-fix-issues-ab9a639d

Script to test for the DefragAnalysis or status of volumes
This script will report the Defrag status of servers.
http://gallery.technet.microsoft.com/8eaee5d9-a176-4690-b54d-274d31620da1

Set Quota based on Group Membership
with this script ou can set a quota based on group membership with FSRM.
http://gallery.technet.microsoft.com/162ded14-be29-4ca6-bfaa-dde35e08a798

Share All Sub-Folders Within a Directory

http://gallery.technet.microsoft.com/Share-all-sub-folders-f44743e9

Show Partition free space on remote server
Shows free space on remote server partitions
http://gallery.technet.microsoft.com/8a6f9f58-5fcc-4f21-a28f-b40a555e0bfc

showdisk - monitor disk usage on a list of computers
The script gathers information on hard disk usage from a list of servers. Disks with less than 20 % free space are highlighted - yellow for 10-20 % and red for <10 %
http://gallery.technet.microsoft.com/bbc79828-71ef-4291-b5cc-92da285a4eba

Storage I/O Performance Tester
This PoSh script executes SqlIo with all permutations of all given test parameters,collects the measures from the output and returns them as tables.You can use this also as a stress test for you storage.The result contains IO+MB per sec and latence times;also a histogram.
http://gallery.technet.microsoft.com/Storage-IO-Performance-d628bad9

time effecient defrag on multiple servers from a txt file
This scripts defrags multiple volumes on multiple servers in the same time using PS background jobs , servers are imported from a txt file of server names
http://gallery.technet.microsoft.com/fc687f47-bac9-4168-8986-ef4b99d12466

Use Windows PowerShell to Verify the Existence of a File

http://gallery.technet.microsoft.com/ed6e0518-5724-4c38-822b-cbc9dbd932bd

Verify Whether or Not a Directory Exists Using Windows PowerShell

http://gallery.technet.microsoft.com/10f2a1e3-cbd6-4d62-a196-22b943884d50