15 lines
414 B
PowerShell
15 lines
414 B
PowerShell
|
|
Function Get-FileSystem($ComputerName){
|
|||
|
|
|
|||
|
|
#Checks if the path is accessible to the requested PC
|
|||
|
|
if(Test-Path \\$ComputerName\C$){
|
|||
|
|
|
|||
|
|
Test-Path -Path (ii \\$ComputerName\C$)
|
|||
|
|
Write-Host "Accessing -FileSystem [\\$ComputerName\C$]" -ForeGround Green
|
|||
|
|
|
|||
|
|
}else{
|
|||
|
|
|
|||
|
|
Write-Host "Could not connect to -FileSystem [\\$ComputerName\C$]" -ForeGround Red
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|