external help file | Module Name | online version | schema |
---|---|---|---|
ComputerManagement-help.xml |
ComputerManagement |
2.0.0 |
Return a list of shares without using WMI
Get-NetShare [-ComputerName] <String> [-Type] <String> [<CommonParameters>]
This function returns a list of shares using the old net view command. This works well in situations where a fierwall may be blocking access.
Get-NetShare -ComputerName server-01 -Type Print
Server Share Path
------ ----- ----
server-01 hp01 \\\\server-01\hp01
server-01 hp02 \\\\server-01\hp02
server-01 hp03 \\\\server-01\hp03
This example shows the basic usage for this function
The name of the server that has file or print shares
Type: System.String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This will be either Print or Disk Print returns printer shares Disk returns file shares
Type: System.String
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
FunctionName : Get-NetShares Created by : jspatton Date Coded : 10/08/2014 11:08:30