From b4c96521fdf59736468e8f9f3359af323de3ab0b Mon Sep 17 00:00:00 2001 From: JacFearsome Date: Tue, 19 Jun 2018 11:28:07 -0400 Subject: [PATCH] Added report functions --- .vs/VSWorkspaceState.json | 6 + .vs/powershell-scripts/v15/.suo | Bin 0 -> 15360 bytes .vs/slnx.sqlite | Bin 0 -> 94208 bytes Report-Functions.ps1 | 294 ++++++++++++++++++++++++++++++++ 4 files changed, 300 insertions(+) create mode 100644 .vs/VSWorkspaceState.json create mode 100644 .vs/powershell-scripts/v15/.suo create mode 100644 .vs/slnx.sqlite create mode 100644 Report-Functions.ps1 diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json new file mode 100644 index 0000000..6b61141 --- /dev/null +++ b/.vs/VSWorkspaceState.json @@ -0,0 +1,6 @@ +{ + "ExpandedNodes": [ + "" + ], + "PreviewInSolutionExplorer": false +} \ No newline at end of file diff --git a/.vs/powershell-scripts/v15/.suo b/.vs/powershell-scripts/v15/.suo new file mode 100644 index 0000000000000000000000000000000000000000..aa64211753ee91a6ae241a38adf12b2fc02d3868 GIT binary patch literal 15360 zcmeG@U6bQhR_aNz$!ro}cZOjJA!$Nb7Cg2kTe9WZ%n-?z+U;*!{!WKPmSkJDEZLIm zc6Vle0MzoZ6jkg4P(>ANQB(n&UqG>W;)PJf8&ALwfVX|ygmYx8$KBKJ_PA#@$?hE2 zk*==pz2}~D&$;*9tK)zF^c(;6*B`(3-^3ZXM?6P-_W5<3E*V;kxaQKi2aR=YK!#-~I9TpZzrepWlG;Z!YWn z7Tn(g{B6Lu0e=VZ+kn3d_#MFC1N?o!0N`!FAYceE3`hb}fDynbAPvX>#sK4hEMNlg z4&ZkI-vPV}cn|Oo0N(}V0C~V9Ux+@)pO z=NIoy$ZMU+e;=Oza3v3leW8#752Hg&!S6xO$0i!!_n_C~ECx7p`PV1XeAANO%dt3N_??F9Z{zVx50dU>}{;*|iSM#n8QTHs!BeVAM7SP8z z1LuoP<&WzM+B8BExRgPrNKFU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QsmCdp zmJ=Wg?fK-wb5||nkcIYqGWxxZoJMa+LKfQd$;vN|nzNoQV|>eDbUyi`p37|62V$Z< zy{wU-VQ4A!Y9g%g3a$mT?1dxe+N+70W*CAX?Wtr9^9JGkxb{@C0be9IjgC$w&qD4J zkQzFrJcB?T52v`br@tPA7kWK<$Q1v?r7e1nOAGM0-M6 z!;@WbR2-d9o>8EVfh@G=lMNVmG-RPYpR5t6qaX|I`D853D=>~y9=Z|M0P}|s+ zDRdtBBeS3rN~%4rtYN_xC@DIvESJ=P1)Cu@I<+j z&<-p>r;}&Ff;LDEomQTqnCsyljrNSPrkE}K$|-b4SveP~UCHO2b#7S)>7dif26b8s zw|UU%WVsXub!z5ore=34xn&KIqEpGUsD1=U(dpw^kivQFDRc^1E~CM8*2H+G&}n3u z#GuU^8TS-Al`Jzs!^{R|*%UgB`~jnnA2LDbkL64ZMxT1f1f4IIGto%TYNl!mohzPk z^zlI!=!CJHg+X(8Aq#ZUSk6K-`qV)d=!CJHh2iM43Mz|E6w8%W?<;5y8!{~`nUz!8 zv&1u9U1+IgHcX+j#2@`+cFS@Yce^18x#k8fxD3YKZ9pQ|T+@O}A*f3eq~UuNB)nCV zumMXeh2Yc?K$3fv#pn!;5sqo`2n|!65b?tt>26s9*LAl*B&F+Ww`B637;Awi#-=vU zmbe0lH_euKJ`i`zme>u%?Xx8==bNV5fH?QqhrzE81}LV5XO~TFglMv0_9?$j_*5^m zehFJO)e2;?kSpi$G#9Jam(O)iZ2%%!RMhEVec9X*)o{rouoxGe6fZ1%8Hr LY$krLT`2x9s%5ce literal 0 HcmV?d00001 diff --git a/Report-Functions.ps1 b/Report-Functions.ps1 new file mode 100644 index 0000000..bc343bc --- /dev/null +++ b/Report-Functions.ps1 @@ -0,0 +1,294 @@ +$style = @" + +"@ + +function Generate-ADUserPasswordReport() { +[cmdletBinding()] +param( + [parameter(Mandatory=$true,ValueFromPipeline=$true)] + [System.String]$FileName, + [parameter(Mandatory=$false)] + [Management.Automation.PSCredential] $Credential +) + +process { +if ($Credential -ne $null) { + $users = Get-ADUser -Filter * -Credential $Credential -Properties "UserPrincipalName","SamAccountName","DisplayName","LastLogonDate","PasswordLastSet","LastBadPasswordAttempt","PasswordNeverExpires","LockedOut","PasswordExpired","PasswordNotRequired","BadLogonCount","badPwdCount","CannotChangePassword","logonCount" | Select-Object * -ExcludeProperty DistinguishedName,GivenName,ModifiedProperties,PropertyCount,RemovedProperties,AddedProperties,PropertyNames,Surname,SID,ObjectGUID,ObjectClass +} else { + $users = Get-ADUser -Filter * -Properties "UserPrincipalName","SamAccountName","DisplayName","LastLogonDate","PasswordLastSet","LastBadPasswordAttempt","PasswordNeverExpires","LockedOut","PasswordExpired","PasswordNotRequired","BadLogonCount","badPwdCount","CannotChangePassword","logonCount" | Select-Object * -ExcludeProperty DistinguishedName,GivenName,ModifiedProperties,PropertyCount,RemovedProperties,AddedProperties,PropertyNames,Surname,SID,ObjectGUID,ObjectClass +} + +$usersHtml = $users | Select-Object * | ConvertTo-Html -Fragment -PreContent "

Active Directory Users - Password Information

" + +$title = "AD Users - Password Information" + +ConvertTo-Html -Head "$title$style" -Body "$searchbar$usersHtml" | Out-File $FileName + +} +} + +function Generate-ADUserReport() { +[cmdletBinding()] +param( + [parameter(Mandatory=$true,ValueFromPipeline=$true)] + [System.String]$FileName, + [parameter(Mandatory=$false)] + [Management.Automation.PSCredential] $Credential +) + +process { +if ($Credential -ne $null) { + $users = Get-ADUser -Filter * -Credential $Credential -Properties "UserPrincipalName","SamAccountName","DisplayName","EmailAddress","Title","BadLogonCount","badPwdCount","CannotChangePassword","CanonicalName","Company","Country","Created","Department","Description","Enabled","GivenName","HomeDirectory","HomePhone","LastBadPasswordAttempt","LastLogonDate","LockedOut","logonCount","mail","Manager","Modified","Name","Office","OfficePhone","PasswordExpired","PasswordNeverExpires","PasswordNotRequired","primaryGroupID","ProtectedFromAccidentalDeletion","PasswordLastSet" | Select-Object * -ExcludeProperty ModifiedProperties,PropertyCount,RemovedProperties,AddedProperties,PropertyNames,ObjectClass +} else { + $users = Get-ADUser -Filter * -Properties "UserPrincipalName","SamAccountName","DisplayName","EmailAddress","Title","BadLogonCount","badPwdCount","CannotChangePassword","CanonicalName","Company","Country","Created","Department","Description","Enabled","GivenName","HomeDirectory","HomePhone","LastBadPasswordAttempt","LastLogonDate","LockedOut","logonCount","mail","Manager","Modified","Name","Office","OfficePhone","PasswordExpired","PasswordNeverExpires","PasswordNotRequired","primaryGroupID","ProtectedFromAccidentalDeletion","PasswordLastSet" | Select-Object * -ExcludeProperty ModifiedProperties,PropertyCount,RemovedProperties,AddedProperties,PropertyNames,ObjectClass +} + +$usersHtml = $users | Select-Object * | ConvertTo-Html -Fragment -PreContent "

Active Directory Users

" + +$title = "AD Users" + +ConvertTo-Html -Head "$title$style" -Body "$searchbar$usersHtml" | Out-File $FileName + +} +} + +function Generate-ADGroupReport() { +[cmdletBinding()] +param( + [parameter(Mandatory=$true,ValueFromPipeline=$true)] + [System.String]$FileName, + [parameter(Mandatory=$false)] + [Management.Automation.PSCredential] $Credential +) + +process { +if ($Credential -ne $null) { + $groups = Get-ADGroup -Filter * -Credential $Credential +} else { + $groups = Get-ADGroup -Filter * +} + +$groupsHtml = $groups | Select-Object Name,GroupCategory,GroupScope | ConvertTo-Html -Fragment -PreContent "

Active Directory Groups

" + +$title = "AD Groups" + +ConvertTo-Html -Head "$title$style" -Body "$searchbar$groupsHtml" | Out-File $FileName +} +} + +### Generate AD Computer Report ### +function Generate-ADComputerReport() { +[cmdletBinding()] +param( + [parameter(Mandatory=$true,ValueFromPipeline=$true)] + [System.String]$FileName, + [parameter(Mandatory=$false)] + [Management.Automation.PSCredential] $Credential +) + +process { +# Grab list of computers in Active Directory +if ($Credential -ne $null) { + $servers = Get-ADComputer -Filter * -Credential $Credential +} else { + $servers = Get-ADComputer -Filter * +} +# Convert list to HTML +$serversHtml = $servers | Select-Object DNSHostName,Enabled,Name,ObjectClass,ObjectGUID,SamAccountName | ConvertTo-Html -Fragment -PreContent "

Active Directory Computers

" + +# Create HTML file +$title = "AD Computer List" + +# Convert everything to HTML and output to file +ConvertTo-Html -Head "$title$style" -Body "$searchbar$serversHtml" | Out-File $FileName +} +} + +### Generate AD Computer Network Report ### +function Generate-ADComputerNetworkReport() { +[cmdletBinding()] +param( + [parameter(Mandatory=$true,ValueFromPipeline=$true)] + [System.String]$FileName, + [parameter(Mandatory=$false)] + [Management.Automation.PSCredential] $Credential +) + +process { +# Grab list of computers in Active Directory +if ($Credential -ne $null) { + $servers = Get-ADComputer -Filter * -Credential $Credential +} else { + $servers = Get-ADComputer -Filter * +} +$serversNet = @() + +foreach ($server in $servers) { + Write-Host "Testing "$server.DNSHostName + $results = Test-Server -ComputerName $server.DNSHostName + $serversNet += $results +} + +$serversHtml = $serversNet | ConvertTo-Html -Fragment -PreContent "

AD Computers - Network Status

" + +# Create HTML file + +$title = "AD Computer List - Network" + +# Convert everything to HTML and output to file +ConvertTo-Html -Head "$title$style" -Body "$searchbar$serversHtml" | Out-File $FileName +} +} + +# This is not my original work, I downloaded it to use with GetFailed.ps1 +Function Test-Server{ +[cmdletBinding()] +param( + [parameter(Mandatory=$true,ValueFromPipeline=$true)] + [string[]]$ComputerName, + [parameter(Mandatory=$false)] + [switch]$CredSSP, + [Management.Automation.PSCredential] $Credential) + +begin{ + $total = Get-Date + $results = @() + if($credssp){if(!($credential)){Write-Host "must supply Credentials with CredSSP test";break}} +} +process{ + foreach($name in $computername) + { + $dt = $cdt= Get-Date + Write-verbose "Testing: $Name" + $failed = 0 + try{ + $DNSEntity = [Net.Dns]::GetHostEntry($name) + $domain = ($DNSEntity.hostname).replace("$name.","") + $ips = $DNSEntity.AddressList | %{$_.IPAddressToString} + } + catch + { + $rst = "" | select Name,IP,Domain,Ping,WSMAN,CredSSP,RemoteReg,RPC,RDP + $rst.name = $name + $results += $rst + $failed = 1 + } + Write-verbose "DNS: $((New-TimeSpan $dt ($dt = get-date)).totalseconds)" + if($failed -eq 0){ + foreach($ip in $ips) + { + + $rst = "" | select Name,IP,Domain,Ping,WSMAN,CredSSP,RemoteReg,RPC,RDP + $rst.name = $name + $rst.ip = $ip + $rst.domain = $domain + ####RDP Check (firewall may block rest so do before ping + try{ + $socket = New-Object Net.Sockets.TcpClient($name, 3389) + if($socket -eq $null) + { + $rst.RDP = $false + } + else + { + $rst.RDP = $true + $socket.close() + } + } + catch + { + $rst.RDP = $false + } + Write-verbose "RDP: $((New-TimeSpan $dt ($dt = get-date)).totalseconds)" + #########ping + if(test-connection $ip -count 1 -Quiet) + { + Write-verbose "PING: $((New-TimeSpan $dt ($dt = get-date)).totalseconds)" + $rst.ping = $true + try{############wsman + Test-WSMan $ip | Out-Null + $rst.WSMAN = $true + } + catch + {$rst.WSMAN = $false} + Write-verbose "WSMAN: $((New-TimeSpan $dt ($dt = get-date)).totalseconds)" + if($rst.WSMAN -and $credssp) ########### credssp + { + try{ + Test-WSMan $ip -Authentication Credssp -Credential $cred + $rst.CredSSP = $true + } + catch + {$rst.CredSSP = $false} + Write-verbose "CredSSP: $((New-TimeSpan $dt ($dt = get-date)).totalseconds)" + } + try ########remote reg + { + [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey([Microsoft.Win32.RegistryHive]::LocalMachine, $ip) | Out-Null + $rst.remotereg = $true + } + catch + {$rst.remotereg = $false} + Write-verbose "remote reg: $((New-TimeSpan $dt ($dt = get-date)).totalseconds)" + try ######### wmi + { + $w = [wmi] '' + $w.psbase.options.timeout = 15000000 + $w.path = "\\$Name\root\cimv2:Win32_ComputerSystem.Name='$Name'" + $w | select none | Out-Null + $rst.RPC = $true + } + catch + {$rst.rpc = $false} + Write-verbose "WMI: $((New-TimeSpan $dt ($dt = get-date)).totalseconds)" + } + else + { + $rst.ping = $false + $rst.wsman = $false + $rst.credssp = $false + $rst.remotereg = $false + $rst.rpc = $false + } + $results += $rst + }} + Write-Verbose "Time for $($Name): $((New-TimeSpan $cdt ($dt)).totalseconds)" + Write-Verbose "----------------------------" +} +} +end{ + Write-Verbose "Time for all: $((New-TimeSpan $total ($dt)).totalseconds)" + Write-Verbose "----------------------------" +return $results +} +} \ No newline at end of file