Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getgroups ($object) {
- ### Example: getgroups -object somename.lastname | select name -unique
- Get-ADPrincipalGroupMembership $object | Foreach {
- $_
- Get-ADPrincipalGroupMembership $_
- }
- }
- function GetPortsandPrinters {
- $printers = Get-Printer
- foreach ($port in $(Get-PrinterPort)) {
- $printers | ? { $_.PortName -like $port.Name } | select Name,
- @{Name = 'Port Name'; Expression = {$port.Name}},
- @{Name = 'Host Address'; Expression = {$port.PrinterHostAddress}}
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement