Server works fine but the disk that has the script i am running it I managed to get every disk but there is a problem every disk in my How do you plan to access to these servers ?.Well, i cannot answer this point because, as i told you in comments : #Display the report in your default browserĪlso i've managed the fact that you may not have any CDRom in the drive, so, to avoid to throw an exception i use : if(Test-Path $Path)Īnd for every server I have (I have a text file with all the server $Report | Sort RawSize -Descending | Select 'Folder Name',Owner,'Created On','Last Updated',Size | ConvertTo-Html -PreContent $Pre -PostContent $Post -Head $Header | Out-File -Append $ReportPath\FolderSizes.html $Post = "Total Space Used In ""$($Path)"": $TotSize" $Pre = "Folder Sizes for ""$Path"" on ""$comp_name"" Run on $(Get-Date -f 'MM/dd/yyyy hh:mm:ss tt')" Owner = (Get-Acl $FileObject.FullName).Owner 'Last Updated' = $FileObject.LastWriteTime $Script:Report = New-Object PSObject -Property Name' = $FileObject.FullName $Size = ($FSO.GetFolder($FileObject.FullName).Size) I want to be able to do this for every disk in my server and for every server I have (I have a text file with all the server names). I have the following script it does what I want, but only for one drive (that I have to specify), and on the server I am running it on.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |