Get-PC/Private/FileSystem.ps1

15 lines
414 B
PowerShell
Raw Normal View History

2024-06-11 18:27:55 +00:00
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
}
}