Intune Initial Scripts Backup

This commit is contained in:
2025-04-21 14:21:38 -04:00
commit 71764cd10f
241 changed files with 28218 additions and 0 deletions

BIN
dump/6PM - unknown.txt Normal file

Binary file not shown.

BIN
dump/9pm-Error.txt Normal file

Binary file not shown.

View File

@@ -0,0 +1,5 @@
$Acct = "ccx/sccm"
$Ws = "l201131"
Invoke-Command $Ws { Param($Acct,$Ws) ([ADSI]"WinNT://$Ws/administrators,group").psbase.Invoke("Add",([ADSI]"WinNT://$Acct").path)} -ArgumentList $Acct,$Ws

73
dump/CCXQ - Shared.txt Normal file
View File

@@ -0,0 +1,73 @@
Q1NCRAFILE001
QRSH111
QIIS005
QRDS002
QMHB003
QMHB004
QRDS001
QPGP001
QMHB001
QMFT001
QRSH101
QSCH012
QDRF001
QFNP008
Q2NCRAFILE001
Q3NCRAFILE001
QMHB002
QSIS001
QSRS001
QSRS004
QFNP007
QSQL029
QSQL030
Q5NCRAFILE001
QSQL006
QADF001
QTABL001
Q4NCRAFILE001
QFNP009
QSCH011
QSQL028
QAPP021
QSCH014
QFNP001
QSCH013
PQRSH001
QVST012
QVST011
QSIS003
QSQL001
QBTS001
QWTS004
QWTS005
QWTS006
QWTS001
QAPP005
QIIS002
QDWH001
QIIS004
QAPP001
QSIS002
QWTS010
QIIS001
QBIZ121
QBIZ131
QBIZ132
QBIZ122
PQRDS001
QFNP003
Q4SQL024
QVST021
QVST022
QAPP003
QEDI113
QEDI112
QEDI111
QRSH112
QEDI152
QEDI153
QEDI151
QUTL012
QCMX001
QNCRASPOWA01

644
dump/CMClient.psm1 Normal file
View File

@@ -0,0 +1,644 @@
<#
===========================================================================
Created with: SAPIEN Technologies, Inc., PowerShell Studio 2014 v4.1.58
Created on: 6/9/2014 1:57 PM
Created by: Adam Bertram
Filename: CMClient.psm1
-------------------------------------------------------------------------
Module Name: CMClient
===========================================================================
#>
#region Invoke-CMClientAction
<#
.SYNOPSIS
This is a helper function that initiates many ConfigMgr client actions.
.DESCRIPTION
.PARAMETER Computername
The system you'd like to initate the action on.
.PARAMETER AsJob
A switch parameter that initates a job in the background
.PARAMETER ClientAction
The client action to initiate.
.EXAMPLE
PS C:\> Invoke-CMClientAction -Computername 'Value1' -AsJob
This example shows how to call the Invoke-CMClientAction function with named parameters.
.NOTES
#>
function Invoke-CMClientAction {
[CmdletBinding()]
param
(
[Parameter(Mandatory = $true)]
[string]$Computername,
[Parameter(Mandatory = $true)]
[ValidateSet('MachinePolicy',
'DiscoveryData',
'ComplianceEvaluation',
'AppDeployment',
'HardwareInventory',
'UpdateDeployment',
'UpdateScan',
'SoftwareInventory')]
[string]$ClientAction,
[Parameter()]
[switch]$AsJob
)
Begin {
try {
$ScheduleIDMappings = @{
'MachinePolicy' = '{00000000-0000-0000-0000-000000000021}';
'DiscoveryData' = '{00000000-0000-0000-0000-000000000003}';
'ComplianceEvaluation' = '{00000000-0000-0000-0000-000000000071}';
'AppDeployment' = '{00000000-0000-0000-0000-000000000121}';
'HardwareInventory' = '{00000000-0000-0000-0000-000000000001}';
'UpdateDeployment' = '{00000000-0000-0000-0000-000000000108}';
'UpdateScan' = '{00000000-0000-0000-0000-000000000113}';
'SoftwareInventory' = '{00000000-0000-0000-0000-000000000002}';
}
$ScheduleID = $ScheduleIDMappings[$ClientAction]
} catch {
Write-Error $_.Exception.Message
}
}
Process {
try {
## Args1 represents the computername and $args[1] represents the scheduleID
$ActionScriptBlock = {
[void] ([wmiclass] "\\$($args[0])\root\ccm:SMS_Client").TriggerSchedule($args[1]);
if (!$?) {
throw "Failed to initiate a $ClientAction on $($args[0])"
}
}
if ($AsJob.IsPresent) {
$Params = @{
'Computername' = $Computername;
'OriginatingFunction' = $ClientAction;
'ScriptBlock' = $ActionScriptBlock;
'ScheduleID' = $ScheduleID
}
Initialize-CMClientJob @Params
} else {
Invoke-Command -ScriptBlock $ActionScriptBlock -ArgumentList $Computername,$ScheduleID
}
} catch {
Write-Error $_.Exception.Message
}
}
End {
}
}
#endregion
#region Initialize-CMClientJob
<#
.SYNOPSIS
This is a helper function that starts and manages background jobs for the all
functions in this module.
.DESCRIPTION
.PARAMETER OriginatingFunction
The function where the job request came from. This is used to keep track of
which background jobs were started by which function.
.PARAMETER ScriptBlock
This is the scriptblock that is passed to the system.
.PARAMETER Computername
The computer name that the function is connecting to. This is used to keep track
of the functions initiated on computers.
.PARAMETER ScheduleID
This is the schedule ID to designate which client action to initiate. This is needed
because it has to be sent to the background job scriptblock.
.EXAMPLE
.NOTES
#>
function Initialize-CMClientJob {
[CmdletBinding()]
param
(
[Parameter(Mandatory = $true)]
[string]$OriginatingFunction,
[Parameter(Mandatory = $true)]
[scriptblock]$ScriptBlock,
[Parameter(Mandatory = $true)]
[string]$Computername,
[Parameter(Mandatory = $true)]
[string]$ScheduleID
)
Begin {
## The total number of jobs that can be concurrently running
$MaxJobThreads = 75
## How long to wait when the max job threads has been met to start another job
$JobWaitSecs = 1
}
Process {
try {
Write-Verbose "Starting job `"$ComputerName - $OriginatingFunction`"..."
Start-Job -ScriptBlock $ScriptBlock -Name "$ComputerName - $OriginatingFunction" -ArgumentList $Computername, $ScheduleID | Out-Null
While ((Get-Job -state running).count -ge $MaxJobThreads) {
Write-Verbose "Maximum job threshold has been met. Waiting $JobWaitSecs second(s) to try again...";
Start-Sleep -Seconds $JobWaitSecs
}
} catch {
Write-Error $_.Exception.Message
}
}
End {
}
}
#endregion
#region Invoke-CMClientMachinePolicyDownload
<#
.SYNOPSIS
This function invokes a machine policy download on a ConfigMgr client
.DESCRIPTION
.PARAMETER Computername
The name of the system you'd like to invoke the machine policy download on
.PARAMETER AsJob
Specify this parameter if you'd like to run this as a background job.
.EXAMPLE
PS C:\> Invoke-CMClientMachinePolicyDownload -Computername 'Value1' -AsJob
.NOTES
#>
function Invoke-CMClientMachinePolicyDownload {
[CmdletBinding()]
param
(
[Parameter(Mandatory = $true,
ValueFromPipeline = $true,
ValueFromPipelineByPropertyName = $true)]
[alias('Name')]
[string]$Computername,
[Parameter()]
[switch]$AsJob
)
Begin {
}
Process {
$Params = @{
'Computername' = $Computername;
'ClientAction' = 'MachinePolicy';
'AsJob' = $AsJob.IsPresent
}
Invoke-CMClientAction @Params
}
End {
}
}
#endregion
#region Invoke-CMClientDiscoveryDataCycle
<#
.SYNOPSIS
This function invokes a DDR cycle on a ConfigMgr client
.DESCRIPTION
.PARAMETER Computername
The name of the system you'd like to invoke the action on
.PARAMETER AsJob
Specify this parameter if you'd like to run this as a background job.
.EXAMPLE
PS C:\> Invoke-CMClientDiscoveryDataCycle -Computername 'Value1' -AsJob
.NOTES
#>
function Invoke-CMClientDiscoveryDataCycle {
[CmdletBinding()]
param
(
[Parameter(Mandatory = $true,
ValueFromPipeline = $true,
ValueFromPipelineByPropertyName = $true)]
[string]$Computername,
[Parameter()]
[switch]$AsJob
)
Begin {
}
Process {
$Params = @{
'Computername' = $Computername;
'ClientAction' = 'DiscoveryData';
'AsJob' = $AsJob.IsPresent
}
Invoke-CMClientAction @Params
}
End {
}
}
#endregion
#region Invoke-CMClientComplianceEvaluation
<#
.SYNOPSIS
This function invokes a compliance evaluation on a ConfigMgr client
.DESCRIPTION
.PARAMETER Computername
The name of the system you'd like to invoke the action on
.PARAMETER AsJob
Specify this parameter if you'd like to run this as a background job.
.EXAMPLE
PS C:\> Invoke-CMClientComplianceEvaluation -Computername 'Value1' -AsJob
.NOTES
#>
function Invoke-CMClientComplianceEvaluation {
[CmdletBinding()]
param
(
[Parameter(Mandatory = $true,
ValueFromPipeline = $true,
ValueFromPipelineByPropertyName = $true)]
[string]$Computername,
[Parameter()]
[switch]$AsJob
)
Begin {
}
Process {
$Params = @{
'Computername' = $Computername;
'ClientAction' = 'ComplianceEvaluation';
'AsJob' = $AsJob.IsPresent
}
Invoke-CMClientAction @Params
}
End {
}
}
#endregion
#region Invoke-CMClientApplicationDeploymentEvaluation
<#
.SYNOPSIS
This function invokes an application deployment eval on a ConfigMgr client
.DESCRIPTION
.PARAMETER Computername
The name of the system you'd like to invoke the action on
.PARAMETER AsJob
Specify this parameter if you'd like to run this as a background job.
.EXAMPLE
PS C:\> Invoke-CMClientApplicationDeploymentEvaluation -Computername 'Value1' -AsJob
.NOTES
#>
function Invoke-CMClientApplicationDeploymentEvaluation {
[CmdletBinding()]
param
(
[Parameter(Mandatory = $true,
ValueFromPipeline = $true,
ValueFromPipelineByPropertyName = $true)]
[string]$Computername,
[Parameter()]
[switch]$AsJob
)
Begin {
}
Process {
$Params = @{
'Computername' = $Computername;
'ClientAction' = 'AppDeployment';
'AsJob' = $AsJob.IsPresent
}
Invoke-CMClientAction @Params
}
End {
}
}
#endregion
#region Invoke-CMClientHardwareInventory
<#
.SYNOPSIS
This function invokes a hardware inventory cycle on a ConfigMgr client
.DESCRIPTION
.PARAMETER Computername
The name of the system you'd like to invoke the action on
.PARAMETER AsJob
Specify this parameter if you'd like to run this as a background job.
.EXAMPLE
PS C:\> Invoke-CMClientHardwareInventory -Computername 'Value1' -AsJob
.NOTES
#>
function Invoke-CMClientHardwareInventory {
[CmdletBinding()]
param
(
[Parameter(Mandatory = $true,
ValueFromPipeline = $true,
ValueFromPipelineByPropertyName = $true)]
[string]$Computername,
[Parameter()]
[switch]$AsJob
)
Begin {
}
Process {
$Params = @{
'Computername' = $Computername;
'ClientAction' = 'HardwareInventory';
'AsJob' = $AsJob.IsPresent
}
Invoke-CMClientAction @Params
}
End {
}
}
#endregion
#region Invoke-CMClientUpdateDeploymentEvaluation
<#
.SYNOPSIS
This function invokes an update deployment eval on a ConfigMgr client
.DESCRIPTION
.PARAMETER Computername
The name of the system you'd like to invoke the action on
.PARAMETER AsJob
Specify this parameter if you'd like to run this as a background job.
.EXAMPLE
PS C:\> Invoke-CMClientUpdateDeploymentEvaluation -Computername 'Value1' -AsJob
.NOTES
#>
function Invoke-CMClientUpdateDeploymentEvaluation {
[CmdletBinding()]
param
(
[Parameter(Mandatory = $true,
ValueFromPipeline = $true,
ValueFromPipelineByPropertyName = $true)]
[string]$Computername,
[Parameter()]
[switch]$AsJob
)
Begin {
}
Process {
$Params = @{
'Computername' = $Computername;
'ClientAction' = 'UpdateDeployment';
'AsJob' = $AsJob.IsPresent
}
Invoke-CMClientAction @Params
}
End {
}
}
#endregion
#region Invoke-CMClientUpdateScan
<#
.SYNOPSIS
This function invokes an update scan eval on a ConfigMgr client
.DESCRIPTION
.PARAMETER Computername
The name of the system you'd like to invoke the action on
.PARAMETER AsJob
Specify this parameter if you'd like to run this as a background job.
.EXAMPLE
PS C:\> Invoke-CMClientUpdateScan -Computername 'Value1' -AsJob
.NOTES
#>
function Invoke-CMClientUpdateScan {
[CmdletBinding()]
param
(
[Parameter(Mandatory = $true,
ValueFromPipeline = $true,
ValueFromPipelineByPropertyName = $true)]
[string]$Computername,
[Parameter()]
[switch]$AsJob
)
Begin {
}
Process {
$Params = @{
'Computername' = $Computername;
'ClientAction' = 'UpdateScan';
'AsJob' = $AsJob.IsPresent
}
Invoke-CMClientAction @Params
}
End {
}
}
#endregion
#region Invoke-CMClientSoftwareInventory
<#
.SYNOPSIS
This function invokes a software inventory scan on a ConfigMgr client
.DESCRIPTION
.PARAMETER Computername
The name of the system you'd like to invoke the action on
.PARAMETER AsJob
Specify this parameter if you'd like to run this as a background job.
.EXAMPLE
PS C:\> Invoke-CMClientSoftwareInventory -Computername 'Value1' -AsJob
.NOTES
#>
function Invoke-CMClientSoftwareInventory {
[CmdletBinding()]
param
(
[Parameter(Mandatory = $true,
ValueFromPipeline = $true,
ValueFromPipelineByPropertyName = $true)]
[string]$Computername,
[Parameter()]
[switch]$AsJob
)
Begin {
}
Process {
$Params = @{
'Computername' = $Computername;
'ClientAction' = 'SoftwareInventory';
'AsJob' = $AsJob.IsPresent
}
Invoke-CMClientAction @Params
}
End {
}
}
#endregion
## Modify these function as advanced functions
<#
Function Set-CMClientBusinessHours ($ComputerName, $StartTime = 3, $EndTime = 7, $WorkingDays) {
## The first digit is the start time (7am), the second digit is the end time (7pm) and the third digit is the days of the week.
## The days of the week are calculated using the table below, so Monday Friday is calculated as 2+4+8+16+32 = 62.
## Sunday - 1, Monday - 2, Tuesday - 4, Wednesday - 8, Thursday - 16, Friday - 32, Saturday - 64
try {
Write-Debug "Initiating the $($MyInvocation.MyCommand.Name) function...";
$cmClientUserSettings = [WmiClass]"\\$ComputerName\ROOT\ccm\ClientSDK:CCM_ClientUXSettings"
$businessHours = $cmClientUserSettings.PSBase.GetMethodParameters("SetBusinessHours")
$businessHours.StartTime = $StartTime
$businessHours.EndTime = $EndTime
$businessHours.WorkingDays = $WorkingDays
$result = $cmClientUserSettings.PSBase.InvokeMethod("SetBusinessHours", $businessHours, $Null)
if ($result.ReturnValue -eq 0) {
$mResult = $true
} else {
$mResult = $false;
}
return $mResult
} catch [System.Exception] {
Write-Error $_.Exception.Message;
}##endtry
}##endfunction
Function Get-CMClientBusinessHours ($ComputerName) {
## The first digit is the start time (7am), the second digit is the end time (7pm) and the third digit is the days of the week.
## The days of the week are calculated using the table below, so Monday Friday is calculated as 2+4+8+16+32 = 62.
## Sunday - 1, Monday - 2, Tuesday - 4, Wednesday - 8, Thursday - 16, Friday - 32, Saturday - 64
try {
Write-Debug "Initiating the $($MyInvocation.MyCommand.Name) function...";
$cmClientUserSettings = [WmiClass]"\\$ComputerName\ROOT\ccm\ClientSDK:CCM_ClientUXSettings"
$businessHours = $cmClientUserSettings.GetBusinessHours()
$businessHoursCI = [string]$businessHours.StartTime + "," + [string]$businessHours.EndTime + "," + [string]$businessHours.WorkingDays
return $businessHoursCI
} catch [System.Exception] {
Write-Error $_.Exception.Message;
}##endtry
}##endfunction
Function Disable-CMClientBusinessHours ($ComputerName) {
try {
## Change the "automatic install or uninstall required software and restart the computer only outside of the specified business hours
return $mResult
} catch [System.Exception] {
Write-Error $_.Exception.Message;
}##endtry
}##endfunction
Function Get-SccmApplicationState ($ComputerName,$Name = $null,[switch]$IncludeDetails) {
try {
Write-Debug "Initiating the $($MyInvocation.MyCommand.Name) function...";
$eval_states = @{0 = 'No state information is available';
1 = 'Application is enforced to desired/resolved state';
2 = 'Application is not required on the client';
3 = 'Application is available for enforcement (install or uninstall based on resolved state). Content may/may not have been downloaded';
4 = 'Application last failed to enforce (install/uninstall)';
5 = 'Application is currently waiting for content download to complete';
6 = 'Application is currently waiting for content download to complete';
7 = 'Application is currently waiting for its dependencies to download';
8 = 'Application is currently waiting for a service (maintenance) window';
9 = 'Application is currently waiting for a previously pending reboot';
10 = 'Application is currently waiting for serialized enforcement';
11 = 'Application is currently enforcing dependencies';
12 = 'Application is currently enforcing';
13 = 'Application install/uninstall enforced and soft reboot is pending';
14 = 'Application installed/uninstalled and hard reboot is pending';
15 = 'Update is available but pending installation';
16 = 'Application failed to evaluate';
17 = 'Application is currently waiting for an active user session to enforce';
18 = 'Application is currently waiting for all users to logoff';
19 = 'Application is currently waiting for a user logon';
20 = 'Application in progress, waiting for retry';
21 = 'Application is waiting for presentation mode to be switched off';
22 = 'Application is pre-downloading content (downloading outside of install job)';
23 = 'Application is pre-downloading dependent content (downloading outside of install job)';
24 = 'Application download failed (downloading during install job)';
25 = 'Application pre-downloading failed (downloading outside of install job)';
26 = 'Download success (downloading during install job)';
27 = 'Post-enforce evaluation';
28 = 'Waiting for network connectivity';
}
if ($Name -and $IncludeDetails.IsPresent) {
$aApps = Request-Wmi -ComputerName $ComputerName -Namespace 'root\ccm\clientsdk' -Query "SELECT * FROM CCM_Application WHERE FullName = '$Name'"
} elseif ($Name -and !$IncludeDetails.IsPresent) {
$aApps = Request-Wmi -ComputerName $ComputerName -Namespace 'root\ccm\clientsdk' -Query "SELECT * FROM CCM_Application WHERE FullName = '$Name'" | Select-Object PSComputerName,FullName,InstallState,ErrorCode,EvaluationState,@{label='StartTime';expression={$_.ConvertToDateTime($_.StartTime)}}
} elseif (!$Name -and $IncludeDetails.IsPresent) {
$aApps = Request-Wmi -ComputerName $ComputerName -Namespace 'root\ccm\clientsdk' -Query "SELECT * FROM CCM_Application"
} elseif (!$Name -and !$IncludeDetails.IsPresent) {
$aApps = Request-Wmi -ComputerName $ComputerName -Namespace 'root\ccm\clientsdk' -Query "SELECT * FROM CCM_Application" | Select-Object PSComputerName,FullName,InstallState,ErrorCode,EvaluationState,@{label='StartTime';expression={$_.ConvertToDateTime($_.StartTime)}}
}
if (!$aApps) {
$mResult = "$($MyInvocation.MyCommand.Name): WMI query failed";
} else {
$mResult = $aApps | Sort-Object FullName;
}##endif
return $mResult;
} catch [System.Exception] {
Write-Error $_.Exception.Message;
}##endtry
}##endfunction
Function Get-CMClientUpdateDeploymentState() {
}
#>
Export-ModuleMember Invoke-CMClientUpdateScan #
Export-ModuleMember Invoke-CMClientUpdateDeploymentEvaluation #
Export-ModuleMember Invoke-CMClientHardwareInventory
Export-ModuleMember Invoke-CMClientApplicationDeploymentEvaluation
Export-ModuleMember Invoke-CMClientComplianceEvaluation
Export-ModuleMember Invoke-CMClientDiscoveryDataCycle
Export-ModuleMember Invoke-CMClientMachinePolicyDownload #

View File

@@ -0,0 +1,70 @@
<#
2 .SYNOPSIS
3 Get the collection membership of a configuration manager client device or computer.
4
5 .DESCRIPTION
6 Get the collection membership of a configuration manager client device or computer.
7 This function will query System Center Configuration manager for a given computer name
8 and return the collections for which it is a member.
9
10 .PARAMETER ComputerName
11 Provide a computer name.
12
13 .PARAMETER SiteServer
14 Specify the name or FQDN of your SCCM site server. By default it gathers the site server
15 from the computer from which the function is called.
16
17 .PARAMETER SiteCode
18 Specify the site code of your SCCM environment. By default it gathers the site code
19 from the computer from which the function is called.
20
21 .PARAMETER Credential
22 Provide a credential object for accessing the site server.
23
24 .EXAMPLE
25 Get-CMClientDeviceCollectionMembership
26
27 Gets the collection membership of the local host.
28
29 .EXAMPLE
30 Get-CMClientDeviceCollectionMembership -Computer DESKTOP01
31
32 Gets the collection membership of DESKTOP01
33
34 .EXAMPLE
35 Get-CMClientDeviceCollectionMembership -Computer DESKTOP01 -Summary
36
37 Gets the collection membership of DESKTOP01 in a summary format.
38
39 .NOTES
40 Created by: Jason Wasser @wasserja
41 Modified: 6/8/2017 10:49:50 AM
42 #>
function Get-CMClientDeviceCollectionMembership {
[CmdletBinding()]
param (
[string]$ComputerName = $env:COMPUTERNAME,
[string]$SiteServer = (Get-WmiObject -Namespace root\ccm -ClassName SMS_Authority).CurrentManagementPoint,
[string]$SiteCode = (Get-WmiObject -Namespace root\ccm -ClassName SMS_Authority).Name.Split(':')[1],
[switch]$Summary,
[System.Management.Automation.PSCredential]$Credential = [System.Management.Automation.PSCredential]::Empty
)
begin {}
process {
Write-Verbose -Message "Gathering collection membership of $ComputerName from Site Server $SiteServer using Site Code $SiteCode."
$Collections = Get-WmiObject -ComputerName $SiteServer -Namespace root/SMS/site_$SiteCode -Credential $Credential -Query "SELECT SMS_Collection.* FROM SMS_FullCollectionMembership, SMS_Collection where name = '$ComputerName' and SMS_FullCollectionMembership.CollectionID = SMS_Collection.CollectionID"
if ($Summary) {
$Collections | Select-Object -Property Name,CollectionID
}
else {
$Collections
}
}
end {}
}
# Get-CMClientDeviceCollectionMembership -ComputerName w2012a | Select name,LimitToCollectionName

BIN
dump/CMUpdateReset.exe Normal file

Binary file not shown.

View File

@@ -0,0 +1,14 @@
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,11
Prop4=31,Clean Software Update Packages in ConfigMgr with PowerShell | | System Center ConfigMgr
[InternetShortcut]
IDList=
URL=https://www.scconfigmgr.com/2017/08/17/clean-software-update-packages-in-configmgr-with-powershell/
IconFile=https://i0.wp.com/www.scconfigmgr.com/wp-content/uploads/2017/03/cropped-SCConfigMgrLOGO_Symbol_Transparent.png?fit=32%2C32&ssl=1
IconIndex=1
[{A7AF692E-098D-4C08-A225-D433CA835ED0}]
Prop5=3,0
Prop9=19,0
Prop2=65,2C0000000000000001000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF1D0100003D000000CD050000AF030000FC
[{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}]
Prop5=8,Microsoft.Website.F65A605E.1C4ACA4F

View File

@@ -0,0 +1,97 @@
<#
Import-Module 'C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1'
New-PSDrive -Name SCCM-Drive -PSProvider "AdminUI.PS.Provider\CMSite" -Root "PNCRASCCM001.ccx.carecentrix.com" -Description "SCCM Site"
#>
# $DeviceCollection_Name = "Nabil - Test Collection"
<#
$DeviceCollection_Name = "All - Inventory - Supporting Infrastructure"
$DeviceCollection_Name = "Stage 2. ADR - QA Servers"
$DeviceCollection_Name = "Stage 3. ADR - PRD Servers - Set 2"
$DeviceCollection_Name = "Stage 3. ADR - PRD Servers - Set 1"
$DeviceCollection_Name = "Stage 1. ADR - DEV Servers - Set 1"
#### $DeviceCollection_Name_ALL = "All - Inventory - Infrastructure Servers",
"All - Inventory - Supporting Infrastructure",
"All - Inventory - Database",
"All - Inventory - Application Servers"
#>
<#
CD sccm-drive:
$DeviceCollection_MemberCount = Get-CMDeviceCollection -Name $DeviceCollection_Name | select Name,MemberCount
$DeviceCollection_ServerNames = Get-CMCollectionMember -CollectionName $DeviceCollection_Name | select Name,IsClient #| Export-Csv "E:\SCCM-Files\SCCM-Scripts\Files\$DeviceCollection_Name.csv" -NoTypeInformation
$ServerName = $DeviceCollection_ServerNames.Name
$ServerName.count
Set-Location c:
#>
#$DeviceCollection_Name = ""
CD sccm-drive:
$DeviceCollection_MemberCount = Get-CMDeviceCollection -Name $DeviceCollection_Name | select Name,MemberCount
$DeviceCollection_ServerNames = Get-CMCollectionMember -CollectionName $DeviceCollection_Name | select Name,IsClient #| Export-Csv "E:\SCCM-Files\SCCM-Scripts\Files\$DeviceCollection_Name.csv" -NoTypeInformation
$ServerName = $DeviceCollection_ServerNames.Name
$ServerName.count
Set-Location c:
#$No_Client = $DeviceCollection_ServerNames | ? { $_.IsClient -eq $false }
#$No_Client.count
# Test-Connection -ComputerName $No_Client.name -Count 1
$Script:ALL_Patch_Servers = @()
$Script:Temp = @()
Function ALL_Patching_Servers {
Param($Coll_Name)
CD sccm-drive:
$Script:Temp = Get-CMCollectionMember -CollectionName $Coll_Name #| select Name,IsClient
$Temp | % {
$Obj = New-Object -TypeName PSObject
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $_.Name
$Obj | Add-Member -MemberType NoteProperty -Name ClientInstalled -Value $_.IsClient
$Obj | Add-Member -MemberType NoteProperty -Name CollectionName -Value $Coll_Name
#$Obj | Add-Member -MemberType NoteProperty -Name CollectionMemberCount -Value {(Get-CMCollectionMember -Name $Coll_Name).MemberCount}
$Obj
$Script:ALL_Patch_Servers += $Obj
}#end%
}#endFunction
#$DeviceCollection_Name_ALL | % { ALL_Patching_Servers -Coll_Name $_ }
$DeviceCollection_Name | % { ALL_Patching_Servers -Coll_Name $_ | sort Server}
Set-Location c:

View File

@@ -0,0 +1,6 @@
[InternetShortcut]
URL=https://gallery.technet.microsoft.com/systemcenter/ConfigMgr-Client-Action-16a364a5
IDList=
HotKey=0
IconFile=C:\Users\nnazmat\AppData\Local\Mozilla\Firefox\Profiles\20v5hisb.default-release\shortcutCache\nnqCGd961WQk9_zngRurQg==.ico
IconIndex=0

View File

@@ -0,0 +1,235 @@
# ===============================================
# Script to decline superseeded updates in WSUS.
# ===============================================
# It's recommended to run the script with the -SkipDecline switch to see how many superseded updates are in WSUS and to TAKE A BACKUP OF THE SUSDB before declining the updates.
# Parameters:
# $UpdateServer = Specify WSUS Server Name
# $UseSSL = Specify whether WSUS Server is configured to use SSL
# $Port = Specify WSUS Server Port
# $SkipDecline = Specify this to do a test run and get a summary of how many superseded updates we have
# $DeclineLastLevelOnly = Specify whether to decline all superseded updates or only last level superseded updates
# $ExclusionPeriod = Specify the number of days between today and the release date for which the superseded updates must not be declined. Eg, if you want to keep superseded updates published within the last 2 months, specify a value of 60 (days)
# Supersedence chain could have multiple updates.
# For example, Update1 supersedes Update2. Update2 supersedes Update3. In this scenario, the Last Level in the supersedence chain is Update3.
# To decline only the last level updates in the supersedence chain, specify the DeclineLastLevelOnly switch
# Usage:
# =======
# To do a test run against WSUS Server without SSL
# Decline-SupersededUpdates.ps1 -UpdateServer SERVERNAME -Port 8530 -SkipDecline
# To do a test run against WSUS Server using SSL
# Decline-SupersededUpdates.ps1 -UpdateServer SERVERNAME -UseSSL -Port 8531 -SkipDecline
# To decline all superseded updates on the WSUS Server using SSL
# Decline-SupersededUpdates.ps1 -UpdateServer SERVERNAME -UseSSL -Port 8531
# To decline only Last Level superseded updates on the WSUS Server using SSL
# Decline-SupersededUpdates.ps1 -UpdateServer SERVERNAME -UseSSL -Port 8531 -DeclineLastLevelOnly
# To decline all superseded updates on the WSUS Server using SSL but keep superseded updates published within the last 2 months (60 days)
# Decline-SupersededUpdates.ps1 -UpdateServer SERVERNAME -UseSSL -Port 8531 -ExclusionPeriod 60
[CmdletBinding()]
Param(
[Parameter(Mandatory=$True,Position=1)]
[string] $UpdateServer,
[Parameter(Mandatory=$False)]
[switch] $UseSSL,
[Parameter(Mandatory=$True, Position=2)]
$Port,
[switch] $SkipDecline,
[switch] $DeclineLastLevelOnly,
[Parameter(Mandatory=$False)]
[int] $ExclusionPeriod = 0
)
Write-Host ""
if ($SkipDecline -and $DeclineLastLevelOnly) {
Write-Host "Using SkipDecline and DeclineLastLevelOnly switches together is not allowed."
Write-Host ""
return
}
$outPath = Split-Path $script:MyInvocation.MyCommand.Path
$outSupersededList = Join-Path $outPath "SupersededUpdates.csv"
$outSupersededListBackup = Join-Path $outPath "SupersededUpdatesBackup.csv"
"UpdateID, RevisionNumber, Title, KBArticle, SecurityBulletin, LastLevel" | Out-File $outSupersededList
try {
if ($UseSSL) {
Write-Host "Connecting to WSUS server $UpdateServer on Port $Port using SSL... " -NoNewLine
} Else {
Write-Host "Connecting to WSUS server $UpdateServer on Port $Port... " -NoNewLine
}
[reflection.assembly]::LoadWithPartialName("Microsoft.UpdateServices.Administration") | out-null
$wsus = [Microsoft.UpdateServices.Administration.AdminProxy]::GetUpdateServer($UpdateServer, $UseSSL, $Port);
}
catch [System.Exception]
{
Write-Host "Failed to connect."
Write-Host "Error:" $_.Exception.Message
Write-Host "Please make sure that WSUS Admin Console is installed on this machine"
Write-Host ""
$wsus = $null
}
if ($wsus -eq $null) { return }
Write-Host "Connected."
$countAllUpdates = 0
$countSupersededAll = 0
$countSupersededLastLevel = 0
$countSupersededExclusionPeriod = 0
$countSupersededLastLevelExclusionPeriod = 0
$countDeclined = 0
Write-Host "Getting a list of all updates... " -NoNewLine
try {
$allUpdates = $wsus.GetUpdates()
}
catch [System.Exception]
{
Write-Host "Failed to get updates."
Write-Host "Error:" $_.Exception.Message
Write-Host "If this operation timed out, please decline the superseded updates from the WSUS Console manually."
Write-Host ""
return
}
Write-Host "Done"
Write-Host "Parsing the list of updates... " -NoNewLine
foreach($update in $allUpdates) {
$countAllUpdates++
if ($update.IsDeclined) {
$countDeclined++
}
if (!$update.IsDeclined -and $update.IsSuperseded) {
$countSupersededAll++
if (!$update.HasSupersededUpdates) {
$countSupersededLastLevel++
}
if ($update.CreationDate -lt (get-date).AddDays(-$ExclusionPeriod)) {
$countSupersededExclusionPeriod++
if (!$update.HasSupersededUpdates) {
$countSupersededLastLevelExclusionPeriod++
}
}
"$($update.Id.UpdateId.Guid), $($update.Id.RevisionNumber), $($update.Title), $($update.KnowledgeBaseArticles), $($update.SecurityBulletins), $($update.HasSupersededUpdates)" | Out-File $outSupersededList -Append
}
}
Write-Host "Done."
Write-Host "List of superseded updates: $outSupersededList"
Write-Host ""
Write-Host "Summary:"
Write-Host "========"
Write-Host "All Updates =" $countAllUpdates
Write-Host "Any except Declined =" ($countAllUpdates - $countDeclined)
Write-Host "All Superseded Updates =" $countSupersededAll
Write-Host " Superseded Updates (Intermediate) =" ($countSupersededAll - $countSupersededLastLevel)
Write-Host " Superseded Updates (Last Level) =" $countSupersededLastLevel
Write-Host " Superseded Updates (Older than $ExclusionPeriod days) =" $countSupersededExclusionPeriod
Write-Host " Superseded Updates (Last Level Older than $ExclusionPeriod days) =" $countSupersededLastLevelExclusionPeriod
Write-Host ""
$i = 0
if (!$SkipDecline) {
Write-Host "SkipDecline flag is set to $SkipDecline. Continuing with declining updates"
$updatesDeclined = 0
if ($DeclineLastLevelOnly) {
Write-Host " DeclineLastLevel is set to True. Only declining last level superseded updates."
foreach ($update in $allUpdates) {
if (!$update.IsDeclined -and $update.IsSuperseded -and !$update.HasSupersededUpdates) {
if ($update.CreationDate -lt (get-date).AddDays(-$ExclusionPeriod)) {
$i++
$percentComplete = "{0:N2}" -f (($updatesDeclined/$countSupersededLastLevelExclusionPeriod) * 100)
Write-Progress -Activity "Declining Updates" -Status "Declining update #$i/$countSupersededLastLevelExclusionPeriod - $($update.Id.UpdateId.Guid)" -PercentComplete $percentComplete -CurrentOperation "$($percentComplete)% complete"
try
{
$update.Decline()
$updatesDeclined++
}
catch [System.Exception]
{
Write-Host "Failed to decline update $($update.Id.UpdateId.Guid). Error:" $_.Exception.Message
}
}
}
}
}
else {
Write-Host " DeclineLastLevel is set to False. Declining all superseded updates."
foreach ($update in $allUpdates) {
if (!$update.IsDeclined -and $update.IsSuperseded) {
if ($update.CreationDate -lt (get-date).AddDays(-$ExclusionPeriod)) {
$i++
$percentComplete = "{0:N2}" -f (($updatesDeclined/$countSupersededAll) * 100)
Write-Progress -Activity "Declining Updates" -Status "Declining update #$i/$countSupersededAll - $($update.Id.UpdateId.Guid)" -PercentComplete $percentComplete -CurrentOperation "$($percentComplete)% complete"
try
{
$update.Decline()
$updatesDeclined++
}
catch [System.Exception]
{
Write-Host "Failed to decline update $($update.Id.UpdateId.Guid). Error:" $_.Exception.Message
}
}
}
}
}
Write-Host " Declined $updatesDeclined updates."
if ($updatesDeclined -ne 0) {
Copy-Item -Path $outSupersededList -Destination $outSupersededListBackup -Force
Write-Host " Backed up list of superseded updates to $outSupersededListBackup"
}
}
else {
Write-Host "SkipDecline flag is set to $SkipDecline. Skipped declining updates"
}
Write-Host ""
Write-Host "Done"
Write-Host ""

BIN
dump/Dev-Servers-Ping.txt Normal file

Binary file not shown.

View File

@@ -0,0 +1,60 @@
"Server","InstalledOn","LastHF","InstalledBy","Description"
"KSOVEPOPS001","8/20/2017 12:00:00 AM","Q2758694","Server Administration and Management","Security update for MSXML4 SP3 (KB2758694)"
"PSQL023","10/13/2019 12:00:00 AM","KB4520005","NT AUTHORITY\SYSTEM","Security Update"
"PSQL022","10/13/2019 12:00:00 AM","KB4520005","NT AUTHORITY\SYSTEM","Security Update"
"PSEC002","1/26/2020 12:00:00 AM","KB4534251","CCX\clroth-ccxadmin","Security Update"
"PSQL023B","1/26/2020 12:00:00 AM","KB4534324","NT AUTHORITY\SYSTEM","Update"
"PNCRAFILE005","1/26/2020 12:00:00 AM","KB4534271","NT AUTHORITY\SYSTEM","Security Update"
"PFNP014","1/26/2020 12:00:00 AM","KB4534324","NT AUTHORITY\SYSTEM","Update"
"PRSH058","1/26/2020 12:00:00 AM","KB4534324","NT AUTHORITY\SYSTEM","Update"
"PSPT001","1/26/2020 12:00:00 AM","KB4534251","CCX\NNAZMAT-CCXADMIN","Security Update"
"PRSH003","2/14/2020 12:00:00 AM","KB4537821","NT AUTHORITY\SYSTEM","Security Update"
"PRSH002","2/14/2020 12:00:00 AM","KB4537821","NT AUTHORITY\SYSTEM","Security Update"
"PRSH152","2/16/2020 12:00:00 AM","KB4537767","NT AUTHORITY\SYSTEM","Security Update"
"PBIZ124","2/16/2020 12:00:00 AM","KB4537821","NT AUTHORITY\SYSTEM","Security Update"
"PSQL016","2/16/2020 12:00:00 AM","KB4537821","CCX\jmbukov-ccxadmin","Security Update"
"PFNP011","2/16/2020 12:00:00 AM","KB4537821","CCX\kmboatr-ccxadmin","Security Update"
"PIIS003","2/16/2020 12:00:00 AM","KB4539601","CCX\abamaso-ccxadmin","Update"
"PSQL026","2/16/2020 12:00:00 AM","KB4520724","CCX\jmbukov-ccxadmin","Security Update"
"PSQL011","2/16/2020 12:00:00 AM","KB4539601","CCX\abamaso-ccxadmin","Update"
"PFNP005","2/16/2020 12:00:00 AM","KB2632503","PFNP005\Administrator","Update"
"PFNP013","2/16/2020 12:00:00 AM","KB4537764","NT AUTHORITY\SYSTEM","Security Update"
"PGAW001","2/16/2020 12:00:00 AM","KB4537821","CCX\rrpante-ccxadmin","Security Update"
"PSQL007","2/16/2020 12:00:00 AM","KB4538483","CCX\dapalme-ccxadmin","Security Update"
"PEXP001","2/16/2020 12:00:00 AM","KB4538483","CCX\clroth-ccxadmin","Security Update"
"PMHB002","2/16/2020 12:00:00 AM","KB4537821","NT AUTHORITY\SYSTEM","Security Update"
"PVSS012","2/16/2020 12:00:00 AM","KB4537821","CCX\rrpante-ccxadmin","Security Update"
"PSNW001","2/16/2020 12:00:00 AM","KB4537821","CCX\SSTHOMA6-CCXAdmin","Security Update"
"PSHP002","2/16/2020 12:00:00 AM","KB4534310","CCX\kmboatr-ccxadmin","Security Update"
"PKEY001","2/16/2020 12:00:00 AM","KB4538483","CCX\SSTHOMA6-CCXAdmin","Security Update"
"PIIS005","2/16/2020 12:00:00 AM","KB4538483","CCX\baboyle-ccxadmin","Security Update"
"PSQL006","2/16/2020 12:00:00 AM","KB4538483","CCX\rrpante-ccxadmin","Security Update"
"PSRS003","2/16/2020 12:00:00 AM","KB4538483","CCX\rrpante-ccxadmin","Security Update"
"PRSH055","2/16/2020 12:00:00 AM","KB4537821","CCX\dapalme-ccxadmin","Security Update"
"PTABL001","2/16/2020 12:00:00 AM","KB4537821","CCX\SSTHOMA6-CCXAdmin","Security Update"
"PQRDS001","2/16/2020 12:00:00 AM","KB4537821","NT AUTHORITY\SYSTEM","Security Update"
"PSRS001","2/16/2020 12:00:00 AM","KB2841134","CCX\baboyle-ccxadmin","Update"
"PNCRAFILE001","2/16/2020 12:00:00 AM","KB4537764","NT AUTHORITY\SYSTEM","Security Update"
"PARM001","2/16/2020 12:00:00 AM","KB4538483","CCX\abamaso-ccxadmin","Security Update"
"PBIZ122","2/16/2020 12:00:00 AM","KB4537821","NT AUTHORITY\SYSTEM","Security Update"
"PBIZ123","2/16/2020 12:00:00 AM","KB4537821","NT AUTHORITY\SYSTEM","Security Update"
"PSLK001","2/16/2020 12:00:00 AM","KB4537821","CCX\clroth-ccxadmin","Security Update"
"PADF001","2/16/2020 12:00:00 AM","KB4538483","CCX\SSTHOMA6-CCXAdmin","Security Update"
"PRSH059","2/16/2020 12:00:00 AM","KB4537821","NT AUTHORITY\SYSTEM","Security Update"
"PBIZ126","2/16/2020 12:00:00 AM","KB4537821","NT AUTHORITY\SYSTEM","Security Update"
"PWTS040","2/16/2020 12:00:00 AM","KB2849696","CCX\rrpante-ccxadmin","Update"
"PBIZ125","2/16/2020 12:00:00 AM","KB4537821","NT AUTHORITY\SYSTEM","Security Update"
"PRSH008","2/16/2020 12:00:00 AM","KB4537821","NT AUTHORITY\SYSTEM","Security Update"
"PBIZ121","2/16/2020 12:00:00 AM","KB4537821","NT AUTHORITY\SYSTEM","Security Update"
"PRSH024","2/16/2020 12:00:00 AM","KB4537821","NT AUTHORITY\SYSTEM","Security Update"
"PRSH010","2/16/2020 12:00:00 AM","KB4486105","NT AUTHORITY\SYSTEM","Update"
"PRSH005","2/16/2020 12:00:00 AM","KB4537821","NT AUTHORITY\SYSTEM","Security Update"
"PRSH015","2/16/2020 12:00:00 AM","KB4537821","NT AUTHORITY\SYSTEM","Security Update"
"PIIS007","2/16/2020 12:00:00 AM","KB4538483","CCX\clroth-ccxadmin","Security Update"
"PRSH021","2/16/2020 12:00:00 AM","KB4537821","NT AUTHORITY\SYSTEM","Security Update"
"PRSH020","2/16/2020 12:00:00 AM","KB4537821","NT AUTHORITY\SYSTEM","Security Update"
"PRSH018","2/16/2020 12:00:00 AM","KB4537821","NT AUTHORITY\SYSTEM","Security Update"
"PNCRAFILE003","2/16/2020 12:00:00 AM","KB4537764","NT AUTHORITY\SYSTEM","Security Update"
"PDOC001","2/16/2020 12:00:00 AM","KB4537821","CCX\rrpante-ccxadmin","Security Update"
"PRSH013","2/16/2020 12:00:00 AM","KB4537821","NT AUTHORITY\SYSTEM","Security Update"
"PSPT002","2/16/2020 12:00:00 AM","KB4534310","CCX\kmboatr-ccxadmin","Security Update"
1 Server InstalledOn LastHF InstalledBy Description
2 KSOVEPOPS001 8/20/2017 12:00:00 AM Q2758694 Server Administration and Management Security update for MSXML4 SP3 (KB2758694)
3 PSQL023 10/13/2019 12:00:00 AM KB4520005 NT AUTHORITY\SYSTEM Security Update
4 PSQL022 10/13/2019 12:00:00 AM KB4520005 NT AUTHORITY\SYSTEM Security Update
5 PSEC002 1/26/2020 12:00:00 AM KB4534251 CCX\clroth-ccxadmin Security Update
6 PSQL023B 1/26/2020 12:00:00 AM KB4534324 NT AUTHORITY\SYSTEM Update
7 PNCRAFILE005 1/26/2020 12:00:00 AM KB4534271 NT AUTHORITY\SYSTEM Security Update
8 PFNP014 1/26/2020 12:00:00 AM KB4534324 NT AUTHORITY\SYSTEM Update
9 PRSH058 1/26/2020 12:00:00 AM KB4534324 NT AUTHORITY\SYSTEM Update
10 PSPT001 1/26/2020 12:00:00 AM KB4534251 CCX\NNAZMAT-CCXADMIN Security Update
11 PRSH003 2/14/2020 12:00:00 AM KB4537821 NT AUTHORITY\SYSTEM Security Update
12 PRSH002 2/14/2020 12:00:00 AM KB4537821 NT AUTHORITY\SYSTEM Security Update
13 PRSH152 2/16/2020 12:00:00 AM KB4537767 NT AUTHORITY\SYSTEM Security Update
14 PBIZ124 2/16/2020 12:00:00 AM KB4537821 NT AUTHORITY\SYSTEM Security Update
15 PSQL016 2/16/2020 12:00:00 AM KB4537821 CCX\jmbukov-ccxadmin Security Update
16 PFNP011 2/16/2020 12:00:00 AM KB4537821 CCX\kmboatr-ccxadmin Security Update
17 PIIS003 2/16/2020 12:00:00 AM KB4539601 CCX\abamaso-ccxadmin Update
18 PSQL026 2/16/2020 12:00:00 AM KB4520724 CCX\jmbukov-ccxadmin Security Update
19 PSQL011 2/16/2020 12:00:00 AM KB4539601 CCX\abamaso-ccxadmin Update
20 PFNP005 2/16/2020 12:00:00 AM KB2632503 PFNP005\Administrator Update
21 PFNP013 2/16/2020 12:00:00 AM KB4537764 NT AUTHORITY\SYSTEM Security Update
22 PGAW001 2/16/2020 12:00:00 AM KB4537821 CCX\rrpante-ccxadmin Security Update
23 PSQL007 2/16/2020 12:00:00 AM KB4538483 CCX\dapalme-ccxadmin Security Update
24 PEXP001 2/16/2020 12:00:00 AM KB4538483 CCX\clroth-ccxadmin Security Update
25 PMHB002 2/16/2020 12:00:00 AM KB4537821 NT AUTHORITY\SYSTEM Security Update
26 PVSS012 2/16/2020 12:00:00 AM KB4537821 CCX\rrpante-ccxadmin Security Update
27 PSNW001 2/16/2020 12:00:00 AM KB4537821 CCX\SSTHOMA6-CCXAdmin Security Update
28 PSHP002 2/16/2020 12:00:00 AM KB4534310 CCX\kmboatr-ccxadmin Security Update
29 PKEY001 2/16/2020 12:00:00 AM KB4538483 CCX\SSTHOMA6-CCXAdmin Security Update
30 PIIS005 2/16/2020 12:00:00 AM KB4538483 CCX\baboyle-ccxadmin Security Update
31 PSQL006 2/16/2020 12:00:00 AM KB4538483 CCX\rrpante-ccxadmin Security Update
32 PSRS003 2/16/2020 12:00:00 AM KB4538483 CCX\rrpante-ccxadmin Security Update
33 PRSH055 2/16/2020 12:00:00 AM KB4537821 CCX\dapalme-ccxadmin Security Update
34 PTABL001 2/16/2020 12:00:00 AM KB4537821 CCX\SSTHOMA6-CCXAdmin Security Update
35 PQRDS001 2/16/2020 12:00:00 AM KB4537821 NT AUTHORITY\SYSTEM Security Update
36 PSRS001 2/16/2020 12:00:00 AM KB2841134 CCX\baboyle-ccxadmin Update
37 PNCRAFILE001 2/16/2020 12:00:00 AM KB4537764 NT AUTHORITY\SYSTEM Security Update
38 PARM001 2/16/2020 12:00:00 AM KB4538483 CCX\abamaso-ccxadmin Security Update
39 PBIZ122 2/16/2020 12:00:00 AM KB4537821 NT AUTHORITY\SYSTEM Security Update
40 PBIZ123 2/16/2020 12:00:00 AM KB4537821 NT AUTHORITY\SYSTEM Security Update
41 PSLK001 2/16/2020 12:00:00 AM KB4537821 CCX\clroth-ccxadmin Security Update
42 PADF001 2/16/2020 12:00:00 AM KB4538483 CCX\SSTHOMA6-CCXAdmin Security Update
43 PRSH059 2/16/2020 12:00:00 AM KB4537821 NT AUTHORITY\SYSTEM Security Update
44 PBIZ126 2/16/2020 12:00:00 AM KB4537821 NT AUTHORITY\SYSTEM Security Update
45 PWTS040 2/16/2020 12:00:00 AM KB2849696 CCX\rrpante-ccxadmin Update
46 PBIZ125 2/16/2020 12:00:00 AM KB4537821 NT AUTHORITY\SYSTEM Security Update
47 PRSH008 2/16/2020 12:00:00 AM KB4537821 NT AUTHORITY\SYSTEM Security Update
48 PBIZ121 2/16/2020 12:00:00 AM KB4537821 NT AUTHORITY\SYSTEM Security Update
49 PRSH024 2/16/2020 12:00:00 AM KB4537821 NT AUTHORITY\SYSTEM Security Update
50 PRSH010 2/16/2020 12:00:00 AM KB4486105 NT AUTHORITY\SYSTEM Update
51 PRSH005 2/16/2020 12:00:00 AM KB4537821 NT AUTHORITY\SYSTEM Security Update
52 PRSH015 2/16/2020 12:00:00 AM KB4537821 NT AUTHORITY\SYSTEM Security Update
53 PIIS007 2/16/2020 12:00:00 AM KB4538483 CCX\clroth-ccxadmin Security Update
54 PRSH021 2/16/2020 12:00:00 AM KB4537821 NT AUTHORITY\SYSTEM Security Update
55 PRSH020 2/16/2020 12:00:00 AM KB4537821 NT AUTHORITY\SYSTEM Security Update
56 PRSH018 2/16/2020 12:00:00 AM KB4537821 NT AUTHORITY\SYSTEM Security Update
57 PNCRAFILE003 2/16/2020 12:00:00 AM KB4537764 NT AUTHORITY\SYSTEM Security Update
58 PDOC001 2/16/2020 12:00:00 AM KB4537821 CCX\rrpante-ccxadmin Security Update
59 PRSH013 2/16/2020 12:00:00 AM KB4537821 NT AUTHORITY\SYSTEM Security Update
60 PSPT002 2/16/2020 12:00:00 AM KB4534310 CCX\kmboatr-ccxadmin Security Update

View File

@@ -0,0 +1,164 @@
"Name","IsClient"
"PQRSH001","True"
"PRSH027","True"
"PRSH019","True"
"PRSH011","True"
"PRSH020","True"
"PRSH021","True"
"PAAD001","True"
"PRSH023","True"
"PRSH010","True"
"PRSH024","True"
"PRSH008","True"
"PRSH001","True"
"PRSH006","True"
"PRSH000","True"
"PRSH009","True"
"PRSH005","True"
"PRSH003","True"
"PRSH004","True"
"PRSH002","True"
"PRSH007","True"
"PRSH022","True"
"PRSH014","True"
"PRSH012","True"
"PRSH016","True"
"PRSH015","True"
"PRSH018","True"
"PRSH017","True"
"PRSH013","True"
"PRSH028","True"
"PRSH052","True"
"PRSH025","True"
"PRSH029","True"
"PRSH026","True"
"PSSP001","True"
"PRSH172","True"
"PWTS040","True"
"PFNP009","True"
"PSPT002","True"
"PDOC001","True"
"PEDI114","True"
"PRSH054","True"
"PRSH051","True"
"PWHD003","True"
"PRSH174","True"
"PBIZ125","True"
"PBIZ121","True"
"PFNP010","True"
"PRSH171","True"
"PIIS007","True"
"PNCRAFILE003","True"
"PSUF002","True"
"PPCH001","True"
"PRSH059","True"
"PBIZ112","True"
"PPCS001","True"
"PARM001","True"
"PSKY001","True"
"PSQL022B","True"
"PTTS011","True"
"PFNP006","True"
"PIIS003","True"
"PEXP001","True"
"PFNP013","True"
"PSQL013","True"
"PALM001","True"
"PGAW001","True"
"PWHD004","True"
"PSPT001","True"
"PNCRAFILE007","True"
"PSUF001","True"
"PEDI111","True"
"PSQL011","True"
"PEZP001","True"
"PNCRANTRX001","True"
"PEDI112","True"
"PDWH001","True"
"PSQL015","True"
"PADF003","True"
"PSQL007","True"
"PFNP005","True"
"PSQL026","True"
"PBIZ126","True"
"PADF002","True"
"PFNP011","True"
"PFNP002","True"
"POWA001","True"
"PSQL030A","True"
"PSQL029A","True"
"PSQL016","True"
"PRSH176","True"
"PRSH056","True"
"PRSH057","True"
"PBIZ124","True"
"PSQL010","True"
"PBIZ111","True"
"PFNP008","True"
"PSSP003","True"
"PRSH152","True"
"PMHB002","True"
"PTABL001","True"
"PCCR001","True"
"PEDI116","True"
"PSNW001","True"
"PSLK001","True"
"PRSH161","True"
"PSKY003","True"
"PBIZ123","True"
"FLT2PTTS011","True"
"PRSH175","True"
"PRSH151","True"
"PSQL030B","True"
"PMHB001","True"
"PVST001","True"
"PIQV001","True"
"PSQL009","True"
"PFNP015","True"
"PSQL025","True"
"PRSH173","True"
"PBIZ122","True"
"PPDQ001","True"
"PVST002","True"
"PRSH053","True"
"PSEC002","True"
"PSQL029B","True"
"PVSS012","True"
"PSQL021","True"
"PFNP012","True"
"PNCRAFILE001","True"
"PSQL028A","True"
"PSRS001","True"
"PNCRAFILE005","True"
"PSIS002","True"
"FLT2PSQL021","True"
"PFNP007","True"
"PVSS011","True"
"PFNP003","True"
"PEDI113","True"
"PADF001","True"
"PQRDS001","True"
"PSQL022","True"
"PRSH050","True"
"PRSH055","True"
"PRSH058","True"
"PRSH162","True"
"PIWC012","True"
"PEDI115","True"
"PJMP001","True"
"PDWH002","True"
"PSRS003","True"
"PSQL006","True"
"PSQL028B","True"
"PIIS005","True"
"PKEY001","True"
"PSHP002","True"
"KSOVEPOPS001","False"
"PSQL001","False"
"PFNP001","False"
"PCPR001","False"
"PBLD001","False"
"PCVV001","False"
"PSQL023","False"
"PSQL023B","False"
"PFNP014","False"
1 Name IsClient
2 PQRSH001 True
3 PRSH027 True
4 PRSH019 True
5 PRSH011 True
6 PRSH020 True
7 PRSH021 True
8 PAAD001 True
9 PRSH023 True
10 PRSH010 True
11 PRSH024 True
12 PRSH008 True
13 PRSH001 True
14 PRSH006 True
15 PRSH000 True
16 PRSH009 True
17 PRSH005 True
18 PRSH003 True
19 PRSH004 True
20 PRSH002 True
21 PRSH007 True
22 PRSH022 True
23 PRSH014 True
24 PRSH012 True
25 PRSH016 True
26 PRSH015 True
27 PRSH018 True
28 PRSH017 True
29 PRSH013 True
30 PRSH028 True
31 PRSH052 True
32 PRSH025 True
33 PRSH029 True
34 PRSH026 True
35 PSSP001 True
36 PRSH172 True
37 PWTS040 True
38 PFNP009 True
39 PSPT002 True
40 PDOC001 True
41 PEDI114 True
42 PRSH054 True
43 PRSH051 True
44 PWHD003 True
45 PRSH174 True
46 PBIZ125 True
47 PBIZ121 True
48 PFNP010 True
49 PRSH171 True
50 PIIS007 True
51 PNCRAFILE003 True
52 PSUF002 True
53 PPCH001 True
54 PRSH059 True
55 PBIZ112 True
56 PPCS001 True
57 PARM001 True
58 PSKY001 True
59 PSQL022B True
60 PTTS011 True
61 PFNP006 True
62 PIIS003 True
63 PEXP001 True
64 PFNP013 True
65 PSQL013 True
66 PALM001 True
67 PGAW001 True
68 PWHD004 True
69 PSPT001 True
70 PNCRAFILE007 True
71 PSUF001 True
72 PEDI111 True
73 PSQL011 True
74 PEZP001 True
75 PNCRANTRX001 True
76 PEDI112 True
77 PDWH001 True
78 PSQL015 True
79 PADF003 True
80 PSQL007 True
81 PFNP005 True
82 PSQL026 True
83 PBIZ126 True
84 PADF002 True
85 PFNP011 True
86 PFNP002 True
87 POWA001 True
88 PSQL030A True
89 PSQL029A True
90 PSQL016 True
91 PRSH176 True
92 PRSH056 True
93 PRSH057 True
94 PBIZ124 True
95 PSQL010 True
96 PBIZ111 True
97 PFNP008 True
98 PSSP003 True
99 PRSH152 True
100 PMHB002 True
101 PTABL001 True
102 PCCR001 True
103 PEDI116 True
104 PSNW001 True
105 PSLK001 True
106 PRSH161 True
107 PSKY003 True
108 PBIZ123 True
109 FLT2PTTS011 True
110 PRSH175 True
111 PRSH151 True
112 PSQL030B True
113 PMHB001 True
114 PVST001 True
115 PIQV001 True
116 PSQL009 True
117 PFNP015 True
118 PSQL025 True
119 PRSH173 True
120 PBIZ122 True
121 PPDQ001 True
122 PVST002 True
123 PRSH053 True
124 PSEC002 True
125 PSQL029B True
126 PVSS012 True
127 PSQL021 True
128 PFNP012 True
129 PNCRAFILE001 True
130 PSQL028A True
131 PSRS001 True
132 PNCRAFILE005 True
133 PSIS002 True
134 FLT2PSQL021 True
135 PFNP007 True
136 PVSS011 True
137 PFNP003 True
138 PEDI113 True
139 PADF001 True
140 PQRDS001 True
141 PSQL022 True
142 PRSH050 True
143 PRSH055 True
144 PRSH058 True
145 PRSH162 True
146 PIWC012 True
147 PEDI115 True
148 PJMP001 True
149 PDWH002 True
150 PSRS003 True
151 PSQL006 True
152 PSQL028B True
153 PIIS005 True
154 PKEY001 True
155 PSHP002 True
156 KSOVEPOPS001 False
157 PSQL001 False
158 PFNP001 False
159 PCPR001 False
160 PBLD001 False
161 PCVV001 False
162 PSQL023 False
163 PSQL023B False
164 PFNP014 False

View File

@@ -0,0 +1,213 @@
"Server","ClientInstalled","CollectionName"
"PIAP002","True","_6PM - Production Patching"
"PKEY003","True","_6PM - Production Patching"
"PNCRAVERIDX002","True","_6PM - Production Patching"
"PNCRAVERIDX005","True","_6PM - Production Patching"
"PNCRAVERDA001","True","_6PM - Production Patching"
"PNCRAVERVLT002","True","_6PM - Production Patching"
"PNCRAVERIDX004","True","_6PM - Production Patching"
"PNCRAVERIDX001","True","_6PM - Production Patching"
"PNCRAVERIDX003","True","_6PM - Production Patching"
"PSEV013","True","_6PM - Production Patching"
"PSEV011","True","_6PM - Production Patching"
"NYMEPALT001","True","_6PM - Production Patching"
"AZPHPALT001","True","_6PM - Production Patching"
"PSEV012","True","_6PM - Production Patching"
"PADM001","True","_6PM - Production Patching"
"PSEV014","True","_6PM - Production Patching"
"KSOPPALT001","True","_6PM - Production Patching"
"PUTL005","True","_6PM - Production Patching"
"PSEV010","True","_6PM - Production Patching"
"PIAP001","True","_6PM - Production Patching"
"PKEY002","True","_6PM - Production Patching"
"PNCRAVERVLT003","True","_6PM - Production Patching"
"PSEV024","True","_6PM - Production Patching"
"PSNX001","True","_6PM - Production Patching"
"PSEV022","True","_6PM - Production Patching"
"PNCRAWINAUTO001","True","_6PM - Production Patching"
"PUTL011","True","_6PM - Production Patching"
"PSSP004","True","_6PM - Production Patching"
"PVRS012","True","_6PM - Production Patching"
"PCAC002","True","_6PM - Production Patching"
"PDRF001","True","_6PM - Production Patching"
"PIAM001","True","_6PM - Production Patching"
"PAPCAV001","True","_6PM - Production Patching"
"PSSP002","True","_6PM - Production Patching"
"CTHAPALT001","True","_6PM - Production Patching"
"PSEV015","True","_6PM - Production Patching"
"PUTL006","True","_6PM - Production Patching"
"PDEP001","True","_6PM - Production Patching"
"PCAC001","True","_6PM - Production Patching"
"PSSP001","True","_6PM - Production Patching"
"PAPCAC002","True","_6PM - Production Patching"
"PIAC001","True","_6PM - Production Patching"
"PIWM002","True","_6PM - Production Patching"
"PMON006","True","_6PM - Production Patching"
"PMON002","True","_6PM - Production Patching"
"PAPJNKSSLA201","True","_6PM - Production Patching"
"PVRS011","True","_6PM - Production Patching"
"PAPSEP001","True","_6PM - Production Patching"
"CTHAPDMC001","True","_6PM - Production Patching"
"AZPHPDMC001","True","_6PM - Production Patching"
"PPKI004","True","_6PM - Production Patching"
"PMON007","True","_6PM - Production Patching"
"PAPJNKSSLA202","True","_6PM - Production Patching"
"PUTL012","True","_6PM - Production Patching"
"PICO001","True","_6PM - Production Patching"
"PFNP009","True","_11PM - Production Patching - File Servers"
"PFNP010","True","_11PM - Production Patching - File Servers"
"PNCRAFILE003","True","_11PM - Production Patching - File Servers"
"PFNP006","True","_11PM - Production Patching - File Servers"
"PFNP013","True","_11PM - Production Patching - File Servers"
"PNCRAFILE007","True","_11PM - Production Patching - File Servers"
"PFNP011","True","_11PM - Production Patching - File Servers"
"PFNP002","True","_11PM - Production Patching - File Servers"
"PFNP008","True","_11PM - Production Patching - File Servers"
"PFNP015","True","_11PM - Production Patching - File Servers"
"PFNP016","True","_11PM - Production Patching - File Servers"
"PFNP017","True","_11PM - Production Patching - File Servers"
"PFNP012","True","_11PM - Production Patching - File Servers"
"PFNP018","True","_11PM - Production Patching - File Servers"
"PNCRAFILE001","True","_11PM - Production Patching - File Servers"
"PFNP019","True","_11PM - Production Patching - File Servers"
"PNCRAFILE005","True","_11PM - Production Patching - File Servers"
"PFNP007","True","_11PM - Production Patching - File Servers"
"PFNP014","False","_11PM - Production Patching - File Servers"
"PFAX021","True","_11PM - Production Patching"
"PFAX022","True","_11PM - Production Patching"
"PRSH030","True","_11PM - Production Patching"
"PRDS001","True","_11PM - Production Patching"
"PRSH038","True","_11PM - Production Patching"
"PRSH039","True","_11PM - Production Patching"
"PRSH033","True","_11PM - Production Patching"
"PRSH031","True","_11PM - Production Patching"
"PRSH035","True","_11PM - Production Patching"
"PRSH032","True","_11PM - Production Patching"
"PDFS001","True","_11PM - Production Patching"
"PDFS003","True","_11PM - Production Patching"
"PIAM002","True","_11PM - Production Patching"
"PRDS002","True","_11PM - Production Patching"
"PRSH037","True","_11PM - Production Patching"
"PRSH034","True","_11PM - Production Patching"
"PNCRAMSMQ001","True","_11PM - Production Patching"
"PRSH036","True","_11PM - Production Patching"
"PIWM001","True","_11PM - Production Patching"
"PAPP011","True","_11PM - Production Patching"
"PDFS002","True","_11PM - Production Patching"
"PRSH040","True","_11PM - Production Patching"
"PAPP001","True","_11PM - Production Patching"
"PQRSH001","True","_9PM - Production Patching"
"PRSH027","True","_9PM - Production Patching"
"PRSH019","True","_9PM - Production Patching"
"PRSH011","True","_9PM - Production Patching"
"PRSH020","True","_9PM - Production Patching"
"PRSH021","True","_9PM - Production Patching"
"PAAD001","True","_9PM - Production Patching"
"PRSH023","True","_9PM - Production Patching"
"PRSH010","True","_9PM - Production Patching"
"PRSH024","True","_9PM - Production Patching"
"PRSH008","True","_9PM - Production Patching"
"PRSH001","True","_9PM - Production Patching"
"PRSH006","True","_9PM - Production Patching"
"PRSH000","True","_9PM - Production Patching"
"PRSH009","True","_9PM - Production Patching"
"PRSH005","True","_9PM - Production Patching"
"PRSH003","True","_9PM - Production Patching"
"PRSH004","True","_9PM - Production Patching"
"PRSH002","True","_9PM - Production Patching"
"PRSH007","True","_9PM - Production Patching"
"PRSH022","True","_9PM - Production Patching"
"PRSH012","True","_9PM - Production Patching"
"PRSH016","True","_9PM - Production Patching"
"PRSH015","True","_9PM - Production Patching"
"PRSH018","True","_9PM - Production Patching"
"PRSH017","True","_9PM - Production Patching"
"PRSH013","True","_9PM - Production Patching"
"PRSH028","True","_9PM - Production Patching"
"PRSH052","True","_9PM - Production Patching"
"PRSH025","True","_9PM - Production Patching"
"PRSH029","True","_9PM - Production Patching"
"PRSH026","True","_9PM - Production Patching"
"PSSP001","True","_9PM - Production Patching"
"PRSH172","True","_9PM - Production Patching"
"PDOC001","True","_9PM - Production Patching"
"PEDI114","True","_9PM - Production Patching"
"PRSH054","True","_9PM - Production Patching"
"PRSH051","True","_9PM - Production Patching"
"PWHD003","True","_9PM - Production Patching"
"PRSH174","True","_9PM - Production Patching"
"PBIZ125","True","_9PM - Production Patching"
"PBIZ121","True","_9PM - Production Patching"
"PRSH171","True","_9PM - Production Patching"
"PSUF002","True","_9PM - Production Patching"
"PPCH001","True","_9PM - Production Patching"
"PRSH059","True","_9PM - Production Patching"
"PBIZ112","True","_9PM - Production Patching"
"PPCS001","True","_9PM - Production Patching"
"PSKY001","True","_9PM - Production Patching"
"PSQL022B","True","_9PM - Production Patching"
"PSQL013","True","_9PM - Production Patching"
"PALM001","True","_9PM - Production Patching"
"PGAW001","True","_9PM - Production Patching"
"PWHD004","True","_9PM - Production Patching"
"PSUF001","True","_9PM - Production Patching"
"PEDI111","True","_9PM - Production Patching"
"PEZP001","True","_9PM - Production Patching"
"PNCRANTRX001","True","_9PM - Production Patching"
"PEDI112","True","_9PM - Production Patching"
"PSQL015","True","_9PM - Production Patching"
"PADF003","True","_9PM - Production Patching"
"PSQL026","True","_9PM - Production Patching"
"PBIZ126","True","_9PM - Production Patching"
"PADF002","True","_9PM - Production Patching"
"POWA001","True","_9PM - Production Patching"
"PSQL030A","True","_9PM - Production Patching"
"PSQL029A","True","_9PM - Production Patching"
"PSQL016","True","_9PM - Production Patching"
"PRSH176","True","_9PM - Production Patching"
"PRSH056","True","_9PM - Production Patching"
"PRSH057","True","_9PM - Production Patching"
"PBIZ124","True","_9PM - Production Patching"
"PSQL010","True","_9PM - Production Patching"
"PBIZ111","True","_9PM - Production Patching"
"PSSP003","True","_9PM - Production Patching"
"PRSH152","True","_9PM - Production Patching"
"PMHB002","True","_9PM - Production Patching"
"PTABL001","True","_9PM - Production Patching"
"PCCR001","True","_9PM - Production Patching"
"PEDI116","True","_9PM - Production Patching"
"PSNW001","True","_9PM - Production Patching"
"PSLK001","True","_9PM - Production Patching"
"PRSH161","True","_9PM - Production Patching"
"PSKY003","True","_9PM - Production Patching"
"PBIZ123","True","_9PM - Production Patching"
"PRSH175","True","_9PM - Production Patching"
"PRSH151","True","_9PM - Production Patching"
"PSQL030B","True","_9PM - Production Patching"
"PMHB001","True","_9PM - Production Patching"
"PVST001","True","_9PM - Production Patching"
"PIQV001","True","_9PM - Production Patching"
"PSQL009","True","_9PM - Production Patching"
"PSQL025","True","_9PM - Production Patching"
"PRSH173","True","_9PM - Production Patching"
"PBIZ122","True","_9PM - Production Patching"
"PPDQ001","True","_9PM - Production Patching"
"PVST002","True","_9PM - Production Patching"
"PRSH053","True","_9PM - Production Patching"
"PSQL029B","True","_9PM - Production Patching"
"PVSS012","True","_9PM - Production Patching"
"PSQL021","True","_9PM - Production Patching"
"PSQL028A","True","_9PM - Production Patching"
"PSIS002","True","_9PM - Production Patching"
"FLT2PSQL021","True","_9PM - Production Patching"
"PVSS011","True","_9PM - Production Patching"
"PEDI113","True","_9PM - Production Patching"
"PQRDS001","True","_9PM - Production Patching"
"PSQL022","True","_9PM - Production Patching"
"PRSH050","True","_9PM - Production Patching"
"PRSH055","True","_9PM - Production Patching"
"PRSH058","True","_9PM - Production Patching"
"PRSH162","True","_9PM - Production Patching"
"PEDI115","True","_9PM - Production Patching"
"PJMP001","True","_9PM - Production Patching"
"PSQL028B","True","_9PM - Production Patching"
1 Server ClientInstalled CollectionName
2 PIAP002 True _6PM - Production Patching
3 PKEY003 True _6PM - Production Patching
4 PNCRAVERIDX002 True _6PM - Production Patching
5 PNCRAVERIDX005 True _6PM - Production Patching
6 PNCRAVERDA001 True _6PM - Production Patching
7 PNCRAVERVLT002 True _6PM - Production Patching
8 PNCRAVERIDX004 True _6PM - Production Patching
9 PNCRAVERIDX001 True _6PM - Production Patching
10 PNCRAVERIDX003 True _6PM - Production Patching
11 PSEV013 True _6PM - Production Patching
12 PSEV011 True _6PM - Production Patching
13 NYMEPALT001 True _6PM - Production Patching
14 AZPHPALT001 True _6PM - Production Patching
15 PSEV012 True _6PM - Production Patching
16 PADM001 True _6PM - Production Patching
17 PSEV014 True _6PM - Production Patching
18 KSOPPALT001 True _6PM - Production Patching
19 PUTL005 True _6PM - Production Patching
20 PSEV010 True _6PM - Production Patching
21 PIAP001 True _6PM - Production Patching
22 PKEY002 True _6PM - Production Patching
23 PNCRAVERVLT003 True _6PM - Production Patching
24 PSEV024 True _6PM - Production Patching
25 PSNX001 True _6PM - Production Patching
26 PSEV022 True _6PM - Production Patching
27 PNCRAWINAUTO001 True _6PM - Production Patching
28 PUTL011 True _6PM - Production Patching
29 PSSP004 True _6PM - Production Patching
30 PVRS012 True _6PM - Production Patching
31 PCAC002 True _6PM - Production Patching
32 PDRF001 True _6PM - Production Patching
33 PIAM001 True _6PM - Production Patching
34 PAPCAV001 True _6PM - Production Patching
35 PSSP002 True _6PM - Production Patching
36 CTHAPALT001 True _6PM - Production Patching
37 PSEV015 True _6PM - Production Patching
38 PUTL006 True _6PM - Production Patching
39 PDEP001 True _6PM - Production Patching
40 PCAC001 True _6PM - Production Patching
41 PSSP001 True _6PM - Production Patching
42 PAPCAC002 True _6PM - Production Patching
43 PIAC001 True _6PM - Production Patching
44 PIWM002 True _6PM - Production Patching
45 PMON006 True _6PM - Production Patching
46 PMON002 True _6PM - Production Patching
47 PAPJNKSSLA201 True _6PM - Production Patching
48 PVRS011 True _6PM - Production Patching
49 PAPSEP001 True _6PM - Production Patching
50 CTHAPDMC001 True _6PM - Production Patching
51 AZPHPDMC001 True _6PM - Production Patching
52 PPKI004 True _6PM - Production Patching
53 PMON007 True _6PM - Production Patching
54 PAPJNKSSLA202 True _6PM - Production Patching
55 PUTL012 True _6PM - Production Patching
56 PICO001 True _6PM - Production Patching
57 PFNP009 True _11PM - Production Patching - File Servers
58 PFNP010 True _11PM - Production Patching - File Servers
59 PNCRAFILE003 True _11PM - Production Patching - File Servers
60 PFNP006 True _11PM - Production Patching - File Servers
61 PFNP013 True _11PM - Production Patching - File Servers
62 PNCRAFILE007 True _11PM - Production Patching - File Servers
63 PFNP011 True _11PM - Production Patching - File Servers
64 PFNP002 True _11PM - Production Patching - File Servers
65 PFNP008 True _11PM - Production Patching - File Servers
66 PFNP015 True _11PM - Production Patching - File Servers
67 PFNP016 True _11PM - Production Patching - File Servers
68 PFNP017 True _11PM - Production Patching - File Servers
69 PFNP012 True _11PM - Production Patching - File Servers
70 PFNP018 True _11PM - Production Patching - File Servers
71 PNCRAFILE001 True _11PM - Production Patching - File Servers
72 PFNP019 True _11PM - Production Patching - File Servers
73 PNCRAFILE005 True _11PM - Production Patching - File Servers
74 PFNP007 True _11PM - Production Patching - File Servers
75 PFNP014 False _11PM - Production Patching - File Servers
76 PFAX021 True _11PM - Production Patching
77 PFAX022 True _11PM - Production Patching
78 PRSH030 True _11PM - Production Patching
79 PRDS001 True _11PM - Production Patching
80 PRSH038 True _11PM - Production Patching
81 PRSH039 True _11PM - Production Patching
82 PRSH033 True _11PM - Production Patching
83 PRSH031 True _11PM - Production Patching
84 PRSH035 True _11PM - Production Patching
85 PRSH032 True _11PM - Production Patching
86 PDFS001 True _11PM - Production Patching
87 PDFS003 True _11PM - Production Patching
88 PIAM002 True _11PM - Production Patching
89 PRDS002 True _11PM - Production Patching
90 PRSH037 True _11PM - Production Patching
91 PRSH034 True _11PM - Production Patching
92 PNCRAMSMQ001 True _11PM - Production Patching
93 PRSH036 True _11PM - Production Patching
94 PIWM001 True _11PM - Production Patching
95 PAPP011 True _11PM - Production Patching
96 PDFS002 True _11PM - Production Patching
97 PRSH040 True _11PM - Production Patching
98 PAPP001 True _11PM - Production Patching
99 PQRSH001 True _9PM - Production Patching
100 PRSH027 True _9PM - Production Patching
101 PRSH019 True _9PM - Production Patching
102 PRSH011 True _9PM - Production Patching
103 PRSH020 True _9PM - Production Patching
104 PRSH021 True _9PM - Production Patching
105 PAAD001 True _9PM - Production Patching
106 PRSH023 True _9PM - Production Patching
107 PRSH010 True _9PM - Production Patching
108 PRSH024 True _9PM - Production Patching
109 PRSH008 True _9PM - Production Patching
110 PRSH001 True _9PM - Production Patching
111 PRSH006 True _9PM - Production Patching
112 PRSH000 True _9PM - Production Patching
113 PRSH009 True _9PM - Production Patching
114 PRSH005 True _9PM - Production Patching
115 PRSH003 True _9PM - Production Patching
116 PRSH004 True _9PM - Production Patching
117 PRSH002 True _9PM - Production Patching
118 PRSH007 True _9PM - Production Patching
119 PRSH022 True _9PM - Production Patching
120 PRSH012 True _9PM - Production Patching
121 PRSH016 True _9PM - Production Patching
122 PRSH015 True _9PM - Production Patching
123 PRSH018 True _9PM - Production Patching
124 PRSH017 True _9PM - Production Patching
125 PRSH013 True _9PM - Production Patching
126 PRSH028 True _9PM - Production Patching
127 PRSH052 True _9PM - Production Patching
128 PRSH025 True _9PM - Production Patching
129 PRSH029 True _9PM - Production Patching
130 PRSH026 True _9PM - Production Patching
131 PSSP001 True _9PM - Production Patching
132 PRSH172 True _9PM - Production Patching
133 PDOC001 True _9PM - Production Patching
134 PEDI114 True _9PM - Production Patching
135 PRSH054 True _9PM - Production Patching
136 PRSH051 True _9PM - Production Patching
137 PWHD003 True _9PM - Production Patching
138 PRSH174 True _9PM - Production Patching
139 PBIZ125 True _9PM - Production Patching
140 PBIZ121 True _9PM - Production Patching
141 PRSH171 True _9PM - Production Patching
142 PSUF002 True _9PM - Production Patching
143 PPCH001 True _9PM - Production Patching
144 PRSH059 True _9PM - Production Patching
145 PBIZ112 True _9PM - Production Patching
146 PPCS001 True _9PM - Production Patching
147 PSKY001 True _9PM - Production Patching
148 PSQL022B True _9PM - Production Patching
149 PSQL013 True _9PM - Production Patching
150 PALM001 True _9PM - Production Patching
151 PGAW001 True _9PM - Production Patching
152 PWHD004 True _9PM - Production Patching
153 PSUF001 True _9PM - Production Patching
154 PEDI111 True _9PM - Production Patching
155 PEZP001 True _9PM - Production Patching
156 PNCRANTRX001 True _9PM - Production Patching
157 PEDI112 True _9PM - Production Patching
158 PSQL015 True _9PM - Production Patching
159 PADF003 True _9PM - Production Patching
160 PSQL026 True _9PM - Production Patching
161 PBIZ126 True _9PM - Production Patching
162 PADF002 True _9PM - Production Patching
163 POWA001 True _9PM - Production Patching
164 PSQL030A True _9PM - Production Patching
165 PSQL029A True _9PM - Production Patching
166 PSQL016 True _9PM - Production Patching
167 PRSH176 True _9PM - Production Patching
168 PRSH056 True _9PM - Production Patching
169 PRSH057 True _9PM - Production Patching
170 PBIZ124 True _9PM - Production Patching
171 PSQL010 True _9PM - Production Patching
172 PBIZ111 True _9PM - Production Patching
173 PSSP003 True _9PM - Production Patching
174 PRSH152 True _9PM - Production Patching
175 PMHB002 True _9PM - Production Patching
176 PTABL001 True _9PM - Production Patching
177 PCCR001 True _9PM - Production Patching
178 PEDI116 True _9PM - Production Patching
179 PSNW001 True _9PM - Production Patching
180 PSLK001 True _9PM - Production Patching
181 PRSH161 True _9PM - Production Patching
182 PSKY003 True _9PM - Production Patching
183 PBIZ123 True _9PM - Production Patching
184 PRSH175 True _9PM - Production Patching
185 PRSH151 True _9PM - Production Patching
186 PSQL030B True _9PM - Production Patching
187 PMHB001 True _9PM - Production Patching
188 PVST001 True _9PM - Production Patching
189 PIQV001 True _9PM - Production Patching
190 PSQL009 True _9PM - Production Patching
191 PSQL025 True _9PM - Production Patching
192 PRSH173 True _9PM - Production Patching
193 PBIZ122 True _9PM - Production Patching
194 PPDQ001 True _9PM - Production Patching
195 PVST002 True _9PM - Production Patching
196 PRSH053 True _9PM - Production Patching
197 PSQL029B True _9PM - Production Patching
198 PVSS012 True _9PM - Production Patching
199 PSQL021 True _9PM - Production Patching
200 PSQL028A True _9PM - Production Patching
201 PSIS002 True _9PM - Production Patching
202 FLT2PSQL021 True _9PM - Production Patching
203 PVSS011 True _9PM - Production Patching
204 PEDI113 True _9PM - Production Patching
205 PQRDS001 True _9PM - Production Patching
206 PSQL022 True _9PM - Production Patching
207 PRSH050 True _9PM - Production Patching
208 PRSH055 True _9PM - Production Patching
209 PRSH058 True _9PM - Production Patching
210 PRSH162 True _9PM - Production Patching
211 PEDI115 True _9PM - Production Patching
212 PJMP001 True _9PM - Production Patching
213 PSQL028B True _9PM - Production Patching

View File

@@ -0,0 +1,32 @@
DAPP012
DFNP009
DVCO001
DAPP006
DWHD003
DFNP001
DBIT901
DWAM002
DCTI001
DFNP020
DFNP002
DAPP011
DCPR001
DVB6001
DWHD001
DPGP001
DEDI001
DDWH001
DUTL012
DFNP014
DIAP001
DGAW001
DAPVRNS001
DAPCAV001
DAPCAC001
DAPCAC002
DFAX011
DAPSEP001
DDOC001
DBTS001
DWAM001
DMHB001

Binary file not shown.

View File

@@ -0,0 +1,54 @@
DeviceName CollectionName StatusTime Status
---------- -------------- ---------- ------
DAPP012 DEV-Patching-Application-Servers 1/27/2020 3:09:05 PM InProgress
DFNP009 DEV-Patching-Application-Servers 1/24/2020 4:34:27 PM InProgress
DVCO001 DEV-Patching-Application-Servers 1/27/2020 2:58:17 PM InProgress
DAPP006 DEV-Patching-Application-Servers 1/29/2020 8:01:37 PM InProgress
DWHD003 DEV-Patching-Application-Servers 1/24/2020 4:14:43 PM InProgress
DFNP001 DEV-Patching-Application-Servers 1/24/2020 4:32:24 PM InProgress
DBIT901 DEV-Patching-Application-Servers 1/24/2020 4:15:29 PM InProgress
DWAM002 DEV-Patching-Application-Servers 1/27/2020 2:20:13 PM InProgress
DCTI001 DEV-Patching-Application-Servers 1/24/2020 4:13:11 PM InProgress
DFNP020 DEV-Patching-Application-Servers 1/24/2020 4:12:41 PM InProgress
DFNP002 DEV-Patching-Application-Servers 1/24/2020 5:34:08 PM InProgress
DAPP011 DEV-Patching-Application-Servers 3/24/2020 11:03:27 PM InProgress
DCPR001 DEV-Patching-Application-Servers 1/24/2020 5:07:06 PM InProgress
DVB6001 DEV-Patching-Application-Servers 1/27/2020 6:16:47 PM InProgress
DWHD001 DEV-Patching-Application-Servers 1/29/2020 7:43:59 PM Success
DPGP001 DEV-Patching-Application-Servers 1/29/2020 6:41:40 PM Success
DEDI001 DEV-Patching-Application-Servers 1/27/2020 3:23:54 PM Success
DDWH001 DEV-Patching-Application-Servers 1/27/2020 2:59:06 PM Success
DUTL012 DEV-Patching-Application-Servers 2/11/2020 11:25:39 PM Success
DFNP014 DEV-Patching-Application-Servers 1/24/2020 4:51:33 PM Success
DIAP001 DEV-Patching-Application-Servers 1/24/2020 3:45:21 PM Success
DGAW001 DEV-Patching-Application-Servers 1/29/2020 6:45:43 PM Success
DAPVRNS001 DEV-Patching-Application-Servers 3/20/2020 8:53:59 AM Success
DAPCAV001 DEV-Patching-Application-Servers 1/29/2020 5:26:57 PM Success
DAPCAC001 DEV-Patching-Application-Servers 2/6/2020 9:56:05 AM Success
DAPCAC002 DEV-Patching-Application-Servers 1/29/2020 5:46:44 PM Success
DFAX011 DEV-Patching-Application-Servers 1/29/2020 6:02:48 PM Success
DAPSEP001 DEV-Patching-Application-Servers 1/29/2020 5:35:25 PM Success
DDOC001 DEV-Patching-Application-Servers 3/2/2020 9:49:41 AM Success
DBTS001 DEV-Patching-Application-Servers 3/26/2020 11:47:08 AM Success
DWAM001 DEV-Patching-Application-Servers 3/28/2020 12:06:01 AM Unknown
DMHB001 DEV-Patching-Application-Servers 3/28/2020 12:06:01 AM Unknown
1 DeviceName CollectionName StatusTime Status
2 ---------- -------------- ---------- ------
3 DAPP012 DEV-Patching-Application-Servers 1/27/2020 3:09:05 PM InProgress
4 DFNP009 DEV-Patching-Application-Servers 1/24/2020 4:34:27 PM InProgress
5 DVCO001 DEV-Patching-Application-Servers 1/27/2020 2:58:17 PM InProgress
6 DAPP006 DEV-Patching-Application-Servers 1/29/2020 8:01:37 PM InProgress
7 DWHD003 DEV-Patching-Application-Servers 1/24/2020 4:14:43 PM InProgress
8 DFNP001 DEV-Patching-Application-Servers 1/24/2020 4:32:24 PM InProgress
9 DBIT901 DEV-Patching-Application-Servers 1/24/2020 4:15:29 PM InProgress
10 DWAM002 DEV-Patching-Application-Servers 1/27/2020 2:20:13 PM InProgress
11 DCTI001 DEV-Patching-Application-Servers 1/24/2020 4:13:11 PM InProgress
12 DFNP020 DEV-Patching-Application-Servers 1/24/2020 4:12:41 PM InProgress
13 DFNP002 DEV-Patching-Application-Servers 1/24/2020 5:34:08 PM InProgress
14 DAPP011 DEV-Patching-Application-Servers 3/24/2020 11:03:27 PM InProgress
15 DCPR001 DEV-Patching-Application-Servers 1/24/2020 5:07:06 PM InProgress
16 DVB6001 DEV-Patching-Application-Servers 1/27/2020 6:16:47 PM InProgress
17 DWHD001 DEV-Patching-Application-Servers 1/29/2020 7:43:59 PM Success
18 DPGP001 DEV-Patching-Application-Servers 1/29/2020 6:41:40 PM Success
19 DEDI001 DEV-Patching-Application-Servers 1/27/2020 3:23:54 PM Success
20 DDWH001 DEV-Patching-Application-Servers 1/27/2020 2:59:06 PM Success
21 DUTL012 DEV-Patching-Application-Servers 2/11/2020 11:25:39 PM Success
22 DFNP014 DEV-Patching-Application-Servers 1/24/2020 4:51:33 PM Success
23 DIAP001 DEV-Patching-Application-Servers 1/24/2020 3:45:21 PM Success
24 DGAW001 DEV-Patching-Application-Servers 1/29/2020 6:45:43 PM Success
25 DAPVRNS001 DEV-Patching-Application-Servers 3/20/2020 8:53:59 AM Success
26 DAPCAV001 DEV-Patching-Application-Servers 1/29/2020 5:26:57 PM Success
27 DAPCAC001 DEV-Patching-Application-Servers 2/6/2020 9:56:05 AM Success
28 DAPCAC002 DEV-Patching-Application-Servers 1/29/2020 5:46:44 PM Success
29 DFAX011 DEV-Patching-Application-Servers 1/29/2020 6:02:48 PM Success
30 DAPSEP001 DEV-Patching-Application-Servers 1/29/2020 5:35:25 PM Success
31 DDOC001 DEV-Patching-Application-Servers 3/2/2020 9:49:41 AM Success
32 DBTS001 DEV-Patching-Application-Servers 3/26/2020 11:47:08 AM Success
33 DWAM001 DEV-Patching-Application-Servers 3/28/2020 12:06:01 AM Unknown
34 DMHB001 DEV-Patching-Application-Servers 3/28/2020 12:06:01 AM Unknown

View File

@@ -0,0 +1,33 @@
"Name","IsClient"
"DFNP014","True"
"DAPSEP001","True"
"DFAX011","True"
"DAPCAC002","True"
"DAPCAC001","True"
"DFNP002","True"
"DAPCAV001","True"
"DAPVRNS001","True"
"DCPR001","True"
"DGAW001","True"
"DWAM002","True"
"DIAP001","True"
"DFNP001","True"
"DWHD003","True"
"DAPP006","True"
"DAPP012","True"
"DDOC001","True"
"DCTI001","True"
"DVB6001","True"
"DFNP009","True"
"DVCO001","True"
"DBIT901","True"
"DFNP020","True"
"DWHD001","True"
"DPGP001","True"
"DEDI001","True"
"DAPP011","True"
"DMHB001","True"
"DDWH001","True"
"DUTL012","True"
"DWAM001","True"
"DBTS001","True"
1 Name IsClient
2 DFNP014 True
3 DAPSEP001 True
4 DFAX011 True
5 DAPCAC002 True
6 DAPCAC001 True
7 DFNP002 True
8 DAPCAV001 True
9 DAPVRNS001 True
10 DCPR001 True
11 DGAW001 True
12 DWAM002 True
13 DIAP001 True
14 DFNP001 True
15 DWHD003 True
16 DAPP006 True
17 DAPP012 True
18 DDOC001 True
19 DCTI001 True
20 DVB6001 True
21 DFNP009 True
22 DVCO001 True
23 DBIT901 True
24 DFNP020 True
25 DWHD001 True
26 DPGP001 True
27 DEDI001 True
28 DAPP011 True
29 DMHB001 True
30 DDWH001 True
31 DUTL012 True
32 DWAM001 True
33 DBTS001 True

View File

@@ -0,0 +1,258 @@
"UpdateGroup","ArticleID","BulletinID","Title"
"Server 2008 Required Updates","2500170","MS11-066","Security Update for Microsoft Chart Controls for Microsoft .NET Framework 3.5 Service Pack 1 (KB2500170)"
"Server 2008 Required Updates","3208481","MS16-144","Security Update for Windows Server 2008 for x64-based Systems (KB3208481)"
"Server 2008 Required Updates","4014652","","Security Update for Windows Server 2008 for x64-based Systems (KB4014652)"
"Server 2008 Required Updates","4014794","","Security Update for Windows Server 2008 for x64-based Systems (KB4014794)"
"Server 2008 Required Updates","4015067","","Security Update for Windows Server 2008 for x64-based Systems (KB4015067)"
"Server 2008 Required Updates","4018927","","Security Update for Windows Server 2008 for x64-based Systems (KB4018927)"
"Server 2008 Required Updates","4034744","","Security Update for Windows Server 2008 for x64-based Systems (KB4034744)"
"Server 2008 Required Updates","3170455","","Security Update for Windows Server 2008 for x64-based Systems (KB3170455)"
"Server 2008 Required Updates","4089229","","2018-03 Security Update for Windows Server 2008 for x64-based Systems (KB4089229)"
"Server 2008 Required Updates","4093227","","2018-06 Security Update for Windows Server 2008 for x64-based Systems (KB4093227)"
"Server 2008 Required Updates","4130956","","2018-06 Security Update for Windows Server 2008 for x64-based Systems (KB4130956)"
"Server 2008 Required Updates","4291391","","2018-07 Security Update for Windows Server 2008 for x64-based Systems (KB4291391)"
"Server 2008 Required Updates","4339503","","2018-07 Security Update for Windows Server 2008 for x64-based Systems (KB4339503)"
"Server 2008 Required Updates","4340007","","2018-07 Security Only Update for .NET Framework 2.0, 3.0, 4.5.2, 4.6 for Windows Server 2008 SP2 for x64 (KB4340007)"
"Server 2008 Required Updates","4338380","","2018-08 Security Update for Windows Server 2008 for x64-based Systems (KB4338380)"
"Server 2008 Required Updates","4340939","","2018-08 Security Update for Windows Server 2008 for x64-based Systems (KB4340939)"
"Server 2008 Required Updates","4341832","","2018-08 Security Update for Windows Server 2008 for x64-based Systems (KB4341832)"
"Server 2008 Required Updates","4345682","","2018-08 Security Only Update for .NET Framework 2.0, 3.0, 4.5.2, 4.6 for Windows Server 2008 SP2 for x64 (KB4345682)"
"Server 2008 Required Updates","4457984","","2018-09 Security Only Quality Update for Windows Server 2008 for x64-based Systems (KB4457984)"
"Server 2008 Required Updates","4463104","","2018-10 Security Only Quality Update for Windows Server 2008 for x64-based Systems (KB4463104)"
"Server 2008 Required Updates","4467700","","2018-11 Security Only Quality Update for Windows Server 2008 for x64-based Systems (KB4467700)"
"Server 2008 Required Updates","4471319","","2018-12 Security Only Quality Update for Windows Server 2008 for x64-based Systems (KB4471319)"
"Server 2008 Required Updates","4471984","","2018-12 Security Only Update for .NET Framework 3.5 SP1, 4.5.2, 4.6 for Windows Server 2008 SP2 for x64 (KB4471984)"
"Server 2008 Required Updates","4480957","","2019-01 Security Only Quality Update for Windows Server 2008 for x64-based Systems (KB4480957)"
"Server 2008 Required Updates","4487124","","2019-02 Security Only Update for .NET Framework 2.0, 3.0, 4.5.2, 4.6 for Windows Server 2008 SP2 for x64 (KB4487124)"
"Server 2008 Required Updates","4487019","","2019-02 Security Only Quality Update for Windows Server 2008 for x64-based Systems (KB4487019)"
"Server 2008 Required Updates","4489876","","2019-03 Security Only Quality Update for Windows Server 2008 for x64-based Systems (KB4489876)"
"Server 2008 Required Updates","4493730","","Security Update for Windows Server 2008 for x64-based Systems (KB4493730)"
"Server 2008 Required Updates","4493458","","2019-04 Security Only Quality Update for Windows Server 2008 for x64-based Systems (KB4493458)"
"Server 2008 Required Updates","4498964","","2019-05 Security Only Update for .NET Framework 2.0, 3.0, 4.5.2, 4.6 on Windows Server 2008 SP2 for x64 (KB4498964)"
"Server 2008 Required Updates","4499180","","2019-05 Security Only Quality Update for Windows Server 2008 for x64-based Systems (KB4499180)"
"Server 2008 Required Updates","4503287","","2019-06 Security Only Quality Update for Windows Server 2008 for x64-based Systems (KB4503287)"
"Server 2008 Required Updates","4507461","","2019-07 Security Only Quality Update for Windows Server 2008 for x64-based Systems (KB4507461)"
"Server 2008 Required Updates","4507414","","2019-07 Security Only Update for .NET Framework 2.0, 3.0, 4.5.2, 4.6 for Windows Server 2008 SP2 for x64 (KB4507414)"
"Server 2008 Required Updates","4512491","","2019-08 Security Only Quality Update for Windows Server 2008 for x64-based Systems (KB4512491)"
"Server 2008 Required Updates","4516051","","2019-09 Security Only Quality Update for Windows Server 2008 for x64-based Systems (KB4516051)"
"Server 2008 Required Updates","4520009","","2019-10 Security Only Quality Update for Windows Server 2008 for x64-based Systems (KB4520009)"
"Server 2008 Required Updates","4474419","","2019-09 Security Update for Windows Server 2008 for x64-based Systems (KB4474419)"
"Server 2008 Required Updates","4525239","","2019-11 Security Only Quality Update for Windows Server 2008 for x64-based Systems (KB4525239)"
"Server 2008 Required Updates","4530719","","2019-12 Security Only Quality Update for Windows Server 2008 for x64-based Systems (KB4530719)"
"Server 2008 Required Updates","4534979","","2020-01 Security Only Update for .NET Framework 2.0, 3.0, 4.5.2, 4.6 for Windows Server 2008 SP2 for x64 (KB4534979)"
"Server 2008 Required Updates","4534312","","2020-01 Security Only Quality Update for Windows Server 2008 for x64-based Systems (KB4534312)"
"Server 2008 Required Updates","960568","","BITS 4.0 for Windows Server 2008 x64 Edition (KB960568)"
"Server 2008 Required Updates","4132941","","Update for Windows Server 2008 x64 Edition (KB4132941)"
"Server 2008 Required Updates","4486459","","2019-02 Update for Windows Server 2008 for x64-based Systems (KB4486459)"
"Server 2008 Required Updates","4490128","","2019-03 Update for Windows Server 2008 for x64-based Systems (KB4490128)"
"Server 2008 Required Updates","4489489","","Update for .NET Framework 2.0, 3.0, 4.5.2, 4.6 for Windows Server 2008 SP2 for x64 (KB4489489)"
"Server 2008 Required Updates","4507704","","2019-07 Update for Windows Server 2008 for x64-based Systems (KB4507704)"
"Server 2008 Required Updates","4501226","","2019-05 Update for Windows Server 2008 for x64-based Systems (KB4501226)"
"Server 2008 Required Updates","4519108","","2019-10 Update for Windows Server 2008 for x64-based Systems (KB4519108)"
"Server 2008 Required Updates","4537822","","2020-02 Security Only Quality Update for Windows Server 2008 for x64-based Systems (KB4537822)"
"Server 2008 Required Updates","4556406","","2020-05 Security Only Update for .NET Framework 2.0, 3.0, 4.5.2, 4.6 for Windows Server 2008 SP2 for x64 (KB4556406)"
"Server 2008 Required Updates","4575904","","2020-07 Extended Security Updates (ESU) Licensing Preparation Package for Windows Server 2008 for x64-based Systems (KB4575904)"
"Server 2008 Required Updates","4570503","","2020-08 Security Only Update for .NET Framework 2.0, 3.0, 4.5.2, 4.6 for Windows Server 2008 SP2 for x64 (KB4570503)"
"Server 2008 Required Updates","4580470","","2020-10 Security Only Update for .NET Framework 2.0, 3.0, 4.5.2, 4.6 for Windows Server 2008 SP2 for x64 (KB4580470)"
"Server 2008 Required Updates","4566469","","2020-10 Security Only Update for .NET Framework 2.0, 3.0, 4.5.2, 4.6 for Windows Server 2008 SP2 for x64 (KB4566469)"
"Server 2008 Required Updates","4586086","","2020-11 Security and Quality Rollup for .NET Framework 2.0, 3.0, 4.5.2, 4.6 for Windows Server 2008 SP2 for x64 (KB4586086)"
"Server 2008 R2 Requred Patches","2894844","","Security Update for Microsoft .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 SP1 for x64-based Systems (KB2894844)"
"Server 2008 R2 Requred Patches","4576490","","2020-09 Security Only Update for .NET Framework 4.8 for Windows Server 2008 R2 for x64 (KB4576490)"
"Server 2008 R2 Requred Patches","2823180","","Update for Windows Server 2008 R2 x64 Edition (KB2823180)"
"Server 2008 R2 Requred Patches","4507411","","2019-07 Security Only Update for .NET Framework 3.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 for Windows 7 and Server 2008 R2 for x64 (KB4507411)"
"Server 2008 R2 Requred Patches","4580387","","2020-10 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4580387)"
"Server 2008 R2 Requred Patches","4556403","","2020-05 Security Only Update for .NET Framework 3.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 for Windows Server 2008 R2 for x64 (KB4556403)"
"Server 2008 R2 Requred Patches","2972100","MS14-057","Security Update for Microsoft .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 SP1 for x64-based Systems (KB2972100)"
"Server 2008 R2 Requred Patches","4099637","","2018-05 Security Only Update for .NET Framework 3.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1 on Windows 7 and Server 2008 R2 for x64 (KB4099637)"
"Server 2008 R2 Requred Patches","4490628","","2019-03 Servicing Stack Update for Windows Server 2008 R2 for x64-based Systems (KB4490628)"
"Server 2008 R2 Requred Patches","4586083","","2020-11 Security and Quality Rollup for .NET Framework 3.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 for Windows Server 2008 R2 for x64 (KB4586083)"
"Server 2008 R2 Requred Patches","2992611","MS14-066","Security Update for Windows Server 2008 R2 x64 Edition (KB2992611)"
"Server 2008 R2 Requred Patches","4019108","","May, 2017 Security Only Update for .NET Framework 3.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2 on Windows 7 and Windows Server 2008 R2 for x64 (KB4019108)"
"Server 2008 R2 Requred Patches","4467106","","2018-11 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4467106)"
"Server 2008 R2 Requred Patches","4503269","","2019-06 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4503269)"
"Server 2008 R2 Requred Patches","2742599","MS13-004","Security Update for Microsoft .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 SP1 for x64-based Systems (KB2742599)"
"Server 2008 R2 Requred Patches","2789645","MS13-015","Security Update for Microsoft .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 SP1 for x64-based Systems (KB2789645)"
"Server 2008 R2 Requred Patches","4099950","","2018-04 Update for Windows Server 2008 R2 for x64-based Systems (KB4099950)"
"Server 2008 R2 Requred Patches","4033342","","Microsoft .NET Framework 4.7.1 for Windows 7 and Windows Server 2008 R2 for x64 (KB4033342)"
"Server 2008 R2 Requred Patches","3072305","MS15-080","Security Update for Microsoft .NET Framework 3.5.1 on Windows 7 SP1 and Windows Server 2008 R2 SP1 for x64 (KB3072305)"
"Server 2008 R2 Requred Patches","4486459","","2019-02 Update for Windows Server 2008 R2 for x64-based Systems (KB4486459)"
"Server 2008 R2 Requred Patches","4541500","","2020-03 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4541500)"
"Server 2008 R2 Requred Patches","4340004","","2018-07 Security Only Update for .NET Framework 3.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2 for Windows 7 and Server 2008 R2 for x64 (KB4340004)"
"Server 2008 R2 Requred Patches","3186497","","Microsoft .NET Framework 4.7 for Windows 7 and Windows Server 2008 R2 for x64 (KB3186497)"
"Server 2008 R2 Requred Patches","4580467","","2020-10 Security Only Update for .NET Framework 3.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 for Windows Server 2008 R2 for x64 (KB4580467)"
"Server 2008 R2 Requred Patches","4501226","","2019-05 Update for Windows Server 2008 R2 for x64-based Systems (KB4501226)"
"Server 2008 R2 Requred Patches","4471328","","2018-12 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4471328)"
"Server 2008 R2 Requred Patches","4507456","","2019-07 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4507456)"
"Server 2008 R2 Requred Patches","2836942","","Update for Microsoft .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 SP1 for x64-based Systems (KB2836942)"
"Server 2008 R2 Requred Patches","2604115","MS12-035","Security Update for Microsoft .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 SP1 for x64-based Systems (KB2604115)"
"Server 2008 R2 Requred Patches","4343899","","2018-08 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4343899)"
"Server 2008 R2 Requred Patches","4525233","","2019-11 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4525233)"
"Server 2008 R2 Requred Patches","2931356","MS14-026","Security Update for Microsoft .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 SP1 for x64-based Systems (KB2931356)"
"Server 2008 R2 Requred Patches","4503548","","Microsoft .NET Framework 4.8 for Windows Server 2008 R2 for x64 (KB4503548)"
"Server 2008 R2 Requred Patches","3023215","MS15-048","Security Update for Microsoft .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 SP1 for x64-based Systems (KB3023215)"
"Server 2008 R2 Requred Patches","4462915","","2018-10 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4462915)"
"Server 2008 R2 Requred Patches","4493448","","2019-04 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4493448)"
"Server 2008 R2 Requred Patches","4489486","","Update for .NET Framework 3.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2 for Windows 7 and Server 2008 R2 for x64 (KB4489486)"
"Server 2008 R2 Requred Patches","2729452","MS12-074","Security Update for Microsoft .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 SP1 for x64-based Systems (KB2729452)"
"Server 2008 R2 Requred Patches","3031432","MS15-015","Security Update for Windows Server 2008 R2 x64 Edition (KB3031432)"
"Server 2008 R2 Requred Patches","4497410","","Microsoft .NET Framework 4.8 Language Packs for Windows 7 and Server 2008 R2 (KB4497410)"
"Server 2008 R2 Requred Patches","2500170","MS11-066","Security Update for Microsoft Chart Controls for Microsoft .NET Framework 3.5 Service Pack 1 (KB2500170)"
"Server 2008 R2 Requred Patches","4499175","","2019-05 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4499175)"
"Server 2008 R2 Requred Patches","4592510","","2020-12 Servicing Stack Update for Windows Server 2008 R2 for x64-based Systems (KB4592510)"
"Server 2008 R2 Requred Patches","3102429","","Update for Windows Server 2008 R2 x64 Edition (KB3102429)"
"Server 2008 R2 Requred Patches","4575903","","2020-07 Extended Security Updates (ESU) Licensing Preparation Package for Windows Server 2008 R2 for x64-based Systems (KB4575903)"
"Server 2008 R2 Requred Patches","4561669","","2020-06 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4561669)"
"Server 2008 R2 Requred Patches","4487121","","2019-02 Security Only Update for .NET Framework 3.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2 for Windows 7 and Server 2008 R2 for x64 (KB4487121)"
"Server 2008 R2 Requred Patches","4345679","","2018-08 Security Only Update for .NET Framework 3.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2 for Windows 7 and Server 2008 R2 for x64 (KB4345679)"
"Server 2008 R2 Requred Patches","2968294","MS14-057","Security Update for Microsoft .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 SP1 for x64-based Systems (KB2968294)"
"Server 2008 R2 Requred Patches","4471981","","2018-12 Security Only Update for .NET Framework 3.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2 for Windows 7 and Server 2008 R2 for x64 (KB4471981)"
"Server 2008 R2 Requred Patches","3074543","MS15-101","Security Update for Microsoft .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 SP1 for x64-based Systems (KB3074543)"
"Server 2008 R2 Requred Patches","4519108","","2019-10 Update for Windows Server 2008 R2 for x64-based Systems (KB4519108)"
"Server 2008 R2 Requred Patches","2840631","MS13-052","Security Update for Microsoft .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 SP1 for x64-based Systems (KB2840631)"
"Server 2008 R2 Requred Patches","4534314","","2020-01 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4534314)"
"Server 2008 R2 Requred Patches","4041090","","2017-09 Security Only Update for .NET Framework 3.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 on Windows 7 and Server 2008 R2 for x64 (KB4041090)"
"Server 2008 R2 Requred Patches","2736422","MS13-007","Security Update for Microsoft .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 SP1 for x64-based Systems (KB2736422)"
"Server 2008 R2 Requred Patches","3097989","MS15-118","Security Update for Microsoft .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 SP1 for x64-based Systems (KB3097989)"
"Server 2008 R2 Requred Patches","2937610","MS14-046","Security Update for Microsoft .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 SP1 for x64-based Systems (KB2937610)"
"Server 2008 R2 Requred Patches","3127220","MS16-019","Security Update for Microsoft .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 SP1 for x64 (KB3127220)"
"Server 2008 R2 Requred Patches","4571719","","2020-08 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4571719)"
"Server 2008 R2 Requred Patches","4480960","","2019-01 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4480960)"
"Server 2008 R2 Requred Patches","4474419","","2019-09 Security Update for Windows Server 2008 R2 for x64-based Systems (KB4474419)"
"Server 2008 R2 Requred Patches","4557900","","2020-05 Update for Windows Server 2008 R2 for x64-based Systems (KB4557900)"
"Server 2008 R2 Requred Patches","4550965","","2020-04 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4550965)"
"Server 2008 R2 Requred Patches","4566371","","2020-09 Update for Windows Server 2008 R2 for x64-based Systems (KB4566371)"
"Server 2008 R2 Requred Patches","3037574","MS15-041","Security Update for Microsoft .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 SP1 for x64-based Systems (KB3037574)"
"Server 2008 R2 Requred Patches","4520003","","2019-10 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4520003)"
"Server 2008 R2 Requred Patches","4014985","","April, 2017 Security Only Update for .NET Framework 3.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2 on Windows 7 and Windows Server 2008 R2 for x64 (KB4014985)"
"Server 2008 R2 Requred Patches","2911501","MS14-009","Security Update for Microsoft .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 SP1 for x64-based Systems (KB2911501)"
"Server 2008 R2 Requred Patches","4507704","","2019-07 Update for Windows Server 2008 R2 for x64-based Systems (KB4507704)"
"Server 2008 R2 Requred Patches","4054530","","Microsoft .NET Framework 4.7.2 for Windows Server 2008 R2 for x64 (KB4054530)"
"Server 2008 R2 Requred Patches","4570500","","2020-08 Security Only Update for .NET Framework 3.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 for Windows Server 2008 R2 for x64 (KB4570500)"
"Server 2008 R2 Requred Patches","4586768","","2020-11 Cumulative Security Update for Internet Explorer 11 for Windows Server 2008 R2 for x64-based systems (KB4586768)"
"Server 2008 R2 Requred Patches","2861698","MS13-082","Security Update for Microsoft .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 SP1 for x64-based Systems (KB2861698)"
"Server 2008 R2 Requred Patches","4578623","","2020-10 Update for Windows Server 2008 R2 for x64-based Systems (KB4578623)"
"Server 2008 R2 Requred Patches","4592471","","2020-12 Security Monthly Quality Rollup for Windows Server 2008 R2 for x64-based Systems (KB4592471)"
"Server 2008 R2 Requred Patches","4586805","","2020-11 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4586805)"
"Server 2008 R2 Requred Patches","4338823","","2018-07 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4338823)"
"Server 2008 R2 Requred Patches","4566466","","2020-10 Security Only Update for .NET Framework 3.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 for Windows Server 2008 R2 for x64 (KB4566466)"
"Server 2008 R2 Requred Patches","4537813","","2020-02 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4537813)"
"Server 2008 R2 Requred Patches","4490128","","2019-03 Update for Windows Server 2008 R2 for x64-based Systems (KB4490128)"
"Server 2008 R2 Requred Patches","4592503","","2020-12 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4592503)"
"Server 2008 R2 Requred Patches","4534976","","2020-01 Security Only Update for .NET Framework 3.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 for Windows 7 and Server 2008 R2 for x64 (KB4534976)"
"Server 2008 R2 Requred Patches","4577053","","2020-09 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4577053)"
"Server 2008 R2 Requred Patches","4530692","","2019-12 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4530692)"
"Server 2008 R2 Requred Patches","2943357","MS14-046","Security Update for Microsoft .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 SP1 for x64-based Systems (KB2943357)"
"Server 2008 R2 Requred Patches","4489885","","2019-03 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4489885)"
"Server 2008 R2 Requred Patches","2836943","","Update for Microsoft .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 SP1 for x64-based Systems (KB2836943)"
"Server 2008 R2 Requred Patches","4556843","","2020-05 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4556843)"
"Server 2008 R2 Requred Patches","4486564","","2019-02 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4486564)"
"Server 2008 R2 Requred Patches","4498961","","2019-05 Security Only Update for .NET Framework 3.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 for Windows 7 and Server 2008 R2 for x64 (KB4498961)"
"Server 2008 R2 Requred Patches","4565539","","2020-07 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4565539)"
"Server 2008 R2 Requred Patches","4055269","","2018-01 Security Only Update for .NET Framework 3.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1 on Windows 7 and Server 2008 R2 for x64 (KB4055269)"
"Server 2008 R2 Requred Patches","4457145","","2018-09 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4457145)"
"Server 2016 Required Patches","4576750","","2020-09 Servicing Stack Update for Windows Server 2016 for x64-based Systems (KB4576750)"
"Server 2016 Required Patches","4580325","","2020-10 Security Update for Adobe Flash Player for Windows Server 2016 for x64-based Systems (KB4580325)"
"Server 2016 Required Patches","890830","","Windows Malicious Software Removal Tool x64 - v5.84 (KB890830)"
"Server 2016 Required Patches","4593226","","2020-12 Cumulative Update for Windows Server 2016 for x64-based Systems (KB4593226)"
"Server 2019 Required Patches","4566516","","2020-07 Cumulative Update for .NET Framework 3.5, 4.7.2 and 4.8 for Windows Server 2019 for x64 (KB4566516)"
"Server 2019 Required Patches","4570505","","2020-08 Cumulative Update for .NET Framework 3.5, 4.7.2 and 4.8 for Windows Server 2019 for x64 (KB4570505)"
"Server 2019 Required Patches","4580325","","2020-10 Security Update for Adobe Flash Player for Windows Server 2019 for x64-based Systems (KB4580325)"
"Server 2019 Required Patches","890830","","Windows Malicious Software Removal Tool x64 - v5.84 (KB890830)"
"Server 2019 Required Patches","4586082","","2020-11 Cumulative Update for .NET Framework 3.5, 4.7.2 and 4.8 for Windows Server 2019 for x64 (KB4586082)"
"Server 2019 Required Patches","4587735","","2020-11 Servicing Stack Update for Windows Server 2019 for x64-based Systems (KB4587735)"
"Server 2019 Required Patches","4592440","","2020-12 Cumulative Update for Windows Server 2019 for x64-based Systems (KB4592440)"
"Server 2012 R2 Required Patches","2966826","MS14-046","Security Update for Microsoft .NET Framework 3.5 on Windows 8.1 and Windows Server 2012 R2 for x64-based Systems (KB2966826)"
"Server 2012 R2 Required Patches","4468323","","Update for Windows Server 2012 R2 (KB4468323)"
"Server 2012 R2 Required Patches","4099639","","2018-05 Security Only Update for .NET Framework 3.5, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1 on Windows 8.1 and Server 2012 R2 for x64 (KB4099639)"
"Server 2012 R2 Required Patches","4580325","","2020-10 Security Update for Adobe Flash Player for Windows Server 2012 R2 for x64-based Systems (KB4580325)"
"Server 2012 R2 Required Patches","4556853","","2020-05 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4556853)"
"Server 2012 R2 Required Patches","3138910","MS16-027","Security Update for Windows Server 2012 R2 (KB3138910)"
"Server 2012 R2 Required Patches","3115224","","Update for Windows Server 2012 R2 (KB3115224)"
"Server 2012 R2 Required Patches","4487028","","2019-02 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4487028)"
"Server 2012 R2 Required Patches","4055271","","2018-01 Security Only Update for .NET Framework 3.5, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1 on Windows 8.1 and Server 2012 R2 for x64 (KB4055271)"
"Server 2012 R2 Required Patches","4471983","","2018-12 Security Only Update for .NET Framework 3.5, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2 for Windows 8.1 and Server 2012 R2 for x64 (KB4471983)"
"Server 2012 R2 Required Patches","3020393","MS15-002","Security Update for Windows Server 2012 R2 (KB3020393)"
"Server 2012 R2 Required Patches","4340006","","2018-07 Security Only Update for .NET Framework 3.5, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2 for Windows 8.1 and Server 2012 R2 for x64 (KB4340006)"
"Server 2012 R2 Required Patches","3109560","MS16-007","Security Update for Windows Server 2012 R2 (KB3109560)"
"Server 2012 R2 Required Patches","2972213","MS14-053","Security Update for Microsoft .NET Framework 3.5 on Windows 8.1 and Windows Server 2012 R2 for x64-based Systems (KB2972213)"
"Server 2012 R2 Required Patches","4565540","","2020-07 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4565540)"
"Server 2012 R2 Required Patches","890830","","Windows Malicious Software Removal Tool x64 - v5.84 (KB890830)"
"Server 2012 R2 Required Patches","4019111","","May, 2017 Security Only Update for .NET Framework 3.5, 4.5.2, 4.6, 4.6.1, 4.6.2 on Windows 8.1 and Windows Server 2012 R2 for x64 (KB4019111)"
"Server 2012 R2 Required Patches","3015696","","Update for Windows Server 2012 R2 (KB3015696)"
"Server 2012 R2 Required Patches","3115858","MS16-013","Security Update for Windows Server 2012 R2 (KB3115858)"
"Server 2012 R2 Required Patches","3186539","","Microsoft .NET Framework 4.7 for Windows 8.1 and Windows Server 2012 R2 for x64 (KB3186539)"
"Server 2012 R2 Required Patches","4556405","","2020-05 Security Only Update for .NET Framework 3.5, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 for Windows 8.1 and Server 2012 R2 for x64 (KB4556405)"
"Server 2012 R2 Required Patches","3072307","MS15-080","Security Update for Microsoft .NET Framework 3.5 on Windows 8.1 and Windows Server 2012 R2 for x64-based Systems (KB3072307)"
"Server 2012 R2 Required Patches","4566425","","2020-07 Servicing Stack Update for Windows Server 2012 R2 for x64-based Systems (KB4566425)"
"Server 2012 R2 Required Patches","4530730","","2019-12 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4530730)"
"Server 2012 R2 Required Patches","3000483","MS15-011","Security Update for Windows Server 2012 R2 (KB3000483)"
"Server 2012 R2 Required Patches","3037576","MS15-041","Security Update for Microsoft .NET Framework 3.5 on Windows 8.1 and Windows Server 2012 R2 for x64-based Systems (KB3037576)"
"Server 2012 R2 Required Patches","4566371","","2020-09 Update for Windows Server 2012 R2 for x64-based Systems (KB4566371)"
"Server 2012 R2 Required Patches","3023219","MS15-048","Security Update for Microsoft .NET Framework 3.5 on Windows 8.1 and Windows Server 2012 R2 for x64-based Systems (KB3023219)"
"Server 2012 R2 Required Patches","4514599","","2019-09 Security Only Update for .NET Framework 3.5, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 for Windows 8.1 and Server 2012 R2 for x64 (KB4514599)"
"Server 2012 R2 Required Patches","3013538","","Update for Windows Server 2012 R2 (KB3013538)"
"Server 2012 R2 Required Patches","4507704","","2019-07 Update for Windows Server 2012 R2 for x64-based Systems (KB4507704)"
"Server 2012 R2 Required Patches","4041092","","2017-09 Security Only Update for .NET Framework 3.5, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 on Windows 8.1 and Server 2012 R2 for x64 (KB4041092)"
"Server 2012 R2 Required Patches","2968296","MS14-057","Security Update for Microsoft .NET Framework 3.5 on Windows 8.1 and Windows Server 2012 R2 for x64-based Systems (KB2968296)"
"Server 2012 R2 Required Patches","4550970","","2020-04 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4550970)"
"Server 2012 R2 Required Patches","4561673","","2020-06 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4561673)"
"Server 2012 R2 Required Patches","4503290","","2019-06 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4503290)"
"Server 2012 R2 Required Patches","2894852","","Security Update for Microsoft .NET Framework 3.5 on Windows 8.1 and Windows Server 2012 R2 for x64-based Systems (KB2894852)"
"Server 2012 R2 Required Patches","4557900","","2020-05 Update for Windows Server 2012 R2 for x64-based Systems (KB4557900)"
"Server 2012 R2 Required Patches","4576489","","2020-09 Security Only Update for .NET Framework 4.8 for Windows 8.1 and Server 2012 R2 for x64 (KB4576489)"
"Server 2012 R2 Required Patches","4577071","","2020-09 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4577071)"
"Server 2012 R2 Required Patches","4507457","","2019-07 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4507457)"
"Server 2012 R2 Required Patches","4501226","","2019-05 Update for Windows Server 2012 R2 for x64-based Systems (KB4501226)"
"Server 2012 R2 Required Patches","4592484","","2020-12 Security Monthly Quality Rollup for Windows Server 2012 R2 for x64-based Systems (KB4592484)"
"Server 2012 R2 Required Patches","2973114","MS14-053","Security Update for Microsoft .NET Framework 3.5 on Windows 8.1 and Windows Server 2012 R2 for x64-based Systems (KB2973114)"
"Server 2012 R2 Required Patches","3134813","","Update for Windows Server 2012 R2 (KB3134813)"
"Server 2012 R2 Required Patches","4499165","","2019-05 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4499165)"
"Server 2012 R2 Required Patches","3097992","MS15-118","Security Update for Microsoft .NET Framework 3.5 on Windows 8.1 and Windows Server 2012 R2 for x64-based Systems (KB3097992)"
"Server 2012 R2 Required Patches","4541505","","2020-03 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4541505)"
"Server 2012 R2 Required Patches","4462930","","Update for Adobe Flash Player for Windows Server 2012 R2 (KB4462930)"
"Server 2012 R2 Required Patches","4033369","","Microsoft .NET Framework 4.7.1 for Windows 8.1 and Windows Server 2012 R2 for x64 (KB4033369)"
"Server 2012 R2 Required Patches","4493467","","2019-04 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4493467)"
"Server 2012 R2 Required Patches","2982998","MS14-076","Security Update for Windows Server 2012 R2 (KB2982998)"
"Server 2012 R2 Required Patches","3074545","MS15-101","Security Update for Microsoft .NET Framework 3.5 on Windows 8.1 and Windows Server 2012 R2 for x64-based Systems (KB3074545)"
"Server 2012 R2 Required Patches","4507413","","2019-07 Security Only Update for .NET Framework 3.5, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 for Windows 8.1 and Server 2012 R2 for x64 (KB4507413)"
"Server 2012 R2 Required Patches","4586085","","2020-11 Security and Quality Rollup for .NET Framework 3.5, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 for Windows 8.1 and Server 2012 R2 for x64 (KB4586085)"
"Server 2012 R2 Required Patches","4534978","","2020-01 Security Only Update for .NET Framework 3.5, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 for Windows 8.1 and Server 2012 R2 for x64 (KB4534978)"
"Server 2012 R2 Required Patches","4586823","","2020-11 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4586823)"
"Server 2012 R2 Required Patches","3138962","MS16-027","Security Update for Windows Server 2012 R2 (KB3138962)"
"Server 2012 R2 Required Patches","3127222","MS16-019","Security Update for Microsoft .NET Framework 3.5 on Windows 8.1 and Windows Server 2012 R2 for x64 (KB3127222)"
"Server 2012 R2 Required Patches","4525250","","2019-11 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4525250)"
"Server 2012 R2 Required Patches","4586768","","2020-11 Cumulative Security Update for Internet Explorer 11 for Windows Server 2012 R2 for x64-based systems (KB4586768)"
"Server 2012 R2 Required Patches","4487123","","2019-02 Security Only Update for .NET Framework 3.5, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2 for Windows 8.1 and Server 2012 R2 for x64 (KB4487123)"
"Server 2012 R2 Required Patches","3018133","","Update for Windows Server 2012 R2 (KB3018133)"
"Server 2012 R2 Required Patches","4578623","","2020-10 Update for Windows Server 2012 R2 for x64-based Systems (KB4578623)"
"Server 2012 R2 Required Patches","4534309","","2020-01 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4534309)"
"Server 2012 R2 Required Patches","4486459","","2019-02 Update for Windows Server 2012 R2 for x64-based Systems (KB4486459)"
"Server 2012 R2 Required Patches","4054566","","Microsoft .NET Framework 4.7.2 for Windows Server 2012 R2 for x64 (KB4054566)"
"Server 2012 R2 Required Patches","4592495","","2020-12 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4592495)"
"Server 2012 R2 Required Patches","4512489","","2019-08 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4512489)"
"Server 2012 R2 Required Patches","4498963","","2019-05 Security Only Update for .NET Framework 3.5, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 for Windows 8.1 and Server 2012 R2 for x64 (KB4498963)"
"Server 2012 R2 Required Patches","4467703","","2018-11 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4467703)"
"Server 2012 R2 Required Patches","4519108","","2019-10 Update for Windows Server 2012 R2 for x64-based Systems (KB4519108)"
"Server 2012 R2 Required Patches","4490128","","2019-03 Update for Windows Server 2012 R2 for x64-based Systems (KB4490128)"
"Server 2012 R2 Required Patches","4345681","","2018-08 Security Only Update for .NET Framework 3.5, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2 for Windows 8.1 and Server 2012 R2 for x64 (KB4345681)"
"Server 2012 R2 Required Patches","4570502","","2020-08 Security Only Update for .NET Framework 3.5, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 for Windows 8.1 and Server 2012 R2 for x64 (KB4570502)"
"Server 2012 R2 Required Patches","4516064","","2019-09 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4516064)"
"Server 2012 R2 Required Patches","4566468","","2020-10 Security Only Update for .NET Framework 3.5, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 for Windows 8.1 and Server 2012 R2 for x64 (KB4566468)"
"Server 2012 R2 Required Patches","3138378","","Update for Windows Server 2012 R2 (KB3138378)"
"Server 2012 R2 Required Patches","4462901","","Update for Windows Server 2012 R2 (KB4462901)"
"Server 2012 R2 Required Patches","2966828","MS14-046","Security Update for Microsoft .NET Framework 3.5 on Windows 8.1 and Windows Server 2012 R2 for x64-based Systems (KB2966828)"
"Server 2012 R2 Required Patches","4486105","","Microsoft .NET Framework 4.8 for Windows Server 2012 R2 for x64 (KB4486105)"
"Server 2012 R2 Required Patches","3134179","","Update for Windows Server 2012 R2 (KB3134179)"
"Server 2012 R2 Required Patches","4339284","","Update for Windows Server 2012 R2 (KB4339284)"
"Server 2012 R2 Required Patches","4537803","","2020-02 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4537803)"
"Server 2012 R2 Required Patches","4489883","","2019-03 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4489883)"
"Server 2012 R2 Required Patches","4014987","","April, 2017 Security Only Update for .NET Framework 3.5, 4.5.2, 4.6, 4.6.1, 4.6.2 on Windows 8.1 and Windows Server 2012 R2 for x64 (KB4014987)"
"Server 2012 R2 Required Patches","4519990","","2019-10 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4519990)"
"Server 2012 R2 Required Patches","3005628","","Update for Microsoft .NET Framework 3.5 for x64-based Systems (KB3005628)"
"Server 2012 R2 Required Patches","3076949","MS15-089","Security Update for Windows Server 2012 R2 (KB3076949)"
"Server 2012 R2 Required Patches","4580358","","2020-10 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4580358)"
"Server 2012 R2 Required Patches","4489488","","2019-03 Update for .NET Framework 3.5, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2 for Windows 8.1 and Server 2012 R2 for x64 (KB4489488)"
"Server 2012 R2 Required Patches","3012235","","Update for Windows Server 2012 R2 (KB3012235)"
"Server 2012 R2 Required Patches","4580469","","2020-10 Security Only Update for .NET Framework 3.5, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 for Windows 8.1 and Server 2012 R2 for x64 (KB4580469)"
"Server 2012 R2 Required Patches","2972103","MS14-057","Security Update for Microsoft .NET Framework 3.5 on Windows 8.1 and Windows Server 2012 R2 for x64-based Systems (KB2972103)"
"Server 2012 R2 Required Patches","3013531","","Update for Windows Server 2012 R2 (KB3013531)"
1 UpdateGroup ArticleID BulletinID Title
2 Server 2008 Required Updates 2500170 MS11-066 Security Update for Microsoft Chart Controls for Microsoft .NET Framework 3.5 Service Pack 1 (KB2500170)
3 Server 2008 Required Updates 3208481 MS16-144 Security Update for Windows Server 2008 for x64-based Systems (KB3208481)
4 Server 2008 Required Updates 4014652 Security Update for Windows Server 2008 for x64-based Systems (KB4014652)
5 Server 2008 Required Updates 4014794 Security Update for Windows Server 2008 for x64-based Systems (KB4014794)
6 Server 2008 Required Updates 4015067 Security Update for Windows Server 2008 for x64-based Systems (KB4015067)
7 Server 2008 Required Updates 4018927 Security Update for Windows Server 2008 for x64-based Systems (KB4018927)
8 Server 2008 Required Updates 4034744 Security Update for Windows Server 2008 for x64-based Systems (KB4034744)
9 Server 2008 Required Updates 3170455 Security Update for Windows Server 2008 for x64-based Systems (KB3170455)
10 Server 2008 Required Updates 4089229 2018-03 Security Update for Windows Server 2008 for x64-based Systems (KB4089229)
11 Server 2008 Required Updates 4093227 2018-06 Security Update for Windows Server 2008 for x64-based Systems (KB4093227)
12 Server 2008 Required Updates 4130956 2018-06 Security Update for Windows Server 2008 for x64-based Systems (KB4130956)
13 Server 2008 Required Updates 4291391 2018-07 Security Update for Windows Server 2008 for x64-based Systems (KB4291391)
14 Server 2008 Required Updates 4339503 2018-07 Security Update for Windows Server 2008 for x64-based Systems (KB4339503)
15 Server 2008 Required Updates 4340007 2018-07 Security Only Update for .NET Framework 2.0, 3.0, 4.5.2, 4.6 for Windows Server 2008 SP2 for x64 (KB4340007)
16 Server 2008 Required Updates 4338380 2018-08 Security Update for Windows Server 2008 for x64-based Systems (KB4338380)
17 Server 2008 Required Updates 4340939 2018-08 Security Update for Windows Server 2008 for x64-based Systems (KB4340939)
18 Server 2008 Required Updates 4341832 2018-08 Security Update for Windows Server 2008 for x64-based Systems (KB4341832)
19 Server 2008 Required Updates 4345682 2018-08 Security Only Update for .NET Framework 2.0, 3.0, 4.5.2, 4.6 for Windows Server 2008 SP2 for x64 (KB4345682)
20 Server 2008 Required Updates 4457984 2018-09 Security Only Quality Update for Windows Server 2008 for x64-based Systems (KB4457984)
21 Server 2008 Required Updates 4463104 2018-10 Security Only Quality Update for Windows Server 2008 for x64-based Systems (KB4463104)
22 Server 2008 Required Updates 4467700 2018-11 Security Only Quality Update for Windows Server 2008 for x64-based Systems (KB4467700)
23 Server 2008 Required Updates 4471319 2018-12 Security Only Quality Update for Windows Server 2008 for x64-based Systems (KB4471319)
24 Server 2008 Required Updates 4471984 2018-12 Security Only Update for .NET Framework 3.5 SP1, 4.5.2, 4.6 for Windows Server 2008 SP2 for x64 (KB4471984)
25 Server 2008 Required Updates 4480957 2019-01 Security Only Quality Update for Windows Server 2008 for x64-based Systems (KB4480957)
26 Server 2008 Required Updates 4487124 2019-02 Security Only Update for .NET Framework 2.0, 3.0, 4.5.2, 4.6 for Windows Server 2008 SP2 for x64 (KB4487124)
27 Server 2008 Required Updates 4487019 2019-02 Security Only Quality Update for Windows Server 2008 for x64-based Systems (KB4487019)
28 Server 2008 Required Updates 4489876 2019-03 Security Only Quality Update for Windows Server 2008 for x64-based Systems (KB4489876)
29 Server 2008 Required Updates 4493730 Security Update for Windows Server 2008 for x64-based Systems (KB4493730)
30 Server 2008 Required Updates 4493458 2019-04 Security Only Quality Update for Windows Server 2008 for x64-based Systems (KB4493458)
31 Server 2008 Required Updates 4498964 2019-05 Security Only Update for .NET Framework 2.0, 3.0, 4.5.2, 4.6 on Windows Server 2008 SP2 for x64 (KB4498964)
32 Server 2008 Required Updates 4499180 2019-05 Security Only Quality Update for Windows Server 2008 for x64-based Systems (KB4499180)
33 Server 2008 Required Updates 4503287 2019-06 Security Only Quality Update for Windows Server 2008 for x64-based Systems (KB4503287)
34 Server 2008 Required Updates 4507461 2019-07 Security Only Quality Update for Windows Server 2008 for x64-based Systems (KB4507461)
35 Server 2008 Required Updates 4507414 2019-07 Security Only Update for .NET Framework 2.0, 3.0, 4.5.2, 4.6 for Windows Server 2008 SP2 for x64 (KB4507414)
36 Server 2008 Required Updates 4512491 2019-08 Security Only Quality Update for Windows Server 2008 for x64-based Systems (KB4512491)
37 Server 2008 Required Updates 4516051 2019-09 Security Only Quality Update for Windows Server 2008 for x64-based Systems (KB4516051)
38 Server 2008 Required Updates 4520009 2019-10 Security Only Quality Update for Windows Server 2008 for x64-based Systems (KB4520009)
39 Server 2008 Required Updates 4474419 2019-09 Security Update for Windows Server 2008 for x64-based Systems (KB4474419)
40 Server 2008 Required Updates 4525239 2019-11 Security Only Quality Update for Windows Server 2008 for x64-based Systems (KB4525239)
41 Server 2008 Required Updates 4530719 2019-12 Security Only Quality Update for Windows Server 2008 for x64-based Systems (KB4530719)
42 Server 2008 Required Updates 4534979 2020-01 Security Only Update for .NET Framework 2.0, 3.0, 4.5.2, 4.6 for Windows Server 2008 SP2 for x64 (KB4534979)
43 Server 2008 Required Updates 4534312 2020-01 Security Only Quality Update for Windows Server 2008 for x64-based Systems (KB4534312)
44 Server 2008 Required Updates 960568 BITS 4.0 for Windows Server 2008 x64 Edition (KB960568)
45 Server 2008 Required Updates 4132941 Update for Windows Server 2008 x64 Edition (KB4132941)
46 Server 2008 Required Updates 4486459 2019-02 Update for Windows Server 2008 for x64-based Systems (KB4486459)
47 Server 2008 Required Updates 4490128 2019-03 Update for Windows Server 2008 for x64-based Systems (KB4490128)
48 Server 2008 Required Updates 4489489 Update for .NET Framework 2.0, 3.0, 4.5.2, 4.6 for Windows Server 2008 SP2 for x64 (KB4489489)
49 Server 2008 Required Updates 4507704 2019-07 Update for Windows Server 2008 for x64-based Systems (KB4507704)
50 Server 2008 Required Updates 4501226 2019-05 Update for Windows Server 2008 for x64-based Systems (KB4501226)
51 Server 2008 Required Updates 4519108 2019-10 Update for Windows Server 2008 for x64-based Systems (KB4519108)
52 Server 2008 Required Updates 4537822 2020-02 Security Only Quality Update for Windows Server 2008 for x64-based Systems (KB4537822)
53 Server 2008 Required Updates 4556406 2020-05 Security Only Update for .NET Framework 2.0, 3.0, 4.5.2, 4.6 for Windows Server 2008 SP2 for x64 (KB4556406)
54 Server 2008 Required Updates 4575904 2020-07 Extended Security Updates (ESU) Licensing Preparation Package for Windows Server 2008 for x64-based Systems (KB4575904)
55 Server 2008 Required Updates 4570503 2020-08 Security Only Update for .NET Framework 2.0, 3.0, 4.5.2, 4.6 for Windows Server 2008 SP2 for x64 (KB4570503)
56 Server 2008 Required Updates 4580470 2020-10 Security Only Update for .NET Framework 2.0, 3.0, 4.5.2, 4.6 for Windows Server 2008 SP2 for x64 (KB4580470)
57 Server 2008 Required Updates 4566469 2020-10 Security Only Update for .NET Framework 2.0, 3.0, 4.5.2, 4.6 for Windows Server 2008 SP2 for x64 (KB4566469)
58 Server 2008 Required Updates 4586086 2020-11 Security and Quality Rollup for .NET Framework 2.0, 3.0, 4.5.2, 4.6 for Windows Server 2008 SP2 for x64 (KB4586086)
59 Server 2008 R2 Requred Patches 2894844 Security Update for Microsoft .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 SP1 for x64-based Systems (KB2894844)
60 Server 2008 R2 Requred Patches 4576490 2020-09 Security Only Update for .NET Framework 4.8 for Windows Server 2008 R2 for x64 (KB4576490)
61 Server 2008 R2 Requred Patches 2823180 Update for Windows Server 2008 R2 x64 Edition (KB2823180)
62 Server 2008 R2 Requred Patches 4507411 2019-07 Security Only Update for .NET Framework 3.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 for Windows 7 and Server 2008 R2 for x64 (KB4507411)
63 Server 2008 R2 Requred Patches 4580387 2020-10 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4580387)
64 Server 2008 R2 Requred Patches 4556403 2020-05 Security Only Update for .NET Framework 3.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 for Windows Server 2008 R2 for x64 (KB4556403)
65 Server 2008 R2 Requred Patches 2972100 MS14-057 Security Update for Microsoft .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 SP1 for x64-based Systems (KB2972100)
66 Server 2008 R2 Requred Patches 4099637 2018-05 Security Only Update for .NET Framework 3.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1 on Windows 7 and Server 2008 R2 for x64 (KB4099637)
67 Server 2008 R2 Requred Patches 4490628 2019-03 Servicing Stack Update for Windows Server 2008 R2 for x64-based Systems (KB4490628)
68 Server 2008 R2 Requred Patches 4586083 2020-11 Security and Quality Rollup for .NET Framework 3.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 for Windows Server 2008 R2 for x64 (KB4586083)
69 Server 2008 R2 Requred Patches 2992611 MS14-066 Security Update for Windows Server 2008 R2 x64 Edition (KB2992611)
70 Server 2008 R2 Requred Patches 4019108 May, 2017 Security Only Update for .NET Framework 3.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2 on Windows 7 and Windows Server 2008 R2 for x64 (KB4019108)
71 Server 2008 R2 Requred Patches 4467106 2018-11 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4467106)
72 Server 2008 R2 Requred Patches 4503269 2019-06 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4503269)
73 Server 2008 R2 Requred Patches 2742599 MS13-004 Security Update for Microsoft .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 SP1 for x64-based Systems (KB2742599)
74 Server 2008 R2 Requred Patches 2789645 MS13-015 Security Update for Microsoft .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 SP1 for x64-based Systems (KB2789645)
75 Server 2008 R2 Requred Patches 4099950 2018-04 Update for Windows Server 2008 R2 for x64-based Systems (KB4099950)
76 Server 2008 R2 Requred Patches 4033342 Microsoft .NET Framework 4.7.1 for Windows 7 and Windows Server 2008 R2 for x64 (KB4033342)
77 Server 2008 R2 Requred Patches 3072305 MS15-080 Security Update for Microsoft .NET Framework 3.5.1 on Windows 7 SP1 and Windows Server 2008 R2 SP1 for x64 (KB3072305)
78 Server 2008 R2 Requred Patches 4486459 2019-02 Update for Windows Server 2008 R2 for x64-based Systems (KB4486459)
79 Server 2008 R2 Requred Patches 4541500 2020-03 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4541500)
80 Server 2008 R2 Requred Patches 4340004 2018-07 Security Only Update for .NET Framework 3.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2 for Windows 7 and Server 2008 R2 for x64 (KB4340004)
81 Server 2008 R2 Requred Patches 3186497 Microsoft .NET Framework 4.7 for Windows 7 and Windows Server 2008 R2 for x64 (KB3186497)
82 Server 2008 R2 Requred Patches 4580467 2020-10 Security Only Update for .NET Framework 3.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 for Windows Server 2008 R2 for x64 (KB4580467)
83 Server 2008 R2 Requred Patches 4501226 2019-05 Update for Windows Server 2008 R2 for x64-based Systems (KB4501226)
84 Server 2008 R2 Requred Patches 4471328 2018-12 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4471328)
85 Server 2008 R2 Requred Patches 4507456 2019-07 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4507456)
86 Server 2008 R2 Requred Patches 2836942 Update for Microsoft .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 SP1 for x64-based Systems (KB2836942)
87 Server 2008 R2 Requred Patches 2604115 MS12-035 Security Update for Microsoft .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 SP1 for x64-based Systems (KB2604115)
88 Server 2008 R2 Requred Patches 4343899 2018-08 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4343899)
89 Server 2008 R2 Requred Patches 4525233 2019-11 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4525233)
90 Server 2008 R2 Requred Patches 2931356 MS14-026 Security Update for Microsoft .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 SP1 for x64-based Systems (KB2931356)
91 Server 2008 R2 Requred Patches 4503548 Microsoft .NET Framework 4.8 for Windows Server 2008 R2 for x64 (KB4503548)
92 Server 2008 R2 Requred Patches 3023215 MS15-048 Security Update for Microsoft .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 SP1 for x64-based Systems (KB3023215)
93 Server 2008 R2 Requred Patches 4462915 2018-10 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4462915)
94 Server 2008 R2 Requred Patches 4493448 2019-04 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4493448)
95 Server 2008 R2 Requred Patches 4489486 Update for .NET Framework 3.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2 for Windows 7 and Server 2008 R2 for x64 (KB4489486)
96 Server 2008 R2 Requred Patches 2729452 MS12-074 Security Update for Microsoft .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 SP1 for x64-based Systems (KB2729452)
97 Server 2008 R2 Requred Patches 3031432 MS15-015 Security Update for Windows Server 2008 R2 x64 Edition (KB3031432)
98 Server 2008 R2 Requred Patches 4497410 Microsoft .NET Framework 4.8 Language Packs for Windows 7 and Server 2008 R2 (KB4497410)
99 Server 2008 R2 Requred Patches 2500170 MS11-066 Security Update for Microsoft Chart Controls for Microsoft .NET Framework 3.5 Service Pack 1 (KB2500170)
100 Server 2008 R2 Requred Patches 4499175 2019-05 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4499175)
101 Server 2008 R2 Requred Patches 4592510 2020-12 Servicing Stack Update for Windows Server 2008 R2 for x64-based Systems (KB4592510)
102 Server 2008 R2 Requred Patches 3102429 Update for Windows Server 2008 R2 x64 Edition (KB3102429)
103 Server 2008 R2 Requred Patches 4575903 2020-07 Extended Security Updates (ESU) Licensing Preparation Package for Windows Server 2008 R2 for x64-based Systems (KB4575903)
104 Server 2008 R2 Requred Patches 4561669 2020-06 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4561669)
105 Server 2008 R2 Requred Patches 4487121 2019-02 Security Only Update for .NET Framework 3.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2 for Windows 7 and Server 2008 R2 for x64 (KB4487121)
106 Server 2008 R2 Requred Patches 4345679 2018-08 Security Only Update for .NET Framework 3.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2 for Windows 7 and Server 2008 R2 for x64 (KB4345679)
107 Server 2008 R2 Requred Patches 2968294 MS14-057 Security Update for Microsoft .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 SP1 for x64-based Systems (KB2968294)
108 Server 2008 R2 Requred Patches 4471981 2018-12 Security Only Update for .NET Framework 3.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2 for Windows 7 and Server 2008 R2 for x64 (KB4471981)
109 Server 2008 R2 Requred Patches 3074543 MS15-101 Security Update for Microsoft .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 SP1 for x64-based Systems (KB3074543)
110 Server 2008 R2 Requred Patches 4519108 2019-10 Update for Windows Server 2008 R2 for x64-based Systems (KB4519108)
111 Server 2008 R2 Requred Patches 2840631 MS13-052 Security Update for Microsoft .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 SP1 for x64-based Systems (KB2840631)
112 Server 2008 R2 Requred Patches 4534314 2020-01 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4534314)
113 Server 2008 R2 Requred Patches 4041090 2017-09 Security Only Update for .NET Framework 3.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 on Windows 7 and Server 2008 R2 for x64 (KB4041090)
114 Server 2008 R2 Requred Patches 2736422 MS13-007 Security Update for Microsoft .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 SP1 for x64-based Systems (KB2736422)
115 Server 2008 R2 Requred Patches 3097989 MS15-118 Security Update for Microsoft .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 SP1 for x64-based Systems (KB3097989)
116 Server 2008 R2 Requred Patches 2937610 MS14-046 Security Update for Microsoft .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 SP1 for x64-based Systems (KB2937610)
117 Server 2008 R2 Requred Patches 3127220 MS16-019 Security Update for Microsoft .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 SP1 for x64 (KB3127220)
118 Server 2008 R2 Requred Patches 4571719 2020-08 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4571719)
119 Server 2008 R2 Requred Patches 4480960 2019-01 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4480960)
120 Server 2008 R2 Requred Patches 4474419 2019-09 Security Update for Windows Server 2008 R2 for x64-based Systems (KB4474419)
121 Server 2008 R2 Requred Patches 4557900 2020-05 Update for Windows Server 2008 R2 for x64-based Systems (KB4557900)
122 Server 2008 R2 Requred Patches 4550965 2020-04 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4550965)
123 Server 2008 R2 Requred Patches 4566371 2020-09 Update for Windows Server 2008 R2 for x64-based Systems (KB4566371)
124 Server 2008 R2 Requred Patches 3037574 MS15-041 Security Update for Microsoft .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 SP1 for x64-based Systems (KB3037574)
125 Server 2008 R2 Requred Patches 4520003 2019-10 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4520003)
126 Server 2008 R2 Requred Patches 4014985 April, 2017 Security Only Update for .NET Framework 3.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2 on Windows 7 and Windows Server 2008 R2 for x64 (KB4014985)
127 Server 2008 R2 Requred Patches 2911501 MS14-009 Security Update for Microsoft .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 SP1 for x64-based Systems (KB2911501)
128 Server 2008 R2 Requred Patches 4507704 2019-07 Update for Windows Server 2008 R2 for x64-based Systems (KB4507704)
129 Server 2008 R2 Requred Patches 4054530 Microsoft .NET Framework 4.7.2 for Windows Server 2008 R2 for x64 (KB4054530)
130 Server 2008 R2 Requred Patches 4570500 2020-08 Security Only Update for .NET Framework 3.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 for Windows Server 2008 R2 for x64 (KB4570500)
131 Server 2008 R2 Requred Patches 4586768 2020-11 Cumulative Security Update for Internet Explorer 11 for Windows Server 2008 R2 for x64-based systems (KB4586768)
132 Server 2008 R2 Requred Patches 2861698 MS13-082 Security Update for Microsoft .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 SP1 for x64-based Systems (KB2861698)
133 Server 2008 R2 Requred Patches 4578623 2020-10 Update for Windows Server 2008 R2 for x64-based Systems (KB4578623)
134 Server 2008 R2 Requred Patches 4592471 2020-12 Security Monthly Quality Rollup for Windows Server 2008 R2 for x64-based Systems (KB4592471)
135 Server 2008 R2 Requred Patches 4586805 2020-11 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4586805)
136 Server 2008 R2 Requred Patches 4338823 2018-07 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4338823)
137 Server 2008 R2 Requred Patches 4566466 2020-10 Security Only Update for .NET Framework 3.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 for Windows Server 2008 R2 for x64 (KB4566466)
138 Server 2008 R2 Requred Patches 4537813 2020-02 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4537813)
139 Server 2008 R2 Requred Patches 4490128 2019-03 Update for Windows Server 2008 R2 for x64-based Systems (KB4490128)
140 Server 2008 R2 Requred Patches 4592503 2020-12 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4592503)
141 Server 2008 R2 Requred Patches 4534976 2020-01 Security Only Update for .NET Framework 3.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 for Windows 7 and Server 2008 R2 for x64 (KB4534976)
142 Server 2008 R2 Requred Patches 4577053 2020-09 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4577053)
143 Server 2008 R2 Requred Patches 4530692 2019-12 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4530692)
144 Server 2008 R2 Requred Patches 2943357 MS14-046 Security Update for Microsoft .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 SP1 for x64-based Systems (KB2943357)
145 Server 2008 R2 Requred Patches 4489885 2019-03 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4489885)
146 Server 2008 R2 Requred Patches 2836943 Update for Microsoft .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 SP1 for x64-based Systems (KB2836943)
147 Server 2008 R2 Requred Patches 4556843 2020-05 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4556843)
148 Server 2008 R2 Requred Patches 4486564 2019-02 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4486564)
149 Server 2008 R2 Requred Patches 4498961 2019-05 Security Only Update for .NET Framework 3.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 for Windows 7 and Server 2008 R2 for x64 (KB4498961)
150 Server 2008 R2 Requred Patches 4565539 2020-07 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4565539)
151 Server 2008 R2 Requred Patches 4055269 2018-01 Security Only Update for .NET Framework 3.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1 on Windows 7 and Server 2008 R2 for x64 (KB4055269)
152 Server 2008 R2 Requred Patches 4457145 2018-09 Security Only Quality Update for Windows Server 2008 R2 for x64-based Systems (KB4457145)
153 Server 2016 Required Patches 4576750 2020-09 Servicing Stack Update for Windows Server 2016 for x64-based Systems (KB4576750)
154 Server 2016 Required Patches 4580325 2020-10 Security Update for Adobe Flash Player for Windows Server 2016 for x64-based Systems (KB4580325)
155 Server 2016 Required Patches 890830 Windows Malicious Software Removal Tool x64 - v5.84 (KB890830)
156 Server 2016 Required Patches 4593226 2020-12 Cumulative Update for Windows Server 2016 for x64-based Systems (KB4593226)
157 Server 2019 Required Patches 4566516 2020-07 Cumulative Update for .NET Framework 3.5, 4.7.2 and 4.8 for Windows Server 2019 for x64 (KB4566516)
158 Server 2019 Required Patches 4570505 2020-08 Cumulative Update for .NET Framework 3.5, 4.7.2 and 4.8 for Windows Server 2019 for x64 (KB4570505)
159 Server 2019 Required Patches 4580325 2020-10 Security Update for Adobe Flash Player for Windows Server 2019 for x64-based Systems (KB4580325)
160 Server 2019 Required Patches 890830 Windows Malicious Software Removal Tool x64 - v5.84 (KB890830)
161 Server 2019 Required Patches 4586082 2020-11 Cumulative Update for .NET Framework 3.5, 4.7.2 and 4.8 for Windows Server 2019 for x64 (KB4586082)
162 Server 2019 Required Patches 4587735 2020-11 Servicing Stack Update for Windows Server 2019 for x64-based Systems (KB4587735)
163 Server 2019 Required Patches 4592440 2020-12 Cumulative Update for Windows Server 2019 for x64-based Systems (KB4592440)
164 Server 2012 R2 Required Patches 2966826 MS14-046 Security Update for Microsoft .NET Framework 3.5 on Windows 8.1 and Windows Server 2012 R2 for x64-based Systems (KB2966826)
165 Server 2012 R2 Required Patches 4468323 Update for Windows Server 2012 R2 (KB4468323)
166 Server 2012 R2 Required Patches 4099639 2018-05 Security Only Update for .NET Framework 3.5, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1 on Windows 8.1 and Server 2012 R2 for x64 (KB4099639)
167 Server 2012 R2 Required Patches 4580325 2020-10 Security Update for Adobe Flash Player for Windows Server 2012 R2 for x64-based Systems (KB4580325)
168 Server 2012 R2 Required Patches 4556853 2020-05 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4556853)
169 Server 2012 R2 Required Patches 3138910 MS16-027 Security Update for Windows Server 2012 R2 (KB3138910)
170 Server 2012 R2 Required Patches 3115224 Update for Windows Server 2012 R2 (KB3115224)
171 Server 2012 R2 Required Patches 4487028 2019-02 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4487028)
172 Server 2012 R2 Required Patches 4055271 2018-01 Security Only Update for .NET Framework 3.5, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1 on Windows 8.1 and Server 2012 R2 for x64 (KB4055271)
173 Server 2012 R2 Required Patches 4471983 2018-12 Security Only Update for .NET Framework 3.5, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2 for Windows 8.1 and Server 2012 R2 for x64 (KB4471983)
174 Server 2012 R2 Required Patches 3020393 MS15-002 Security Update for Windows Server 2012 R2 (KB3020393)
175 Server 2012 R2 Required Patches 4340006 2018-07 Security Only Update for .NET Framework 3.5, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2 for Windows 8.1 and Server 2012 R2 for x64 (KB4340006)
176 Server 2012 R2 Required Patches 3109560 MS16-007 Security Update for Windows Server 2012 R2 (KB3109560)
177 Server 2012 R2 Required Patches 2972213 MS14-053 Security Update for Microsoft .NET Framework 3.5 on Windows 8.1 and Windows Server 2012 R2 for x64-based Systems (KB2972213)
178 Server 2012 R2 Required Patches 4565540 2020-07 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4565540)
179 Server 2012 R2 Required Patches 890830 Windows Malicious Software Removal Tool x64 - v5.84 (KB890830)
180 Server 2012 R2 Required Patches 4019111 May, 2017 Security Only Update for .NET Framework 3.5, 4.5.2, 4.6, 4.6.1, 4.6.2 on Windows 8.1 and Windows Server 2012 R2 for x64 (KB4019111)
181 Server 2012 R2 Required Patches 3015696 Update for Windows Server 2012 R2 (KB3015696)
182 Server 2012 R2 Required Patches 3115858 MS16-013 Security Update for Windows Server 2012 R2 (KB3115858)
183 Server 2012 R2 Required Patches 3186539 Microsoft .NET Framework 4.7 for Windows 8.1 and Windows Server 2012 R2 for x64 (KB3186539)
184 Server 2012 R2 Required Patches 4556405 2020-05 Security Only Update for .NET Framework 3.5, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 for Windows 8.1 and Server 2012 R2 for x64 (KB4556405)
185 Server 2012 R2 Required Patches 3072307 MS15-080 Security Update for Microsoft .NET Framework 3.5 on Windows 8.1 and Windows Server 2012 R2 for x64-based Systems (KB3072307)
186 Server 2012 R2 Required Patches 4566425 2020-07 Servicing Stack Update for Windows Server 2012 R2 for x64-based Systems (KB4566425)
187 Server 2012 R2 Required Patches 4530730 2019-12 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4530730)
188 Server 2012 R2 Required Patches 3000483 MS15-011 Security Update for Windows Server 2012 R2 (KB3000483)
189 Server 2012 R2 Required Patches 3037576 MS15-041 Security Update for Microsoft .NET Framework 3.5 on Windows 8.1 and Windows Server 2012 R2 for x64-based Systems (KB3037576)
190 Server 2012 R2 Required Patches 4566371 2020-09 Update for Windows Server 2012 R2 for x64-based Systems (KB4566371)
191 Server 2012 R2 Required Patches 3023219 MS15-048 Security Update for Microsoft .NET Framework 3.5 on Windows 8.1 and Windows Server 2012 R2 for x64-based Systems (KB3023219)
192 Server 2012 R2 Required Patches 4514599 2019-09 Security Only Update for .NET Framework 3.5, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 for Windows 8.1 and Server 2012 R2 for x64 (KB4514599)
193 Server 2012 R2 Required Patches 3013538 Update for Windows Server 2012 R2 (KB3013538)
194 Server 2012 R2 Required Patches 4507704 2019-07 Update for Windows Server 2012 R2 for x64-based Systems (KB4507704)
195 Server 2012 R2 Required Patches 4041092 2017-09 Security Only Update for .NET Framework 3.5, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 on Windows 8.1 and Server 2012 R2 for x64 (KB4041092)
196 Server 2012 R2 Required Patches 2968296 MS14-057 Security Update for Microsoft .NET Framework 3.5 on Windows 8.1 and Windows Server 2012 R2 for x64-based Systems (KB2968296)
197 Server 2012 R2 Required Patches 4550970 2020-04 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4550970)
198 Server 2012 R2 Required Patches 4561673 2020-06 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4561673)
199 Server 2012 R2 Required Patches 4503290 2019-06 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4503290)
200 Server 2012 R2 Required Patches 2894852 Security Update for Microsoft .NET Framework 3.5 on Windows 8.1 and Windows Server 2012 R2 for x64-based Systems (KB2894852)
201 Server 2012 R2 Required Patches 4557900 2020-05 Update for Windows Server 2012 R2 for x64-based Systems (KB4557900)
202 Server 2012 R2 Required Patches 4576489 2020-09 Security Only Update for .NET Framework 4.8 for Windows 8.1 and Server 2012 R2 for x64 (KB4576489)
203 Server 2012 R2 Required Patches 4577071 2020-09 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4577071)
204 Server 2012 R2 Required Patches 4507457 2019-07 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4507457)
205 Server 2012 R2 Required Patches 4501226 2019-05 Update for Windows Server 2012 R2 for x64-based Systems (KB4501226)
206 Server 2012 R2 Required Patches 4592484 2020-12 Security Monthly Quality Rollup for Windows Server 2012 R2 for x64-based Systems (KB4592484)
207 Server 2012 R2 Required Patches 2973114 MS14-053 Security Update for Microsoft .NET Framework 3.5 on Windows 8.1 and Windows Server 2012 R2 for x64-based Systems (KB2973114)
208 Server 2012 R2 Required Patches 3134813 Update for Windows Server 2012 R2 (KB3134813)
209 Server 2012 R2 Required Patches 4499165 2019-05 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4499165)
210 Server 2012 R2 Required Patches 3097992 MS15-118 Security Update for Microsoft .NET Framework 3.5 on Windows 8.1 and Windows Server 2012 R2 for x64-based Systems (KB3097992)
211 Server 2012 R2 Required Patches 4541505 2020-03 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4541505)
212 Server 2012 R2 Required Patches 4462930 Update for Adobe Flash Player for Windows Server 2012 R2 (KB4462930)
213 Server 2012 R2 Required Patches 4033369 Microsoft .NET Framework 4.7.1 for Windows 8.1 and Windows Server 2012 R2 for x64 (KB4033369)
214 Server 2012 R2 Required Patches 4493467 2019-04 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4493467)
215 Server 2012 R2 Required Patches 2982998 MS14-076 Security Update for Windows Server 2012 R2 (KB2982998)
216 Server 2012 R2 Required Patches 3074545 MS15-101 Security Update for Microsoft .NET Framework 3.5 on Windows 8.1 and Windows Server 2012 R2 for x64-based Systems (KB3074545)
217 Server 2012 R2 Required Patches 4507413 2019-07 Security Only Update for .NET Framework 3.5, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 for Windows 8.1 and Server 2012 R2 for x64 (KB4507413)
218 Server 2012 R2 Required Patches 4586085 2020-11 Security and Quality Rollup for .NET Framework 3.5, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 for Windows 8.1 and Server 2012 R2 for x64 (KB4586085)
219 Server 2012 R2 Required Patches 4534978 2020-01 Security Only Update for .NET Framework 3.5, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 for Windows 8.1 and Server 2012 R2 for x64 (KB4534978)
220 Server 2012 R2 Required Patches 4586823 2020-11 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4586823)
221 Server 2012 R2 Required Patches 3138962 MS16-027 Security Update for Windows Server 2012 R2 (KB3138962)
222 Server 2012 R2 Required Patches 3127222 MS16-019 Security Update for Microsoft .NET Framework 3.5 on Windows 8.1 and Windows Server 2012 R2 for x64 (KB3127222)
223 Server 2012 R2 Required Patches 4525250 2019-11 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4525250)
224 Server 2012 R2 Required Patches 4586768 2020-11 Cumulative Security Update for Internet Explorer 11 for Windows Server 2012 R2 for x64-based systems (KB4586768)
225 Server 2012 R2 Required Patches 4487123 2019-02 Security Only Update for .NET Framework 3.5, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2 for Windows 8.1 and Server 2012 R2 for x64 (KB4487123)
226 Server 2012 R2 Required Patches 3018133 Update for Windows Server 2012 R2 (KB3018133)
227 Server 2012 R2 Required Patches 4578623 2020-10 Update for Windows Server 2012 R2 for x64-based Systems (KB4578623)
228 Server 2012 R2 Required Patches 4534309 2020-01 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4534309)
229 Server 2012 R2 Required Patches 4486459 2019-02 Update for Windows Server 2012 R2 for x64-based Systems (KB4486459)
230 Server 2012 R2 Required Patches 4054566 Microsoft .NET Framework 4.7.2 for Windows Server 2012 R2 for x64 (KB4054566)
231 Server 2012 R2 Required Patches 4592495 2020-12 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4592495)
232 Server 2012 R2 Required Patches 4512489 2019-08 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4512489)
233 Server 2012 R2 Required Patches 4498963 2019-05 Security Only Update for .NET Framework 3.5, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 for Windows 8.1 and Server 2012 R2 for x64 (KB4498963)
234 Server 2012 R2 Required Patches 4467703 2018-11 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4467703)
235 Server 2012 R2 Required Patches 4519108 2019-10 Update for Windows Server 2012 R2 for x64-based Systems (KB4519108)
236 Server 2012 R2 Required Patches 4490128 2019-03 Update for Windows Server 2012 R2 for x64-based Systems (KB4490128)
237 Server 2012 R2 Required Patches 4345681 2018-08 Security Only Update for .NET Framework 3.5, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2 for Windows 8.1 and Server 2012 R2 for x64 (KB4345681)
238 Server 2012 R2 Required Patches 4570502 2020-08 Security Only Update for .NET Framework 3.5, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 for Windows 8.1 and Server 2012 R2 for x64 (KB4570502)
239 Server 2012 R2 Required Patches 4516064 2019-09 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4516064)
240 Server 2012 R2 Required Patches 4566468 2020-10 Security Only Update for .NET Framework 3.5, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 for Windows 8.1 and Server 2012 R2 for x64 (KB4566468)
241 Server 2012 R2 Required Patches 3138378 Update for Windows Server 2012 R2 (KB3138378)
242 Server 2012 R2 Required Patches 4462901 Update for Windows Server 2012 R2 (KB4462901)
243 Server 2012 R2 Required Patches 2966828 MS14-046 Security Update for Microsoft .NET Framework 3.5 on Windows 8.1 and Windows Server 2012 R2 for x64-based Systems (KB2966828)
244 Server 2012 R2 Required Patches 4486105 Microsoft .NET Framework 4.8 for Windows Server 2012 R2 for x64 (KB4486105)
245 Server 2012 R2 Required Patches 3134179 Update for Windows Server 2012 R2 (KB3134179)
246 Server 2012 R2 Required Patches 4339284 Update for Windows Server 2012 R2 (KB4339284)
247 Server 2012 R2 Required Patches 4537803 2020-02 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4537803)
248 Server 2012 R2 Required Patches 4489883 2019-03 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4489883)
249 Server 2012 R2 Required Patches 4014987 April, 2017 Security Only Update for .NET Framework 3.5, 4.5.2, 4.6, 4.6.1, 4.6.2 on Windows 8.1 and Windows Server 2012 R2 for x64 (KB4014987)
250 Server 2012 R2 Required Patches 4519990 2019-10 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4519990)
251 Server 2012 R2 Required Patches 3005628 Update for Microsoft .NET Framework 3.5 for x64-based Systems (KB3005628)
252 Server 2012 R2 Required Patches 3076949 MS15-089 Security Update for Windows Server 2012 R2 (KB3076949)
253 Server 2012 R2 Required Patches 4580358 2020-10 Security Only Quality Update for Windows Server 2012 R2 for x64-based Systems (KB4580358)
254 Server 2012 R2 Required Patches 4489488 2019-03 Update for .NET Framework 3.5, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2 for Windows 8.1 and Server 2012 R2 for x64 (KB4489488)
255 Server 2012 R2 Required Patches 3012235 Update for Windows Server 2012 R2 (KB3012235)
256 Server 2012 R2 Required Patches 4580469 2020-10 Security Only Update for .NET Framework 3.5, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 for Windows 8.1 and Server 2012 R2 for x64 (KB4580469)
257 Server 2012 R2 Required Patches 2972103 MS14-057 Security Update for Microsoft .NET Framework 3.5 on Windows 8.1 and Windows Server 2012 R2 for x64-based Systems (KB2972103)
258 Server 2012 R2 Required Patches 3013531 Update for Windows Server 2012 R2 (KB3013531)

View File

@@ -0,0 +1,637 @@
server
W2012A
W2012B
Q1NCRAFILE001
DFNP014
DAPCAC002
DAPCAV001
DAPVRNS001
DGAW001
DWAM002
DIAP001
DWHD003
DCTI001
DVB6001
DFNP009
DVCO001
DBIT901
DFNP020
DAPP011
DMHB001
QRSH023
QRSH022
QRSH021
DCAM011
DCIC011
DCIC012
DSPUPG2010
DOSM012
DOSM011
DMDA011
DICW011
DTABL001
DSIS002
DOWA001
DBIZ111
DBIZ112
DBIZ113
DUTL012
DWAM001
DSRS004
DSSS001
DSQL009
DSQL021
DSIS004
QRSH002
QRSH041
QRSH051
QRSH001
QRSH031
QAPP041
DEDI111
DEDI112
DEDI113
QRSH111
DSQL027A
DSQL027B
DSRS005
DSQL000
DSQL030
DSQL004
DSQL029
DSIS005
DSQL031
DSIS003
DNCRASSIS001
DSQL028
DSQL021Q
DSQL024
DNCRASPWFE01
DNCRASPAS01
QAPP031
QNCRASPAPP01
QNCRASPDC01
QNCRASPAPP02
QNCRASPWFE01
QNCRASPWFE02
QNCRASPDC02
QNCRASPSEA01
QNCRASPSEA02
QRDS002
QMHB003
QMHB004
QRDS001
QAPP051
QMHB001
QMFT001
QBIZ151
QBIZ152
Q1SQL024
QAPP011
QNCRASPOOS01
DNCRASPOOS01
QRSH101
QSCH012
QDRF001
QFNP008
Q2NCRAFILE001
Q3NCRAFILE001
QMHB002
QSRS004
QFNP007
QSQL029
QSQL030
Q5NCRAFILE001
QADF001
QTABL001
Q4NCRAFILE001
QFNP009
QSCH011
QSQL028
QAPP021
QSCH014
QFNP001
QSCH013
PQRSH001
QVST012
QVST011
QSIS003
PNCRAVPRXY001
PIAP002
PKEY003
PMON005
PNCRAVERIDX002
PNCRAVERIDX005
PNCRAVERDA001
PNCRAVERVLT002
PNCRAVERVLT001
PNCRAVERIDX004
PNCRAVERIDX001
PNCRAVERIDX003
PSEV013
PSEV011
PALT001
NYMEPALT001
AZPHPALT001
PSEV012
PADM001
PSEV014
KSOPPALT001
PRSH027
PRSH019
PRSH011
PUTL005
PSEV010
PICW011
PVEO002
PIAP001
PKEY002
PNCRAVERVLT003
PSEV024
PSNX001
PSEV022
PNCRAWINAUTO001
PUTL011
PSSP004
PVRS012
PCAC002
PDRF001
PRSH020
PRSH021
PAAD001
PIAM001
PAPCAV001
PRSH023
PSSP002
PMON010
PRSH010
PRSH024
PRSH008
PRSH001
PRSH006
PRSH000
PRSH009
PRSH005
PRSH003
PRSH004
PRSH002
PRSH007
PRSH022
PRSH014
PRSH012
PRSH016
PRSH015
PRSH018
PRSH017
PRSH013
PFAX021
PVEO001
PNCRAVPRXY002
PFAX022
CTHAPALT001
PSEV015
PUTL006
PVET001
PDEP001
PRSH028
PCAC001
PRSH052
PRSH030
PRSH025
PRSH029
PMON009
PRSH026
PSSP001
PAPCAC002
PIAC001
PNCRANTRX002
PRSH172
PIWM002
PFNP009
PDOC001
PEDI114
PRSH054
PRSH051
PWHD003
PRSH174
PBIZ125
PBIZ121
PFNP010
PRSH171
PNCRAFILE003
PSUF002
PPCH001
PRSH059
PBIZ112
PSSS001
PPCS001
PSKY001
PSQL022B
PTTS011
PFNP006
PFNP013
PSQL013
PALM001
PGAW001
PWHD004
PNCRAFILE007
PSUF001
PEDI111
PEZP001
PNCRANTRX001
PMON006
PEDI112
PVER001
PSQL015
PADF003
PVEB001
PSQL026
PBIZ126
PADF002
PFNP011
PFNP002
POWA001
PSQL030A
PSQL029A
PSQL016
PRDS001
PRSH176
PRSH056
PRSH057
PBIZ124
PSQL010
PMON011
PBIZ111
PMON002
PFNP008
PSSP003
PRSH152
PMHB002
PAPJNKSSLA201
PTABL001
PCCR001
PEDI116
PDMC005
PSNW001
PSLK001
PDMC003
PRSH161
PSKY003
PDMC002
PDMC001
PDMC004
PVRS011
PAPSEP001
CTHAPDMC001
PDMC006
CTSTPDMC001
PBIZ123
FLT2PTTS011
FLT2PDMC001
AZPHPDMC001
FLT2PDMC002
KSOPPDMC001
NYMEPDMC001
PRSH175
PRSH151
PSQL030B
PMHB001
PVST001
PIQV001
PSQL009
PFNP015
PSQL025
PRSH173
PBIZ122
PPDQ001
PVST002
PRSH053
PSQL029B
PRSH038
PRSH039
PRSH033
PRSH031
PRSH035
PRSH032
PVSS012
PDFS001
PDFS003
PIAM002
PSQL021
PRDS002
PRSH037
PRSH034
PFNP016
PVAV001
PFNP017
PFNP012
PNCRAMSMQ001
PRSH036
PFNP018
PNCRAFILE001
PIWM001
PAPP011
PDFS002
PSQL028A
PRSH040
PVAV002
PVAV003
PFNP019
PNCRAFILE005
PSIS002
FLT2PSQL021
PAPP001
PFNP007
PNCRARCM001
AZPHPRCS011
CTHAPRCS011
CTHAPALT002
CTSTPALT001
PPKI004
PMON007
PVSS011
PFNP003
PEDI113
DPOCSP001
PVVC012
PVVC014
PVVC013
QRSH113
Q5SQL022
QUTL012
Q4SQL024
QFNP003
QBIZ121
QBIZ132
QEDI153
PQRDS001
QEDI113
QRSH112
QBIZ131
QSIS002
QBIZ122
QVST021
QEDI152
QEDI111
QVST022
QEDI151
QEDI112
Q1SQL022
PAPJNKSSLA202
PUTL012
PVVC015
PVVC016
QBIZ112
QBIZ111
Q2SQL022
Q3SQL022
Q4SQL022B
Q4SQL022
POSM014
PSQL022
PCIC011
PIMQ011
PRSH050
PMDA011
PISR011
PSRS004
PMDA014
PSQL014
PRSH055
PMDA012
PMDA013
PRSH058
PRSH162
FLT2PCIC011
PBIT901
PIWC012
FLT2POSM012
POSM012
PIWC011
FLT2POSM013
PVVC011
PRSH101
QBIZ142
FLT2PMDA011
FLT2POSM011
FLT2PMDA012
FLT2POSM014
FLT2PICW011
FLT2PMDA013
FLT2PMDA014
PRCS012
POSM011
POSM013
DIWC011
PRCS011
PSQL024
PDISKTEST1
PMDA016
FLT2PCAC001
PMDA015
PMDA017
FLT2PALT001
POSM016
FLT2PCAC002
POSM015
PSQL012
FLT2PRCS011
FLT2PMDA017
FLT2PMDA015
FLT2PMDA016
KSOPPRCS011
PEDI115
PRSH102
DVST001
QBIZ141
PIPM001
DRCS011
QSNX001
PJMP001
PAPCAC001
DNCRAAUTO006
PSQL027
PSUS001
PNCRAVERRRPT001
PSIS003
PSQL028Q
PSQL028B
PSQL030Q
QNCRASCCM001
QQATEST01
PVAPV002
PSEC003
PVAPV003
PVAPV001
PSQL029Q
PVVCO005
PVVCO006
PVVCO002
PICO001
PVVCO003
PNCRALSWMON001
PVVCO004
PNCRANTRX004
PNCRAVERVLT004
FLT2VEB002
FLT2VEB003
S16NCRASRV00001
PNCRAVONE01
DSPUPG2013
DAPP012
DDOC001
DAPCAC001
DFNP001
DFAX011
DAPP006
DFNP002
DAPSEP001
PNCRASCCMWKDP03
PNCRASCCMWSP2
PNCRASCCMWKDP02
PNCRASCCMWSP3
PNCRASMTP02
PNCRASMTP01
PNCRAADMIN01
PVVCO001
PFNP005
PFNP001
PNCRACS01
QNCRACS01
DNCRACS01
PNCRAMEP01
DNCRAMEP01
PNCRAEXMBX005
DNCRAFILETEST01
PPKI003
PSQL008
PAPP002
QAPP005
PSEV005
PSEV002
PVEP001
PRSH181
PRSH150
PVCO001
PRSH182
QAPP002
DFNP011
DHIL001
QAPP010
PSEV021
PRSH049
PRSH060
PDRDS001
PSQL023
PSQL023B
PSEV017
PFNP014
DAPP001-2012R2
PSEV023
DOIT001
PVRT006
PVRT003
PVRT004
PVRT001
PVRT005
PVRT002
PFAX014
PFAX013
PFAX012
PFAX011
PVRT007
FLT2PVRT007
DVVC002
DVVC001
CTHAPVRT007
AZPHPVRT007
KSOPPVRT007
PSQL026B
PSQLCL26
PRMS002
PRMS001
PVER005
Q2FNP003
Q5FNP003
Q1FNP003
Q4FNP003
Q3FNP003
QDNS001
PMQS001
QCMX001
psql029cl
psql028cl
PNTX001
PCMX001
DMQS001
FLT2VEB001
psql030cl
DRSQL003
DRSQL002
DRRDS001
DRTEST001
DRRDS002
dsql02130cl
DMS3001
PNCRASPOWA01
I3-PROD-LIS
PNCRASMI01
DNCRAAUTO004
DNCRAAUTO003
DSPC001
DFAX001
DWHD004
GOLD-S16-INSTAN
DVRS001
DFAX002
DVVC003
FLT2PDEP001
DVVC004
DSTMN001
DNCRATESTVM2
PADS001
NPTEST1
PSCH014-TEST
PVEP602
PWAP002-0
PSQL000
PSEV006
PVEP601
PFAX011CAP
PSCH011-TEST
PVEP604
PMFT001
PFAX015
PDOMS001
PVEP603
PWAP001-0
TESTVM6
TEST
QBIZ100
PNCRAMEDI001
TEMPDC004
TEMPDC006
TEMPNETWRIX
DSTEA001
DSACS001
DSBAMCS001
PNCRAWFM01
DSNX001
CLVA1PFNP005
CLVA1PFNP003
CLVA1PFNP006
CLVA1PEXM001
CLVA1PFNP007
CLVA1PFNP001
CLVA1PFNP002
CLVA1PDMC001
DSPUPG2016
DRSQL028
PNCRAFILE004
QNCRAMEP01
PNCRAPROSPD01
PNFP012A
PNFP011A
PFNP003A
PFNP001A
PEXM004
1 server
2 W2012A
3 W2012B
4 Q1NCRAFILE001
5 DFNP014
6 DAPCAC002
7 DAPCAV001
8 DAPVRNS001
9 DGAW001
10 DWAM002
11 DIAP001
12 DWHD003
13 DCTI001
14 DVB6001
15 DFNP009
16 DVCO001
17 DBIT901
18 DFNP020
19 DAPP011
20 DMHB001
21 QRSH023
22 QRSH022
23 QRSH021
24 DCAM011
25 DCIC011
26 DCIC012
27 DSPUPG2010
28 DOSM012
29 DOSM011
30 DMDA011
31 DICW011
32 DTABL001
33 DSIS002
34 DOWA001
35 DBIZ111
36 DBIZ112
37 DBIZ113
38 DUTL012
39 DWAM001
40 DSRS004
41 DSSS001
42 DSQL009
43 DSQL021
44 DSIS004
45 QRSH002
46 QRSH041
47 QRSH051
48 QRSH001
49 QRSH031
50 QAPP041
51 DEDI111
52 DEDI112
53 DEDI113
54 QRSH111
55 DSQL027A
56 DSQL027B
57 DSRS005
58 DSQL000
59 DSQL030
60 DSQL004
61 DSQL029
62 DSIS005
63 DSQL031
64 DSIS003
65 DNCRASSIS001
66 DSQL028
67 DSQL021Q
68 DSQL024
69 DNCRASPWFE01
70 DNCRASPAS01
71 QAPP031
72 QNCRASPAPP01
73 QNCRASPDC01
74 QNCRASPAPP02
75 QNCRASPWFE01
76 QNCRASPWFE02
77 QNCRASPDC02
78 QNCRASPSEA01
79 QNCRASPSEA02
80 QRDS002
81 QMHB003
82 QMHB004
83 QRDS001
84 QAPP051
85 QMHB001
86 QMFT001
87 QBIZ151
88 QBIZ152
89 Q1SQL024
90 QAPP011
91 QNCRASPOOS01
92 DNCRASPOOS01
93 QRSH101
94 QSCH012
95 QDRF001
96 QFNP008
97 Q2NCRAFILE001
98 Q3NCRAFILE001
99 QMHB002
100 QSRS004
101 QFNP007
102 QSQL029
103 QSQL030
104 Q5NCRAFILE001
105 QADF001
106 QTABL001
107 Q4NCRAFILE001
108 QFNP009
109 QSCH011
110 QSQL028
111 QAPP021
112 QSCH014
113 QFNP001
114 QSCH013
115 PQRSH001
116 QVST012
117 QVST011
118 QSIS003
119 PNCRAVPRXY001
120 PIAP002
121 PKEY003
122 PMON005
123 PNCRAVERIDX002
124 PNCRAVERIDX005
125 PNCRAVERDA001
126 PNCRAVERVLT002
127 PNCRAVERVLT001
128 PNCRAVERIDX004
129 PNCRAVERIDX001
130 PNCRAVERIDX003
131 PSEV013
132 PSEV011
133 PALT001
134 NYMEPALT001
135 AZPHPALT001
136 PSEV012
137 PADM001
138 PSEV014
139 KSOPPALT001
140 PRSH027
141 PRSH019
142 PRSH011
143 PUTL005
144 PSEV010
145 PICW011
146 PVEO002
147 PIAP001
148 PKEY002
149 PNCRAVERVLT003
150 PSEV024
151 PSNX001
152 PSEV022
153 PNCRAWINAUTO001
154 PUTL011
155 PSSP004
156 PVRS012
157 PCAC002
158 PDRF001
159 PRSH020
160 PRSH021
161 PAAD001
162 PIAM001
163 PAPCAV001
164 PRSH023
165 PSSP002
166 PMON010
167 PRSH010
168 PRSH024
169 PRSH008
170 PRSH001
171 PRSH006
172 PRSH000
173 PRSH009
174 PRSH005
175 PRSH003
176 PRSH004
177 PRSH002
178 PRSH007
179 PRSH022
180 PRSH014
181 PRSH012
182 PRSH016
183 PRSH015
184 PRSH018
185 PRSH017
186 PRSH013
187 PFAX021
188 PVEO001
189 PNCRAVPRXY002
190 PFAX022
191 CTHAPALT001
192 PSEV015
193 PUTL006
194 PVET001
195 PDEP001
196 PRSH028
197 PCAC001
198 PRSH052
199 PRSH030
200 PRSH025
201 PRSH029
202 PMON009
203 PRSH026
204 PSSP001
205 PAPCAC002
206 PIAC001
207 PNCRANTRX002
208 PRSH172
209 PIWM002
210 PFNP009
211 PDOC001
212 PEDI114
213 PRSH054
214 PRSH051
215 PWHD003
216 PRSH174
217 PBIZ125
218 PBIZ121
219 PFNP010
220 PRSH171
221 PNCRAFILE003
222 PSUF002
223 PPCH001
224 PRSH059
225 PBIZ112
226 PSSS001
227 PPCS001
228 PSKY001
229 PSQL022B
230 PTTS011
231 PFNP006
232 PFNP013
233 PSQL013
234 PALM001
235 PGAW001
236 PWHD004
237 PNCRAFILE007
238 PSUF001
239 PEDI111
240 PEZP001
241 PNCRANTRX001
242 PMON006
243 PEDI112
244 PVER001
245 PSQL015
246 PADF003
247 PVEB001
248 PSQL026
249 PBIZ126
250 PADF002
251 PFNP011
252 PFNP002
253 POWA001
254 PSQL030A
255 PSQL029A
256 PSQL016
257 PRDS001
258 PRSH176
259 PRSH056
260 PRSH057
261 PBIZ124
262 PSQL010
263 PMON011
264 PBIZ111
265 PMON002
266 PFNP008
267 PSSP003
268 PRSH152
269 PMHB002
270 PAPJNKSSLA201
271 PTABL001
272 PCCR001
273 PEDI116
274 PDMC005
275 PSNW001
276 PSLK001
277 PDMC003
278 PRSH161
279 PSKY003
280 PDMC002
281 PDMC001
282 PDMC004
283 PVRS011
284 PAPSEP001
285 CTHAPDMC001
286 PDMC006
287 CTSTPDMC001
288 PBIZ123
289 FLT2PTTS011
290 FLT2PDMC001
291 AZPHPDMC001
292 FLT2PDMC002
293 KSOPPDMC001
294 NYMEPDMC001
295 PRSH175
296 PRSH151
297 PSQL030B
298 PMHB001
299 PVST001
300 PIQV001
301 PSQL009
302 PFNP015
303 PSQL025
304 PRSH173
305 PBIZ122
306 PPDQ001
307 PVST002
308 PRSH053
309 PSQL029B
310 PRSH038
311 PRSH039
312 PRSH033
313 PRSH031
314 PRSH035
315 PRSH032
316 PVSS012
317 PDFS001
318 PDFS003
319 PIAM002
320 PSQL021
321 PRDS002
322 PRSH037
323 PRSH034
324 PFNP016
325 PVAV001
326 PFNP017
327 PFNP012
328 PNCRAMSMQ001
329 PRSH036
330 PFNP018
331 PNCRAFILE001
332 PIWM001
333 PAPP011
334 PDFS002
335 PSQL028A
336 PRSH040
337 PVAV002
338 PVAV003
339 PFNP019
340 PNCRAFILE005
341 PSIS002
342 FLT2PSQL021
343 PAPP001
344 PFNP007
345 PNCRARCM001
346 AZPHPRCS011
347 CTHAPRCS011
348 CTHAPALT002
349 CTSTPALT001
350 PPKI004
351 PMON007
352 PVSS011
353 PFNP003
354 PEDI113
355 DPOCSP001
356 PVVC012
357 PVVC014
358 PVVC013
359 QRSH113
360 Q5SQL022
361 QUTL012
362 Q4SQL024
363 QFNP003
364 QBIZ121
365 QBIZ132
366 QEDI153
367 PQRDS001
368 QEDI113
369 QRSH112
370 QBIZ131
371 QSIS002
372 QBIZ122
373 QVST021
374 QEDI152
375 QEDI111
376 QVST022
377 QEDI151
378 QEDI112
379 Q1SQL022
380 PAPJNKSSLA202
381 PUTL012
382 PVVC015
383 PVVC016
384 QBIZ112
385 QBIZ111
386 Q2SQL022
387 Q3SQL022
388 Q4SQL022B
389 Q4SQL022
390 POSM014
391 PSQL022
392 PCIC011
393 PIMQ011
394 PRSH050
395 PMDA011
396 PISR011
397 PSRS004
398 PMDA014
399 PSQL014
400 PRSH055
401 PMDA012
402 PMDA013
403 PRSH058
404 PRSH162
405 FLT2PCIC011
406 PBIT901
407 PIWC012
408 FLT2POSM012
409 POSM012
410 PIWC011
411 FLT2POSM013
412 PVVC011
413 PRSH101
414 QBIZ142
415 FLT2PMDA011
416 FLT2POSM011
417 FLT2PMDA012
418 FLT2POSM014
419 FLT2PICW011
420 FLT2PMDA013
421 FLT2PMDA014
422 PRCS012
423 POSM011
424 POSM013
425 DIWC011
426 PRCS011
427 PSQL024
428 PDISKTEST1
429 PMDA016
430 FLT2PCAC001
431 PMDA015
432 PMDA017
433 FLT2PALT001
434 POSM016
435 FLT2PCAC002
436 POSM015
437 PSQL012
438 FLT2PRCS011
439 FLT2PMDA017
440 FLT2PMDA015
441 FLT2PMDA016
442 KSOPPRCS011
443 PEDI115
444 PRSH102
445 DVST001
446 QBIZ141
447 PIPM001
448 DRCS011
449 QSNX001
450 PJMP001
451 PAPCAC001
452 DNCRAAUTO006
453 PSQL027
454 PSUS001
455 PNCRAVERRRPT001
456 PSIS003
457 PSQL028Q
458 PSQL028B
459 PSQL030Q
460 QNCRASCCM001
461 QQATEST01
462 PVAPV002
463 PSEC003
464 PVAPV003
465 PVAPV001
466 PSQL029Q
467 PVVCO005
468 PVVCO006
469 PVVCO002
470 PICO001
471 PVVCO003
472 PNCRALSWMON001
473 PVVCO004
474 PNCRANTRX004
475 PNCRAVERVLT004
476 FLT2VEB002
477 FLT2VEB003
478 S16NCRASRV00001
479 PNCRAVONE01
480 DSPUPG2013
481 DAPP012
482 DDOC001
483 DAPCAC001
484 DFNP001
485 DFAX011
486 DAPP006
487 DFNP002
488 DAPSEP001
489 PNCRASCCMWKDP03
490 PNCRASCCMWSP2
491 PNCRASCCMWKDP02
492 PNCRASCCMWSP3
493 PNCRASMTP02
494 PNCRASMTP01
495 PNCRAADMIN01
496 PVVCO001
497 PFNP005
498 PFNP001
499 PNCRACS01
500 QNCRACS01
501 DNCRACS01
502 PNCRAMEP01
503 DNCRAMEP01
504 PNCRAEXMBX005
505 DNCRAFILETEST01
506 PPKI003
507 PSQL008
508 PAPP002
509 QAPP005
510 PSEV005
511 PSEV002
512 PVEP001
513 PRSH181
514 PRSH150
515 PVCO001
516 PRSH182
517 QAPP002
518 DFNP011
519 DHIL001
520 QAPP010
521 PSEV021
522 PRSH049
523 PRSH060
524 PDRDS001
525 PSQL023
526 PSQL023B
527 PSEV017
528 PFNP014
529 DAPP001-2012R2
530 PSEV023
531 DOIT001
532 PVRT006
533 PVRT003
534 PVRT004
535 PVRT001
536 PVRT005
537 PVRT002
538 PFAX014
539 PFAX013
540 PFAX012
541 PFAX011
542 PVRT007
543 FLT2PVRT007
544 DVVC002
545 DVVC001
546 CTHAPVRT007
547 AZPHPVRT007
548 KSOPPVRT007
549 PSQL026B
550 PSQLCL26
551 PRMS002
552 PRMS001
553 PVER005
554 Q2FNP003
555 Q5FNP003
556 Q1FNP003
557 Q4FNP003
558 Q3FNP003
559 QDNS001
560 PMQS001
561 QCMX001
562 psql029cl
563 psql028cl
564 PNTX001
565 PCMX001
566 DMQS001
567 FLT2VEB001
568 psql030cl
569 DRSQL003
570 DRSQL002
571 DRRDS001
572 DRTEST001
573 DRRDS002
574 dsql02130cl
575 DMS3001
576 PNCRASPOWA01
577 I3-PROD-LIS
578 PNCRASMI01
579 DNCRAAUTO004
580 DNCRAAUTO003
581 DSPC001
582 DFAX001
583 DWHD004
584 GOLD-S16-INSTAN
585 DVRS001
586 DFAX002
587 DVVC003
588 FLT2PDEP001
589 DVVC004
590 DSTMN001
591 DNCRATESTVM2
592 PADS001
593 NPTEST1
594 PSCH014-TEST
595 PVEP602
596 PWAP002-0
597 PSQL000
598 PSEV006
599 PVEP601
600 PFAX011CAP
601 PSCH011-TEST
602 PVEP604
603 PMFT001
604 PFAX015
605 PDOMS001
606 PVEP603
607 PWAP001-0
608 TESTVM6
609 TEST
610 QBIZ100
611 PNCRAMEDI001
612 TEMPDC004
613 TEMPDC006
614 TEMPNETWRIX
615 DSTEA001
616 DSACS001
617 DSBAMCS001
618 PNCRAWFM01
619 DSNX001
620 CLVA1PFNP005
621 CLVA1PFNP003
622 CLVA1PFNP006
623 CLVA1PEXM001
624 CLVA1PFNP007
625 CLVA1PFNP001
626 CLVA1PFNP002
627 CLVA1PDMC001
628 DSPUPG2016
629 DRSQL028
630 PNCRAFILE004
631 QNCRAMEP01
632 PNCRAPROSPD01
633 PNFP012A
634 PNFP011A
635 PFNP003A
636 PFNP001A
637 PEXM004

View File

@@ -0,0 +1,301 @@
"PSComputerName","caption"
"W2012A","Microsoft Windows Server 2012 R2 Standard"
"W2012B","Microsoft Windows Server 2012 R2 Standard"
"Q1NCRAFILE001","Microsoft Windows Server 2019 Standard"
"DFNP014","Microsoft Windows Server 2016 Standard"
"DAPCAC002","Microsoft Windows Server 2016 Standard"
"DAPCAV001","Microsoft Windows Server 2016 Standard"
"DAPVRNS001","Microsoft Windows Server 2012 R2 Standard"
"DGAW001","Microsoft Windows Server 2016 Standard"
"DWAM002","Microsoft Windows Server 2012 R2 Standard"
"DIAP001","Microsoft Windows Server 2012 R2 Standard"
"DWHD003","Microsoft Windows Server 2012 R2 Standard"
"DCTI001","Microsoft Windows Server 2012 R2 Standard"
"DVB6001","Microsoft Windows Server 2012 R2 Standard"
"DFNP009","Microsoft Windows Server 2012 R2 Standard"
"DBIT901","Microsoft Windows Server 2012 R2 Standard"
"DFNP020","Microsoft Windows Server 2012 R2 Standard"
"DAPP011","Microsoft Windows Server 2012 R2 Standard"
"DMHB001","Microsoft Windows Server 2012 R2 Standard"
"QRSH023","Microsoft Windows Server 2012 R2 Standard"
"QRSH022","Microsoft Windows Server 2012 R2 Standard"
"QRSH021","Microsoft Windows Server 2012 R2 Standard"
"DCAM011","Microsoft Windows Server 2012 R2 Standard"
"DCIC011","Microsoft Windows Server 2012 R2 Standard"
"DCIC012","Microsoft Windows Server 2012 R2 Standard"
"DSPUPG2010","Microsoft Windows Server 2012 R2 Standard"
"DOSM012","Microsoft Windows Server 2012 R2 Standard"
"DOSM011","Microsoft Windows Server 2012 R2 Standard"
"DMDA011","Microsoft Windows Server 2012 R2 Standard"
"DICW011","Microsoft Windows Server 2012 R2 Standard"
"DTABL001","Microsoft Windows Server 2012 R2 Standard"
"DSIS002","Microsoft Windows Server 2012 R2 Standard"
"DOWA001","Microsoft Windows Server 2012 R2 Standard"
"DBIZ111","Microsoft Windows Server 2012 R2 Standard"
"DBIZ112","Microsoft Windows Server 2012 R2 Standard"
"DBIZ113","Microsoft Windows Server 2012 R2 Standard"
"DUTL012","Microsoft Windows Server 2016 Standard"
"DWAM001","Microsoft Windows Server 2012 R2 Standard"
"DSRS004","Microsoft Windows Server 2012 R2 Standard"
"DSSS001","Microsoft Windows Server 2012 R2 Standard"
"DSQL009","Microsoft Windows Server 2012 R2 Standard"
"DSQL021","Microsoft Windows Server 2012 R2 Standard"
"DSIS004","Microsoft Windows Server 2016 Standard"
"QRSH002","Microsoft Windows Server 2012 R2 Standard"
"QRSH041","Microsoft Windows Server 2012 R2 Standard"
"QRSH051","Microsoft Windows Server 2012 R2 Standard"
"QRSH001","Microsoft Windows Server 2012 R2 Standard"
"QRSH031","Microsoft Windows Server 2012 R2 Standard"
"QAPP041","Microsoft Windows Server 2012 R2 Standard"
"DEDI111","Microsoft Windows Server 2012 R2 Standard"
"DEDI112","Microsoft Windows Server 2012 R2 Standard"
"DEDI113","Microsoft Windows Server 2012 R2 Standard"
"QRSH111","Microsoft Windows Server 2012 R2 Standard"
"DSQL027A","Microsoft Windows Server 2016 Standard"
"DSQL027B","Microsoft Windows Server 2016 Standard"
"DSRS005","Microsoft Windows Server 2016 Standard"
"DSQL000","Microsoft Windows Server 2016 Standard"
"DSQL030","Microsoft Windows Server 2016 Standard"
"DSQL004","Microsoft Windows Server 2016 Standard"
"DSQL029","Microsoft Windows Server 2016 Standard"
"DSIS005","Microsoft Windows Server 2016 Standard"
"DSQL031","Microsoft Windows Server 2016 Standard"
"DSIS003","Microsoft Windows Server 2016 Standard"
"DNCRASSIS001","Microsoft Windows Server 2019 Standard"
"DSQL028","Microsoft Windows Server 2016 Standard"
"DSQL021Q","Microsoft Windows Server 2019 Standard"
"DSQL024","Microsoft Windows Server 2012 R2 Standard"
"DNCRASPWFE01","Microsoft Windows Server 2019 Standard"
"DNCRASPAS01","Microsoft Windows Server 2019 Standard"
"QAPP031","Microsoft Windows Server 2012 R2 Standard"
"QNCRASPAPP01","Microsoft Windows Server 2019 Standard"
"QNCRASPDC01","Microsoft Windows Server 2019 Standard"
"QNCRASPAPP02","Microsoft Windows Server 2019 Standard"
"QNCRASPWFE01","Microsoft Windows Server 2019 Standard"
"QNCRASPWFE02","Microsoft Windows Server 2019 Standard"
"QNCRASPDC02","Microsoft Windows Server 2019 Standard"
"QNCRASPSEA01","Microsoft Windows Server 2019 Standard"
"QNCRASPSEA02","Microsoft Windows Server 2019 Standard"
"QRDS002","Microsoft Windows Server 2012 R2 Standard"
"QMHB003","Microsoft Windows Server 2012 R2 Standard"
"QMHB004","Microsoft Windows Server 2012 R2 Standard"
"QRDS001","Microsoft Windows Server 2012 R2 Standard"
"QAPP051","Microsoft Windows Server 2012 R2 Standard"
"QMHB001","Microsoft Windows Server 2012 R2 Standard"
"QMFT001","Microsoft Windows Server 2012 R2 Standard"
"QBIZ151","Microsoft Windows Server 2012 R2 Standard"
"QBIZ152","Microsoft Windows Server 2012 R2 Standard"
"Q1SQL024","Microsoft Windows Server 2012 R2 Standard"
"QAPP011","Microsoft Windows Server 2012 R2 Standard"
"QNCRASPOOS01","Microsoft Windows Server 2016 Standard"
"DNCRASPOOS01","Microsoft Windows Server 2016 Standard"
"QRSH101","Microsoft Windows Server 2012 R2 Standard"
"QSCH012","Microsoft Windows Server 2012 R2 Standard"
"QDRF001","Microsoft Windows Server 2012 R2 Standard"
"QFNP008","Microsoft Windows Server 2012 R2 Standard"
"Q2NCRAFILE001","Microsoft Windows Server 2019 Standard"
"Q3NCRAFILE001","Microsoft Windows Server 2019 Standard"
"QMHB002","Microsoft Windows Server 2012 R2 Standard"
"QSRS004","Microsoft Windows Server 2012 R2 Standard"
"QFNP007","Microsoft Windows Server 2012 R2 Standard"
"QSQL029","Microsoft Windows Server 2016 Standard"
"QSQL030","Microsoft Windows Server 2016 Standard"
"Q5NCRAFILE001","Microsoft Windows Server 2019 Standard"
"QADF001","Microsoft Windows Server 2016 Standard"
"QTABL001","Microsoft Windows Server 2012 R2 Standard"
"Q4NCRAFILE001","Microsoft Windows Server 2019 Standard"
"QFNP009","Microsoft Windows Server 2012 R2 Standard"
"QSCH011","Microsoft Windows Server 2012 R2 Standard"
"QSQL028","Microsoft Windows Server 2016 Standard"
"QAPP021","Microsoft Windows Server 2012 R2 Standard"
"QSCH014","Microsoft Windows Server 2012 R2 Standard"
"QFNP001","Microsoft Windows Server 2012 R2 Standard"
"QSCH013","Microsoft Windows Server 2012 R2 Standard"
"QVST012","Microsoft Windows Server 2012 R2 Standard"
"QVST011","Microsoft Windows Server 2012 R2 Standard"
"QSIS003","Microsoft Windows Server 2016 Standard"
"PNCRAVPRXY001","Microsoft Windows Server 2019 Standard"
"PMON005","Microsoft Windows Server 2016 Standard"
"PNCRAVERVLT001","Microsoft Windows Server 2016 Standard"
"PICW011","Microsoft Windows Server 2012 R2 Standard"
"PMON010","Microsoft Windows Server 2016 Standard"
"PNCRAVPRXY002","Microsoft Windows Server 2019 Standard"
"PVET001","Microsoft Windows Server 2016 Standard"
"PMON009","Microsoft Windows Server 2016 Standard"
"PNCRANTRX002","Microsoft Windows Server 2016 Standard"
"PSSS001","Microsoft Windows Server 2012 R2 Standard"
"PTTS011","Microsoft Windows Server 2012 R2 Standard"
"PVER001","Microsoft Windows Server 2019 Standard"
"PVEB001","Microsoft Windows Server 2012 R2 Standard"
"PMON011","Microsoft Windows Server 2016 Standard"
"PDMC005","Microsoft Windows Server 2019 Standard"
"PDMC003","Microsoft Windows Server 2012 R2 Standard"
"PDMC003","Microsoft Windows Server 2012 R2 Standard"
"PDMC004","Microsoft Windows Server 2012 R2 Standard"
"PDMC006","Microsoft Windows Server 2012 R2 Standard"
"CTSTPDMC001","Microsoft Windows Server 2012 R2 Standard"
"FLT2PTTS011","Microsoft Windows Server 2012 R2 Standard"
"FLT2PDMC001","Microsoft Windows Server 2012 R2 Standard"
"FLT2PDMC002","Microsoft Windows Server 2012 R2 Standard"
"KSOPPDMC001","Microsoft Windows Server 2012 R2 Standard"
"NYMEPDMC001","Microsoft Windows Server 2012 R2 Standard"
"PVAV001","Microsoft Windows Server 2012 R2 Standard"
"PVAV002","Microsoft Windows Server 2016 Standard"
"PVAV003","Microsoft Windows Server 2016 Standard"
"AZPHPRCS011","Microsoft Windows Server 2012 R2 Standard"
"CTHAPRCS011","Microsoft Windows Server 2012 R2 Standard"
"CTHAPALT002","Microsoft Windows Server 2012 R2 Standard"
"CTSTPALT001","Microsoft Windows Server 2012 R2 Standard"
"PFNP003","Microsoft? Windows Server? 2008 Enterprise "
"DPOCSP001","Microsoft Windows Server 2019 Standard"
"PVVC012","Microsoft Windows Server 2012 R2 Standard"
"PVVC014","Microsoft Windows Server 2012 R2 Standard"
"PVVC013","Microsoft Windows Server 2012 R2 Standard"
"QRSH113","Microsoft Windows Server 2012 R2 Standard"
"Q5SQL022","Microsoft Windows Server 2012 R2 Standard"
"QUTL012","Microsoft Windows Server 2016 Standard"
"Q4SQL024","Microsoft Windows Server 2012 R2 Standard"
"QFNP003","Microsoft Windows Server 2012 R2 Standard"
"QBIZ121","Microsoft Windows Server 2012 R2 Standard"
"QBIZ132","Microsoft Windows Server 2012 R2 Standard"
"QEDI153","Microsoft Windows Server 2012 R2 Standard"
"QEDI113","Microsoft Windows Server 2012 R2 Standard"
"QRSH112","Microsoft Windows Server 2012 R2 Standard"
"QBIZ131","Microsoft Windows Server 2012 R2 Standard"
"QSIS002","Microsoft Windows Server 2012 R2 Standard"
"QBIZ122","Microsoft Windows Server 2012 R2 Standard"
"QVST021","Microsoft Windows Server 2012 R2 Standard"
"QEDI152","Microsoft Windows Server 2012 R2 Standard"
"QEDI111","Microsoft Windows Server 2012 R2 Standard"
"QVST022","Microsoft Windows Server 2012 R2 Standard"
"QEDI151","Microsoft Windows Server 2012 R2 Standard"
"QEDI112","Microsoft Windows Server 2012 R2 Standard"
"Q1SQL022","Microsoft Windows Server 2012 R2 Standard"
"PVVC015","Microsoft Windows Server 2012 R2 Standard"
"PVVC016","Microsoft Windows Server 2012 R2 Standard"
"QBIZ112","Microsoft Windows Server 2012 R2 Standard"
"QBIZ111","Microsoft Windows Server 2012 R2 Standard"
"Q2SQL022","Microsoft Windows Server 2012 R2 Standard"
"Q3SQL022","Microsoft Windows Server 2012 R2 Standard"
"Q4SQL022B","Microsoft Windows Server 2012 R2 Standard"
"Q4SQL022","Microsoft Windows Server 2012 R2 Standard"
"POSM014","Microsoft Windows Server 2012 R2 Standard"
"PCIC011","Microsoft Windows Server 2012 R2 Standard"
"PIMQ011","Microsoft Windows Server 2012 R2 Standard"
"PMDA011","Microsoft Windows Server 2012 R2 Standard"
"PISR011","Microsoft Windows Server 2012 R2 Standard"
"PSRS004","Microsoft Windows Server 2012 R2 Standard"
"PMDA014","Microsoft Windows Server 2012 R2 Standard"
"PSQL014","Microsoft Windows Server 2012 R2 Standard"
"PMDA012","Microsoft Windows Server 2012 R2 Standard"
"PMDA013","Microsoft Windows Server 2012 R2 Standard"
"FLT2PCIC011","Microsoft Windows Server 2012 R2 Standard"
"PBIT901","Microsoft Windows Server 2012 R2 Standard"
"PIWC012","Microsoft Windows Server 2012 R2 Standard"
"FLT2POSM012","Microsoft Windows Server 2012 R2 Standard"
"POSM012","Microsoft Windows Server 2012 R2 Standard"
"PIWC011","Microsoft Windows Server 2012 R2 Standard"
"FLT2POSM013","Microsoft Windows Server 2012 R2 Standard"
"PVVC011","Microsoft Windows Server 2012 R2 Standard"
"PRSH101","Microsoft Windows Server 2012 R2 Standard"
"QBIZ142","Microsoft Windows Server 2012 R2 Standard"
"FLT2PMDA011","Microsoft Windows Server 2012 R2 Standard"
"FLT2POSM011","Microsoft Windows Server 2012 R2 Standard"
"FLT2PMDA012","Microsoft Windows Server 2012 R2 Standard"
"FLT2POSM014","Microsoft Windows Server 2012 R2 Standard"
"FLT2PICW011","Microsoft Windows Server 2012 R2 Standard"
"FLT2PMDA013","Microsoft Windows Server 2012 R2 Standard"
"FLT2PMDA014","Microsoft Windows Server 2012 R2 Standard"
"PRCS012","Microsoft Windows Server 2012 R2 Standard"
"POSM011","Microsoft Windows Server 2012 R2 Standard"
"POSM013","Microsoft Windows Server 2012 R2 Standard"
"DIWC011","Microsoft Windows Server 2012 R2 Standard"
"PRCS011","Microsoft Windows Server 2012 R2 Standard"
"PSQL024","Microsoft Windows Server 2012 R2 Standard"
"PDISKTEST1","Microsoft Windows Server 2012 R2 Standard"
"PMDA016","Microsoft Windows Server 2012 R2 Standard"
"FLT2PCAC001","Microsoft Windows Server 2012 R2 Standard"
"PMDA015","Microsoft Windows Server 2012 R2 Standard"
"PMDA017","Microsoft Windows Server 2012 R2 Standard"
"FLT2PALT001","Microsoft Windows Server 2012 R2 Standard"
"POSM016","Microsoft Windows Server 2012 R2 Standard"
"FLT2PCAC002","Microsoft Windows Server 2012 R2 Standard"
"POSM015","Microsoft Windows Server 2012 R2 Standard"
"PSQL012","Microsoft Windows Server 2012 R2 Standard"
"FLT2PRCS011","Microsoft Windows Server 2012 R2 Standard"
"FLT2PMDA017","Microsoft Windows Server 2012 R2 Standard"
"FLT2PMDA015","Microsoft Windows Server 2012 R2 Standard"
"FLT2PMDA016","Microsoft Windows Server 2012 R2 Standard"
"KSOPPRCS011","Microsoft Windows Server 2012 R2 Standard"
"PRSH102","Microsoft Windows Server 2012 R2 Standard"
"DVST001","Microsoft Windows Server 2012 R2 Standard"
"QBIZ141","Microsoft Windows Server 2012 R2 Standard"
"DRCS011","Microsoft Windows Server 2012 R2 Standard"
"QSNX001","Microsoft Windows Server 2012 R2 Standard"
"PAPCAC001","Microsoft Windows Server 2016 Standard"
"DNCRAAUTO006","Microsoft Windows Server 2016 Standard"
"PSQL027","Microsoft Windows Server 2016 Standard"
"PSUS001","Microsoft Windows Server 2016 Standard"
"PNCRAVERRRPT001","Microsoft Windows Server 2016 Standard"
"PSIS003","Microsoft Windows Server 2016 Standard"
"PSQL028Q","Microsoft Windows Server 2019 Standard"
"PSQL030Q","Microsoft Windows Server 2019 Standard"
"QNCRASCCM001","Microsoft Windows Server 2019 Standard"
"PVAPV002","Microsoft Windows Server 2019 Standard"
"PSEC003","Microsoft Windows Server 2019 Standard"
"PVAPV003","Microsoft Windows Server 2019 Standard"
"PVAPV001","Microsoft Windows Server 2019 Standard"
"PSQL029Q","Microsoft Windows Server 2019 Standard"
"PVVCO005","Microsoft Windows Server 2019 Standard"
"PVVCO006","Microsoft Windows Server 2019 Standard"
"PVVCO002","Microsoft Windows Server 2019 Standard"
"PVVCO003","Microsoft Windows Server 2019 Standard"
"PNCRALSWMON001","Microsoft Windows Server 2019 Standard"
"PVVCO004","Microsoft Windows Server 2019 Standard"
"PNCRANTRX004","Microsoft Windows Server 2019 Standard"
"PNCRAVERVLT004","Microsoft Windows Server 2016 Standard"
"FLT2VEB002","Microsoft Windows Server 2019 Standard"
"FLT2VEB003","Microsoft Windows Server 2016 Standard"
"S16NCRASRV00001","Microsoft Windows Server 2016 Standard"
"PNCRAVONE01","Microsoft Windows Server 2019 Standard"
"DSPUPG2013","Microsoft Windows Server 2012 R2 Standard"
"DAPP012","Microsoft Windows Server 2012 R2 Standard"
"DDOC001","Microsoft Windows Server 2012 R2 Standard"
"DAPCAC001","Microsoft Windows Server 2016 Standard"
"DFNP001","Microsoft Windows Server 2012 R2 Standard"
"DFAX011","Microsoft Windows Server 2016 Standard"
"DAPP006","Microsoft Windows Server 2012 R2 Standard"
"DFNP002","Microsoft Windows Server 2012 R2 Standard"
"DAPSEP001","Microsoft Windows Server 2016 Standard"
"PNCRASCCMWKDP03","Microsoft Windows Server 2019 Standard"
"PNCRASCCMWSP2","Microsoft Windows Server 2019 Standard"
"PNCRASCCMWKDP02","Microsoft Windows Server 2019 Standard"
"PNCRASCCMWSP3","Microsoft Windows Server 2019 Standard"
"PNCRASMTP02","Microsoft Windows Server 2019 Standard"
"PNCRASMTP01","Microsoft Windows Server 2019 Standard"
"PNCRAADMIN01","Microsoft Windows Server 2019 Standard"
"PVVCO001","Microsoft Windows Server 2019 Standard"
"PFNP005","Microsoft Windows Server 2019 Standard"
"PFNP001","Microsoft? Windows Server? 2008 Enterprise "
"PNCRACS01","Microsoft Windows Server 2019 Standard"
"QNCRACS01","Microsoft Windows Server 2019 Standard"
"DNCRACS01","Microsoft Windows Server 2019 Standard"
"PNCRAMEP01","Microsoft Windows Server 2019 Standard"
"DNCRAMEP01","Microsoft Windows Server 2019 Standard"
"PNCRAEXMBX005","Microsoft Windows Server 2012 R2 Standard"
"DNCRAFILETEST01","Microsoft Windows Server 2019 Standard"
"PAPP002","Microsoft Windows 2000 Server"
"DFNP011","Microsoft Windows Server 2012 R2 Standard"
"PSQL023","Microsoft Windows Server 2012 R2 Standard"
"PSQL023B","Microsoft Windows Server 2012 R2 Standard"
"PSQL026","Microsoft Windows Server 2016 Standard"
"PSQL029A","Microsoft Windows Server 2016 Standard"
"PSQL030A","Microsoft Windows Server 2016 Standard"
"PSQL030A","Microsoft Windows Server 2016 Standard"
"PNCRAWFM01","Microsoft Windows Server 2019 Standard"
"DSPUPG2016","Microsoft Windows Server 2019 Standard"
"DRSQL028","Microsoft Windows Server 2016 Standard"
"PNCRAFILE004","Microsoft Windows Server 2019 Standard"
"QNCRAMEP01","Microsoft Windows Server 2019 Standard"
"PFNP003A","Microsoft Windows Server 2019 Standard"
"PFNP001A","Microsoft Windows Server 2019 Standard"
1 PSComputerName caption
2 W2012A Microsoft Windows Server 2012 R2 Standard
3 W2012B Microsoft Windows Server 2012 R2 Standard
4 Q1NCRAFILE001 Microsoft Windows Server 2019 Standard
5 DFNP014 Microsoft Windows Server 2016 Standard
6 DAPCAC002 Microsoft Windows Server 2016 Standard
7 DAPCAV001 Microsoft Windows Server 2016 Standard
8 DAPVRNS001 Microsoft Windows Server 2012 R2 Standard
9 DGAW001 Microsoft Windows Server 2016 Standard
10 DWAM002 Microsoft Windows Server 2012 R2 Standard
11 DIAP001 Microsoft Windows Server 2012 R2 Standard
12 DWHD003 Microsoft Windows Server 2012 R2 Standard
13 DCTI001 Microsoft Windows Server 2012 R2 Standard
14 DVB6001 Microsoft Windows Server 2012 R2 Standard
15 DFNP009 Microsoft Windows Server 2012 R2 Standard
16 DBIT901 Microsoft Windows Server 2012 R2 Standard
17 DFNP020 Microsoft Windows Server 2012 R2 Standard
18 DAPP011 Microsoft Windows Server 2012 R2 Standard
19 DMHB001 Microsoft Windows Server 2012 R2 Standard
20 QRSH023 Microsoft Windows Server 2012 R2 Standard
21 QRSH022 Microsoft Windows Server 2012 R2 Standard
22 QRSH021 Microsoft Windows Server 2012 R2 Standard
23 DCAM011 Microsoft Windows Server 2012 R2 Standard
24 DCIC011 Microsoft Windows Server 2012 R2 Standard
25 DCIC012 Microsoft Windows Server 2012 R2 Standard
26 DSPUPG2010 Microsoft Windows Server 2012 R2 Standard
27 DOSM012 Microsoft Windows Server 2012 R2 Standard
28 DOSM011 Microsoft Windows Server 2012 R2 Standard
29 DMDA011 Microsoft Windows Server 2012 R2 Standard
30 DICW011 Microsoft Windows Server 2012 R2 Standard
31 DTABL001 Microsoft Windows Server 2012 R2 Standard
32 DSIS002 Microsoft Windows Server 2012 R2 Standard
33 DOWA001 Microsoft Windows Server 2012 R2 Standard
34 DBIZ111 Microsoft Windows Server 2012 R2 Standard
35 DBIZ112 Microsoft Windows Server 2012 R2 Standard
36 DBIZ113 Microsoft Windows Server 2012 R2 Standard
37 DUTL012 Microsoft Windows Server 2016 Standard
38 DWAM001 Microsoft Windows Server 2012 R2 Standard
39 DSRS004 Microsoft Windows Server 2012 R2 Standard
40 DSSS001 Microsoft Windows Server 2012 R2 Standard
41 DSQL009 Microsoft Windows Server 2012 R2 Standard
42 DSQL021 Microsoft Windows Server 2012 R2 Standard
43 DSIS004 Microsoft Windows Server 2016 Standard
44 QRSH002 Microsoft Windows Server 2012 R2 Standard
45 QRSH041 Microsoft Windows Server 2012 R2 Standard
46 QRSH051 Microsoft Windows Server 2012 R2 Standard
47 QRSH001 Microsoft Windows Server 2012 R2 Standard
48 QRSH031 Microsoft Windows Server 2012 R2 Standard
49 QAPP041 Microsoft Windows Server 2012 R2 Standard
50 DEDI111 Microsoft Windows Server 2012 R2 Standard
51 DEDI112 Microsoft Windows Server 2012 R2 Standard
52 DEDI113 Microsoft Windows Server 2012 R2 Standard
53 QRSH111 Microsoft Windows Server 2012 R2 Standard
54 DSQL027A Microsoft Windows Server 2016 Standard
55 DSQL027B Microsoft Windows Server 2016 Standard
56 DSRS005 Microsoft Windows Server 2016 Standard
57 DSQL000 Microsoft Windows Server 2016 Standard
58 DSQL030 Microsoft Windows Server 2016 Standard
59 DSQL004 Microsoft Windows Server 2016 Standard
60 DSQL029 Microsoft Windows Server 2016 Standard
61 DSIS005 Microsoft Windows Server 2016 Standard
62 DSQL031 Microsoft Windows Server 2016 Standard
63 DSIS003 Microsoft Windows Server 2016 Standard
64 DNCRASSIS001 Microsoft Windows Server 2019 Standard
65 DSQL028 Microsoft Windows Server 2016 Standard
66 DSQL021Q Microsoft Windows Server 2019 Standard
67 DSQL024 Microsoft Windows Server 2012 R2 Standard
68 DNCRASPWFE01 Microsoft Windows Server 2019 Standard
69 DNCRASPAS01 Microsoft Windows Server 2019 Standard
70 QAPP031 Microsoft Windows Server 2012 R2 Standard
71 QNCRASPAPP01 Microsoft Windows Server 2019 Standard
72 QNCRASPDC01 Microsoft Windows Server 2019 Standard
73 QNCRASPAPP02 Microsoft Windows Server 2019 Standard
74 QNCRASPWFE01 Microsoft Windows Server 2019 Standard
75 QNCRASPWFE02 Microsoft Windows Server 2019 Standard
76 QNCRASPDC02 Microsoft Windows Server 2019 Standard
77 QNCRASPSEA01 Microsoft Windows Server 2019 Standard
78 QNCRASPSEA02 Microsoft Windows Server 2019 Standard
79 QRDS002 Microsoft Windows Server 2012 R2 Standard
80 QMHB003 Microsoft Windows Server 2012 R2 Standard
81 QMHB004 Microsoft Windows Server 2012 R2 Standard
82 QRDS001 Microsoft Windows Server 2012 R2 Standard
83 QAPP051 Microsoft Windows Server 2012 R2 Standard
84 QMHB001 Microsoft Windows Server 2012 R2 Standard
85 QMFT001 Microsoft Windows Server 2012 R2 Standard
86 QBIZ151 Microsoft Windows Server 2012 R2 Standard
87 QBIZ152 Microsoft Windows Server 2012 R2 Standard
88 Q1SQL024 Microsoft Windows Server 2012 R2 Standard
89 QAPP011 Microsoft Windows Server 2012 R2 Standard
90 QNCRASPOOS01 Microsoft Windows Server 2016 Standard
91 DNCRASPOOS01 Microsoft Windows Server 2016 Standard
92 QRSH101 Microsoft Windows Server 2012 R2 Standard
93 QSCH012 Microsoft Windows Server 2012 R2 Standard
94 QDRF001 Microsoft Windows Server 2012 R2 Standard
95 QFNP008 Microsoft Windows Server 2012 R2 Standard
96 Q2NCRAFILE001 Microsoft Windows Server 2019 Standard
97 Q3NCRAFILE001 Microsoft Windows Server 2019 Standard
98 QMHB002 Microsoft Windows Server 2012 R2 Standard
99 QSRS004 Microsoft Windows Server 2012 R2 Standard
100 QFNP007 Microsoft Windows Server 2012 R2 Standard
101 QSQL029 Microsoft Windows Server 2016 Standard
102 QSQL030 Microsoft Windows Server 2016 Standard
103 Q5NCRAFILE001 Microsoft Windows Server 2019 Standard
104 QADF001 Microsoft Windows Server 2016 Standard
105 QTABL001 Microsoft Windows Server 2012 R2 Standard
106 Q4NCRAFILE001 Microsoft Windows Server 2019 Standard
107 QFNP009 Microsoft Windows Server 2012 R2 Standard
108 QSCH011 Microsoft Windows Server 2012 R2 Standard
109 QSQL028 Microsoft Windows Server 2016 Standard
110 QAPP021 Microsoft Windows Server 2012 R2 Standard
111 QSCH014 Microsoft Windows Server 2012 R2 Standard
112 QFNP001 Microsoft Windows Server 2012 R2 Standard
113 QSCH013 Microsoft Windows Server 2012 R2 Standard
114 QVST012 Microsoft Windows Server 2012 R2 Standard
115 QVST011 Microsoft Windows Server 2012 R2 Standard
116 QSIS003 Microsoft Windows Server 2016 Standard
117 PNCRAVPRXY001 Microsoft Windows Server 2019 Standard
118 PMON005 Microsoft Windows Server 2016 Standard
119 PNCRAVERVLT001 Microsoft Windows Server 2016 Standard
120 PICW011 Microsoft Windows Server 2012 R2 Standard
121 PMON010 Microsoft Windows Server 2016 Standard
122 PNCRAVPRXY002 Microsoft Windows Server 2019 Standard
123 PVET001 Microsoft Windows Server 2016 Standard
124 PMON009 Microsoft Windows Server 2016 Standard
125 PNCRANTRX002 Microsoft Windows Server 2016 Standard
126 PSSS001 Microsoft Windows Server 2012 R2 Standard
127 PTTS011 Microsoft Windows Server 2012 R2 Standard
128 PVER001 Microsoft Windows Server 2019 Standard
129 PVEB001 Microsoft Windows Server 2012 R2 Standard
130 PMON011 Microsoft Windows Server 2016 Standard
131 PDMC005 Microsoft Windows Server 2019 Standard
132 PDMC003 Microsoft Windows Server 2012 R2 Standard
133 PDMC003 Microsoft Windows Server 2012 R2 Standard
134 PDMC004 Microsoft Windows Server 2012 R2 Standard
135 PDMC006 Microsoft Windows Server 2012 R2 Standard
136 CTSTPDMC001 Microsoft Windows Server 2012 R2 Standard
137 FLT2PTTS011 Microsoft Windows Server 2012 R2 Standard
138 FLT2PDMC001 Microsoft Windows Server 2012 R2 Standard
139 FLT2PDMC002 Microsoft Windows Server 2012 R2 Standard
140 KSOPPDMC001 Microsoft Windows Server 2012 R2 Standard
141 NYMEPDMC001 Microsoft Windows Server 2012 R2 Standard
142 PVAV001 Microsoft Windows Server 2012 R2 Standard
143 PVAV002 Microsoft Windows Server 2016 Standard
144 PVAV003 Microsoft Windows Server 2016 Standard
145 AZPHPRCS011 Microsoft Windows Server 2012 R2 Standard
146 CTHAPRCS011 Microsoft Windows Server 2012 R2 Standard
147 CTHAPALT002 Microsoft Windows Server 2012 R2 Standard
148 CTSTPALT001 Microsoft Windows Server 2012 R2 Standard
149 PFNP003 Microsoft? Windows Server? 2008 Enterprise
150 DPOCSP001 Microsoft Windows Server 2019 Standard
151 PVVC012 Microsoft Windows Server 2012 R2 Standard
152 PVVC014 Microsoft Windows Server 2012 R2 Standard
153 PVVC013 Microsoft Windows Server 2012 R2 Standard
154 QRSH113 Microsoft Windows Server 2012 R2 Standard
155 Q5SQL022 Microsoft Windows Server 2012 R2 Standard
156 QUTL012 Microsoft Windows Server 2016 Standard
157 Q4SQL024 Microsoft Windows Server 2012 R2 Standard
158 QFNP003 Microsoft Windows Server 2012 R2 Standard
159 QBIZ121 Microsoft Windows Server 2012 R2 Standard
160 QBIZ132 Microsoft Windows Server 2012 R2 Standard
161 QEDI153 Microsoft Windows Server 2012 R2 Standard
162 QEDI113 Microsoft Windows Server 2012 R2 Standard
163 QRSH112 Microsoft Windows Server 2012 R2 Standard
164 QBIZ131 Microsoft Windows Server 2012 R2 Standard
165 QSIS002 Microsoft Windows Server 2012 R2 Standard
166 QBIZ122 Microsoft Windows Server 2012 R2 Standard
167 QVST021 Microsoft Windows Server 2012 R2 Standard
168 QEDI152 Microsoft Windows Server 2012 R2 Standard
169 QEDI111 Microsoft Windows Server 2012 R2 Standard
170 QVST022 Microsoft Windows Server 2012 R2 Standard
171 QEDI151 Microsoft Windows Server 2012 R2 Standard
172 QEDI112 Microsoft Windows Server 2012 R2 Standard
173 Q1SQL022 Microsoft Windows Server 2012 R2 Standard
174 PVVC015 Microsoft Windows Server 2012 R2 Standard
175 PVVC016 Microsoft Windows Server 2012 R2 Standard
176 QBIZ112 Microsoft Windows Server 2012 R2 Standard
177 QBIZ111 Microsoft Windows Server 2012 R2 Standard
178 Q2SQL022 Microsoft Windows Server 2012 R2 Standard
179 Q3SQL022 Microsoft Windows Server 2012 R2 Standard
180 Q4SQL022B Microsoft Windows Server 2012 R2 Standard
181 Q4SQL022 Microsoft Windows Server 2012 R2 Standard
182 POSM014 Microsoft Windows Server 2012 R2 Standard
183 PCIC011 Microsoft Windows Server 2012 R2 Standard
184 PIMQ011 Microsoft Windows Server 2012 R2 Standard
185 PMDA011 Microsoft Windows Server 2012 R2 Standard
186 PISR011 Microsoft Windows Server 2012 R2 Standard
187 PSRS004 Microsoft Windows Server 2012 R2 Standard
188 PMDA014 Microsoft Windows Server 2012 R2 Standard
189 PSQL014 Microsoft Windows Server 2012 R2 Standard
190 PMDA012 Microsoft Windows Server 2012 R2 Standard
191 PMDA013 Microsoft Windows Server 2012 R2 Standard
192 FLT2PCIC011 Microsoft Windows Server 2012 R2 Standard
193 PBIT901 Microsoft Windows Server 2012 R2 Standard
194 PIWC012 Microsoft Windows Server 2012 R2 Standard
195 FLT2POSM012 Microsoft Windows Server 2012 R2 Standard
196 POSM012 Microsoft Windows Server 2012 R2 Standard
197 PIWC011 Microsoft Windows Server 2012 R2 Standard
198 FLT2POSM013 Microsoft Windows Server 2012 R2 Standard
199 PVVC011 Microsoft Windows Server 2012 R2 Standard
200 PRSH101 Microsoft Windows Server 2012 R2 Standard
201 QBIZ142 Microsoft Windows Server 2012 R2 Standard
202 FLT2PMDA011 Microsoft Windows Server 2012 R2 Standard
203 FLT2POSM011 Microsoft Windows Server 2012 R2 Standard
204 FLT2PMDA012 Microsoft Windows Server 2012 R2 Standard
205 FLT2POSM014 Microsoft Windows Server 2012 R2 Standard
206 FLT2PICW011 Microsoft Windows Server 2012 R2 Standard
207 FLT2PMDA013 Microsoft Windows Server 2012 R2 Standard
208 FLT2PMDA014 Microsoft Windows Server 2012 R2 Standard
209 PRCS012 Microsoft Windows Server 2012 R2 Standard
210 POSM011 Microsoft Windows Server 2012 R2 Standard
211 POSM013 Microsoft Windows Server 2012 R2 Standard
212 DIWC011 Microsoft Windows Server 2012 R2 Standard
213 PRCS011 Microsoft Windows Server 2012 R2 Standard
214 PSQL024 Microsoft Windows Server 2012 R2 Standard
215 PDISKTEST1 Microsoft Windows Server 2012 R2 Standard
216 PMDA016 Microsoft Windows Server 2012 R2 Standard
217 FLT2PCAC001 Microsoft Windows Server 2012 R2 Standard
218 PMDA015 Microsoft Windows Server 2012 R2 Standard
219 PMDA017 Microsoft Windows Server 2012 R2 Standard
220 FLT2PALT001 Microsoft Windows Server 2012 R2 Standard
221 POSM016 Microsoft Windows Server 2012 R2 Standard
222 FLT2PCAC002 Microsoft Windows Server 2012 R2 Standard
223 POSM015 Microsoft Windows Server 2012 R2 Standard
224 PSQL012 Microsoft Windows Server 2012 R2 Standard
225 FLT2PRCS011 Microsoft Windows Server 2012 R2 Standard
226 FLT2PMDA017 Microsoft Windows Server 2012 R2 Standard
227 FLT2PMDA015 Microsoft Windows Server 2012 R2 Standard
228 FLT2PMDA016 Microsoft Windows Server 2012 R2 Standard
229 KSOPPRCS011 Microsoft Windows Server 2012 R2 Standard
230 PRSH102 Microsoft Windows Server 2012 R2 Standard
231 DVST001 Microsoft Windows Server 2012 R2 Standard
232 QBIZ141 Microsoft Windows Server 2012 R2 Standard
233 DRCS011 Microsoft Windows Server 2012 R2 Standard
234 QSNX001 Microsoft Windows Server 2012 R2 Standard
235 PAPCAC001 Microsoft Windows Server 2016 Standard
236 DNCRAAUTO006 Microsoft Windows Server 2016 Standard
237 PSQL027 Microsoft Windows Server 2016 Standard
238 PSUS001 Microsoft Windows Server 2016 Standard
239 PNCRAVERRRPT001 Microsoft Windows Server 2016 Standard
240 PSIS003 Microsoft Windows Server 2016 Standard
241 PSQL028Q Microsoft Windows Server 2019 Standard
242 PSQL030Q Microsoft Windows Server 2019 Standard
243 QNCRASCCM001 Microsoft Windows Server 2019 Standard
244 PVAPV002 Microsoft Windows Server 2019 Standard
245 PSEC003 Microsoft Windows Server 2019 Standard
246 PVAPV003 Microsoft Windows Server 2019 Standard
247 PVAPV001 Microsoft Windows Server 2019 Standard
248 PSQL029Q Microsoft Windows Server 2019 Standard
249 PVVCO005 Microsoft Windows Server 2019 Standard
250 PVVCO006 Microsoft Windows Server 2019 Standard
251 PVVCO002 Microsoft Windows Server 2019 Standard
252 PVVCO003 Microsoft Windows Server 2019 Standard
253 PNCRALSWMON001 Microsoft Windows Server 2019 Standard
254 PVVCO004 Microsoft Windows Server 2019 Standard
255 PNCRANTRX004 Microsoft Windows Server 2019 Standard
256 PNCRAVERVLT004 Microsoft Windows Server 2016 Standard
257 FLT2VEB002 Microsoft Windows Server 2019 Standard
258 FLT2VEB003 Microsoft Windows Server 2016 Standard
259 S16NCRASRV00001 Microsoft Windows Server 2016 Standard
260 PNCRAVONE01 Microsoft Windows Server 2019 Standard
261 DSPUPG2013 Microsoft Windows Server 2012 R2 Standard
262 DAPP012 Microsoft Windows Server 2012 R2 Standard
263 DDOC001 Microsoft Windows Server 2012 R2 Standard
264 DAPCAC001 Microsoft Windows Server 2016 Standard
265 DFNP001 Microsoft Windows Server 2012 R2 Standard
266 DFAX011 Microsoft Windows Server 2016 Standard
267 DAPP006 Microsoft Windows Server 2012 R2 Standard
268 DFNP002 Microsoft Windows Server 2012 R2 Standard
269 DAPSEP001 Microsoft Windows Server 2016 Standard
270 PNCRASCCMWKDP03 Microsoft Windows Server 2019 Standard
271 PNCRASCCMWSP2 Microsoft Windows Server 2019 Standard
272 PNCRASCCMWKDP02 Microsoft Windows Server 2019 Standard
273 PNCRASCCMWSP3 Microsoft Windows Server 2019 Standard
274 PNCRASMTP02 Microsoft Windows Server 2019 Standard
275 PNCRASMTP01 Microsoft Windows Server 2019 Standard
276 PNCRAADMIN01 Microsoft Windows Server 2019 Standard
277 PVVCO001 Microsoft Windows Server 2019 Standard
278 PFNP005 Microsoft Windows Server 2019 Standard
279 PFNP001 Microsoft? Windows Server? 2008 Enterprise
280 PNCRACS01 Microsoft Windows Server 2019 Standard
281 QNCRACS01 Microsoft Windows Server 2019 Standard
282 DNCRACS01 Microsoft Windows Server 2019 Standard
283 PNCRAMEP01 Microsoft Windows Server 2019 Standard
284 DNCRAMEP01 Microsoft Windows Server 2019 Standard
285 PNCRAEXMBX005 Microsoft Windows Server 2012 R2 Standard
286 DNCRAFILETEST01 Microsoft Windows Server 2019 Standard
287 PAPP002 Microsoft Windows 2000 Server
288 DFNP011 Microsoft Windows Server 2012 R2 Standard
289 PSQL023 Microsoft Windows Server 2012 R2 Standard
290 PSQL023B Microsoft Windows Server 2012 R2 Standard
291 PSQL026 Microsoft Windows Server 2016 Standard
292 PSQL029A Microsoft Windows Server 2016 Standard
293 PSQL030A Microsoft Windows Server 2016 Standard
294 PSQL030A Microsoft Windows Server 2016 Standard
295 PNCRAWFM01 Microsoft Windows Server 2019 Standard
296 DSPUPG2016 Microsoft Windows Server 2019 Standard
297 DRSQL028 Microsoft Windows Server 2016 Standard
298 PNCRAFILE004 Microsoft Windows Server 2019 Standard
299 QNCRAMEP01 Microsoft Windows Server 2019 Standard
300 PFNP003A Microsoft Windows Server 2019 Standard
301 PFNP001A Microsoft Windows Server 2019 Standard

View File

@@ -0,0 +1,426 @@
"server","SideIndicator"
"W2012A","<="
"W2012B","<="
"Q1NCRAFILE001","<="
"DFNP014","<="
"DAPCAC002","<="
"DAPCAV001","<="
"DAPVRNS001","<="
"DGAW001","<="
"DWAM002","<="
"DIAP001","<="
"DWHD003","<="
"DCTI001","<="
"DVB6001","<="
"DFNP009","<="
"DVCO001","<="
"DBIT901","<="
"DFNP020","<="
"DAPP011","<="
"DMHB001","<="
"QRSH023","<="
"QRSH022","<="
"QRSH021","<="
"DCAM011","<="
"DCIC011","<="
"DCIC012","<="
"DSPUPG2010","<="
"DOSM012","<="
"DOSM011","<="
"DMDA011","<="
"DICW011","<="
"DTABL001","<="
"DSIS002","<="
"DOWA001","<="
"DBIZ111","<="
"DBIZ112","<="
"DBIZ113","<="
"DUTL012","<="
"DWAM001","<="
"DSRS004","<="
"DSSS001","<="
"DSQL009","<="
"DSQL021","<="
"DSIS004","<="
"QRSH002","<="
"QRSH041","<="
"QRSH051","<="
"QRSH001","<="
"QRSH031","<="
"QAPP041","<="
"DEDI111","<="
"DEDI112","<="
"DEDI113","<="
"QRSH111","<="
"DSQL027A","<="
"DSQL027B","<="
"DSRS005","<="
"DSQL000","<="
"DSQL030","<="
"DSQL004","<="
"DSQL029","<="
"DSIS005","<="
"DSQL031","<="
"DSIS003","<="
"DNCRASSIS001","<="
"DSQL028","<="
"DSQL021Q","<="
"DSQL024","<="
"DNCRASPWFE01","<="
"DNCRASPAS01","<="
"QAPP031","<="
"QNCRASPAPP01","<="
"QNCRASPDC01","<="
"QNCRASPAPP02","<="
"QNCRASPWFE01","<="
"QNCRASPWFE02","<="
"QNCRASPDC02","<="
"QNCRASPSEA01","<="
"QNCRASPSEA02","<="
"QRDS002","<="
"QMHB003","<="
"QMHB004","<="
"QRDS001","<="
"QAPP051","<="
"QMHB001","<="
"QMFT001","<="
"QBIZ151","<="
"QBIZ152","<="
"Q1SQL024","<="
"QAPP011","<="
"QNCRASPOOS01","<="
"DNCRASPOOS01","<="
"QRSH101","<="
"QSCH012","<="
"QDRF001","<="
"QFNP008","<="
"Q2NCRAFILE001","<="
"Q3NCRAFILE001","<="
"QMHB002","<="
"QSRS004","<="
"QFNP007","<="
"QSQL029","<="
"QSQL030","<="
"Q5NCRAFILE001","<="
"QADF001","<="
"QTABL001","<="
"Q4NCRAFILE001","<="
"QFNP009","<="
"QSCH011","<="
"QSQL028","<="
"QAPP021","<="
"QSCH014","<="
"QFNP001","<="
"QSCH013","<="
"QVST012","<="
"QVST011","<="
"QSIS003","<="
"PNCRAVPRXY001","<="
"PMON005","<="
"PNCRAVERVLT001","<="
"PALT001","<="
"PICW011","<="
"PVEO002","<="
"PMON010","<="
"PRSH014","<="
"PVEO001","<="
"PNCRAVPRXY002","<="
"PVET001","<="
"PMON009","<="
"PNCRANTRX002","<="
"PSSS001","<="
"PTTS011","<="
"PVER001","<="
"PVEB001","<="
"PMON011","<="
"PDMC005","<="
"PDMC003","<="
"PDMC002","<="
"PDMC001","<="
"PDMC004","<="
"PDMC006","<="
"CTSTPDMC001","<="
"FLT2PTTS011","<="
"FLT2PDMC001","<="
"FLT2PDMC002","<="
"KSOPPDMC001","<="
"NYMEPDMC001","<="
"PVAV001","<="
"PVAV002","<="
"PVAV003","<="
"PNCRARCM001","<="
"AZPHPRCS011","<="
"CTHAPRCS011","<="
"CTHAPALT002","<="
"CTSTPALT001","<="
"PFNP003","<="
"DPOCSP001","<="
"PVVC012","<="
"PVVC014","<="
"PVVC013","<="
"QRSH113","<="
"Q5SQL022","<="
"QUTL012","<="
"Q4SQL024","<="
"QFNP003","<="
"QBIZ121","<="
"QBIZ132","<="
"QEDI153","<="
"QEDI113","<="
"QRSH112","<="
"QBIZ131","<="
"QSIS002","<="
"QBIZ122","<="
"QVST021","<="
"QEDI152","<="
"QEDI111","<="
"QVST022","<="
"QEDI151","<="
"QEDI112","<="
"Q1SQL022","<="
"PVVC015","<="
"PVVC016","<="
"QBIZ112","<="
"QBIZ111","<="
"Q2SQL022","<="
"Q3SQL022","<="
"Q4SQL022B","<="
"Q4SQL022","<="
"POSM014","<="
"PCIC011","<="
"PIMQ011","<="
"PMDA011","<="
"PISR011","<="
"PSRS004","<="
"PMDA014","<="
"PSQL014","<="
"PMDA012","<="
"PMDA013","<="
"FLT2PCIC011","<="
"PBIT901","<="
"PIWC012","<="
"FLT2POSM012","<="
"POSM012","<="
"PIWC011","<="
"FLT2POSM013","<="
"PVVC011","<="
"PRSH101","<="
"QBIZ142","<="
"FLT2PMDA011","<="
"FLT2POSM011","<="
"FLT2PMDA012","<="
"FLT2POSM014","<="
"FLT2PICW011","<="
"FLT2PMDA013","<="
"FLT2PMDA014","<="
"PRCS012","<="
"POSM011","<="
"POSM013","<="
"DIWC011","<="
"PRCS011","<="
"PSQL024","<="
"PDISKTEST1","<="
"PMDA016","<="
"FLT2PCAC001","<="
"PMDA015","<="
"PMDA017","<="
"FLT2PALT001","<="
"POSM016","<="
"FLT2PCAC002","<="
"POSM015","<="
"PSQL012","<="
"FLT2PRCS011","<="
"FLT2PMDA017","<="
"FLT2PMDA015","<="
"FLT2PMDA016","<="
"KSOPPRCS011","<="
"PRSH102","<="
"DVST001","<="
"QBIZ141","<="
"PIPM001","<="
"DRCS011","<="
"QSNX001","<="
"PAPCAC001","<="
"DNCRAAUTO006","<="
"PSQL027","<="
"PSUS001","<="
"PNCRAVERRRPT001","<="
"PSIS003","<="
"PSQL028Q","<="
"PSQL030Q","<="
"QNCRASCCM001","<="
"QQATEST01","<="
"PVAPV002","<="
"PSEC003","<="
"PVAPV003","<="
"PVAPV001","<="
"PSQL029Q","<="
"PVVCO005","<="
"PVVCO006","<="
"PVVCO002","<="
"PVVCO003","<="
"PNCRALSWMON001","<="
"PVVCO004","<="
"PNCRANTRX004","<="
"PNCRAVERVLT004","<="
"FLT2VEB002","<="
"FLT2VEB003","<="
"S16NCRASRV00001","<="
"PNCRAVONE01","<="
"DSPUPG2013","<="
"DAPP012","<="
"DDOC001","<="
"DAPCAC001","<="
"DFNP001","<="
"DFAX011","<="
"DAPP006","<="
"DFNP002","<="
"DAPSEP001","<="
"PNCRASCCMWKDP03","<="
"PNCRASCCMWSP2","<="
"PNCRASCCMWKDP02","<="
"PNCRASCCMWSP3","<="
"PNCRASMTP02","<="
"PNCRASMTP01","<="
"PNCRAADMIN01","<="
"PVVCO001","<="
"PFNP005","<="
"PFNP001","<="
"PNCRACS01","<="
"QNCRACS01","<="
"DNCRACS01","<="
"PNCRAMEP01","<="
"DNCRAMEP01","<="
"PNCRAEXMBX005","<="
"DNCRAFILETEST01","<="
"PPKI003","<="
"PSQL008","<="
"PAPP002","<="
"QAPP005","<="
"PSEV005","<="
"PSEV002","<="
"PVEP001","<="
"PRSH181","<="
"PRSH150","<="
"PVCO001","<="
"PRSH182","<="
"QAPP002","<="
"DFNP011","<="
"DHIL001","<="
"QAPP010","<="
"PSEV021","<="
"PRSH049","<="
"PRSH060","<="
"PDRDS001","<="
"PSQL023","<="
"PSQL023B","<="
"PSEV017","<="
"DAPP001-2012R2","<="
"PSEV023","<="
"DOIT001","<="
"PVRT006","<="
"PVRT003","<="
"PVRT004","<="
"PVRT001","<="
"PVRT005","<="
"PVRT002","<="
"PFAX014","<="
"PFAX013","<="
"PFAX012","<="
"PFAX011","<="
"PVRT007","<="
"FLT2PVRT007","<="
"DVVC002","<="
"DVVC001","<="
"CTHAPVRT007","<="
"AZPHPVRT007","<="
"KSOPPVRT007","<="
"PSQL026B","<="
"PSQLCL26","<="
"PRMS002","<="
"PRMS001","<="
"PVER005","<="
"Q2FNP003","<="
"Q5FNP003","<="
"Q1FNP003","<="
"Q4FNP003","<="
"Q3FNP003","<="
"QDNS001","<="
"PMQS001","<="
"QCMX001","<="
"psql029cl","<="
"psql028cl","<="
"PNTX001","<="
"PCMX001","<="
"DMQS001","<="
"FLT2VEB001","<="
"psql030cl","<="
"DRSQL003","<="
"DRSQL002","<="
"DRRDS001","<="
"DRTEST001","<="
"DRRDS002","<="
"dsql02130cl","<="
"DMS3001","<="
"PNCRASPOWA01","<="
"I3-PROD-LIS","<="
"PNCRASMI01","<="
"DNCRAAUTO004","<="
"DNCRAAUTO003","<="
"DSPC001","<="
"DFAX001","<="
"DWHD004","<="
"GOLD-S16-INSTAN","<="
"DVRS001","<="
"DFAX002","<="
"DVVC003","<="
"FLT2PDEP001","<="
"DVVC004","<="
"DSTMN001","<="
"DNCRATESTVM2","<="
"PADS001","<="
"NPTEST1","<="
"PSCH014-TEST","<="
"PVEP602","<="
"PWAP002-0","<="
"PSQL000","<="
"PSEV006","<="
"PVEP601","<="
"PFAX011CAP","<="
"PSCH011-TEST","<="
"PVEP604","<="
"PMFT001","<="
"PFAX015","<="
"PDOMS001","<="
"PVEP603","<="
"PWAP001-0","<="
"TESTVM6","<="
"TEST","<="
"QBIZ100","<="
"PNCRAMEDI001","<="
"TEMPDC004","<="
"TEMPDC006","<="
"TEMPNETWRIX","<="
"DSTEA001","<="
"DSACS001","<="
"DSBAMCS001","<="
"PNCRAWFM01","<="
"DSNX001","<="
"CLVA1PFNP005","<="
"CLVA1PFNP003","<="
"CLVA1PFNP006","<="
"CLVA1PEXM001","<="
"CLVA1PFNP007","<="
"CLVA1PFNP001","<="
"CLVA1PFNP002","<="
"CLVA1PDMC001","<="
"DSPUPG2016","<="
"DRSQL028","<="
"PNCRAFILE004","<="
"QNCRAMEP01","<="
"PNCRAPROSPD01","<="
"PNFP012A","<="
"PNFP011A","<="
"PFNP003A","<="
"PFNP001A","<="
"PEXM004","<="
1 server SideIndicator
2 W2012A <=
3 W2012B <=
4 Q1NCRAFILE001 <=
5 DFNP014 <=
6 DAPCAC002 <=
7 DAPCAV001 <=
8 DAPVRNS001 <=
9 DGAW001 <=
10 DWAM002 <=
11 DIAP001 <=
12 DWHD003 <=
13 DCTI001 <=
14 DVB6001 <=
15 DFNP009 <=
16 DVCO001 <=
17 DBIT901 <=
18 DFNP020 <=
19 DAPP011 <=
20 DMHB001 <=
21 QRSH023 <=
22 QRSH022 <=
23 QRSH021 <=
24 DCAM011 <=
25 DCIC011 <=
26 DCIC012 <=
27 DSPUPG2010 <=
28 DOSM012 <=
29 DOSM011 <=
30 DMDA011 <=
31 DICW011 <=
32 DTABL001 <=
33 DSIS002 <=
34 DOWA001 <=
35 DBIZ111 <=
36 DBIZ112 <=
37 DBIZ113 <=
38 DUTL012 <=
39 DWAM001 <=
40 DSRS004 <=
41 DSSS001 <=
42 DSQL009 <=
43 DSQL021 <=
44 DSIS004 <=
45 QRSH002 <=
46 QRSH041 <=
47 QRSH051 <=
48 QRSH001 <=
49 QRSH031 <=
50 QAPP041 <=
51 DEDI111 <=
52 DEDI112 <=
53 DEDI113 <=
54 QRSH111 <=
55 DSQL027A <=
56 DSQL027B <=
57 DSRS005 <=
58 DSQL000 <=
59 DSQL030 <=
60 DSQL004 <=
61 DSQL029 <=
62 DSIS005 <=
63 DSQL031 <=
64 DSIS003 <=
65 DNCRASSIS001 <=
66 DSQL028 <=
67 DSQL021Q <=
68 DSQL024 <=
69 DNCRASPWFE01 <=
70 DNCRASPAS01 <=
71 QAPP031 <=
72 QNCRASPAPP01 <=
73 QNCRASPDC01 <=
74 QNCRASPAPP02 <=
75 QNCRASPWFE01 <=
76 QNCRASPWFE02 <=
77 QNCRASPDC02 <=
78 QNCRASPSEA01 <=
79 QNCRASPSEA02 <=
80 QRDS002 <=
81 QMHB003 <=
82 QMHB004 <=
83 QRDS001 <=
84 QAPP051 <=
85 QMHB001 <=
86 QMFT001 <=
87 QBIZ151 <=
88 QBIZ152 <=
89 Q1SQL024 <=
90 QAPP011 <=
91 QNCRASPOOS01 <=
92 DNCRASPOOS01 <=
93 QRSH101 <=
94 QSCH012 <=
95 QDRF001 <=
96 QFNP008 <=
97 Q2NCRAFILE001 <=
98 Q3NCRAFILE001 <=
99 QMHB002 <=
100 QSRS004 <=
101 QFNP007 <=
102 QSQL029 <=
103 QSQL030 <=
104 Q5NCRAFILE001 <=
105 QADF001 <=
106 QTABL001 <=
107 Q4NCRAFILE001 <=
108 QFNP009 <=
109 QSCH011 <=
110 QSQL028 <=
111 QAPP021 <=
112 QSCH014 <=
113 QFNP001 <=
114 QSCH013 <=
115 QVST012 <=
116 QVST011 <=
117 QSIS003 <=
118 PNCRAVPRXY001 <=
119 PMON005 <=
120 PNCRAVERVLT001 <=
121 PALT001 <=
122 PICW011 <=
123 PVEO002 <=
124 PMON010 <=
125 PRSH014 <=
126 PVEO001 <=
127 PNCRAVPRXY002 <=
128 PVET001 <=
129 PMON009 <=
130 PNCRANTRX002 <=
131 PSSS001 <=
132 PTTS011 <=
133 PVER001 <=
134 PVEB001 <=
135 PMON011 <=
136 PDMC005 <=
137 PDMC003 <=
138 PDMC002 <=
139 PDMC001 <=
140 PDMC004 <=
141 PDMC006 <=
142 CTSTPDMC001 <=
143 FLT2PTTS011 <=
144 FLT2PDMC001 <=
145 FLT2PDMC002 <=
146 KSOPPDMC001 <=
147 NYMEPDMC001 <=
148 PVAV001 <=
149 PVAV002 <=
150 PVAV003 <=
151 PNCRARCM001 <=
152 AZPHPRCS011 <=
153 CTHAPRCS011 <=
154 CTHAPALT002 <=
155 CTSTPALT001 <=
156 PFNP003 <=
157 DPOCSP001 <=
158 PVVC012 <=
159 PVVC014 <=
160 PVVC013 <=
161 QRSH113 <=
162 Q5SQL022 <=
163 QUTL012 <=
164 Q4SQL024 <=
165 QFNP003 <=
166 QBIZ121 <=
167 QBIZ132 <=
168 QEDI153 <=
169 QEDI113 <=
170 QRSH112 <=
171 QBIZ131 <=
172 QSIS002 <=
173 QBIZ122 <=
174 QVST021 <=
175 QEDI152 <=
176 QEDI111 <=
177 QVST022 <=
178 QEDI151 <=
179 QEDI112 <=
180 Q1SQL022 <=
181 PVVC015 <=
182 PVVC016 <=
183 QBIZ112 <=
184 QBIZ111 <=
185 Q2SQL022 <=
186 Q3SQL022 <=
187 Q4SQL022B <=
188 Q4SQL022 <=
189 POSM014 <=
190 PCIC011 <=
191 PIMQ011 <=
192 PMDA011 <=
193 PISR011 <=
194 PSRS004 <=
195 PMDA014 <=
196 PSQL014 <=
197 PMDA012 <=
198 PMDA013 <=
199 FLT2PCIC011 <=
200 PBIT901 <=
201 PIWC012 <=
202 FLT2POSM012 <=
203 POSM012 <=
204 PIWC011 <=
205 FLT2POSM013 <=
206 PVVC011 <=
207 PRSH101 <=
208 QBIZ142 <=
209 FLT2PMDA011 <=
210 FLT2POSM011 <=
211 FLT2PMDA012 <=
212 FLT2POSM014 <=
213 FLT2PICW011 <=
214 FLT2PMDA013 <=
215 FLT2PMDA014 <=
216 PRCS012 <=
217 POSM011 <=
218 POSM013 <=
219 DIWC011 <=
220 PRCS011 <=
221 PSQL024 <=
222 PDISKTEST1 <=
223 PMDA016 <=
224 FLT2PCAC001 <=
225 PMDA015 <=
226 PMDA017 <=
227 FLT2PALT001 <=
228 POSM016 <=
229 FLT2PCAC002 <=
230 POSM015 <=
231 PSQL012 <=
232 FLT2PRCS011 <=
233 FLT2PMDA017 <=
234 FLT2PMDA015 <=
235 FLT2PMDA016 <=
236 KSOPPRCS011 <=
237 PRSH102 <=
238 DVST001 <=
239 QBIZ141 <=
240 PIPM001 <=
241 DRCS011 <=
242 QSNX001 <=
243 PAPCAC001 <=
244 DNCRAAUTO006 <=
245 PSQL027 <=
246 PSUS001 <=
247 PNCRAVERRRPT001 <=
248 PSIS003 <=
249 PSQL028Q <=
250 PSQL030Q <=
251 QNCRASCCM001 <=
252 QQATEST01 <=
253 PVAPV002 <=
254 PSEC003 <=
255 PVAPV003 <=
256 PVAPV001 <=
257 PSQL029Q <=
258 PVVCO005 <=
259 PVVCO006 <=
260 PVVCO002 <=
261 PVVCO003 <=
262 PNCRALSWMON001 <=
263 PVVCO004 <=
264 PNCRANTRX004 <=
265 PNCRAVERVLT004 <=
266 FLT2VEB002 <=
267 FLT2VEB003 <=
268 S16NCRASRV00001 <=
269 PNCRAVONE01 <=
270 DSPUPG2013 <=
271 DAPP012 <=
272 DDOC001 <=
273 DAPCAC001 <=
274 DFNP001 <=
275 DFAX011 <=
276 DAPP006 <=
277 DFNP002 <=
278 DAPSEP001 <=
279 PNCRASCCMWKDP03 <=
280 PNCRASCCMWSP2 <=
281 PNCRASCCMWKDP02 <=
282 PNCRASCCMWSP3 <=
283 PNCRASMTP02 <=
284 PNCRASMTP01 <=
285 PNCRAADMIN01 <=
286 PVVCO001 <=
287 PFNP005 <=
288 PFNP001 <=
289 PNCRACS01 <=
290 QNCRACS01 <=
291 DNCRACS01 <=
292 PNCRAMEP01 <=
293 DNCRAMEP01 <=
294 PNCRAEXMBX005 <=
295 DNCRAFILETEST01 <=
296 PPKI003 <=
297 PSQL008 <=
298 PAPP002 <=
299 QAPP005 <=
300 PSEV005 <=
301 PSEV002 <=
302 PVEP001 <=
303 PRSH181 <=
304 PRSH150 <=
305 PVCO001 <=
306 PRSH182 <=
307 QAPP002 <=
308 DFNP011 <=
309 DHIL001 <=
310 QAPP010 <=
311 PSEV021 <=
312 PRSH049 <=
313 PRSH060 <=
314 PDRDS001 <=
315 PSQL023 <=
316 PSQL023B <=
317 PSEV017 <=
318 DAPP001-2012R2 <=
319 PSEV023 <=
320 DOIT001 <=
321 PVRT006 <=
322 PVRT003 <=
323 PVRT004 <=
324 PVRT001 <=
325 PVRT005 <=
326 PVRT002 <=
327 PFAX014 <=
328 PFAX013 <=
329 PFAX012 <=
330 PFAX011 <=
331 PVRT007 <=
332 FLT2PVRT007 <=
333 DVVC002 <=
334 DVVC001 <=
335 CTHAPVRT007 <=
336 AZPHPVRT007 <=
337 KSOPPVRT007 <=
338 PSQL026B <=
339 PSQLCL26 <=
340 PRMS002 <=
341 PRMS001 <=
342 PVER005 <=
343 Q2FNP003 <=
344 Q5FNP003 <=
345 Q1FNP003 <=
346 Q4FNP003 <=
347 Q3FNP003 <=
348 QDNS001 <=
349 PMQS001 <=
350 QCMX001 <=
351 psql029cl <=
352 psql028cl <=
353 PNTX001 <=
354 PCMX001 <=
355 DMQS001 <=
356 FLT2VEB001 <=
357 psql030cl <=
358 DRSQL003 <=
359 DRSQL002 <=
360 DRRDS001 <=
361 DRTEST001 <=
362 DRRDS002 <=
363 dsql02130cl <=
364 DMS3001 <=
365 PNCRASPOWA01 <=
366 I3-PROD-LIS <=
367 PNCRASMI01 <=
368 DNCRAAUTO004 <=
369 DNCRAAUTO003 <=
370 DSPC001 <=
371 DFAX001 <=
372 DWHD004 <=
373 GOLD-S16-INSTAN <=
374 DVRS001 <=
375 DFAX002 <=
376 DVVC003 <=
377 FLT2PDEP001 <=
378 DVVC004 <=
379 DSTMN001 <=
380 DNCRATESTVM2 <=
381 PADS001 <=
382 NPTEST1 <=
383 PSCH014-TEST <=
384 PVEP602 <=
385 PWAP002-0 <=
386 PSQL000 <=
387 PSEV006 <=
388 PVEP601 <=
389 PFAX011CAP <=
390 PSCH011-TEST <=
391 PVEP604 <=
392 PMFT001 <=
393 PFAX015 <=
394 PDOMS001 <=
395 PVEP603 <=
396 PWAP001-0 <=
397 TESTVM6 <=
398 TEST <=
399 QBIZ100 <=
400 PNCRAMEDI001 <=
401 TEMPDC004 <=
402 TEMPDC006 <=
403 TEMPNETWRIX <=
404 DSTEA001 <=
405 DSACS001 <=
406 DSBAMCS001 <=
407 PNCRAWFM01 <=
408 DSNX001 <=
409 CLVA1PFNP005 <=
410 CLVA1PFNP003 <=
411 CLVA1PFNP006 <=
412 CLVA1PEXM001 <=
413 CLVA1PFNP007 <=
414 CLVA1PFNP001 <=
415 CLVA1PFNP002 <=
416 CLVA1PDMC001 <=
417 DSPUPG2016 <=
418 DRSQL028 <=
419 PNCRAFILE004 <=
420 QNCRAMEP01 <=
421 PNCRAPROSPD01 <=
422 PNFP012A <=
423 PNFP011A <=
424 PFNP003A <=
425 PFNP001A <=
426 PEXM004 <=

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,13 @@
DIAP001
DAPP006
DFAX011
DAPVRNS001
DWAM001
DMHB001
DFNP002
DFNP020
DBIT901
DFNP009
DVB6001
DCTI001
DWHD003

View File

@@ -0,0 +1,18 @@
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,11
Prop4=31,Fully Automate Software Update Maintenance in Configuration Manager <20> Dam Good Admin
[InternetShortcut]
IDList=
URL=https://damgoodadmin.com/2017/11/05/fully-automate-software-update-maintenance-in-cm/
IconFile=https://damgoodadmin.com/favicon.ico
IconIndex=1
[{A7AF692E-098D-4C08-A225-D433CA835ED0}]
Prop5=3,0
Prop9=19,0
Prop2=65,2C0000000000000001000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF8F0200003D0000003F07000083030000B7
[{000214A0-0000-0000-C000-000000000046}.A]
Prop4=31,Fully Automate Software Update Maintenance in Configuration Manager <20> Dam Good Admin
[{000214A0-0000-0000-C000-000000000046}.W]
Prop4=31,Fully Automate Software Update Maintenance in Configuration Manager +IBM- Dam Good Admin
[{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}]
Prop5=8,Microsoft.Website.47A136E5.3264C1C6

7
dump/GUI-AlertBox.ps1 Normal file
View File

@@ -0,0 +1,7 @@
Add-Type -AssemblyName PresentationCore,PresentationFramework
$ButtonType = [System.Windows.MessageBoxButton]::YesNoCancel
$MessageIcon = [System.Windows.MessageBoxImage]::Error
$MessageBody = "Are you sure you want to delete the log file?"
$MessageTitle = "Confirm Deletion"
$Result = [System.Windows.MessageBox]::Show($MessageBody,$MessageTitle,$ButtonType,$MessageIcon)
"Your choice is $Result"

12
dump/GUI-DialogBox.ps1 Normal file
View File

@@ -0,0 +1,12 @@

$d = [Windows.Forms.MessageBox]::show("PowerShell Rocks", "PowerShell Rocks",
[Windows.Forms.MessageBoxButtons]::YesNo, [Windows.Forms.MessageBoxIcon]::Question)
If ($d -eq [Windows.Forms.DialogResult]::Yes)
{
'Yes, PowerShell Rocks'
}
else
{
"On no, you don't like me"
}

View File

@@ -0,0 +1,135 @@
$Location = Split-Path $MyInvocation.MyCommand.Path -Parent
Function Start-Form {
$Global:Collection_Name = ""
#$Global:Select_Tool = ""
$Global:Output_Type = ""
$Temp = ""
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
$Form = New-Object System.Windows.Forms.Form
$Form.Size = New-Object System.Drawing.Size(600,400)
##############################################
#$Form_Load={ $outputBox.text = "Welcome" }
############################################## Start functions
<# function pingInfo {
if ($RadioButton1.Checked -eq $true) {$nrOfPings=1}
if ($RadioButton2.Checked -eq $true) {$nrOfPings=2}
if ($RadioButton3.Checked -eq $true) {$nrOfPings=3}
$computer=$DropDownBox.SelectedItem.ToString() #populate the var with the value you selected
$pingResult=ping $wks -n $nrOfPings | fl | out-string;
$outputBox.text=$pingResult
} #end pingInfo
#>
############################################## end functions
##############################################
Function temp {
$outputBox.text = $textBox1.text | Out-String
$Global:Collection_Name = $textBox1.Text
#$Global:Select_Tool = $RadioButton1.Checked
$Global:Select_Tool = $DropDownBox.text
#$Global:Output_Type =
#if ($RadioButton2.Checked -eq $true) {Get-Service | Out-GridView}
If($DropDownBox.text = "Tool1"){gcc}
$textBox1.clear()
$DropDownBox.text = "----Select Tool----"
}
##############################################
Function Update-Dropdown1 {
# $Collections += $textBox1.text
$Collections = @("Tool1","Tool2","Tool3","Tool4","Tool5","Tool6","Tool7")
$Collections | % { $DropDownBox.Items.Add($_) }
}
##############################################
Function gcc {
$outputBox.text = Get-Service | Out-String
}
##############################################
Function Clear-Variables {
$Global:Collection_Name = ""
$Global:Select_Tool = ""
$Global:Output_Type = ""
}
############################################## Start group boxes
$groupBox = New-Object System.Windows.Forms.GroupBox
$groupBox.Location = New-Object System.Drawing.Size(270,20)
$groupBox.size = New-Object System.Drawing.Size(150,110)
$groupBox.text = "Select Output:"
$Form.Controls.Add($groupBox)
############################################## end group boxes
############################################## Start radio buttons
$RadioButton1 = New-Object System.Windows.Forms.RadioButton
$RadioButton1.Location = new-object System.Drawing.Point(15,15)
$RadioButton1.size = New-Object System.Drawing.Size(130,20)
$RadioButton1.Checked = $true
$RadioButton1.Text = "Powershell Window"
$groupBox.Controls.Add($RadioButton1)
$RadioButton2 = New-Object System.Windows.Forms.RadioButton
$RadioButton2.Location = new-object System.Drawing.Point(15,35)
$RadioButton2.size = New-Object System.Drawing.Size(80,20)
$RadioButton2.Text = "Gridview"
$groupBox.Controls.Add($RadioButton2)
$RadioButton3 = New-Object System.Windows.Forms.RadioButton
$RadioButton3.Location = new-object System.Drawing.Point(15,55)
$RadioButton3.size = New-Object System.Drawing.Size(80,20)
$RadioButton3.Text = "Export csv"
$groupBox.Controls.Add($RadioButton3)
############################################## end radio buttons
########### Text Box ###########
############Define text box1 for input
$textBox1 = New-Object System.Windows.Forms.TextBox;
$textBox1.Left = 20;
$textBox1.Top = 30;
$textBox1.width = 200;
$Form.Controls.Add($textBox1)
############################################## Start drop down boxes
$DropDownBox = New-Object System.Windows.Forms.ComboBox
$DropDownBox.Location = New-Object System.Drawing.Size(20,80)
$DropDownBox.Size = New-Object System.Drawing.Size(180,20)
$DropDownBox.DropDownHeight = 200
$DropDownBox.text = "----Select Tool----"
$Form.Controls.Add($DropDownBox)
############################################## end drop down boxes
############################################## Start text fields
$outputBox = New-Object System.Windows.Forms.TextBox
$outputBox.Location = New-Object System.Drawing.Size(10,150)
$outputBox.Size = New-Object System.Drawing.Size(565,200)
$outputBox.MultiLine = $True
$outputBox.ScrollBars = "Vertical"
$Form.Controls.Add($outputBox)
############################################## end text fields
############################################## Start buttons
$Button = New-Object System.Windows.Forms.Button
$Button.Location = New-Object System.Drawing.Size(450,30)
$Button.Size = New-Object System.Drawing.Size(110,80)
$Button.Text = "Go"
$Button.Add_Click({temp})
$Form.Controls.Add($Button)
############################################## end buttons
Update-Dropdown1
$Form.Add_Shown({$Form.Activate()})
[void] $Form.ShowDialog()
}

View File

@@ -0,0 +1,96 @@
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
$Form = New-Object System.Windows.Forms.Form
$Form.Size = New-Object System.Drawing.Size(600,400)
############################################## Start functions
function pingInfo {
if ($RadioButton1.Checked -eq $true) {$nrOfPings=1}
if ($RadioButton2.Checked -eq $true) {$nrOfPings=2}
if ($RadioButton3.Checked -eq $true) {$nrOfPings=3}
$computer=$DropDownBox.SelectedItem.ToString() #populate the var with the value you selected
$pingResult=ping $wks -n $nrOfPings | fl | out-string;
$outputBox.text=$pingResult
} #end pingInfo
############################################## end functions
############################################## Start group boxes
$groupBox = New-Object System.Windows.Forms.GroupBox
$groupBox.Location = New-Object System.Drawing.Size(270,20)
$groupBox.size = New-Object System.Drawing.Size(100,100)
$groupBox.text = "Nr of pings:"
$Form.Controls.Add($groupBox)
############################################## end group boxes
############################################## Start radio buttons
$RadioButton1 = New-Object System.Windows.Forms.RadioButton
$RadioButton1.Location = new-object System.Drawing.Point(15,15)
$RadioButton1.size = New-Object System.Drawing.Size(80,20)
$RadioButton1.Checked = $true
$RadioButton1.Text = "Ping once"
$groupBox.Controls.Add($RadioButton1)
$RadioButton2 = New-Object System.Windows.Forms.RadioButton
$RadioButton2.Location = new-object System.Drawing.Point(15,45)
$RadioButton2.size = New-Object System.Drawing.Size(80,20)
$RadioButton2.Text = "Ping twice"
$groupBox.Controls.Add($RadioButton2)
$RadioButton3 = New-Object System.Windows.Forms.RadioButton
$RadioButton3.Location = new-object System.Drawing.Point(15,75)
$RadioButton3.size = New-Object System.Drawing.Size(80,20)
$RadioButton3.Text = "Ping thrice"
$groupBox.Controls.Add($RadioButton3)
############################################## end radio buttons
############################################## Start drop down boxes
$DropDownBox = New-Object System.Windows.Forms.ComboBox
$DropDownBox.Location = New-Object System.Drawing.Size(20,50)
$DropDownBox.Size = New-Object System.Drawing.Size(180,20)
$DropDownBox.DropDownHeight = 200
$Form.Controls.Add($DropDownBox)
$wksList=@("hrcomputer1","hrcomputer2","hrcomputer3","workstation1","workstation2","computer5","localhost")
foreach ($wks in $wksList) {
$DropDownBox.Items.Add($wks)
} #end foreach
############################################## end drop down boxes
############################################## Start text fields
$outputBox = New-Object System.Windows.Forms.TextBox
$outputBox.Location = New-Object System.Drawing.Size(10,150)
$outputBox.Size = New-Object System.Drawing.Size(565,200)
$outputBox.MultiLine = $True
$outputBox.ScrollBars = "Vertical"
$Form.Controls.Add($outputBox)
############################################## end text fields
############################################## Start buttons
$Button = New-Object System.Windows.Forms.Button
$Button.Location = New-Object System.Drawing.Size(400,30)
$Button.Size = New-Object System.Drawing.Size(110,80)
$Button.Text = "Ping"
$Button.Add_Click({pingInfo})
$Form.Controls.Add($Button)
############################################## end buttons
$Form.Add_Shown({$Form.Activate()})
[void] $Form.ShowDialog()

View File

@@ -0,0 +1,93 @@
2
3
# Introduction to Radio buttons and Grouping #
##############################################
# A function to create the form
function Cheesy_Form{
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
# Set the size of your form
$Form = New-Object System.Windows.Forms.Form
$Form.width = 500
$Form.height = 300
$Form.Text = "My Cheesy Form with Radio buttons"
# Set the font of the text to be used within the form
$Font = New-Object System.Drawing.Font("Times New Roman",12)
$Form.Font = $Font
# Create a group that will contain your radio buttons
$MyGroupBox = New-Object System.Windows.Forms.GroupBox
$MyGroupBox.Location = '40,30'
$MyGroupBox.size = '400,110'
$MyGroupBox.text = "Do you like Cheese?"
# Create the collection of radio buttons
$RadioButton1 = New-Object System.Windows.Forms.RadioButton
$RadioButton1.Location = '20,40'
$RadioButton1.size = '350,20'
$RadioButton1.Checked = $true
$RadioButton1.Text = "Yes - I like Cheese."
$RadioButton2 = New-Object System.Windows.Forms.RadioButton
$RadioButton2.Location = '20,70'
$RadioButton2.size = '350,20'
$RadioButton2.Checked = $false
$RadioButton2.Text = "No - I don't like Cheese."
$RadioButton3 = New-Object System.Windows.Forms.RadioButton
$RadioButton3.Location = '60,150'
$RadioButton3.size = '350,20'
$RadioButton3.Checked = $false
$RadioButton3.Text = "This is not a cheese related response."
# Add an OK button
# Thanks to J.Vierra for simplifing the use of buttons in forms
$OKButton = new-object System.Windows.Forms.Button
$OKButton.Location = '130,200'
$OKButton.Size = '100,40'
$OKButton.Text = 'OK'
$OKButton.DialogResult=[System.Windows.Forms.DialogResult]::OK
#Add a cancel button
$CancelButton = new-object System.Windows.Forms.Button
$CancelButton.Location = '255,200'
$CancelButton.Size = '100,40'
$CancelButton.Text = "Cancel"
$CancelButton.DialogResult=[System.Windows.Forms.DialogResult]::Cancel
# Add all the GroupBox controls on one line
$MyGroupBox.Controls.AddRange(@($Radiobutton1,$RadioButton2))
# Add all the Form controls on one line
$form.Controls.AddRange(@($MyGroupBox,$OKButton,$CancelButton,$RadioButton3))
# Assign the Accept and Cancel options in the form to the corresponding buttons
$form.AcceptButton = $OKButton
$form.CancelButton = $CancelButton
# Activate the form
$form.Add_Shown({$form.Activate()})
# Get the results from the button click
$dialogResult = $form.ShowDialog()
# If the OK button is selected
if ($dialogResult -eq "OK"){
# Check the current state of each radio button and respond accordingly
if ($RadioButton1.Checked -and (!($RadioButton3.Checked))){
[System.Windows.Forms.MessageBox]::Show("You like cheese." , "Great")}
elseif ($RadioButton2.Checked -and (!($RadioButton3.Checked))){
[System.Windows.Forms.MessageBox]::Show("So your not a fan of cheese." , "Awe")}
elseif ($RadioButton3.Checked = $true){[System.Windows.Forms.MessageBox]::Show("That's OK - You don't have to answer cheesy questions" , "'No' to cheesy")}
}
}
# Call the function
Cheesy_Form

118
dump/GUI-Inputbox-Text.ps1 Normal file
View File

@@ -0,0 +1,118 @@
Function Invoke-InputBox {
[cmdletbinding(DefaultParameterSetName="plain")]
[OutputType([system.string],ParameterSetName='plain')]
[OutputType([system.security.securestring],ParameterSetName='secure')]
Param(
[Parameter(ParameterSetName="secure")]
[Parameter(HelpMessage = "Enter the title for the input box. No more than 25 characters.",
ParameterSetName="plain")]
[ValidateNotNullorEmpty()]
[ValidateScript({$_.length -le 25})]
[string]$Title = "User Input",
[Parameter(ParameterSetName="secure")]
[Parameter(HelpMessage = "Enter a prompt. No more than 50 characters.",ParameterSetName="plain")]
[ValidateNotNullorEmpty()]
[ValidateScript({$_.length -le 50})]
[string]$Prompt = "Please enter a value:",
[Parameter(HelpMessage = "Use to mask the entry and return a secure string.",
ParameterSetName="secure")]
[switch]$AsSecureString
)
if ($PSEdition -eq 'Core') {
Write-Warning "Sorry. This command will not run on PowerShell Core."
#bail out
Return
}
Add-Type -AssemblyName PresentationFramework
Add-Type assemblyName PresentationCore
Add-Type assemblyName WindowsBase
#remove the variable because it might get cached in the ISE or VS Code
Remove-Variable -Name myInput -Scope script -ErrorAction SilentlyContinue
$form = New-Object System.Windows.Window
$stack = New-object System.Windows.Controls.StackPanel
#define what it looks like
$form.Title = $title
$form.Height = 150
$form.Width = 350
$label = New-Object System.Windows.Controls.Label
$label.Content = " $Prompt"
$label.HorizontalAlignment = "left"
$stack.AddChild($label)
if ($AsSecureString) {
$inputbox = New-Object System.Windows.Controls.PasswordBox
}
else {
$inputbox = New-Object System.Windows.Controls.TextBox
}
$inputbox.Width = 300
$inputbox.HorizontalAlignment = "center"
$stack.AddChild($inputbox)
$space = new-object System.Windows.Controls.Label
$space.Height = 10
$stack.AddChild($space)
$btn = New-Object System.Windows.Controls.Button
$btn.Content = "_OK"
$btn.Width = 65
$btn.HorizontalAlignment = "center"
$btn.VerticalAlignment = "bottom"
#add an event handler
$btn.Add_click( {
if ($AsSecureString) {
$script:myInput = $inputbox.SecurePassword
}
else {
$script:myInput = $inputbox.text
}
$form.Close()
})
$stack.AddChild($btn)
$space2 = new-object System.Windows.Controls.Label
$space2.Height = 10
$stack.AddChild($space2)
$btn2 = New-Object System.Windows.Controls.Button
$btn2.Content = "_Cancel"
$btn2.Width = 65
$btn2.HorizontalAlignment = "center"
$btn2.VerticalAlignment = "bottom"
#add an event handler
$btn2.Add_click( {
$form.Close()
})
$stack.AddChild($btn2)
#add the stack to the form
$form.AddChild($stack)
#show the form
$inputbox.Focus() | Out-Null
$form.WindowStartupLocation = [System.Windows.WindowStartupLocation]::CenterScreen
$form.ShowDialog() | out-null
#write the result from the input box back to the pipeline
$script:myInput
}

20
dump/GUI-Inputbox.ps1 Normal file
View File

@@ -0,0 +1,20 @@
$global:FN = ""
function New-InputBox
{
param
(
[Parameter(Mandatory)]
[string]$FirstName,
[Parameter(Mandatory)]
[string]$LastName,
[Parameter(Mandatory)]
[string]$Password
)
$FirstName, $LastName, $Password
$Global:FN = $FirstName
}
Show-Command -Name New-InputBox

3
dump/GUI-Inputbox2.ps1 Normal file
View File

@@ -0,0 +1,3 @@
[void][System.Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic')
$name = [Microsoft.VisualBasic.Interaction]::InputBox("Enter your name", "Name", "Lastname")
"Your name is $name"

98
dump/GUI-Inputbox3.ps1 Normal file
View File

@@ -0,0 +1,98 @@
function button ($title,$mailbx, $WF, $TF) {
###################Load Assembly for creating form & button######
[void][System.Reflection.Assembly]::LoadWithPartialName( System.Windows.Forms)
[void][System.Reflection.Assembly]::LoadWithPartialName( Microsoft.VisualBasic)
#####Define the form size & placement
$form = New-Object System.Windows.Forms.Form;
$form.Width = 500;
$form.Height = 150;
$form.Text = $title;
$form.StartPosition = [System.Windows.Forms.FormStartPosition]::CenterScreen;
##############Define text label1
$textLabel1 = New-Object System.Windows.Forms.Label;
$textLabel1.Left = 25;
$textLabel1.Top = 15;
$textLabel1.Text = $mailbx;
##############Define text label2
$textLabel2 = New-Object System.Windows.Forms.Label;
$textLabel2.Left = 25;
$textLabel2.Top = 50;
$textLabel2.Text = $WF;
##############Define text label3
$textLabel3 = New-Object System.Windows.Forms.Label;
$textLabel3.Left = 25;
$textLabel3.Top = 85;
$textLabel3.Text = $TF;
############Define text box1 for input
$textBox1 = New-Object System.Windows.Forms.TextBox;
$textBox1.Left = 150;
$textBox1.Top = 10;
$textBox1.width = 200;
############Define text box2 for input
$textBox2 = New-Object System.Windows.Forms.TextBox;
$textBox2.Left = 150;
$textBox2.Top = 50;
$textBox2.width = 200;
############Define text box3 for input
$textBox3 = New-Object System.Windows.Forms.TextBox;
$textBox3.Left = 150;
$textBox3.Top = 90;
$textBox3.width = 200;
#############Define default values for the input boxes
$defaultValue =
$textBox1.Text = $defaultValue;
$textBox2.Text = $defaultValue;
$textBox3.Text = $defaultValue;
#############define OK button
$button = New-Object System.Windows.Forms.Button;
$button.Left = 360;
$button.Top = 85;
$button.Width = 100;
$button.Text = Ok;
############# This is when you have to close the form after getting values
$eventHandler = [System.EventHandler]{
$textBox1.Text;
$textBox2.Text;
$textBox3.Text;
$form.Close();};
$button.Add_Click($eventHandler) ;
#############Add controls to all the above objects defined
$form.Controls.Add($button);
$form.Controls.Add($textLabel1);
$form.Controls.Add($textLabel2);
$form.Controls.Add($textLabel3);
$form.Controls.Add($textBox1);
$form.Controls.Add($textBox2);
$form.Controls.Add($textBox3);
$ret = $form.ShowDialog();
#################return values
return $textBox1.Text, $textBox2.Text, $textBox3.Text
}
$return= button Enter Folders Enter mailbox Working Folder Target Folder

78
dump/GUI-Rich-Textbox.ps1 Normal file
View File

@@ -0,0 +1,78 @@
function Load-Form {
Add-Type -AssemblyName System.Windows.Forms
Add-Type -AssemblyName System.Drawing
$form = New-Object System.Windows.Forms.Form
$form.Text = "Data Entry Form"
$form.Size = New-Object System.Drawing.Size(400,300)
$form.StartPosition = "CenterScreen"
$OKButton = New-Object System.Windows.Forms.Button
$OKButton.Location = New-Object System.Drawing.Point(75,120)
$OKButton.Size = New-Object System.Drawing.Size(75,23)
$OKButton.Text = "OK"
$OKButton.DialogResult = [System.Windows.Forms.DialogResult]::OK
$form.AcceptButton = $OKButton
$form.Controls.Add($OKButton)
$CancelButton = New-Object System.Windows.Forms.Button
$CancelButton.Location = New-Object System.Drawing.Point(150,120)
$CancelButton.Size = New-Object System.Drawing.Size(75,23)
$CancelButton.Text = "Cancel"
$CancelButton.DialogResult = [System.Windows.Forms.DialogResult]::Cancel
$form.CancelButton = $CancelButton
$form.Controls.Add($CancelButton)
$StartButton = New-Object System.Windows.Forms.Button
$StartButton.Location = New-Object System.Drawing.Point(75,90)
$StartButton.Size = New-Object System.Drawing.Size(75,23)
$StartButton.Text = "Start"
$StartButton.DialogResult = [System.Windows.Forms.DialogResult]::None
$StartButton.Add_Click({
Test
$OUTPUT_RICHTEXT.Text+="Get out"
})
$form.Controls.Add($StartButton)
$SCRIPT:OUTPUT_RICHTEXT=New-Object System.Windows.Forms.RichTextBox
$OUTPUT_RICHTEXT.Location=New-Object System.Drawing.Size(10,150)
$OUTPUT_RICHTEXT.Size=New-Object System.Drawing.Size(300,100)
$OUTPUT_RICHTEXT.Multiline=$True
$OUTPUT_RICHTEXT.ReadOnly = $True
$OUTPUT_RICHTEXT.BackColor = [Drawing.Color]::White
$OUTPUT_RICHTEXT.ScrollBars = "Vertical"
$form.Controls.Add($OUTPUT_RICHTEXT)
$label = New-Object System.Windows.Forms.Label
$label.Location = New-Object System.Drawing.Point(10,20)
$label.Size = New-Object System.Drawing.Size(280,20)
$label.Text = "Please enter the information in the space below:"
$form.Controls.Add($label)
$textBox = New-Object System.Windows.Forms.TextBox
$textBox.Location = New-Object System.Drawing.Point(10,40)
$textBox.Size = New-Object System.Drawing.Size(260,20)
$form.Controls.Add($textBox)
$form.Topmost = $True
$form.Add_Shown({$textBox.Select()})
$result = $form.ShowDialog()
if ($result -eq [System.Windows.Forms.DialogResult]::OK)
{
$x = $textBox.Text
$x
}
}
function Test {
$script:OUTPUT_RICHTEXT.SelectionColor = 'Magenta'
$script:OUTPUT_RICHTEXT.AppendText("This text will be Magenta. &#8175;n")
$script:OUTPUT_RICHTEXT.SelectionColor = 'Green'
$script:OUTPUT_RICHTEXT.AppendText("This text will be Green. &#8175;n")
$script:OUTPUT_RICHTEXT.SelectionColor = 'Blue'
$script:OUTPUT_RICHTEXT.AppendText("This text will be Blue. &#8175;n")
}
Load-Form

45
dump/GUI-Textbox.ps1 Normal file
View File

@@ -0,0 +1,45 @@
Add-Type -AssemblyName System.Windows.Forms
Add-Type -AssemblyName System.Drawing
$form = New-Object System.Windows.Forms.Form
$form.Text = 'Data Entry Form'
$form.Size = New-Object System.Drawing.Size(300,200)
$form.StartPosition = 'CenterScreen'
$okButton = New-Object System.Windows.Forms.Button
$okButton.Location = New-Object System.Drawing.Point(75,120)
$okButton.Size = New-Object System.Drawing.Size(75,23)
$okButton.Text = 'OK'
$okButton.DialogResult = [System.Windows.Forms.DialogResult]::OK
$form.AcceptButton = $okButton
$form.Controls.Add($okButton)
$cancelButton = New-Object System.Windows.Forms.Button
$cancelButton.Location = New-Object System.Drawing.Point(150,120)
$cancelButton.Size = New-Object System.Drawing.Size(75,23)
$cancelButton.Text = 'Cancel'
$cancelButton.DialogResult = [System.Windows.Forms.DialogResult]::Cancel
$form.CancelButton = $cancelButton
$form.Controls.Add($cancelButton)
$label = New-Object System.Windows.Forms.Label
$label.Location = New-Object System.Drawing.Point(10,20)
$label.Size = New-Object System.Drawing.Size(280,20)
$label.Text = 'Please enter the information in the space below:'
$form.Controls.Add($label)
$textBox = New-Object System.Windows.Forms.TextBox
$textBox.Location = New-Object System.Drawing.Point(10,40)
$textBox.Size = New-Object System.Drawing.Size(260,20)
$form.Controls.Add($textBox)
$form.Topmost = $true
$form.Add_Shown({$textBox.Select()})
$result = $form.ShowDialog()
if ($result -eq [System.Windows.Forms.DialogResult]::OK)
{
$x = $textBox.Text
$x
}

92
dump/GUI-Textbox2.ps1 Normal file
View File

@@ -0,0 +1,92 @@
### Creating the form with the Windows forms namespace
Add-Type -AssemblyName System.Windows.Forms
Add-Type -AssemblyName System.Drawing
$form = New-Object System.Windows.Forms.Form
$form.Text = 'Enter the appropriate information' ### Text to be displayed in the title
$form.Size = New-Object System.Drawing.Size(310,625) ### Size of the window
$form.StartPosition = 'CenterScreen' ### Optional - specifies where the window should start
$form.FormBorderStyle = [System.Windows.Forms.FormBorderStyle]::FixedToolWindow ### Optional - prevents resize of the window
#$form.Topmost = $true ### Optional - Opens on top of other windows
### Adding an OK button to the text box window
$OKButton = New-Object System.Windows.Forms.Button
$OKButton.Location = New-Object System.Drawing.Point(155,550) ### Location of where the button will be
$OKButton.Size = New-Object System.Drawing.Size(75,23) ### Size of the button
$OKButton.Text = 'OK' ### Text inside the button
$OKButton.DialogResult = [System.Windows.Forms.DialogResult]::OK
$form.AcceptButton = $OKButton
$form.Controls.Add($OKButton)
### Adding a Cancel button to the text box window
$CancelButton = New-Object System.Windows.Forms.Button
$CancelButton.Location = New-Object System.Drawing.Point(70,550) ### Location of where the button will be
$CancelButton.Size = New-Object System.Drawing.Size(75,23) ### Size of the button
$CancelButton.Text = 'Cancel' ### Text inside the button
$CancelButton.DialogResult = [System.Windows.Forms.DialogResult]::Cancel
$form.CancelButton = $CancelButton
$form.Controls.Add($CancelButton)
### Putting a label above the text box
$label = New-Object System.Windows.Forms.Label
$label.Location = New-Object System.Drawing.Point(10,10) ### Location of where the label will be
$label.AutoSize = $True
$Font = New-Object System.Drawing.Font("Arial",12,[System.Drawing.FontStyle]::Bold) ### Formatting text for the label
$label.Font = $Font
$label.Text = $Input_Type ### Text of label, defined by the parameter that was used when the function is called
$label.ForeColor = 'Red' ### Color of the label text
$form.Controls.Add($label)
### Inserting the text box that will accept input
$textBox = New-Object System.Windows.Forms.TextBox
$textBox.Location = New-Object System.Drawing.Point(10,40) ### Location of the text box
$textBox.Size = New-Object System.Drawing.Size(275,500) ### Size of the text box
$textBox.Multiline = $true ### Allows multiple lines of data
$textbox.AcceptsReturn = $true ### By hitting enter it creates a new line
$textBox.ScrollBars = "Vertical" ### Allows for a vertical scroll bar if the list of text is too big for the window
$form.Controls.Add($textBox)
$form.Add_Shown({$textBox.Select()}) ### Activates the form and sets the focus on it
$result = $form.ShowDialog() ### Displays the form
### If the OK button is selected do the following
if ($result -eq [System.Windows.Forms.DialogResult]::OK)
{
### Removing all the spaces and extra lines
$x = $textBox.Lines | Where{$_} | ForEach{ $_.Trim() }
### Putting the array together
$array = @()
### Putting each entry into array as individual objects
$array = $x -split "`r`n"
### Sending back the results while taking out empty objects
Return $array | Where-Object {$_ -ne ''}
}
### If the cancel button is selected do the following
if ($result -eq [System.Windows.Forms.DialogResult]::Cancel)
{
Write-Host "User Canceled" -BackgroundColor Red -ForegroundColor White
Write-Host "Press any key to exit..."
$Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
Exit
}
###############################################################################
### User Name(s) example of how to utilize the GUI_TextBox function
###############################################################################
$Users = GUI_TextBox "User Names(s):" ### Calls the text box function with a parameter and puts returned input in variable
$User_Count = $Users | Measure-Object | % {$_.Count} ### Measures how many objects were inputted
If ($User_Count -eq 0){ ### If the count returns 0 it will throw and error
Write-Host "Nothing was inputed..." -BackgroundColor Red -ForegroundColor White
Return
}
Else { ### If there was actual data returned in the input, the script will continue
Write-Host "Number of users entered:" $User_Count -BackgroundColor Cyan -ForegroundColor Black
$Users
### Here is where you would put your specific code to take action on those users inputted
}

59
dump/Hotfix-Report1.ps1 Normal file
View File

@@ -0,0 +1,59 @@
<#
.Synopsis
This script will get details of perticular patch installed on remote computer.
.DESCRIPTION
This script will get details of perticular patch installed on remote computer, in this case I am trying to get recent emergency patch installed on remote computer.
.EXAMPLE
get-content "C:\temp\Hareesh\Script\Computers.txt" | get-installedpatch
.EXAMPLE
get-installedpatch -computers computer1,computer2
.INPUTS
computername
.FUNCTIONALITY
This cmdlet is useful to check the recent emergency patch (KB4499175 or KB4499180) is installed on remote computer or not.
#>
function get-installedpatch
{
[cmdletbinding()]
param
(
[Parameter(
Mandatory=$true,
ValueFromPipeline=$true
)]
[string[]]$computers
)
Begin
{
$Results = @()
}
Process
{
foreach ($computer in $computers)
{
if (Test-Connection -ComputerName $computer -Count 1 -ea SilentlyContinue)
{
try
{
$hotfix = get-wmiobject win32_quickfixengineering -ComputerName $computer | sort Installedon -Descending | select -First 1 -ErrorAction stop
}
catch
{
Write-output "$computer is giving exception"
$Computer #| out-file 'C:\temp\Hareesh\Script\KB4499175_ExceptionComputers.txt' -Append
}
}
else
{
Write-output "$computer is not online" #| Out-File "C:\temp\Hareesh\Script\KB4499175_Notonline.txt"
}
$hotfix
$Results #| export-csv "C:\temp\Hareesh\Script\KB4499175_Installed.csv" -NoTypeInformation
}
}
end {}
}
#get-content "C:\temp\Hareesh\Script\Computers.txt" | get-installedpatch

View File

@@ -0,0 +1,36 @@
<#
Import-Module 'C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1'
New-PSDrive -Name SCCM-Drive -PSProvider "AdminUI.PS.Provider\CMSite" -Root "PNCRASCCM001.ccx.carecentrix.com" -Description "SCCM Site"
#>
$Current_Location = Get-Location
CD sccm-drive:
$All_Collections = @()
$Collection_Names =
"_6PM - Production Patching",
"_9PM - Production Patching",
"_11PM - Production Patching - File Servers",
"_11PM - Production Patching",
"__6PM - Production Patching - Domain Controllers 1",
"__9PM - Production Patching - Domain Controllers 2",
"__11PM - Production Patching - Domain Controllers 3"
$Collection_Names | % { $All_Collections += Get-CMCollection -Name $_ }
$All_Collections.name | % { $Maint = Get-CMMaintenanceWindow -CollectionName $_
$Obj = New-Object -TypeName PSObject
$obj | Add-Member -MemberType NoteProperty -Name Collection -Value $_
$Obj | Add-Member -MemberType NoteProperty -Name MaintenanceWindowName -Value $Maint.Name
$Obj | Add-Member -MemberType NoteProperty -Name Description -Value $Maint.Description
$Obj | Add-Member -MemberType NoteProperty -Name StartTime -Value $Maint.StartTime
$Obj | Add-Member -MemberType NoteProperty -Name RecurrenceType -Value $Maint.RecurrenceType
$Obj
}#end%
#Set-Location $Current_Location

View File

@@ -0,0 +1,73 @@
<#
Import-Module 'C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1'
New-PSDrive -Name SCCM-Drive -PSProvider "AdminUI.PS.Provider\CMSite" -Root "PNCRASCCM001.ccx.carecentrix.com" -Description "SCCM Site"
#>
$DeviceCollection_Name = "6PM - Production Patching"
#$DeviceCollection_Name = "9PM - Production Patching"
#$DeviceCollection_Name = "11PM - Production Patching - File Servers"
#$DeviceCollection_Name = "11PM - Production Patching"
#$DeviceCollection_Name = ""
$DD = @()
$Downloaded_Updates = @()
$NOT_Downloaded_Updates = @()
$Count = 0
[INT]$Last_Writetime = "800" #hours
CD sccm-drive:
$DeviceCollection_MemberCount = Get-CMDeviceCollection -Name $DeviceCollection_Name | select Name,MemberCount
$DeviceCollection_ServerNames = Get-CMCollectionMember -CollectionName $DeviceCollection_Name | select Name,IsClient
Set-Location c:
$DeviceCollection_ServerNames.Name | % {
$Computer = $_
$Check_Contents = gci "\\$Computer\c$\Windows\ccmcache" | ? { $_.lastwritetime -gt ((Get-Date).AddHours((-$Last_Writetime))) }
If ($Check_Contents) { $Downloaded_Updates += $Computer }
Else { $NOT_Downloaded_Updates += $Computer }
}
If($Downloaded_Updates) {
$Downloaded_Updates | % {
$Updates_Downloaded = gci "\\$_\c$\Windows\ccmcache" | ? { $_.lastwritetime -gt ((Get-Date).AddHours((-$Last_Writetime))) }
$Obj = New-Object -TypeName PSObject
$Obj | Add-Member -MemberType NoteProperty -Name Computer -Value $_
$Obj | Add-Member -MemberType NoteProperty -Name LastWriteTime -Value $Updates_Downloaded[-1].LastWriteTime
$Obj | Add-Member -MemberType NoteProperty -Name FileName -Value $Updates_Downloaded[-1].Name
$Obj | Add-Member -MemberType NoteProperty -Name UpdatesCount -Value ($Updates_Downloaded.count)
$Obj
}#end%
}#endIf
Write-Host ""
Write-Host "Total Servers in Collection: $($DeviceCollection_MemberCount.MemberCount)" -ForegroundColor Green
Write-Host ""
Write-Host "Servers Downloaded patches count: $($Downloaded_Updates.count)" -ForegroundColor Green
Write-Host ""
Write-Host "Total Servers in Collection - $($DeviceCollection_MemberCount.MemberCount)"
Write-Host ""
Write-Host "Nothing Downloaded for: $($NOT_Downloaded_Updates.count) Servers" -ForegroundColor Yellow
Write-Host ""
<#
Write-Host ""
Write-Host ""
Write-Host "Folder Empty for the following:"
Write-Host "$NOT_Downloaded_Updates"
#>

View File

@@ -0,0 +1,37 @@
$Downloaded_Updates = @()
$NOT_Downloaded_Updates = @()
$Count = 0
$Servers = Import-Csv 'E:\SCCM-Files\SCCM-Scripts\Files\9PM - Production Patching-NoInstall.csv'
$Servers.Server | % {
$Computer = $_
$Check_Contents = gci "\\$Computer\c$\Windows\ccmcache" -ErrorAction SilentlyContinue #| ? { $_.lastwritetime -gt ((Get-Date).AddHours((-$Last_Writetime))) }
If ($Check_Contents) { $Downloaded_Updates += $Computer }
Else { $NOT_Downloaded_Updates += $Computer }
}
If($Downloaded_Updates) {
$Downloaded_Updates | % {
$Updates_Downloaded = gci "\\$_\c$\Windows\ccmcache" -ErrorAction SilentlyContinue #| ? { $_.lastwritetime -gt ((Get-Date).AddHours((-$Last_Writetime))) }
$Obj = New-Object -TypeName PSObject
$Obj | Add-Member -MemberType NoteProperty -Name Computer -Value $_
$Obj | Add-Member -MemberType NoteProperty -Name LastWriteTime -Value $Updates_Downloaded[-1].LastWriteTime
$Obj | Add-Member -MemberType NoteProperty -Name FileName -Value $Updates_Downloaded[-1].Name
$Obj | Add-Member -MemberType NoteProperty -Name UpdatesCount -Value ($Updates_Downloaded.count)
$Obj
}#end%
}#endIf
Write-Host ""
Write-Host "Nothing Downloaded for: $NOT_Downloaded_Updates" -ForegroundColor Yellow
Write-Host ""
Write-Host "Servers Downloaded patches count: $($Downloaded_Updates.count)" -ForegroundColor Green
Write-Host ""

312
dump/NA-Tool-GUI-2.ps1 Normal file
View File

@@ -0,0 +1,312 @@
$Location = Split-Path $MyInvocation.MyCommand.Path -Parent
$Script:ALL_Patch_Servers = @()
$Script:Responding = @()
$Script:NotResponding = @()
$Global:Collection_Name = ""
$Global:Select_Tool
$Global:Output_Type = ""
If(!(Get-PSDrive -Name SCCM-Drive -ErrorAction SilentlyContinue)) {
Import-Module 'C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1'
New-PSDrive -Name SCCM-Drive -PSProvider "AdminUI.PS.Provider\CMSite" -Root "PNCRASCCM001.ccx.carecentrix.com" -Description "SCCM Site"
}
#########################################################################################################################################################
Function Start-Form {
#$Global:Collection_Name = ""
#$Global:Select_Tool = ""
#$Global:Output_Type = ""
$Temp = ""
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
$Form = New-Object System.Windows.Forms.Form
$Form.Size = New-Object System.Drawing.Size(1000,800)
##############################################
#$Form_Load={ $Script:outputBox.text = "Welcome" }
############################################## Start functions
<# function pingInfo {
if ($RadioButton1.Checked -eq $true) {$nrOfPings=1}
if ($RadioButton2.Checked -eq $true) {$nrOfPings=2}
if ($RadioButton3.Checked -eq $true) {$nrOfPings=3}
$computer=$DropDownBox.SelectedItem.ToString() #populate the var with the value you selected
$pingResult=ping $wks -n $nrOfPings | fl | out-string;
$Script:outputBox.text=$pingResult
} #end pingInfo
#>
############################################## end functions
Function SCCM-Module {
If(!(Get-PSDrive).Name -eq "sccm-drive") {
Import-Module 'C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1'
New-PSDrive -Name SCCM-Drive -PSProvider "AdminUI.PS.Provider\CMSite" -Root "PNCRASCCM001.ccx.carecentrix.com" -Description "SCCM Site"
}#endIf
CD sccm-drive:
}#endFunction
##############################################
Function Run-Defaults {
$Script:textBox1.Text = "Nabil - Test Collection"
$Script:RadioButton1.Checked = $true
}
##############################################
Function temp {
$outputBox.Clear()
#$Script:outputBox.text = $textBox1.text | Out-String
$Global:Collection_Name = $textBox1.Text
#$Global:Select_Tool = $RadioButton1.Checked
$Global:Select_Tool = $DropDownBox.text
#$Global:Output_Type =
If ($RadioButton1.Checked -eq $true) { $Global:Output_Type = "Window"; $outputBox.Text = "Radio1 Checked: $($RadioButton1.Checked)" | Out-String }
ElseIf ($RadioButton2.Checked -eq $true) { $Global:Output_Type = "Gridview"; $outputBox.Text = "Radio2 Checked: $RadioButton2.Checked" | Out-String }
ElseIf ($RadioButton3.Checked -eq $true) { $Global:Output_Type = "Export"; $outputBox.Text = "Radio3 Checked: $RadioButton2.Checked" | Out-String }
If($Global:Collection_Name -and $Global:Select_Tool) {
# If($DropDownBox.text = "Tool1"){gcc}
Run-Tool
$textBox1.clear()
$DropDownBox.text = "----Select Tool----"
Clear-Variables
}#endIf
Else { #$T = { Write-Host "You must enter Collection Name ............!!" -ForegroundColor Red }
$Script:outputBox.SelectionColor = 'red'
$Script:outputBox.Text = "You must select 'Tool' and enter Collection Name............!!"
}
Run-Defaults
}#endFunction
##############################################
Function Update-Dropdown1 {
# $Collections += $textBox1.text
$Collections = @("Collection-Servers","Ping-Collection","Check_Uptime","Test-Service","Tool5","Tool6","Tool7")
$Collections | % { $DropDownBox.Items.Add($_) }
}
##############################################
Function gcc {
$Script:outputBox.text = Get-Service | Out-String
}
##############################################
Function Clear-Variables {
$Global:Collection_Name = ""
$Global:Select_Tool = ""
$Global:Output_Type = ""
$Script:ALL_Patch_Servers = @()
}
#region Controls
############################################## Start group boxes
$groupBox = New-Object System.Windows.Forms.GroupBox
$groupBox.Location = New-Object System.Drawing.Size(270,20)
$groupBox.size = New-Object System.Drawing.Size(150,110)
$groupBox.text = "Select Output:"
$Form.Controls.Add($groupBox)
############################################## end group boxes
############################################## Start radio buttons
$Script:RadioButton1 = New-Object System.Windows.Forms.RadioButton
$Script:RadioButton1.Location = new-object System.Drawing.Point(15,15)
$Script:RadioButton1.size = New-Object System.Drawing.Size(130,20)
$Script:RadioButton1.Checked = $true
$Script:RadioButton1.Text = "Window"
$groupBox.Controls.Add($RadioButton1)
$Script:RadioButton2 = New-Object System.Windows.Forms.RadioButton
$Script:RadioButton2.Location = new-object System.Drawing.Point(15,35)
$Script:RadioButton2.size = New-Object System.Drawing.Size(80,20)
$Script:RadioButton2.Text = "Gridview"
$groupBox.Controls.Add($RadioButton2)
$Script:RadioButton3 = New-Object System.Windows.Forms.RadioButton
$Script:RadioButton3.Location = new-object System.Drawing.Point(15,55)
$Script:RadioButton3.size = New-Object System.Drawing.Size(80,20)
$Script:RadioButton3.Text = "Export csv"
$groupBox.Controls.Add($RadioButton3)
############################################## end radio buttons
########### Text Box ###########
############Define text box1 for input
$Script:textBox1 = New-Object System.Windows.Forms.TextBox;
$Script:textBox1.Left = 20;
$Script:textBox1.Top = 30;
$Script:textBox1.width = 200;
$Script:textBox1.Text = "Nabil - Test Collection"
$Form.Controls.Add($textBox1)
############################################## Start drop down boxes
$Script:DropDownBox = New-Object System.Windows.Forms.ComboBox
$Script:DropDownBox.Location = New-Object System.Drawing.Size(20,80)
$Script:DropDownBox.Size = New-Object System.Drawing.Size(180,20)
$Script:DropDownBox.DropDownHeight = 200
$Script:DropDownBox.text = "----Select Tool----"
$Form.Controls.Add($DropDownBox)
############################################## end drop down boxes
<############################################## Start text fields
$Script:outputBox = New-Object System.Windows.Forms.TextBox
$Script:outputBox.Location = New-Object System.Drawing.Size(10,150)
$Script:outputBox.Size = New-Object System.Drawing.Size(865,300)
$Script:outputBox.MultiLine = $True
$Script:outputBox.ScrollBars = "Vertical"
$Form.Controls.Add($Script:outputBox)
###########>
$SCRIPT:outputBox=New-Object System.Windows.Forms.RichTextBox
$outputBox.Location=New-Object System.Drawing.Size(10,150)
$outputBox.Size=New-Object System.Drawing.Size(965,600)
$outputBox.Multiline=$True
$outputBox.ReadOnly = $True
$outputBox.BackColor = [Drawing.Color]::White
$outputBox.ScrollBars = "both"
$outputBox.WordWrap = $false
$outputBox.Font = 'Consolas, 8.25pt'
$form.Controls.Add($Script:outputBox)
############################################## end text fields
############################################## Start buttons
$Button = New-Object System.Windows.Forms.Button
$Button.Location = New-Object System.Drawing.Size(450,30)
$Button.Size = New-Object System.Drawing.Size(110,80)
$Button.Text = "Go"
$Button.Add_Click({temp})
$Form.Controls.Add($Button)
#endregion Controls
############################################## end buttons
Update-Dropdown1
$Form.Add_Shown({$Form.Activate()})
[void] $Form.ShowDialog()
}
#########################################################################################################################################################
<# Function Input-Box {
[void][System.Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic')
$Global:Collection_Name = [Microsoft.VisualBasic.Interaction]::InputBox("Enter your name", "Name", "Enter Collection Name")
}
#>
#############################################################################################################################################################
Function Display-Results {
#Param($Global:Output_Type,$Final_Result)
Write-Host "DisplayType: $($Global:Output_Type)"
Switch ($Global:Output_Type){
Window { $Script:outputBox.Text = $Script:ALL_Patch_Servers | Out-String}
Gridview { $Script:ALL_Patch_Servers | Out-GridView }
Export { $Script:ALL_Patch_Servers | Export-Csv -Path $Location\Results.csv -NoTypeInformation; ii $Location\Results.csv }
}#endSwitch
}
#############################################################################################################################################################
Function Collection-Servers {
#Param($Coll_Name)
Write-Host "Collection:$Global:Collection_Name"
SCCM-Module
#CD sccm-drive:
$Script:DeviceCollection_MemberCount = Get-CMDeviceCollection -Name $Global:Collection_Name | select Name,MemberCount
$Script:DeviceCollection_ServerNames = Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name,IsClient #| Export-Csv "E:\SCCM-Files\SCCM-Scripts\Files\$Global:Collection_Name.csv" -NoTypeInformation
#$ServerName = $DeviceCollection_ServerNames.Name
Set-Location c:
#$Script:Temp = Get-CMCollectionMember -CollectionName $Global:Collection_Name #| select Name,IsClient
$Script:DeviceCollection_ServerNames | % {
$Obj = New-Object -TypeName PSObject
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $_.Name
$Obj | Add-Member -MemberType NoteProperty -Name ClientInstalled -Value $_.IsClient
$Obj | Add-Member -MemberType NoteProperty -Name CollectionName -Value $Global:Collection_Name
#$Obj | Add-Member -MemberType NoteProperty -Name CollectionMemberCount -Value {(Get-CMCollectionMember -Name $Global:Collection_Name).MemberCount}
$Obj
$Script:ALL_Patch_Servers += $Obj
}#end%
# $Script:outputBox.Text = $Script:ALL_Patch_Servers | Out-String
Display-Results #-Final_Result $Script:ALL_Patch_Servers
Write-Host "$Script:ALL_Patch_Servers"
}#endFunction
#############################################################################################################################################################
Function Ping_Collection {
$Ping_Result = @()
Write-Host "Total Server Count: $($Script:ALL_Patch_Servers.count)" -ForegroundColor Green
Write-Host ""
SCCM-Module
#CD sccm-drive:
$Script:DeviceCollection_ServerNames1 = Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name
Set-Location c:
$Script:DeviceCollection_ServerNames1.Name | % {
$Obj = New-Object -TypeName PSObject
If (Test-Connection $_ -Count 1 -ErrorAction SilentlyContinue ) {
#Write-Host "Responding:---- $_ " -ForegroundColor Green
#$Script:outputBox.AppendText("Responding: $_")
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $_
$Obj | Add-Member -MemberType NoteProperty -Name Responding -Value "No!"
$Ping_Result += $Obj
}#endIf
Else {
#$Script:outputBox.AppendText("NOT Responding: $_")
$NotResponding += $_
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $_
$Obj | Add-Member -MemberType NoteProperty -Name Responding -Value "No!"
$Ping_Result += $Obj
}
}#end%
$Script:outputBox.Text = $Ping_Result | ft -AutoSize | Out-String
write-host "-------------------------------------------------------"
Write-host "$($Responding.count) / $($DeviceCollection_ServerNames1.count) -- Responding" -foregroundcolor Green
Write-host "$($NotResponding.count) / $($DeviceCollection_ServerNames1.count) -- NOT Responding" -foregroundcolor Red
Write-Host "Servers NOT Responding: $NotResponding " -ForegroundColor Red
}#endFunction
#############################################################################################################################################################
Function Check_Uptime {
SCCM-Module
$Script:DeviceCollection_ServerNames1 = Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name
$Script:outputBox.Text = $Script:DeviceCollection_ServerNames1.name | % { gwmi win32_operatingsystem -ComputerName $_ -ErrorAction SilentlyContinue | select @{n="Server";e={$_.PSComputername}},@{n="LastBootup";e={$_.Converttodatetime($_.LastBootUpTime)}}} | sort LastBootup -descending | Out-String
}
#############################################################################################################################################################
Function Test-Service {
$T = Get-Service
$outputBox.Text = $T | ft -AutoSize | Out-String
}
#############################################################################################################################################################
Function Run-Tool {
Switch($Global:Select_Tool) {
Collection-Servers { Collection-Servers; Write-Host "Tool Selected: $Global:Select_Tool" }
Ping-Collection { Ping_Collection }
Check_Uptime { Check_Uptime }
Test-Service { Test-Service }
}#endSwitch
#Clear-Variables
}#endFunction
#############################################################################################################################################################
Start-Form

293
dump/NA-Tool-GUI.ps1 Normal file
View File

@@ -0,0 +1,293 @@
$Location = Split-Path $MyInvocation.MyCommand.Path -Parent
$Script:ALL_Patch_Servers = @()
$Script:Responding = @()
$Script:NotResponding = @()
$Global:Collection_Name = ""
$Global:Select_Tool
$Global:Output_Type = ""
If(!(Get-PSDrive -Name SCCM-Drive -ErrorAction SilentlyContinue)) {
Import-Module 'C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1'
New-PSDrive -Name SCCM-Drive -PSProvider "AdminUI.PS.Provider\CMSite" -Root "PNCRASCCM001.ccx.carecentrix.com" -Description "SCCM Site"
}
#########################################################################################################################################################
Function Start-Form {
#$Global:Collection_Name = ""
#$Global:Select_Tool = ""
#$Global:Output_Type = ""
$Temp = ""
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
$Form = New-Object System.Windows.Forms.Form
$Form.Size = New-Object System.Drawing.Size(900,500)
##############################################
#$Form_Load={ $Script:outputBox.text = "Welcome" }
############################################## Start functions
<# function pingInfo {
if ($RadioButton1.Checked -eq $true) {$nrOfPings=1}
if ($RadioButton2.Checked -eq $true) {$nrOfPings=2}
if ($RadioButton3.Checked -eq $true) {$nrOfPings=3}
$computer=$DropDownBox.SelectedItem.ToString() #populate the var with the value you selected
$pingResult=ping $wks -n $nrOfPings | fl | out-string;
$Script:outputBox.text=$pingResult
} #end pingInfo
#>
############################################## end functions
Function SCCM-Module {
If(!(Get-PSDrive).Name -eq "sccm-drive") {
Import-Module 'C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1'
New-PSDrive -Name SCCM-Drive -PSProvider "AdminUI.PS.Provider\CMSite" -Root "PNCRASCCM001.ccx.carecentrix.com" -Description "SCCM Site"
}#endIf
CD sccm-drive:
}#endFunction
##############################################
Function Run-Defaults {
$Script:textBox1.Text = "Nabil - Test Collection"
$Script:RadioButton1.Checked = $true
}
##############################################
Function temp {
$outputBox.Clear()
#$Script:outputBox.text = $textBox1.text | Out-String
$Global:Collection_Name = $textBox1.Text
#$Global:Select_Tool = $RadioButton1.Checked
$Global:Select_Tool = $DropDownBox.text
#$Global:Output_Type =
If ($RadioButton1.Checked -eq $true) { $Global:Output_Type = "Window"; $outputBox.Text = "Radio1 Checked: $($RadioButton1.Checked)" | Out-String }
ElseIf ($RadioButton2.Checked -eq $true) { $Global:Output_Type = "Gridview"; $outputBox.Text = "Radio2 Checked: $RadioButton2.Checked" | Out-String }
ElseIf ($RadioButton3.Checked -eq $true) { $Global:Output_Type = "Export"; $outputBox.Text = "Radio3 Checked: $RadioButton2.Checked" | Out-String }
If($Global:Collection_Name -and $Global:Select_Tool) {
# If($DropDownBox.text = "Tool1"){gcc}
Run-Tool
$textBox1.clear()
$DropDownBox.text = "----Select Tool----"
Clear-Variables
}#endIf
Else { #$T = { Write-Host "You must enter Collection Name ............!!" -ForegroundColor Red }
$Script:outputBox.SelectionColor = 'red'
$Script:outputBox.Text = "You must select 'Tool' and enter Collection Name............!!"
}
Run-Defaults
}#endFunction
##############################################
Function Update-Dropdown1 {
# $Collections += $textBox1.text
$Collections = @("Collection-Servers","Ping-Collection","Check_Uptime","Tool4","Tool5","Tool6","Tool7")
$Collections | % { $DropDownBox.Items.Add($_) }
}
##############################################
Function gcc {
$Script:outputBox.text = Get-Service | Out-String
}
##############################################
Function Clear-Variables {
$Global:Collection_Name = ""
$Global:Select_Tool = ""
$Global:Output_Type = ""
$Script:ALL_Patch_Servers = @()
}
#region Controls
############################################## Start group boxes
$groupBox = New-Object System.Windows.Forms.GroupBox
$groupBox.Location = New-Object System.Drawing.Size(270,20)
$groupBox.size = New-Object System.Drawing.Size(150,110)
$groupBox.text = "Select Output:"
$Form.Controls.Add($groupBox)
############################################## end group boxes
############################################## Start radio buttons
$Script:RadioButton1 = New-Object System.Windows.Forms.RadioButton
$Script:RadioButton1.Location = new-object System.Drawing.Point(15,15)
$Script:RadioButton1.size = New-Object System.Drawing.Size(130,20)
$Script:RadioButton1.Checked = $true
$Script:RadioButton1.Text = "Window"
$groupBox.Controls.Add($RadioButton1)
$Script:RadioButton2 = New-Object System.Windows.Forms.RadioButton
$Script:RadioButton2.Location = new-object System.Drawing.Point(15,35)
$Script:RadioButton2.size = New-Object System.Drawing.Size(80,20)
$Script:RadioButton2.Text = "Gridview"
$groupBox.Controls.Add($RadioButton2)
$Script:RadioButton3 = New-Object System.Windows.Forms.RadioButton
$Script:RadioButton3.Location = new-object System.Drawing.Point(15,55)
$Script:RadioButton3.size = New-Object System.Drawing.Size(80,20)
$Script:RadioButton3.Text = "Export csv"
$groupBox.Controls.Add($RadioButton3)
############################################## end radio buttons
########### Text Box ###########
############Define text box1 for input
$Script:textBox1 = New-Object System.Windows.Forms.TextBox;
$Script:textBox1.Left = 20;
$Script:textBox1.Top = 30;
$Script:textBox1.width = 200;
$Script:textBox1.Text = "Nabil - Test Collection"
$Form.Controls.Add($textBox1)
############################################## Start drop down boxes
$Script:DropDownBox = New-Object System.Windows.Forms.ComboBox
$Script:DropDownBox.Location = New-Object System.Drawing.Size(20,80)
$Script:DropDownBox.Size = New-Object System.Drawing.Size(180,20)
$Script:DropDownBox.DropDownHeight = 200
$Script:DropDownBox.text = "----Select Tool----"
$Form.Controls.Add($DropDownBox)
############################################## end drop down boxes
<############################################## Start text fields
$Script:outputBox = New-Object System.Windows.Forms.TextBox
$Script:outputBox.Location = New-Object System.Drawing.Size(10,150)
$Script:outputBox.Size = New-Object System.Drawing.Size(865,300)
$Script:outputBox.MultiLine = $True
$Script:outputBox.ScrollBars = "Vertical"
$Form.Controls.Add($Script:outputBox)
###########>
$SCRIPT:outputBox=New-Object System.Windows.Forms.RichTextBox
$outputBox.Location=New-Object System.Drawing.Size(10,150)
$outputBox.Size=New-Object System.Drawing.Size(865,300)
$outputBox.Multiline=$True
$outputBox.ReadOnly = $True
$outputBox.BackColor = [Drawing.Color]::White
$outputBox.ScrollBars = "Vertical"
$form.Controls.Add($Script:outputBox)
############################################## end text fields
############################################## Start buttons
$Button = New-Object System.Windows.Forms.Button
$Button.Location = New-Object System.Drawing.Size(450,30)
$Button.Size = New-Object System.Drawing.Size(110,80)
$Button.Text = "Go"
$Button.Add_Click({temp})
$Form.Controls.Add($Button)
#endregion Controls
############################################## end buttons
Update-Dropdown1
$Form.Add_Shown({$Form.Activate()})
[void] $Form.ShowDialog()
}
#########################################################################################################################################################
<# Function Input-Box {
[void][System.Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic')
$Global:Collection_Name = [Microsoft.VisualBasic.Interaction]::InputBox("Enter your name", "Name", "Enter Collection Name")
}
#>
#############################################################################################################################################################
Function Display-Results {
#Param($Global:Output_Type,$Final_Result)
Write-Host "DisplayType: $($Global:Output_Type)"
Switch ($Global:Output_Type){
Window { $Script:outputBox.Text = $Script:ALL_Patch_Servers | Out-String}
Gridview { $Script:ALL_Patch_Servers | Out-GridView }
Export { $Script:ALL_Patch_Servers | Export-Csv -Path $Location\Results.csv -NoTypeInformation; ii $Location\Results.csv }
}#endSwitch
}
#############################################################################################################################################################
Function Collection-Servers {
#Param($Coll_Name)
Write-Host "Collection:$Global:Collection_Name"
SCCM-Module
#CD sccm-drive:
$Script:DeviceCollection_MemberCount = Get-CMDeviceCollection -Name $Global:Collection_Name | select Name,MemberCount
$Script:DeviceCollection_ServerNames = Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name,IsClient #| Export-Csv "E:\SCCM-Files\SCCM-Scripts\Files\$Global:Collection_Name.csv" -NoTypeInformation
#$ServerName = $DeviceCollection_ServerNames.Name
Set-Location c:
#$Script:Temp = Get-CMCollectionMember -CollectionName $Global:Collection_Name #| select Name,IsClient
$Script:DeviceCollection_ServerNames | % {
$Obj = New-Object -TypeName PSObject
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $_.Name
$Obj | Add-Member -MemberType NoteProperty -Name ClientInstalled -Value $_.IsClient
$Obj | Add-Member -MemberType NoteProperty -Name CollectionName -Value $Global:Collection_Name
#$Obj | Add-Member -MemberType NoteProperty -Name CollectionMemberCount -Value {(Get-CMCollectionMember -Name $Global:Collection_Name).MemberCount}
$Obj
$Script:ALL_Patch_Servers += $Obj
}#end%
# $Script:outputBox.Text = $Script:ALL_Patch_Servers | Out-String
Display-Results #-Final_Result $Script:ALL_Patch_Servers
Write-Host "$Script:ALL_Patch_Servers"
}#endFunction
#############################################################################################################################################################
Function Ping_Collection {
Write-Host "Total Server Count: $($Script:ALL_Patch_Servers.count)" -ForegroundColor Green
Write-Host ""
SCCM-Module
#CD sccm-drive:
$Script:DeviceCollection_ServerNames1 = Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name
Set-Location c:
$Script:DeviceCollection_ServerNames1.Name | % {
If (Test-Connection $_ -Count 1 -ErrorAction SilentlyContinue ) {
#Write-Host "Responding:---- $_ " -ForegroundColor Green
$Script:outputBox.AppendText("Responding: $_")
$Responding += $_
}#endIf
Else {
$Script:outputBox.AppendText("NOT Responding: $_")
$NotResponding += $_ }
}#end%
write-host "-------------------------------------------------------"
Write-host "$($Responding.count) / $($DeviceCollection_ServerNames1.count) -- Responding" -foregroundcolor Green
Write-host "$($NotResponding.count) / $($DeviceCollection_ServerNames1.count) -- NOT Responding" -foregroundcolor Red
Write-Host "Servers NOT Responding: $NotResponding " -ForegroundColor Red
}#endFunction
#############################################################################################################################################################
Function Check_Uptime {
SCCM-Module
$Script:DeviceCollection_ServerNames1 = Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name
$Script:outputBox.Text = $Script:DeviceCollection_ServerNames1.name | % { gwmi win32_operatingsystem -ComputerName $_ -ErrorAction SilentlyContinue | select @{n="Server";e={$_.PSComputername}},@{n="LastBootup";e={$_.Converttodatetime($_.LastBootUpTime)}}} | sort LastBootup -descending | Out-String
}
#############################################################################################################################################################
Function Run-Tool {
Switch($Global:Select_Tool) {
Collection-Servers { Collection-Servers; Write-Host "Tool Selected: $Global:Select_Tool" }
Ping-Collection { Ping_Collection }
Check_Uptime { Check_Uptime }
}#endSwitch
#Clear-Variables
}#endFunction
#############################################################################################################################################################
Start-Form

133
dump/NA-Tool.ps1 Normal file
View File

@@ -0,0 +1,133 @@
# Import-Module E:\SCCM-Files\SCCM-Scripts\CMClient.psm1
######### From _Get-SCCMSoftwareUpdateStatus.ps1 #######
#Get-SCCMSoftwareUpdateStatus -DeploymentIDFromGUI
# $Status = Get-SCCMSoftwareUpdateStatus -DeploymentID 16777359 | select DeviceName
<#
$status | ? { $_.status -eq "InProgress" }
$Status | ? { $_.status -eq "unknown" }
$Status | ? { $_.status -eq "Error" }
$Status | ? { $_.status -eq "unknown" } | Measure | Select Count
#>
####################################################################################
###### From CCMClient.psm1 ####
<#
####################################################################################
####################################################################################
Invoke-CMClientUpdateScan -ComputerName
Invoke-CMClientUpdateDeploymentEvaluation -ComputerName
Invoke-CMClientMachinePolicyDownload -ComputerName
$comps | % {
Invoke-CMClientUpdateScan -ComputerName $_
Invoke-CMClientUpdateDeploymentEvaluation -ComputerName $_
Invoke-CMClientMachinePolicyDownload -ComputerName $_
}
####################################################################################
####################################################################################
$comps = ""
<#
$DeviceCollection_ServerNames.Name | % { $T = Test-Connection -ComputerName $_ -Count 1 -ErrorAction SilentlyContinue
If($T) { Write-Host "Server $_ -- Responding" -ForegroundColor Green } Else { Write-Host "Server $_ -- Not Responding" -ForegroundColor Red }
}
####################################################################################
###
$Responding = @()
$NotResponding = @()
$DeviceCollection_ServerNames.Name | % {
If (Test-Connection $_ -Count 1 -ErrorAction SilentlyContinue ) {
Write-Host "Responding:---- $_ " -ForegroundColor Green
$Responding += $_
}#endIf
Else { $NotResponding += $_ }
}#end%
write-host "-------------------------------------------------------"
Write-host "$($Responding.count) / $($DeviceCollection_ServerNames.Name.count) -- Responding" -foregroundcolor Green
Write-host "$($NotResponding.count) / $($DeviceCollection_ServerNames.Name.count) -- NOT Responding" -foregroundcolor Red
Write-Host "Servers NOT Responding: $NotResponding " -ForegroundColor Red
$Responding | % { gwmi win32_operatingsystem -ComputerName $_ -ErrorAction SilentlyContinue | select @{n="Server";e={$_.PSComputername}},@{n="LastBootup";e={$_.Converttodatetime($_.LastBootUpTime)}}} | sort LastBootup -descending | ft -autosize
####################################################################################
gwmi win32_operatingsystem -ComputerName $DeviceCollection_ServerNames.Name | select @{n="Server";e={$_.PSComputername}},@{n="LastBootup";e={$_.Converttodatetime($_.LastBootUpTime)}} | ft -autosize
#>
<#
####################################################################################
####################################################################################
$Downloaded_Updates = @()
$NOT_Downloaded_Updates = @()
$Count = 0
[INT]$Last_Writetime = "90"
$comps = $DeviceCollection_ServerNames.name
$comps | % {
$Computer = $_
$Check_Contents = gci "\\$Computer\c$\Windows\ccmcache" | ? { $_.lastwritetime -gt ((Get-Date).ADDDays((-$Last_Writetime))) }
If ($Check_Contents) { $Downloaded_Updates += $Computer }
Else { $NOT_Downloaded_Updates += $Computer }
}
If($Downloaded_Updates) {
$Downloaded_Updates | % {
$Updates_Downloaded = gci "\\$_\c$\Windows\ccmcache" | ? { $_.lastwritetime -gt ((Get-Date).ADDDays((-$Last_Writetime))) }
$Obj = New-Object -TypeName PSObject
$Obj | Add-Member -MemberType NoteProperty -Name Computer -Value $_
$Obj | Add-Member -MemberType NoteProperty -Name LastWriteTime -Value $Updates_Downloaded[-1].LastWriteTime
$Obj | Add-Member -MemberType NoteProperty -Name FileName -Value $Updates_Downloaded[-1].Name
$Obj | Add-Member -MemberType NoteProperty -Name UpdatesCount -Value ($Updates_Downloaded.count)
$Obj
}#end%
}#endIf
Write-Host ""
Write-Host "Nothing Downloaded for: $NOT_Downloaded_Updates" -ForegroundColor Yellow
Write-Host ""
Write-Host "Servers Downloaded patches count: $($Downloaded_Updates.count)" -ForegroundColor Green
Write-Host ""
####################################################################################
####################################################################################
#>
#>
######################## Check Installed Updates ###########################
# $DeviceCollection_ServerNames.Name | % { Get-HotFix -ComputerName $_ | sort installedon -Descending | Select -First 1}
# Get-HotFix -ComputerName pfnp013 | sort installedon -Descending | Select -First 10
# $DeviceCollection_Name

View File

@@ -0,0 +1,93 @@
 <#
Import-Module 'C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1'
New-PSDrive -Name SCCM-Drive -PSProvider "AdminUI.PS.Provider\CMSite" -Root "PNCRASCCM001.ccx.carecentrix.com" -Description "SCCM Site"
#>
<#
$Count = 0
# $D_ID = "16777912","16777914","16777916"
# $D_ID = "16777913","16777915","16777917"
# $D_ID = "16778068"
$Patching_Collections = "All - Inventory - Supporting Infrastructure", #------------------------0
"All - Inventory - Database", #------------------------1
"All - Inventory - Application Servers" #----------2
<#
$Patching_Collections = "All - Inventory - Infrastructure Servers", #------------------------0
"All - Inventory - Supporting Infrastructure", #------------------------1
"All - Inventory - Database", #------------------------2
"All - Inventory - Application Servers" #----------3
$D_ID = @("16777850"),"16777851")
$Patching_Collections = @("_6PM - Production Patching - Group 1"),
"_6PM - Production Patching - Group 2"
#>
#>
$Run_Collections = "0","1","2"
# $Run_Collections = "0"
$Script:Temp = @()
$Global:General = @()
Function Patch_Report {
Param($ID,$Name)
$ID
$T = Get-SCCMSoftwareUpdateStatus -DeploymentID $ID
write-host ""
write-host "------------------------------------------------------------------------------------"
write-host "$Name" -foregroundcolor white -backgroundcolor black
write-host "Total Servers: $($T.DeviceName.Count)" -foregroundcolor Black -Backgroundcolor white
$S = $T | ? { $_.Status -eq "InProgress" }
$Err = $T | ? { $_.Status -eq 'error' } | Select DeviceName
$Success = $T | ? { $_.Status -eq 'Success' } | Select DeviceName
$Un = $T | ? { $_.Status -eq 'Unknown' } | Select DeviceName
Write-Host "Unknown: $($Un.count)" -ForegroundColor Gray
Write-Host "Success: $($Success.Devicename.count)" -ForegroundColor Green
write-host "InProgress: $($S.DeviceName.count)" -foregroundcolor Cyan
write-host "Error Count: $($err.DeviceName.count)" -foregroundcolor red
#Write-Host "Error: $($Err.count)"
$Temp = $Err
$Global:General = $Err
}#endFunction
Write-Host "#####################################################################################" -BackgroundColor green -ForegroundColor black
$Run_Collections | % { Patch_Report -ID $D_ID[$_] -Name $Patching_Collections[$_] }
<#
$DeviceCollection_ServerNames.Name | % { $T = Test-Connection -ComputerName $_ -Count 1 -ErrorAction SilentlyContinue
If($T) { Write-Host "Server $_ -- Responding" -ForegroundColor Green } Else { Write-Host "Server $_ -- Not Responding" -ForegroundColor Red }
}
# $DeviceCollection_ServerNames.Name | % { gwmi win32_operatingsystem -ComputerName $_ | select @{n="Server";e={$_.PSComputername}},@{n="LastBootup";e={$_.Converttodatetime($_.LastBootUpTime)}}} | sort server| ft -autosize
# gwmi win32_operatingsystem -ComputerName $Temp.DeviceName | select @{n="Server";e={$_.PSComputername}},@{n="LastBootup";e={$_.Converttodatetime($_.LastBootUpTime)}} | ft -autosize
#>

68
dump/Patching-Status.ps1 Normal file
View File

@@ -0,0 +1,68 @@
 <#
$T = Get-SCCMSoftwareUpdateStatus -DeploymentID 16777538 # _11PM - Production Patching
$S = $T | ? { $_.Status -eq "InProgress" }
write-host ""
write-host "------------------------------------------------------------------------------------"
write-host "_11PM - Production Patching" -foregroundcolor white -backgroundcolor black
write-host "Total Servers: $($S.DeviceName.count)" -foregroundcolor Black -Backgroundcolor white
$Err = $T | ? { $_.Status -eq 'error' } | Select DeviceName
$Success = $T | ? { $_.Status -eq 'Success' } | Select DeviceName
write-host "Error Count: $($err.count)" -foregroundcolor Yellow
write-host "InProgress: $($S.DeviceName.count)" -foregroundcolor Cyan
#>
<#
$T = Get-SCCMSoftwareUpdateStatus -DeploymentID 16777541 # _9PM - Production Patching
$S = $T | ? { $_.Status -eq "InProgress" }
write-host ""
write-host "------------------------------------------------------------------------------------"
write-host "_9PM - Production Patching" -foregroundcolor white -backgroundcolor black
write-host "Total Servers: $($S.DeviceName.count)" -foregroundcolor Black -Backgroundcolor white
$Err = $T | ? { $_.Status -eq 'error' } | Select DeviceName
$Success = $T | ? { $_.Status -eq 'Success' } | Select DeviceName
write-host "Error Count: $($err.count)" -foregroundcolor Yellow
write-host "InProgress: $($S.DeviceName.count)" -foregroundcolor Cyan
#>
<#
$T = Get-SCCMSoftwareUpdateStatus -DeploymentID 16777540 # _6PM - Production Patching
$S = $T | ? { $_.Status -eq "InProgress" }
write-host ""
write-host "------------------------------------------------------------------------------------"
write-host "_6PM - Production Patching" -foregroundcolor white -backgroundcolor black
write-host "Total Servers: $($S.DeviceName.count)" -foregroundcolor Black -Backgroundcolor white
$Err = $T | ? { $_.Status -eq 'error' } | Select DeviceName
$Success = $T | ? { $_.Status -eq 'Success' } | Select DeviceName
write-host "Error Count: $($err.count)" -foregroundcolor Yellow
write-host "InProgress: $($S.DeviceName.count)" -foregroundcolor Cyan
write-host "Success: $($Success.DeviceName.count)" -foregroundcolor Green
#>
<#
$T = Get-SCCMSoftwareUpdateStatus -DeploymentID 16777539 # _11PM - Production Patching - File Servers
$S = $T | ? { $_.Status -eq "InProgress" }
$S.DeviceName.count
write-host ""
write-host "------------------------------------------------------------------------------------"
write-host "_11PM - Production Patching - File Servers" -foregroundcolor white -backgroundcolor black
write-host "Total Servers: $($S.DeviceName.count)" -foregroundcolor Black -Backgroundcolor white
$Err = $T | ? { $_.Status -eq 'error' } | Select DeviceName
$Success = $T | ? { $_.Status -eq 'Success' } | Select DeviceName
write-host "Error Count: $($err.count)" -foregroundcolor Yellow
write-host "InProgress: $($S.DeviceName.count)" -foregroundcolor Cyan
write-host "Success: $($Success.DeviceName.count)" -foregroundcolor Green
#>
#
# Test-Connection -ComputerName $s.DeviceName -Count 1
# gwmi win32_operatingsystem -ComputerName $s.devicename | select @{n="Server";e={$_.PSComputername}},@{n="LastBootup";e={$_.Converttodatetime($_.LastBootUpTime)}} | sort LastBootup -descending | ft -autosize
# gwmi win32_operatingsystem -ComputerName PVST002 | select @{n="Server";e={$_.PSComputername}},@{n="LastBootup";e={$_.Converttodatetime($_.LastBootUpTime)}} | ft -autosize

View File

@@ -0,0 +1,6 @@
[InternetShortcut]
URL=https://gallery.technet.microsoft.com/systemcenter/Remote-software-center-044e3514/view/Discussions#content
IDList=
HotKey=0
IconFile=C:\Users\nnazmat\AppData\Local\Mozilla\Firefox\Profiles\20v5hisb.default-release\shortcutCache\2y5eSHQr6ejNZZQJXZyJKg==.ico
IconIndex=0

184
dump/RPC2.PS1 Normal file
View File

@@ -0,0 +1,184 @@
# Author: Ryan Ries [MSFT]
# Updated By: Abdulrehman Altaf
# Origianl date: 15 Feb. 2014
# updated date: 27 September 2018
#Requires -Version 3
Function Test-RPC
{
[CmdletBinding(SupportsShouldProcess=$True)]
Param([Parameter(ValueFromPipeline=$True)][String[]]$ComputerName = 'localhost')
BEGIN
{
Set-StrictMode -Version Latest
$PInvokeCode = @'
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
public class Rpc
{
// I found this crud in RpcDce.h
[DllImport("Rpcrt4.dll", CharSet = CharSet.Auto)]
public static extern int RpcBindingFromStringBinding(string StringBinding, out IntPtr Binding);
[DllImport("Rpcrt4.dll")]
public static extern int RpcBindingFree(ref IntPtr Binding);
[DllImport("Rpcrt4.dll", CharSet = CharSet.Auto)]
public static extern int RpcMgmtEpEltInqBegin(IntPtr EpBinding,
int InquiryType, // 0x00000000 = RPC_C_EP_ALL_ELTS
int IfId,
int VersOption,
string ObjectUuid,
out IntPtr InquiryContext);
[DllImport("Rpcrt4.dll", CharSet = CharSet.Auto)]
public static extern int RpcMgmtEpEltInqNext(IntPtr InquiryContext,
out RPC_IF_ID IfId,
out IntPtr Binding,
out Guid ObjectUuid,
out IntPtr Annotation);
[DllImport("Rpcrt4.dll", CharSet = CharSet.Auto)]
public static extern int RpcBindingToStringBinding(IntPtr Binding, out IntPtr StringBinding);
public struct RPC_IF_ID
{
public Guid Uuid;
public ushort VersMajor;
public ushort VersMinor;
}
public static List<int> QueryEPM(string host)
{
List<int> ports = new List<int>();
int retCode = 0; // RPC_S_OK
IntPtr bindingHandle = IntPtr.Zero;
IntPtr inquiryContext = IntPtr.Zero;
IntPtr elementBindingHandle = IntPtr.Zero;
RPC_IF_ID elementIfId;
Guid elementUuid;
IntPtr elementAnnotation;
try
{
retCode = RpcBindingFromStringBinding("ncacn_ip_tcp:" + host, out bindingHandle);
if (retCode != 0)
throw new Exception("RpcBindingFromStringBinding: " + retCode);
retCode = RpcMgmtEpEltInqBegin(bindingHandle, 0, 0, 0, string.Empty, out inquiryContext);
if (retCode != 0)
throw new Exception("RpcMgmtEpEltInqBegin: " + retCode);
do
{
IntPtr bindString = IntPtr.Zero;
retCode = RpcMgmtEpEltInqNext (inquiryContext, out elementIfId, out elementBindingHandle, out elementUuid, out elementAnnotation);
if (retCode != 0)
if (retCode == 1772)
break;
retCode = RpcBindingToStringBinding(elementBindingHandle, out bindString);
if (retCode != 0)
throw new Exception("RpcBindingToStringBinding: " + retCode);
string s = Marshal.PtrToStringAuto(bindString).Trim().ToLower();
if(s.StartsWith("ncacn_ip_tcp:"))
ports.Add(int.Parse(s.Split('[')[1].Split(']')[0]));
RpcBindingFree(ref elementBindingHandle);
}
while (retCode != 1772); // RPC_X_NO_MORE_ENTRIES
}
catch(Exception ex)
{
Console.WriteLine(ex);
return ports;
}
finally
{
RpcBindingFree(ref bindingHandle);
}
return ports;
}
}
'@
}
PROCESS
{
ForEach($Computer In $ComputerName)
{
If($PSCmdlet.ShouldProcess($Computer))
{
[Bool]$EPMOpen = $False
$Socket = New-Object Net.Sockets.TcpClient
Try
{
$Socket.Connect($Computer, 135)
If ($Socket.Connected)
{
$EPMOpen = $True
}
$Socket.Close()
}
Catch
{
$Socket.Dispose()
}
If ($EPMOpen)
{
Add-Type $PInvokeCode
$RPCPorts = [Rpc]::QueryEPM($Computer)
[Bool]$AllPortsOpen = $True
Foreach ($Port In $RPCPorts)
{
$Socket = New-Object Net.Sockets.TcpClient
Try
{
$Socket.Connect($Computer, $Port)
If (!$Socket.Connected)
{
$AllPortsOpen = $False
}
$Socket.Close()
}
Catch
{
$AllPortsOpen = $False
$Socket.Dispose()
}
}
#[PSObject]@{'ComputerName' = $Computer; 'EndPointMapperOpen' = $EPMOpen; 'RPCPortsInUse' = $RPCPorts; 'AllRPCPortsOpen' = $AllPortsOpen}
Write-Host "open RPC ports on $Computer are:" -BackgroundColor Green -ForegroundColor Black
Write-Host "------------------Summary------------------"
[PSObject]@{'ComputerName' = $Computer; 'EndPointMapperOpen' = $EPMOpen; 'AllRPCPortsOpen' = $AllPortsOpen; 'RPCPortsInUse' = $RPCPorts;}
Write-Host "------------------Port Detail------------------"
foreach ($all_rpc_prots in $RPCPorts){
[PSObject]@{'RPCPortsInUse' = $all_rpc_prots;'AllRPCPortsOpen' = $AllPortsOpen; }
}
}
Else
{
[PSObject]@{'ComputerName' = $Computer; 'EndPointMapperOpen' = $EPMOpen}
}
}
}
}
END
{
}
}
Test-RPC 10.162.98.80

View File

@@ -0,0 +1,12 @@
$computer = "dfnp002"
$namespace = "ROOT\ccm\Policy\Machine\ActualConfig"
$classname = "CCM_RebootSettings"
Write-Output "====================================="
Write-Output "COMPUTER : $computer "
Write-Output "CLASS : $classname "
Write-Output "====================================="
Get-WmiObject -Class $classname -ComputerName $computer -Namespace $namespace |
Select-Object * -ExcludeProperty PSComputerName, Scope, Path, Options, ClassPath, Properties, SystemProperties, Qualifiers, Site, Container |
Format-List -Property [a-z]*

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,13 @@
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,11
Prop4=31,Remotely Restart-SCCMSyncCycle Using Powershell
[InternetShortcut]
IDList=
URL=https://thesysadminchannel.com/remotely-restart-sccmsynccycle-using-powershell/
IconFile=https://thesysadminchannel.com/wp-content/uploads/2018/03/favicon.png
IconIndex=1
[{A7AF692E-098D-4C08-A225-D433CA835ED0}]
Prop5=3,0
Prop9=19,0
[{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}]
Prop5=8,Microsoft.Website.16B02C56.2527D155

View File

@@ -0,0 +1,129 @@
Function Restart-SCCMSyncCycle {
<#
.Synopsis
Remotely restarts sccm service cycles.
.DESCRIPTION
This function restarts all sccm policies on a remote client so that the client can immediately get any pending software updates or inventory.
.NOTES
Name: Restart-SCCMSyncCycle
Author: theSysadminChannel
Version: 1
DateCreated: 2017-02-09
.LINK
https://thesysadminchannel.com/remotely-restart-sccmsynccycle-using-powershell -
.PARAMETER ComputerName
The computer to which connectivity will be checked
.EXAMPLE
Restart-SCCMSyncCycle -Computername Pactest-1
Description:
Will restart all sccm services on a remote machine.
.EXAMPLE
Restart-SCCMSyncCycle -ComputerName pactest-1, pactest-2, pactest-3
Description:
Will generate a list of installed programs on pactest-1, pactest-2 and pactest-3
#>
[CmdletBinding()]
param(
[Parameter(
ValueFromPipeline=$true,
ValueFromPipelineByPropertyName=$true,
Position=0)]
[string[]] $ComputerName = $env:COMPUTERNAME
)
Foreach ($Computer in $ComputerName ) {
try {
Write-Host "====================================================================="
Write-Output "$Computer : Machine Policy Evaluation Cycle"
Invoke-WMIMethod -ComputerName $Computer -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000022}" -ErrorAction Stop | select -ExpandProperty PSComputerName | Out-Null
Write-Output "$Computer : Application Deployment Evaluation Cycle"
Invoke-WMIMethod -ComputerName $Computer -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000121}" | select -ExpandProperty PSComputerName | Out-Null
# Write-Output "$Computer : Discovery Data Collection Cycle"
# Invoke-WMIMethod -ComputerName $Computer -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000003}" | select -ExpandProperty PSComputerName | Out-Null
# Write-Output "$Computer : File Collection Cycle"
# Invoke-WMIMethod -ComputerName $Computer -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000010}" | select -ExpandProperty PSComputerName | Out-Null
# Write-Output "$Computer : Hardware Inventory Cycle"
# Invoke-WMIMethod -ComputerName $Computer -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000001}" | select -ExpandProperty PSComputerName | Out-Null
Write-Output "$Computer : Machine Policy Retrieval Cycle"
Invoke-WMIMethod -ComputerName $Computer -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000021}" | select -ExpandProperty PSComputerName | Out-Null
Write-Output "$Computer : Software Inventory Cycle"
Invoke-WMIMethod -ComputerName $Computer -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000002}" | select -ExpandProperty PSComputerName | Out-Null
# Write-Output "$Computer : Software Metering Usage Report Cycle"
# Invoke-WMIMethod -ComputerName $Computer -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000031}" | select -ExpandProperty PSComputerName | Out-Null
Write-Output "$Computer : Software Update Deployment Evaluation Cycle"
Invoke-WMIMethod -ComputerName $Computer -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000114}" | select -ExpandProperty PSComputerName | Out-Null
#Write-Output "$Computer : Software Update Scan Cycle"
#Invoke-WMIMethod -ComputerName $Computer -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000113}" | select -ExpandProperty PSComputerName | Out-Null
# Write-Output "$Computer : State Message Refresh"
# Invoke-WMIMethod -ComputerName $Computer -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000111}" | select -ExpandProperty PSComputerName | Out-Null
#Write-Output "$Computer : User Policy Retrieval Cycle"
#Invoke-WMIMethod -ComputerName $Computer -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000026}" | select -ExpandProperty PSComputerName | Out-Null
#Write-Output "$Computer : User Policy Evaluation Cycle"
#Invoke-WMIMethod -ComputerName $Computer -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000027}" | select -ExpandProperty PSComputerName | Out-Null
# Write-Output "$Computer : Windows Installers Source List Update Cycle"
# Invoke-WMIMethod -ComputerName $Computer -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000032}" | select -ExpandProperty PSComputerName | Out-Null
sleep 1
}
catch {
Write-Host $Computer.toUpper() "is not online or Account is locked out" -ForegroundColor:Red
Write-Host
Write-Host
}
}
}
# Restart-SCCMSyncCycle pver001
# Restart-SCCMSyncCycle
# Restart-SCCMSyncCycle $DeviceCollection_ServerNames.name
# Restart-SCCMSyncCycle $Script:ALL_Patch_Servers.Server

View File

@@ -0,0 +1,6 @@
[InternetShortcut]
URL=https://gallery.technet.microsoft.com/systemcenter/SCCM-Deployment-Dashboard-f2b395f5
IDList=
HotKey=0
IconFile=C:\Users\nnazmat\AppData\Local\Mozilla\Firefox\Profiles\20v5hisb.default-release\shortcutCache\wiVy1vvHEfWoHxaKfKs0sQ==.ico
IconIndex=0

Binary file not shown.

View File

@@ -0,0 +1,44 @@
Software Updates Client Computer Log Files
* CAS.log - Provides information about the process of downloading software updates to the local cache and cache management.
* CIAgent.log - Provides information about processing configuration items, including software updates.
* LocationServices.log - Provides information about the location of the WSUS server when a scan is initiated on the client.
* PatchDownloader.log - Provides information about the process for downloading software updates from the update source to the download destination on the site server. This log is only on the client computer configured as the synchronization host for the Inventory Tool for Microsoft Updates.
* PolicyAgent.log - Provides information about the process for downloading, compiling, and deleting policies on client computers.
* PolicyEvaluator - Provides information about the process for evaluating policies on client computers, including policies from software updates.
* RebootCoordinator.log - Provides information about the process for coordinating system restarts on client computers after software update installations.
* ScanAgent.log - Provides information about the scan requests for software updates, what tool is requested for the scan, the WSUS location, and so on.
* ScanWrapper - Provides information about the prerequisite checks and the scan process initialization for the Inventory Tool for Microsoft Updates on Systems Management Server (SMS) 2003 clients.
* SdmAgent.log - Provides information about the process for verifying and decompressing packages that contain configuration item information for software updates.
* ServiceWindowManager.log - Provides information about the process for evaluating configured maintenance windows.
* smscliUI.log - Provides information about the Configuration Manager Control Panel user interactions, such as initiating a Software Updates Scan Cycle from the Configuration Manager Properties dialog box, opening the Program Download Monitor, and so on.
* SmsWusHandler - Provides information about the scan process for the Inventory Tool for Microsoft Updates on SMS 2003 client computers.
* StateMessage.log - Provides information about when software updates state messages are created and sent to the management point.
* UpdatesDeployment.log - Provides information about the deployment on the client, including software update activation, evaluation, and enforcement. Verbose logging shows additional information about the interaction with the client user interface.
* UpdatesHandler.log - Provides information about software update compliance scanning and about the download and installation of software updates on the client.
* UpdatesStore.log - Provides information about the compliance status for the software updates that were assessed during the compliance scan cycle.
* WUAHandler.log - Provides information about when the Windows Update Agent on the client searches for software updates.
* WUSSyncXML.log - Provides information about the Inventory Tool for the Microsoft Updates synchronization process. This log is only on the client computer configured as the synchronization host for the Inventory Tool for Microsoft Updates.
* Windows Update Agent Log File
* WindowsUpdate.log - Provides information about when the Windows Update Agent connects to the WSUS server and retrieves the software updates for compliance assessment and whether there are updates to the agent components.

11
dump/SCCM-Powershell.txt Normal file
View File

@@ -0,0 +1,11 @@
Right-click the Windows PowerShell icon and choose "Run as administrator".
Type CD 'C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin' and hit enter.
Type Import-Module .\ConfigurationManager.psd1 and run it.
Here's the crucial missing step. Enter New-PSDrive -Name [yoursitecode] -PSProvider "AdminUI.PS.Provider\CMSite" -Root "[your SCCM server's FQDN]" -Description "SCCM Site"
Now we can connect to the site. Enter CD ABC:, where ABC is your site code. The colon is necessary!
=============================================================================================================================================
Import-Module 'C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1'
New-PSDrive -Name SCCM-Drive -PSProvider "AdminUI.PS.Provider\CMSite" -Root "PNCRASCCM001.ccx.carecentrix.com" -Description "SCCM Site"

8
dump/SCCM-Reports.txt Normal file
View File

@@ -0,0 +1,8 @@
Report Names:
- States 5 - States for an update in a deployment(secondary)
- States 4 - Computers in a specific state for a deployment(secondary)
- Software 02D - Computers with specific software installed
- Software 01A - Summary of installed software in a specific collection
- IP - All subnets by subnet mask
-

View File

@@ -0,0 +1,3 @@
"Server","ClientInstalled","CollectionName"
"W2012A","True","Nabil - Test Collection"
"W2012B","True","Nabil - Test Collection"
1 Server ClientInstalled CollectionName
2 W2012A True Nabil - Test Collection
3 W2012B True Nabil - Test Collection

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,218 @@
#------------------------------------------------------------------------
# Source File Information (DO NOT MODIFY)
# Source ID: b24654a3-c952-4b96-8e01-c56d9800c4a7
# Source File: FirstForm4-tabs.psf
#------------------------------------------------------------------------
#region File Recovery Data (DO NOT MODIFY)
<#RecoveryData:
UwsAAB+LCAAAAAAABADFVl1vmzAUfZ+0/2DxzELIR9NIBKkhjVStXasl6/ZWGbhJvBo7sk0T9utn
B5Lla4VKaSokBPY5Pvf6XF/wvkPEX0BkA6ww0g+ScNazGjXX8j9/Qsi7F2RKGKZDQuEbTsAfEiHV
kIuk9UXhUNbmcuI5B6icG/6GSCGVzaFnjTKpIKn9JCzmC1kzK+R3Gx2bstFjEUyrVjeXjYKUqlRA
j0GqBKY2ekhDSqKvkI35M7Be2OngdtS+cLvNFtQvuxZiOpSeNdHruRaKZoTGQuOsgDMlOJV5ijrQ
B8HnIFRWEK5SxUcRpjAgCTAThIZe2Mhtes4aWka94zFY/lArlXICSoCpEfmjCd22TvSi1SolmV22
/FVqpdgxLJWJRSSH0OsXrV3gbjmOizWfzLPnrGbX0HI7A56EvM+X725pZIRCvnzV1iPuUMoXAz1m
+WORwsFuHDJM4FgpwqbXDIcU4srMG53/VigaYEZ2d2+khF7ZRomMuKAkPMUO+fdMh2e0PkB7vOAf
pz0TsJ95BZ9ueYSVlrZ8t3Wpz16nAucOL00VDfiCFTY36hVo+Znd1G4FRt4U3IZro0YV/BiHNyyG
peYcQ28f9hFQfZohXuGDGWZTU9yb4J6Oze81BCfvCNX7Qz9VirN37w7hSuaNveFfHTTr3Yp1kBta
yFW2s9PWbh5+Sl5zs0p15V2+ejA/JDwSmWI6UhmFPo6eA065+E+D2zF79+VKSki0MSDX2GIk8094
wD1ns+q+Sl5O59A4ecmWK5ofs/MICbxYdeW3a9Wbk/akM3HduF3HTVyu9SuhZ8kp4AJOL7R5zUve
c7Z/ov2/L8SajlMLAAA=#>
#endregion
<#
.NOTES
--------------------------------------------------------------------------------
Code generated by: SAPIEN Technologies, Inc., PowerShell Studio 2016 v5.2.124
Generated on: 7/21/2016 3:30 PM
Generated by: administrator
--------------------------------------------------------------------------------
.DESCRIPTION
GUI script generated by PowerShell Studio 2016
#>
#----------------------------------------------
#region Application Functions
#----------------------------------------------
#endregion Application Functions
#----------------------------------------------
# Generated Form Function
#----------------------------------------------
function Call-FirstForm4-tabs_psf {
#----------------------------------------------
#region Import the Assemblies
#----------------------------------------------
[void][reflection.assembly]::Load('System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
[void][reflection.assembly]::Load('System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
[void][reflection.assembly]::Load('System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a')
#endregion Import Assemblies
#----------------------------------------------
#region Generated Form Objects
#----------------------------------------------
[System.Windows.Forms.Application]::EnableVisualStyles()
$form1 = New-Object 'System.Windows.Forms.Form'
$combobox1 = New-Object 'System.Windows.Forms.ComboBox'
$button1 = New-Object 'System.Windows.Forms.Button'
$button_ComboBoxSelection = New-Object 'System.Windows.Forms.Button'
$InitialFormWindowState = New-Object 'System.Windows.Forms.FormWindowState'
$TextBox_Display = New-Object 'System.Windows.Forms.TextBox'
#endregion Generated Form Objects
#----------------------------------------------
# User Generated Script
#----------------------------------------------
$combobox1_SelectedIndexChanged={
#TODO: Place custom script here
}
$form1_Load={
#TODO: Place custom script here
}
$button1_Click={
#TODO: Place custom script here
Ba
}
$button_ComboBoxSelection_Click={
$TextBox_Display.text = $Combobox1.SelectedItem
}
$TextBox_Display_TextChanged={
}
# --End User Generated Script--
#----------------------------------------------
#region Generated Events
#----------------------------------------------
$Form_StateCorrection_Load=
{
#Correct the initial state of the form to prevent the .Net maximized form issue
$form1.WindowState = $InitialFormWindowState
}
$Form_Cleanup_FormClosed=
{
#Remove all event handlers from the controls
try
{
$combobox1.remove_SelectedIndexChanged($combobox1_SelectedIndexChanged)
$form1.remove_Load($form1_Load)
$form1.remove_Load($Form_StateCorrection_Load)
$form1.remove_FormClosed($Form_Cleanup_FormClosed)
}
catch [Exception]
{ }
}
#endregion Generated Events
#----------------------------------------------
#region Generated Form Code
#----------------------------------------------
$form1.SuspendLayout()
#
# form1
#
$form1.Controls.Add($combobox1)
$form1.Controls.Add($button1)
$form1.Controls.Add($button_ComboBoxSelection)
$form1.Controls.Add($TextBox_Display)
$form1.AutoScaleDimensions = '6, 13'
$form1.AutoScaleMode = 'Font'
$form1.ClientSize = '950, 644'
$form1.Name = 'form1'
$form1.Text = 'Form'
$form1.add_Load($form1_Load)
#
# combobox1
#
$combobox1.AllowDrop = $True
$combobox1.FormattingEnabled = $True
#$combobox1.Items.AddRange("")
<#
[void]$combobox1.Items.Add('One')
[void]$combobox1.Items.Add('Two')
[void]$combobox1.Items.Add('Three')
#>
#
#
$TextBox_Display.Location = '278, 120'
$TextBox_Display.Name = 'VCenterUserPassword'
$TextBox_Display.Size = '132, 20'
$TextBox_Display.TabIndex = 8
$TextBox_Display.add_TextChanged($TextBox_Display_TextChanged)
#
$combobox1.Location = '148, 67'
#$combobox1.MaxDropDownItems = 20
$Combobox1.Text="- Select -"
$combobox1.Name = 'combobox1'
$combobox1.Size = '121, 21'
$combobox1.TabIndex = 1
$combobox1.add_SelectedIndexChanged($combobox1_SelectedIndexChanged)
#
# button1
#
$button1.Location = '309, 67'
$button1.Name = 'button1'
$button1.Size = '75, 23'
$button1.TabIndex = 0
$button1.Text = 'button1'
$button1.UseVisualStyleBackColor = $True
$form1.ResumeLayout()
$button1.add_Click($button1_Click)
#endregion Generated Form Code
#
# button_ComboBoxSelection
$button_ComboBoxSelection.Location = '309, 40'
$button_ComboBoxSelection.Name = 'button_ComboBoxSelection'
$button_ComboBoxSelection.Size = '75, 23'
$button_ComboBoxSelection.TabIndex = 1
$button_ComboBoxSelection.Text = 'Select Item'
$button_ComboBoxSelection.add_Click($button_ComboBoxSelection_Click)
#
#----------------------------------------------
#Save the initial state of the form
$InitialFormWindowState = $form1.WindowState
#Init the OnLoad event to correct the initial state of the form
$form1.add_Load($Form_StateCorrection_Load)
#Clean up the control events
$form1.add_FormClosed($Form_Cleanup_FormClosed)
#Show the Form
return $form1.ShowDialog()
} #End Function
Function Ba {
#$combobox1.Items.Add('a')
$combobox1.Items.Clear()
$P = Get-Process | select -ExpandProperty ProcessName
$P | % { $combobox1.Items.Add($_) }
}
#Call the form
Call-FirstForm4-tabs_psf | Out-Null

View File

@@ -0,0 +1,222 @@
#------------------------------------------------------------------------
# Source File Information (DO NOT MODIFY)
# Source ID: b24654a3-c952-4b96-8e01-c56d9800c4a7
# Source File: FirstForm4-tabs.psf
#------------------------------------------------------------------------
#region File Recovery Data (DO NOT MODIFY)
<#RecoveryData:
UwsAAB+LCAAAAAAABADFVl1vmzAUfZ+0/2DxzELIR9NIBKkhjVStXasl6/ZWGbhJvBo7sk0T9utn
B5Lla4VKaSokBPY5Pvf6XF/wvkPEX0BkA6ww0g+ScNazGjXX8j9/Qsi7F2RKGKZDQuEbTsAfEiHV
kIuk9UXhUNbmcuI5B6icG/6GSCGVzaFnjTKpIKn9JCzmC1kzK+R3Gx2bstFjEUyrVjeXjYKUqlRA
j0GqBKY2ekhDSqKvkI35M7Be2OngdtS+cLvNFtQvuxZiOpSeNdHruRaKZoTGQuOsgDMlOJV5ijrQ
B8HnIFRWEK5SxUcRpjAgCTAThIZe2Mhtes4aWka94zFY/lArlXICSoCpEfmjCd22TvSi1SolmV22
/FVqpdgxLJWJRSSH0OsXrV3gbjmOizWfzLPnrGbX0HI7A56EvM+X725pZIRCvnzV1iPuUMoXAz1m
+WORwsFuHDJM4FgpwqbXDIcU4srMG53/VigaYEZ2d2+khF7ZRomMuKAkPMUO+fdMh2e0PkB7vOAf
pz0TsJ95BZ9ueYSVlrZ8t3Wpz16nAucOL00VDfiCFTY36hVo+Znd1G4FRt4U3IZro0YV/BiHNyyG
peYcQ28f9hFQfZohXuGDGWZTU9yb4J6Oze81BCfvCNX7Qz9VirN37w7hSuaNveFfHTTr3Yp1kBta
yFW2s9PWbh5+Sl5zs0p15V2+ejA/JDwSmWI6UhmFPo6eA065+E+D2zF79+VKSki0MSDX2GIk8094
wD1ns+q+Sl5O59A4ecmWK5ofs/MICbxYdeW3a9Wbk/akM3HduF3HTVyu9SuhZ8kp4AJOL7R5zUve
c7Z/ov2/L8SajlMLAAA=#>
#endregion
<#
.NOTES
--------------------------------------------------------------------------------
Code generated by: SAPIEN Technologies, Inc., PowerShell Studio 2016 v5.2.124
Generated on: 7/21/2016 3:30 PM
Generated by: administrator
--------------------------------------------------------------------------------
.DESCRIPTION
GUI script generated by PowerShell Studio 2016
#>
#----------------------------------------------
#region Application Functions
#----------------------------------------------
#endregion Application Functions
#----------------------------------------------
# Generated Form Function
#----------------------------------------------
function Call-FirstForm4-tabs_psf {
#----------------------------------------------
#region Import the Assemblies
#----------------------------------------------
[void][reflection.assembly]::Load('System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
[void][reflection.assembly]::Load('System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
[void][reflection.assembly]::Load('System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a')
#endregion Import Assemblies
#----------------------------------------------
#region Generated Form Objects
#----------------------------------------------
[System.Windows.Forms.Application]::EnableVisualStyles()
$form1 = New-Object 'System.Windows.Forms.Form'
$combobox1 = New-Object 'System.Windows.Forms.ComboBox'
$button1 = New-Object 'System.Windows.Forms.Button'
$button_ComboBoxSelection = New-Object 'System.Windows.Forms.Button'
$InitialFormWindowState = New-Object 'System.Windows.Forms.FormWindowState'
$TextBox_Display = New-Object 'System.Windows.Forms.TextBox'
#endregion Generated Form Objects
#----------------------------------------------
# User Generated Script
#----------------------------------------------
$combobox1_SelectedIndexChanged={
#TODO: Place custom script here
}
$form1_Load={
#TODO: Place custom script here
}
$button1_Click={
#TODO: Place custom script here
Ba
}
$button_ComboBoxSelection_Click={
$TextBox_Display.text = $Combobox1.SelectedItem
}
$TextBox_Display_TextChanged={
}
# --End User Generated Script--
#----------------------------------------------
#region Generated Events
#----------------------------------------------
$Form_StateCorrection_Load=
{
#Correct the initial state of the form to prevent the .Net maximized form issue
$form1.WindowState = $InitialFormWindowState
}
$Form_Cleanup_FormClosed=
{
#Remove all event handlers from the controls
try
{
$combobox1.remove_SelectedIndexChanged($combobox1_SelectedIndexChanged)
$form1.remove_Load($form1_Load)
$form1.remove_Load($Form_StateCorrection_Load)
$form1.remove_FormClosed($Form_Cleanup_FormClosed)
}
catch [Exception]
{ }
}
#endregion Generated Events
#----------------------------------------------
#region Generated Form Code
#----------------------------------------------
$form1.SuspendLayout()
#
# form1
#
$form1.Controls.Add($combobox1)
$form1.Controls.Add($button1)
$form1.Controls.Add($button_ComboBoxSelection)
$form1.Controls.Add($TextBox_Display)
$form1.AutoScaleDimensions = '6, 13'
$form1.AutoScaleMode = 'Font'
$form1.ClientSize = '950, 644'
$form1.Name = 'form1'
$form1.Text = 'Form'
$form1.add_Load($form1_Load)
#
# combobox1
#
$combobox1.AllowDrop = $True
$combobox1.FormattingEnabled = $True
#$combobox1.Items.AddRange("")
<#
[void]$combobox1.Items.Add('One')
[void]$combobox1.Items.Add('Two')
[void]$combobox1.Items.Add('Three')
#>
#
#
$TextBox_Display.Location = '278, 120'
$TextBox_Display.Name = 'VCenterUserPassword'
$TextBox_Display.Size = '132, 20'
$TextBox_Display.TabIndex = 8
$TextBox_Display.add_TextChanged($TextBox_Display_TextChanged)
#
$combobox1.Location = '148, 67'
#$combobox1.MaxDropDownItems = 20
$Combobox1.Text="- Select -"
$combobox1.Name = 'combobox1'
$combobox1.Size = '121, 21'
$combobox1.TabIndex = 1
$combobox1.add_SelectedIndexChanged($combobox1_SelectedIndexChanged)
#
# button1
#
$button1.Location = '309, 67'
$button1.Name = 'button1'
$button1.Size = '75, 23'
$button1.TabIndex = 0
$button1.Text = 'button1'
$button1.UseVisualStyleBackColor = $True
$form1.ResumeLayout()
$button1.add_Click($button1_Click)
#endregion Generated Form Code
#
# button_ComboBoxSelection
$button_ComboBoxSelection.Location = '309, 40'
$button_ComboBoxSelection.Name = 'button_ComboBoxSelection'
$button_ComboBoxSelection.Size = '75, 23'
$button_ComboBoxSelection.TabIndex = 1
$button_ComboBoxSelection.Text = 'Select Item'
$button_ComboBoxSelection.add_Click($button_ComboBoxSelection_Click)
#
#----------------------------------------------
#Save the initial state of the form
$InitialFormWindowState = $form1.WindowState
#Init the OnLoad event to correct the initial state of the form
$form1.add_Load($Form_StateCorrection_Load)
#Clean up the control events
$form1.add_FormClosed($Form_Cleanup_FormClosed)
#Show the Form
return $form1.ShowDialog()
} #End Function
Function Ba {
#$combobox1.Items.Add('a')
$combobox1.Items.Clear()
$P = Get-Process w* | select -ExpandProperty ProcessName
$P | % { $combobox1.Items.Add($_) }
}
#Call the form
Call-FirstForm4-tabs_psf | Out-Null

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,43 @@
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
$objForm = New-Object Windows.Forms.Form
$objForm.Text = "Select a Date"
$objForm.Size = New-Object Drawing.Size @(490,250)
$objForm.StartPosition = "CenterScreen"
$objForm.KeyPreview = $True
$objForm.Add_KeyDown({
if ($_.KeyCode -eq "Enter")
{
$script:dtmDate=$objCalendar.SelectionStart
$objForm.Close()
}
})
$objForm.Add_KeyDown({
if ($_.KeyCode -eq "Escape")
{
$objForm.Close()
}
})
$objCalendar = New-Object System.Windows.Forms.MonthCalendar
$objCalendar.Text = "Start"
$objCalendar.ShowTodayCircle = $False
$objCalendar.MaxSelectionCount = 1
$objForm.Controls.Add($objCalendar)
$objForm.Topmost = $True
$objForm.Add_Shown({$objForm.Activate()})
[void] $objForm.ShowDialog()
if ($dtmDate)
{
Write-Host "Date selected: $dtmDate"
}
$objForm.Dispose()

View File

@@ -0,0 +1,489 @@
#############################
# Developed by Tinniam V Ganesh
# Date 24 Apr 2012
# Powershell GUI generated by Primal Forms CE from Sapien Technologies (http://www.sapien.com/)
#########################################################################################################
function Get-SysInfo ($strComputer)
{
write-host reached here
$statusBar1.Text =Working
if ($radiobutton1.checked -eq $True)
{
$wmi = Get-WmiObject Win32_ComputerSystem -Namespace root\CIMV2" -ComputerName $strComputer|Export-csv -force “test.csv”
}
else
{
$wmi =Get-WmiObject Win32_ComputerSystem -Namespace “root\CIMV2" -ComputerName $strComputer|ConvertTo-Html|out-file -append test.html
}
$statusBar1.Text =Done.
}
#*=============================================================================
Function Get-BIOSInfo ($strComputer)
{
$statusBar1.Text =Working
if ($radiobutton1.checked -eq $True)
{
$wmi = Get-WmiObject Win32_BIOS -Namespace root\CIMV2" -computername $strComputer|Export-csv -force “test.csv”
}
else
{
$wmi = Get-WmiObject Win32_BIOS -Namespace “root\CIMV2" -computername $strComputer|ConvertTo-Html|out-file -append test.html
}
$statusBar1.Text =Done.
}
Function Get-OSInfo {
$statusBar1.Text =Working
if ($radiobutton1.checked -eq $True)
{
$wmi = Get-WmiObject Win32_OperatingSystem -Namespace root\CIMV2" -Computername $strComputer|Export-csv -force “test.csv”
}
else
{
$wmi = Get-WmiObject Win32_OperatingSystem -Namespace “root\CIMV2" -Computername $strComputer|out-file -append test.html
}
$statusBar1.Text =Done.
}
Function Get-CPUInfo {
$statusBar1.Text =Working
if ($radiobutton1.checked -eq $True)
{
$wmi = Get-WmiObject Win32_Processor -Namespace root\CIMV2" -Computername $strComputer|Export-csv -force “test.csv”
}
else
{
$wmi = Get-WmiObject Win32_Processor -Namespace “root\CIMV2" -Computername $strComputer|out-file -append test.html
}
$statusBar1.Text =Done.
}
Function Get-DiskInfo {
$statusBar1.Text =Working
if ($radiobutton1.checked -eq $True)
{
$wmi = Get-WmiObject Win32_DiskDrive -Namespace root\CIMV2" -ComputerName $strComputer|Export-csv -force “test.csv”
}
else
{
$wmi = Get-WmiObject Win32_DiskDrive -Namespace “root\CIMV2" -ComputerName $strComputer|out-file -append test.html
}
$statusBar1.Text =Done.
}
Function Get-NetworkInfo {
$statusBar1.Text =Working
if ($radiobutton1.checked -eq $True)
{
$wmi = Get-WmiObject Win32_NetworkAdapterConfiguration -Namespace root\CIMV2" -ComputerName $strComputer | where{$_.IPEnabled -eq “True”}|Export-csv -noclobber “test.csv”
}
else
{
$wmi = Get-WmiObject Win32_NetworkAdapterConfiguration -Namespace “root\CIMV2" -ComputerName $strComputer | where{$_.IPEnabled -eq True}|out-file -append test.html
}
$statusBar1.Text =Done.
}
#Generated Form Function
function GenerateForm {
########################################################################
# Code Generated By: SAPIEN Technologies PrimalForms (Community Edition) v1.0.10.0
# Generated On: 4/24/2012 2:46 PM
# Generated By: tvganesh
########################################################################
#region Import the Assemblies
[reflection.assembly]::loadwithpartialname(System.Windows.Forms) | Out-Null
[reflection.assembly]::loadwithpartialname(System.Drawing) | Out-Null
#endregion
#region Generated Form Objects
$form1 = New-Object System.Windows.Forms.Form
$statusBar1 = New-Object System.Windows.Forms.StatusBar
$label2 = New-Object System.Windows.Forms.Label
$button3 = New-Object System.Windows.Forms.Button
$button2 = New-Object System.Windows.Forms.Button
$tabControl1 = New-Object System.Windows.Forms.TabControl
$tabControl = New-Object System.Windows.Forms.TabPage
$groupBox1 = New-Object System.Windows.Forms.GroupBox
$radioButton2 = New-Object System.Windows.Forms.RadioButton
$radioButton1 = New-Object System.Windows.Forms.RadioButton
$label1 = New-Object System.Windows.Forms.Label
$textBox1 = New-Object System.Windows.Forms.TextBox
$comboBox1 = New-Object System.Windows.Forms.ComboBox
$Database = New-Object System.Windows.Forms.TabPage
$tabPage1 = New-Object System.Windows.Forms.TabPage
$tabPage2 = New-Object System.Windows.Forms.TabPage
$button1 = New-Object System.Windows.Forms.Button
$fontDialog1 = New-Object System.Windows.Forms.FontDialog
$InitialFormWindowState = New-Object System.Windows.Forms.FormWindowState
#endregion Generated Form Objects
#———————————————-
#Generated Event Script Blocks
#———————————————-
#Provide Custom Code for events specified in PrimalForms.
$button3_OnClick=
{
$form1.Close()
}
$button2_OnClick=
{
$textBox1.text="
# Set to the first item
$comboBox1.SelectedIndex = 0;
}
$handler_button1_Click=
{
$x = $textbox1.text
$vals = $x.split(“,”)
forEach($strComputer in $vals)
{
switch($combobox1.selectedItem)
{
“SysInfo” {Get-SysInfo ($strComputer)}
“BiosInfo” {Get-BiosInfo($strComputer)}
“CPUInfo” {Get-cpuInfo($strComputer)}
“DiskInfo” {Get-diskInfo($strComputer)}
“OSInfo” {Get-OSInfo($strCOmputer)}
“NetworkInfo” {Get-NetworkInfo($strComputer)}
}
}
}
$OnLoadForm_StateCorrection=
{#Correct the initial state of the form to prevent the .Net maximized form issue
$form1.WindowState = $InitialFormWindowState
}
#———————————————-
#region Generated Form Code
$System_Drawing_Size = New-Object System.Drawing.Size
$System_Drawing_Size.Height = 444
$System_Drawing_Size.Width = 704
$form1.ClientSize = $System_Drawing_Size
$form1.DataBindings.DefaultDataSourceUpdateMode = 0
$form1.Name = “form1"
$form1.Text = Primal Form
$statusBar1.DataBindings.DefaultDataSourceUpdateMode = 0
$System_Drawing_Point = New-Object System.Drawing.Point
$System_Drawing_Point.X = 0
$System_Drawing_Point.Y = 422
$statusBar1.Location = $System_Drawing_Point
$statusBar1.Name = statusBar1"
$System_Drawing_Size = New-Object System.Drawing.Size
$System_Drawing_Size.Height = 22
$System_Drawing_Size.Width = 704
$statusBar1.Size = $System_Drawing_Size
$statusBar1.TabIndex = 8
$statusBar1.Text = “Ready”
$form1.Controls.Add($statusBar1)
$label2.DataBindings.DefaultDataSourceUpdateMode = 0
$label2.Font = New-Object System.Drawing.Font(“Microsoft Sans Serif”,14.25,1,3,1)
$System_Drawing_Point = New-Object System.Drawing.Point
$System_Drawing_Point.X = 205
$System_Drawing_Point.Y = 22
$label2.Location = $System_Drawing_Point
$label2.Name = “label2"
$System_Drawing_Size = New-Object System.Drawing.Size
$System_Drawing_Size.Height = 34
$System_Drawing_Size.Width = 341
$label2.Size = $System_Drawing_Size
$label2.TabIndex = 7
$label2.Text = Windows Resource Management
$form1.Controls.Add($label2)
$button3.DataBindings.DefaultDataSourceUpdateMode = 0
$System_Drawing_Point = New-Object System.Drawing.Point
$System_Drawing_Point.X = 439
$System_Drawing_Point.Y = 343
$button3.Location = $System_Drawing_Point
$button3.Name = button3"
$System_Drawing_Size = New-Object System.Drawing.Size
$System_Drawing_Size.Height = 23
$System_Drawing_Size.Width = 75
$button3.Size = $System_Drawing_Size
$button3.TabIndex = 6
$button3.Text = “Exit”
$button3.UseVisualStyleBackColor = $True
$button3.add_Click($button3_OnClick)
$form1.Controls.Add($button3)
$button2.DataBindings.DefaultDataSourceUpdateMode = 0
$System_Drawing_Point = New-Object System.Drawing.Point
$System_Drawing_Point.X = 330
$System_Drawing_Point.Y = 343
$button2.Location = $System_Drawing_Point
$button2.Name = “button2"
$System_Drawing_Size = New-Object System.Drawing.Size
$System_Drawing_Size.Height = 23
$System_Drawing_Size.Width = 75
$button2.Size = $System_Drawing_Size
$button2.TabIndex = 5
$button2.Text = Cancel
$button2.UseVisualStyleBackColor = $True
$button2.add_Click($button2_OnClick)
$form1.Controls.Add($button2)
$tabControl1.DataBindings.DefaultDataSourceUpdateMode = 0
$System_Drawing_Point = New-Object System.Drawing.Point
$System_Drawing_Point.X = 136
$System_Drawing_Point.Y = 83
$tabControl1.Location = $System_Drawing_Point
$tabControl1.Name = tabControl1"
$tabControl1.SelectedIndex = 0
$tabControl1.ShowToolTips = $True
$System_Drawing_Size = New-Object System.Drawing.Size
$System_Drawing_Size.Height = 231
$System_Drawing_Size.Width = 453
$tabControl1.Size = $System_Drawing_Size
$tabControl1.TabIndex = 4
$form1.Controls.Add($tabControl1)
$tabControl.DataBindings.DefaultDataSourceUpdateMode = 0
$System_Drawing_Point = New-Object System.Drawing.Point
$System_Drawing_Point.X = 4
$System_Drawing_Point.Y = 22
$tabControl.Location = $System_Drawing_Point
$tabControl.Name = “tabControl”
$System_Windows_Forms_Padding = New-Object System.Windows.Forms.Padding
$System_Windows_Forms_Padding.All = 3
$System_Windows_Forms_Padding.Bottom = 3
$System_Windows_Forms_Padding.Left = 3
$System_Windows_Forms_Padding.Right = 3
$System_Windows_Forms_Padding.Top = 3
$tabControl.Padding = $System_Windows_Forms_Padding
$System_Drawing_Size = New-Object System.Drawing.Size
$System_Drawing_Size.Height = 205
$System_Drawing_Size.Width = 445
$tabControl.Size = $System_Drawing_Size
$tabControl.TabIndex = 0
$tabControl.Text = “Basic Commands”
$tabControl.UseVisualStyleBackColor = $True
$tabControl1.Controls.Add($tabControl)
$groupBox1.DataBindings.DefaultDataSourceUpdateMode = 0
$System_Drawing_Point = New-Object System.Drawing.Point
$System_Drawing_Point.X = 271
$System_Drawing_Point.Y = 123
$groupBox1.Location = $System_Drawing_Point
$groupBox1.Name = “groupBox1"
$System_Drawing_Size = New-Object System.Drawing.Size
$System_Drawing_Size.Height = 49
$System_Drawing_Size.Width = 124
$groupBox1.Size = $System_Drawing_Size
$groupBox1.TabIndex = 3
$groupBox1.TabStop = $False
$groupBox1.Text = Save As
$tabControl.Controls.Add($groupBox1)
$radioButton2.DataBindings.DefaultDataSourceUpdateMode = 0
$System_Drawing_Point = New-Object System.Drawing.Point
$System_Drawing_Point.X = 48
$System_Drawing_Point.Y = 19
$radioButton2.Location = $System_Drawing_Point
$radioButton2.Name = radioButton2"
$System_Drawing_Size = New-Object System.Drawing.Size
$System_Drawing_Size.Height = 24
$System_Drawing_Size.Width = 104
$radioButton2.Size = $System_Drawing_Size
$radioButton2.TabIndex = 1
$radioButton2.TabStop = $True
$radioButton2.Text = “HTML”
$radioButton2.UseVisualStyleBackColor = $True
$groupBox1.Controls.Add($radioButton2)
$radioButton1.DataBindings.DefaultDataSourceUpdateMode = 0
$System_Drawing_Point = New-Object System.Drawing.Point
$System_Drawing_Point.X = 6
$System_Drawing_Point.Y = 19
$radioButton1.Location = $System_Drawing_Point
$radioButton1.Name = “radioButton1"
$System_Drawing_Size = New-Object System.Drawing.Size
$System_Drawing_Size.Height = 24
$System_Drawing_Size.Width = 104
$radioButton1.Size = $System_Drawing_Size
$radioButton1.TabIndex = 0
$radioButton1.TabStop = $True
$radioButton1.Text = CSV
$radioButton1.UseVisualStyleBackColor = $True
$radioButton1.checked =$True
$groupBox1.Controls.Add($radioButton1)
$label1.DataBindings.DefaultDataSourceUpdateMode = 0
$System_Drawing_Point = New-Object System.Drawing.Point
$System_Drawing_Point.X = 6
$System_Drawing_Point.Y = 26
$label1.Location = $System_Drawing_Point
$label1.Name = label1"
$System_Drawing_Size = New-Object System.Drawing.Size
$System_Drawing_Size.Height = 20
$System_Drawing_Size.Width = 192
$label1.Size = $System_Drawing_Size
$label1.TabIndex = 2
$label1.Text = “Enter comma separated server list”
$tabControl.Controls.Add($label1)
$textBox1.DataBindings.DefaultDataSourceUpdateMode = 0
$System_Drawing_Point = New-Object System.Drawing.Point
$System_Drawing_Point.X = 220
$System_Drawing_Point.Y = 26
$textBox1.Location = $System_Drawing_Point
$textBox1.Name = “textBox1"
$System_Drawing_Size = New-Object System.Drawing.Size
$System_Drawing_Size.Height = 20
$System_Drawing_Size.Width = 203
$textBox1.Size = $System_Drawing_Size
$textBox1.TabIndex = 1
$tabControl.Controls.Add($textBox1)
$comboBox1.DataBindings.DefaultDataSourceUpdateMode = 0
$comboBox1.FormattingEnabled = $True
$System_Drawing_Point = New-Object System.Drawing.Point
$System_Drawing_Point.X = 220
$System_Drawing_Point.Y = 79
$comboBox1.Location = $System_Drawing_Point
$comboBox1.Name = comboBox1"
$System_Drawing_Size = New-Object System.Drawing.Size
$System_Drawing_Size.Height = 21
$System_Drawing_Size.Width = 200
$comboBox1.Size = $System_Drawing_Size
$comboBox1.TabIndex = 0
$commands = @(“SysInfo”,”BIOSInfo”,”OSInfo”,”CPUInfo”,”DiskInfo”,”NetworkInfo”)
ForEach ($command in $commands){
$comboBox1.items.add($command)
}
$tabControl.Controls.Add($comboBox1)
# Set to the first item
$comboBox1.SelectedIndex = 0;
$Database.DataBindings.DefaultDataSourceUpdateMode = 0
$System_Drawing_Point = New-Object System.Drawing.Point
$System_Drawing_Point.X = 4
$System_Drawing_Point.Y = 22
$Database.Location = $System_Drawing_Point
$Database.Name = “Database”
$System_Windows_Forms_Padding = New-Object System.Windows.Forms.Padding
$System_Windows_Forms_Padding.All = 3
$System_Windows_Forms_Padding.Bottom = 3
$System_Windows_Forms_Padding.Left = 3
$System_Windows_Forms_Padding.Right = 3
$System_Windows_Forms_Padding.Top = 3
$Database.Padding = $System_Windows_Forms_Padding
$System_Drawing_Size = New-Object System.Drawing.Size
$System_Drawing_Size.Height = 205
$System_Drawing_Size.Width = 445
$Database.Size = $System_Drawing_Size
$Database.TabIndex = 1
$Database.Text = “Database”
$Database.UseVisualStyleBackColor = $True
$tabControl1.Controls.Add($Database)
$tabPage1.DataBindings.DefaultDataSourceUpdateMode = 0
$System_Drawing_Point = New-Object System.Drawing.Point
$System_Drawing_Point.X = 4
$System_Drawing_Point.Y = 22
$tabPage1.Location = $System_Drawing_Point
$tabPage1.Name = “tabPage1"
$System_Windows_Forms_Padding = New-Object System.Windows.Forms.Padding
$System_Windows_Forms_Padding.All = 3
$System_Windows_Forms_Padding.Bottom = 3
$System_Windows_Forms_Padding.Left = 3
$System_Windows_Forms_Padding.Right = 3
$System_Windows_Forms_Padding.Top = 3
$tabPage1.Padding = $System_Windows_Forms_Padding
$System_Drawing_Size = New-Object System.Drawing.Size
$System_Drawing_Size.Height = 205
$System_Drawing_Size.Width = 445
$tabPage1.Size = $System_Drawing_Size
$tabPage1.TabIndex = 2
$tabPage1.Text = Active Directory
$tabPage1.UseVisualStyleBackColor = $True
$tabControl1.Controls.Add($tabPage1)
$tabPage2.DataBindings.DefaultDataSourceUpdateMode = 0
$System_Drawing_Point = New-Object System.Drawing.Point
$System_Drawing_Point.X = 4
$System_Drawing_Point.Y = 22
$tabPage2.Location = $System_Drawing_Point
$tabPage2.Name = tabPage2"
$System_Windows_Forms_Padding = New-Object System.Windows.Forms.Padding
$System_Windows_Forms_Padding.All = 3
$System_Windows_Forms_Padding.Bottom = 3
$System_Windows_Forms_Padding.Left = 3
$System_Windows_Forms_Padding.Right = 3
$System_Windows_Forms_Padding.Top = 3
$tabPage2.Padding = $System_Windows_Forms_Padding
$System_Drawing_Size = New-Object System.Drawing.Size
$System_Drawing_Size.Height = 205
$System_Drawing_Size.Width = 445
$tabPage2.Size = $System_Drawing_Size
$tabPage2.TabIndex = 3
$tabPage2.Text = “Backup & Restore”
$tabPage2.UseVisualStyleBackColor = $True
$tabControl1.Controls.Add($tabPage2)
$button1.DataBindings.DefaultDataSourceUpdateMode = 0
$System_Drawing_Point = New-Object System.Drawing.Point
$System_Drawing_Point.X = 226
$System_Drawing_Point.Y = 343
$button1.Location = $System_Drawing_Point
$button1.Name = “button1"
$System_Drawing_Size = New-Object System.Drawing.Size
$System_Drawing_Size.Height = 23
$System_Drawing_Size.Width = 75
$button1.Size = $System_Drawing_Size
$button1.TabIndex = 0
$button1.Text = Submit
$button1.UseVisualStyleBackColor = $True
$button1.add_Click($handler_button1_Click)
$form1.Controls.Add($button1)
$fontDialog1.ShowHelp = $True
#endregion Generated Form Code
#Save the initial state of the form
$InitialFormWindowState = $form1.WindowState
#Init the OnLoad event to correct the initial state of the form
$form1.add_Load($OnLoadForm_StateCorrection)
#Show the Form
$form1.ShowDialog()| Out-Null
} #End Function
#Call the Function
GenerateForm

View File

@@ -0,0 +1,144 @@
# Show message box popup.
Add-Type -AssemblyName System.Windows.Forms
$result = [System.Windows.Forms.MessageBox]::Show("My message", "Window Title", [System.Windows.Forms.MessageBoxButtons]::OK, [System.Windows.Forms.MessageBoxIcon]::None)
# Show input box popup.
Add-Type -AssemblyName Microsoft.VisualBasic
$inputText = [Microsoft.VisualBasic.Interaction]::InputBox("Enter some value:", "Window Title", "Default value")
# Show an Open File Dialog and return the file selected by the user.
function Read-OpenFileDialog([string]$InitialDirectory, [switch]$AllowMultiSelect)
{
Add-Type -AssemblyName System.Windows.Forms
$openFileDialog = New-Object System.Windows.Forms.OpenFileDialog
$openFileDialog.initialDirectory = $InitialDirectory
$openFileDialog.filter = "All files (*.*)| *.*"
if ($AllowMultiSelect) { $openFileDialog.MultiSelect = $true }
$openFileDialog.ShowDialog() > $null
if ($allowMultiSelect) { return $openFileDialog.Filenames } else { return $openFileDialog.Filename }
}
# Show an Open Folder Dialog and return the directory selected by the user.
function Read-FolderBrowserDialog([string]$InitialDirectory)
{
Add-Type -AssemblyName System.Windows.Forms
$openFolderDialog = New-Object System.Windows.Forms.FolderBrowserDialog
$openFolderDialog.ShowNewFolderButton = $true
$openFolderDialog.RootFolder = $InitialDirectory
$openFolderDialog.ShowDialog()
return $openFolderDialog.SelectedPath
}
# Prompt for multi-line user input:
function Read-MultiLineInputDialog([string]$Message, [string]$WindowTitle, [string]$DefaultText)
{
<#
.SYNOPSIS
Prompts the user with a multi-line input box and returns the text they enter, or null if they cancelled the prompt.
.DESCRIPTION
Prompts the user with a multi-line input box and returns the text they enter, or null if they cancelled the prompt.
.PARAMETER Message
The message to display to the user explaining what text we are asking them to enter.
.PARAMETER WindowTitle
The text to display on the prompt window's title.
.PARAMETER DefaultText
The default text to show in the input box.
.EXAMPLE
$userText = Read-MultiLineInputDialog "Input some text please:" "Get User's Input"
Shows how to create a simple prompt to get mutli-line input from a user.
.EXAMPLE
# Setup the default multi-line address to fill the input box with.
$defaultAddress = @'
John Doe
123 St.
Some Town, SK, Canada
A1B 2C3
'@
$address = Read-MultiLineInputDialog "Please enter your full address, including name, street, city, and postal code:" "Get User's Address" $defaultAddress
if ($address -eq $null)
{
Write-Error "You pressed the Cancel button on the multi-line input box."
}
Prompts the user for their address and stores it in a variable, pre-filling the input box with a default multi-line address.
If the user pressed the Cancel button an error is written to the console.
.EXAMPLE
$inputText = Read-MultiLineInputDialog -Message "If you have a really long message you can break it apart`nover two lines with the powershell newline character:" -WindowTitle "Window Title" -DefaultText "Default text for the input box."
Shows how to break the second parameter (Message) up onto two lines using the powershell newline character (`n).
If you break the message up into more than two lines the extra lines will be hidden behind or show ontop of the TextBox.
.NOTES
Name: Show-MultiLineInputDialog
Author: Daniel Schroeder (originally based on the code shown at http://technet.microsoft.com/en-us/library/ff730941.aspx)
Version: 1.0
#>
Add-Type -AssemblyName System.Drawing
Add-Type -AssemblyName System.Windows.Forms
# Create the Label.
$label = New-Object System.Windows.Forms.Label
$label.Location = New-Object System.Drawing.Size(10,10)
$label.Size = New-Object System.Drawing.Size(280,20)
$label.AutoSize = $true
$label.Text = $Message
# Create the TextBox used to capture the user's text.
$textBox = New-Object System.Windows.Forms.TextBox
$textBox.Location = New-Object System.Drawing.Size(10,40)
$textBox.Size = New-Object System.Drawing.Size(575,200)
$textBox.AcceptsReturn = $true
$textBox.AcceptsTab = $false
$textBox.Multiline = $true
$textBox.ScrollBars = 'Both'
$textBox.Text = $DefaultText
# Create the OK button.
$okButton = New-Object System.Windows.Forms.Button
$okButton.Location = New-Object System.Drawing.Size(510,250)
$okButton.Size = New-Object System.Drawing.Size(75,25)
$okButton.Text = "OK"
$okButton.Add_Click({ $form.Tag = $textBox.Text; $form.Close() })
# Create the Cancel button.
$cancelButton = New-Object System.Windows.Forms.Button
$cancelButton.Location = New-Object System.Drawing.Size(415,250)
$cancelButton.Size = New-Object System.Drawing.Size(75,25)
$cancelButton.Text = "Cancel"
$cancelButton.Add_Click({ $form.Tag = $null; $form.Close() })
# Create the form.
$form = New-Object System.Windows.Forms.Form
$form.Text = $WindowTitle
$form.Size = New-Object System.Drawing.Size(600,310)
$form.FormBorderStyle = 'FixedSingle'
$form.StartPosition = "CenterScreen"
$form.AutoSizeMode = 'GrowAndShrink'
$form.Topmost = $True
$form.AcceptButton = $okButton
$form.CancelButton = $cancelButton
$form.ShowInTaskbar = $true
# Add all of the controls to the form.
$form.Controls.Add($label)
$form.Controls.Add($textBox)
$form.Controls.Add($okButton)
$form.Controls.Add($cancelButton)
# Initialize and show the form.
$form.Add_Shown({$form.Activate()})
$form.ShowDialog() > $null # Trash the text of the button that was clicked.
# Return the text that the user entered.
return $form.Tag
}

View File

@@ -0,0 +1,114 @@
$ErrorActionPreference = "SilentlyContinue"
Import-Module ActiveDirectory
#Generated Form Function
function GenerateForm {
########################################################################
# Code Generated By: SAPIEN Technologies PrimalForms (Community Edition) v1.0.10.0
# Generated On: 8/20/2013 12:23 AM
# Generated By: Subsun
########################################################################
#region Import the Assemblies
[reflection.assembly]::loadwithpartialname("System.Windows.Forms") | Out-Null
[reflection.assembly]::loadwithpartialname("System.Drawing") | Out-Null
#endregion
#region Generated Form Objects
$form1 = New-Object System.Windows.Forms.Form
$richTextBox1 = New-Object System.Windows.Forms.RichTextBox
$Find = New-Object System.Windows.Forms.Button
$textBox1 = New-Object System.Windows.Forms.TextBox
$InitialFormWindowState = New-Object System.Windows.Forms.FormWindowState
#endregion Generated Form Objects
#----------------------------------------------
#Generated Event Script Blocks
#----------------------------------------------
#Provide Custom Code for events specified in PrimalForms.
$handler_Find_Click=
{
#TODO: Place custom script here
$User = Get-Aduser $textBox1.Text -Properties Name,homeDirectory,SamAccountName,CanonicalName | Select Name,homeDirectory,SamAccountName,CanonicalName
If ($User) {
$richTextBox1.Text = $User | FL Name,homeDirectory,SamAccountName,CanonicalName | Out-String
}Else {
$richTextBox1.Text = "Error in finding $($textBox1.Text)"
}
}
$OnLoadForm_StateCorrection=
{#Correct the initial state of the form to prevent the .Net maximized form issue
$form1.WindowState = $InitialFormWindowState
}
#----------------------------------------------
#region Generated Form Code
$System_Drawing_Size = New-Object System.Drawing.Size
$System_Drawing_Size.Height = 212
$System_Drawing_Size.Width = 477
$form1.ClientSize = $System_Drawing_Size
$form1.DataBindings.DefaultDataSourceUpdateMode = 0
$form1.Name = "form1"
$form1.Text = "ADFind"
$richTextBox1.DataBindings.DefaultDataSourceUpdateMode = 0
$System_Drawing_Point = New-Object System.Drawing.Point
$System_Drawing_Point.X = 12
$System_Drawing_Point.Y = 38
$richTextBox1.Location = $System_Drawing_Point
$richTextBox1.Name = "richTextBox1"
$System_Drawing_Size = New-Object System.Drawing.Size
$System_Drawing_Size.Height = 162
$System_Drawing_Size.Width = 450
$richTextBox1.Size = $System_Drawing_Size
$richTextBox1.TabIndex = 2
$richTextBox1.font = "Courier New"
$richTextBox1.Text = ""
$form1.Controls.Add($richTextBox1)
$Find.DataBindings.DefaultDataSourceUpdateMode = 0
$System_Drawing_Point = New-Object System.Drawing.Point
$System_Drawing_Point.X = 353
$System_Drawing_Point.Y = 8
$Find.Location = $System_Drawing_Point
$Find.Name = "Find"
$System_Drawing_Size = New-Object System.Drawing.Size
$System_Drawing_Size.Height = 23
$System_Drawing_Size.Width = 109
$Find.Size = $System_Drawing_Size
$Find.TabIndex = 1
$Find.Text = "Find"
$Find.UseVisualStyleBackColor = $True
$Find.add_Click($handler_Find_Click)
$form1.Controls.Add($Find)
$textBox1.DataBindings.DefaultDataSourceUpdateMode = 0
$System_Drawing_Point = New-Object System.Drawing.Point
$System_Drawing_Point.X = 12
$System_Drawing_Point.Y = 12
$textBox1.Location = $System_Drawing_Point
$textBox1.Name = "textBox1"
$System_Drawing_Size = New-Object System.Drawing.Size
$System_Drawing_Size.Height = 20
$System_Drawing_Size.Width = 320
$textBox1.Size = $System_Drawing_Size
$textBox1.TabIndex = 0
$form1.Controls.Add($textBox1)
#endregion Generated Form Code
#Save the initial state of the form
$InitialFormWindowState = $form1.WindowState
#Init the OnLoad event to correct the initial state of the form
$form1.add_Load($OnLoadForm_StateCorrection)
#Show the Form
$form1.ShowDialog()| Out-Null
} #End Function
#Call the Function
GenerateForm

View File

@@ -0,0 +1,50 @@
Add-Type -AssemblyName System.Windows.Forms
$Form = New-Object system.Windows.Forms.Form
$Form.Text = "Sample Form"
$Form.AutoScroll = $True
$Form.width = 500
$Form.height = 300
$Form.AutoSize = $True
#$Form.AutoSizeMode = "GrowAndShrink"
# or GrowOnly
$Form.MinimizeBox = $False
$Form.MaximizeBox = $False
$Form.WindowState = "Normal"
# Maximized, Minimized, Normal
$Form.SizeGripStyle = "Hide"
# Auto, Hide, Show
$Form.ShowInTaskbar = $False
#$Form.Opacity = 0.7
# 1.0 is fully opaque; 0.0 is invisible
$Form.BackColor = "Lime"
# color names are static properties of System.Drawing.Color
# you can also use ARGB values, such as "#FFFFEBCD"
$Form.StartPosition = "CenterScreen"
# CenterScreen, Manual, WindowsDefaultLocation, WindowsDefaultBounds, CenterParent
$Form.Icon = [System.Drawing.Icon]::ExtractAssociatedIcon($PSHome + "\powershell.exe")
#$Font = New-Object System.Drawing.Font("Times New Roman",24,[System.Drawing.FontStyle]::Italic)
# Font styles are: Regular, Bold, Italic, Underline, Strikeout
#$Form.Font = $Font
$Label = New-Object System.Windows.Forms.Label
$Label.Text = "This form is very simple."
$Label.AutoSize = $True
$Form.Controls.Add($Label)
$OKButton = New-Object System.Windows.Forms.Button
$OKButton.Location = New-Object System.Drawing.Size(75,120)
$OKButton.Size = New-Object System.Drawing.Size(75,23)
$OKButton.Text = "Get Service"
$OKButton.Add_Click({$Form.Close()})
$Form.Controls.Add($OKButton)
$Form.ShowDialog()

View File

@@ -0,0 +1,91 @@
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
$Form = New-Object System.Windows.Forms.Form
$Form.Size = New-Object System.Drawing.Size(600,400)
############################################## Start functions
function pingInfo {
$wks=$InputBox.text;
$pingResult=Test-Connection -ComputerName $wks -Count 1 | out-string;
$outputBox.text=$pingResult
} #end pingInfo
############################################## end functions
Function NA-GetHardDriveInfo {
$Computer = $InputBox.Text
$HDInfo = Gwmi Win32_logicaldisk -ComputerName $Computer -Filter "Drivetype = '3'" | ft -AutoSize | Out-String
$outputBox.Text = $HDInfo
}
############################################## Start text fields
Function NA-GetProcess {
$Computer = $InputBox.Text
$Proc = Get-Process -ComputerName $Computer | % {
$Obj = New-Object -TypeName PSObject
$Obj | Add-Member -MemberType NoteProperty -Name Handles -Value $_.handles
$Obj | Add-Member -MemberType NoteProperty -Name NPM -Value $_.npm
$Obj | Add-Member -MemberType NoteProperty -Name PM -Value $_.pm
$Obj | Add-Member -MemberType NoteProperty -Name WS -Value $_.WS
$Obj | Add-Member -MemberType NoteProperty -Name VM -Value $_.vm
$Obj | Add-Member -MemberType NoteProperty -Name CPU -Value $_.cpu
$Obj | Add-Member -MemberType NoteProperty -Name ID -Value $_.ID
$Obj | Add-Member -MemberType NoteProperty -Name ProcessName -Value $_.ProcessName
$Obj
}
$outputBox.Text = $Proc
}
############################################## end functions
$InputBox = New-Object System.Windows.Forms.TextBox
$InputBox.Location = New-Object System.Drawing.Size(20,50)
$InputBox.Size = New-Object System.Drawing.Size(150,20)
$Form.Controls.Add($InputBox)
$outputBox = New-Object System.Windows.Forms.TextBox
$outputBox.Location = New-Object System.Drawing.Size(10,150)
$outputBox.Size = New-Object System.Drawing.Size(565,200)
$outputBox.MultiLine = $True
$outputBox.ScrollBars = "Vertical"
$Form.Controls.Add($outputBox)
############################################## end text fields
############################################## Start buttons
$Button = New-Object System.Windows.Forms.Button
$Button.Location = New-Object System.Drawing.Size(400,30)
$Button.Size = New-Object System.Drawing.Size(80,20)
$Button.Text = "Ping"
$Button.Add_Click({pingInfo})
$Form.Controls.Add($Button)
############################################## end buttons
$Button_HDrive = New-Object System.Windows.Forms.Button
$Button_HDrive.Location = New-Object System.Drawing.Size(400,50)
$Button_HDrive.Size = New-Object System.Drawing.Size(80,20)
$Button_HDrive.Text = "Hard Drive"
$Button_HDrive.Add_Click({NA-GetHardDriveInfo})
$Form.Controls.Add($Button_HDrive)
############################################## end button_HDrive
$Button_Proc = New-Object System.Windows.Forms.Button
$Button_Proc.Location = New-Object System.Drawing.Size(400,70)
$Button_Proc.Size = New-Object System.Drawing.Size(80,20)
$Button_Proc.Text = "Processes"
$Button_Proc.Add_Click({NA-GetProcess})
$Form.Controls.Add($Button_Proc)
$Form.Add_Shown({$Form.Activate()})
[void] $Form.ShowDialog()

View File

@@ -0,0 +1,45 @@
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
$Form = New-Object System.Windows.Forms.Form
$Form.Size = New-Object System.Drawing.Size(600,400)
############################################## Start functions
function pingInfo {
$wks=$InputBox.text;
$pingResult=ping $wks | fl | out-string;
$outputBox.text=$pingResult
} #end pingInfo
############################################## end functions
############################################## Start text fields
$InputBox = New-Object System.Windows.Forms.TextBox
$InputBox.Location = New-Object System.Drawing.Size(20,50)
$InputBox.Size = New-Object System.Drawing.Size(150,20)
$Form.Controls.Add($InputBox)
$outputBox = New-Object System.Windows.Forms.TextBox
$outputBox.Location = New-Object System.Drawing.Size(10,150)
$outputBox.Size = New-Object System.Drawing.Size(565,200)
$outputBox.MultiLine = $True
$outputBox.ScrollBars = "Vertical"
$Form.Controls.Add($outputBox)
############################################## end text fields
############################################## Start buttons
$Button = New-Object System.Windows.Forms.Button
$Button.Location = New-Object System.Drawing.Size(400,30)
$Button.Size = New-Object System.Drawing.Size(110,80)
$Button.Text = "Ping"
$Button.Add_Click({pingInfo})
$Form.Controls.Add($Button)
############################################## end buttons
$Form.Add_Shown({$Form.Activate()})
[void] $Form.ShowDialog()

View File

@@ -0,0 +1,165 @@
#========================================================================
# Code Generated By: SAPIEN Technologies, Inc., PowerShell Studio 2012 v3.1.13
# Generated On: 12/18/2012 2:15 PM
# Generated By: James Vierra
# Organization: Designed Systems & Services
#========================================================================
#----------------------------------------------
#region Application Functions
#----------------------------------------------
function OnApplicationLoad {
#Note: This function is not called in Projects
#Note: This function runs before the form is created
#Note: To get the script directory in the Packager use: Split-Path $hostinvocation.MyCommand.path
#Note: To get the console output in the Packager (Windows Mode) use: $ConsoleOutput (Type: System.Collections.ArrayList)
#Important: Form controls cannot be accessed in this function
#TODO: Add snapins and custom code to validate the application load
return $true #return true for success or false for failure
}
function OnApplicationExit {
#Note: This function is not called in Projects
#Note: This function runs after the form is closed
#TODO: Add custom code to clean up and unload snapins when the application exits
$script:ExitCode = 0 #Set the exit code for the Packager
}
#endregion Application Functions
#----------------------------------------------
# Generated Form Function
#----------------------------------------------
function Call-Demo-WebBrowserCtl_pff {
#----------------------------------------------
#region Import the Assemblies
#----------------------------------------------
[void][reflection.assembly]::LoadWithPartialName("System.Windows.Forms")
[void][reflection.assembly]::Load("System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
[void][reflection.assembly]::Load("System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")
[void][reflection.assembly]::Load("System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")
[void][reflection.assembly]::Load("System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")
[void][reflection.assembly]::Load("System.DirectoryServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
[void][reflection.assembly]::Load("System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")
#endregion Import Assemblies
#----------------------------------------------
#region Generated Form Objects
#----------------------------------------------
[System.Windows.Forms.Application]::EnableVisualStyles()
$form1 = New-Object 'System.Windows.Forms.Form'
$buttonGetElement = New-Object 'System.Windows.Forms.Button'
$webbrowser1 = New-Object 'System.Windows.Forms.WebBrowser'
$buttonOK = New-Object 'System.Windows.Forms.Button'
$InitialFormWindowState = New-Object 'System.Windows.Forms.FormWindowState'
#endregion Generated Form Objects
#----------------------------------------------
# User Generated Script
#----------------------------------------------
$FormEvent_Load={
#TODO: Initialize Form Controls here
$webbrowser1.navigate("http://www.google.com")
}
$buttonGetElement_Click={
#TODO: Place custom script here
$el=$webbrowser1.Document.GetElementById('gstyle')
[System.Windows.Forms.MessageBox]::Show($el.InnerHtml)
}
# --End User Generated Script--
#----------------------------------------------
#region Generated Events
#----------------------------------------------
$Form_StateCorrection_Load=
{
#Correct the initial state of the form to prevent the .Net maximized form issue
$form1.WindowState = $InitialFormWindowState
}
$Form_Cleanup_FormClosed=
{
#Remove all event handlers from the controls
try
{
$buttonGetElement.remove_Click($buttonGetElement_Click)
$form1.remove_Load($FormEvent_Load)
$form1.remove_Load($Form_StateCorrection_Load)
$form1.remove_FormClosed($Form_Cleanup_FormClosed)
}
catch [Exception]
{ }
}
#endregion Generated Events
#----------------------------------------------
#region Generated Form Code
#----------------------------------------------
#
# form1
#
$form1.Controls.Add($buttonGetElement)
$form1.Controls.Add($webbrowser1)
$form1.Controls.Add($buttonOK)
$form1.AcceptButton = $buttonOK
$form1.ClientSize = '520, 475'
$form1.FormBorderStyle = 'FixedDialog'
$form1.MaximizeBox = $False
$form1.MinimizeBox = $False
$form1.Name = "form1"
$form1.StartPosition = 'CenterScreen'
$form1.Text = "Form"
$form1.add_Load($FormEvent_Load)
#
# buttonGetElement
#
$buttonGetElement.Location = '50, 438'
$buttonGetElement.Name = "buttonGetElement"
$buttonGetElement.Size = '84, 24'
$buttonGetElement.TabIndex = 2
$buttonGetElement.Text = "Get Element"
$buttonGetElement.UseVisualStyleBackColor = $True
$buttonGetElement.add_Click($buttonGetElement_Click)
#
# webbrowser1
#
$webbrowser1.Location = '39, 127'
$webbrowser1.MinimumSize = '20, 20'
$webbrowser1.Name = "webbrowser1"
$webbrowser1.Size = '569, 385'
$webbrowser1.TabIndex = 1
#
# buttonOK
#
$buttonOK.Anchor = 'Bottom, Right'
$buttonOK.DialogResult = 'OK'
$buttonOK.Location = '433, 440'
$buttonOK.Name = "buttonOK"
$buttonOK.Size = '75, 23'
$buttonOK.TabIndex = 0
$buttonOK.Text = "OK"
$buttonOK.UseVisualStyleBackColor = $True
#endregion Generated Form Code
#----------------------------------------------
#Save the initial state of the form
$InitialFormWindowState = $form1.WindowState
#Init the OnLoad event to correct the initial state of the form
$form1.add_Load($Form_StateCorrection_Load)
#Clean up the control events
$form1.add_FormClosed($Form_Cleanup_FormClosed)
#Show the Form
return $form1.ShowDialog()
} #End Function
#Call OnApplicationLoad to initialize
if((OnApplicationLoad) -eq $true)
{
#Call the form
Call-Demo-WebBrowserCtl_pff | Out-Null
#Perform cleanup
OnApplicationExit
}

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,432 @@
Add-Type -AssemblyName System.Windows.Forms
Add-Type -AssemblyName System.Drawing
function mouseDown {
$Global:mCurFirstX = ([System.Windows.Forms.Cursor]::Position.X )
$Global:mCurFirstY = ([System.Windows.Forms.Cursor]::Position.Y )
}
function mouseMove ($mControlName) {
$mCurMoveX = ([System.Windows.Forms.Cursor]::Position.X )
$mCurMoveY = ([System.Windows.Forms.Cursor]::Position.Y )
if ($Global:mCurFirstX -ne 0 -and $Global:mCurFirstY -ne 0){
$mDifX = $Global:mCurFirstX - $mCurMoveX
$mDifY = $Global:mCurFirstY - $mCurMoveY
$this.Left = $this.Left - $mDifX
$this.Top = $this.Top - $mDifY
$Global:mCurFirstX = $mCurMoveX
$Global:mCurFirstY = $mCurMoveY
}
}
function mouseUP ($mControlObj) {
$mCurUpX = ([System.Windows.Forms.Cursor]::Position.X )
$mCurUpY = ([System.Windows.Forms.Cursor]::Position.Y )
$Global:mCurFirstX = 0
$Global:mCurFirstY = 0
Foreach ($mElement In $Global:mFormObj.Elements){
if ($mElement.Name -eq $this.name){
foreach( $mProp in $mElement.Properties){
Switch($mProp.Name){
'Top'{ $mProp.Value = $this.Top}
'Left'{$mProp.Value = $this.Left}
}
}
}
}
renewGrids
}
Function renewGrids {
$mList = New-Object System.Collections.ArrayList
[array]$mElementsArr = $mFormObj.Elements | select Name,Type
$mList.AddRange($mElementsArr)
$mElemetnsGrid.DataSource = $mList
$mElemetnsGrid.Columns[1].ReadOnly = $true
$mList2 = New-Object System.Collections.ArrayList
[array]$mPropertyArr = $mFormObj.Elements[$mElemetnsGrid.CurrentRow.Index].Properties
$mList2.AddRange($mPropertyArr)
$mPropertiesGrid.DataSource = $mList2
$mPropertiesGrid.Columns[0].ReadOnly=$true
}
Function DeleteElement {
$Global:mFormObj.Elements = $mFormObj.Elements | ?{$_.Name -notlike $mFormObj.Elements[$mElemetnsGrid.CurrentRow.Index].Name}
renewGrids
}
Function AddProperty ($mName,$mValue){
$mPropertyObj = New-Object PSCustomObject
$mPropertyObj | Add-Member -Name 'Name' -MemberType NoteProperty -Value $mName
$mPropertyObj | Add-Member -Name 'Value' -MemberType NoteProperty -Value $mValue
return $mPropertyObj
}
Function ElementsChanged{
$mList2 = New-Object System.Collections.ArrayList
[array]$mPropertyArr = $mFormObj.Elements[$mElemetnsGrid.CurrentRow.Index].Properties
$mList2.AddRange($mPropertyArr)
$mPropertiesGrid.DataSource = $mList2
}
function ElementsEndEdit {
$Global:mFormObj.Elements[$mElemetnsGrid.CurrentRow.Index].Name = $mElemetnsGrid.CurrentCell.FormattedValue
repaintForm
}
Function AddElement {
$mPropertiesArr =@()
$mSameType = ($mFormObj.Elements | ?{$_.Type -like $mControlType.SelectedItem})
if($mSameType.count -ne $NUll -and $mSameType -ne $null) {
$mControlName=''+$mControlType.SelectedItem+($mSameType.count+1)
}elseif($mSameType.Count -eq $null -and $mSameType -ne $null){
$mControlName=''+$mControlType.SelectedItem+'2'
}else{
$mControlName=''+$mControlType.SelectedItem+'1'
}
$mPropertiesArr+= AddProperty 'Text' $mControlName
$mPropertiesArr+= AddProperty 'SizeX' 100
$mPropertiesArr+= AddProperty 'SizeY' 23
$mPropertiesArr+= AddProperty 'Top' 5
$mPropertiesArr+= AddProperty 'Left' 5
$mPropertiesArr+= AddProperty 'Anchor' 'Left,Top'
$mElementsObj = New-Object PSCustomObject
$mElementsObj |Add-Member -Name 'Name' -MemberType NoteProperty -Value $mControlName
$mElementsObj |Add-Member -Name 'Type' -MemberType NoteProperty -Value ($mControlType.SelectedItem)
$mElementsObj |Add-Member -Name 'Properties' -MemberType NoteProperty -Value $mPropertiesArr
$Global:mFormObj.Elements += $mElementsObj
renewGrids
repaintForm
}
function AddControl ($mControl) {
$mReturnControl = $null
switch ($mControl.Type){
"TextBox" {$mReturnControl = New-Object System.Windows.Forms.TextBox}
"ListBox" {$mReturnControl = New-Object System.Windows.Forms.ListBox}
"ComboBoX" {$mReturnControl = New-Object System.Windows.Forms.ComboBox}
"Label" {$mReturnControl = New-Object System.Windows.Forms.Label}
"DataGrid" {$mReturnControl = New-Object System.Windows.Forms.DataGridView}
"Button" {$mReturnControl = New-Object System.Windows.Forms.Button}
'CheckBox' {$mReturnControl = New-Object System.Windows.Forms.CheckBox}
'DateTimePicker' {$mReturnControl = New-Object System.Windows.Forms.DateTimePicker}
'ListView' {$mReturnControl = New-Object System.Windows.Forms.ListView}
'PictureBox' {$mReturnControl = New-Object System.Windows.Forms.PictureBox}
'RichTextBox' {$mReturnControl = New-Object System.Windows.Forms.RichTextBox}
'TreeView' {$mReturnControl = New-Object System.Windows.Forms.TreeView}
'WebBrowser' {$mReturnControl = New-Object System.Windows.Forms.WebBrowser}
"default" {write-host 'something goes wrong sorry :('}
}
$mReturnControl.Name = $mControl.Name
$mSizeX=$null
$mSizeY=$null
foreach ($mProperty in $mControl.Properties){
switch ($mProperty.Name){
'Text' {$mReturnControl.Text=$mProperty.Value}
'SizeX' {$mSizeX=$mProperty.Value}
'SizeY' {$mSizeY=$mProperty.Value}
'Top' {$mReturnControl.Top=$mProperty.Value}
'Left' {$mReturnControl.Left=$mProperty.Value}
'Anchor'{$mReturnControl.Anchor=$mProperty.Value}
}
}
$mReturnControl.Size = New-Object System.Drawing.Size($mSizeX,$mSizeY)
$mReturnControl.Add_MouseDown({MouseDown})
$mReturnControl.Add_MouseMove({MouseMove ($mControl.Name)})
$mReturnControl.Add_MouseUP({MouseUP})
Return $mReturnControl
}
function PropertiesEndEdit{
foreach ($mProperty in $Global:mFormObj.Elements[$mElemetnsGrid.CurrentRow.Index].Properties){
if ($mProperty.Name -eq $mPropertiesGrid.currentrow.Cells[0].FormattedValue){
$mProperty.Value = $mPropertiesGrid.currentrow.Cells[1].FormattedValue
}
}
repaintForm
}
Function repaintForm {
$mFormGroupBox.Size = New-Object System.Drawing.Size(($mFormObj.SizeX),($mFormObj.SizeY))
$mFormGroupBox.controls.clear()
Foreach ($mElement in $mFormObj.Elements){
$mFormGroupBox.controls.add((AddControl $mElement))
}
}
Function EditFormSize ($x,$y){
$Global:mFormObj.SizeX = $X
$Global:mFormObj.SizeY = $Y
repaintForm
}
function ExportForm {
$mFormObj
$mExportString = "
"
$mExportString+= '
Add-Type -AssemblyName System.Windows.Forms
Add-Type -AssemblyName System.Drawing
$MyForm = New-Object System.Windows.Forms.Form
$MyForm.Text="MyForm"
$MyForm.Size = New-Object System.Drawing.Size('+$mFormObj.SizeX+','+$mFormObj.SizeY+')
'
foreach ($mElement in $mFormObj.Elements){
$mExportString+='
$m'+$mElement.Name+' = New-Object System.Windows.Forms.'+$mElement.Type+''
$mPrSizeX=''
$mPrSizeY=''
foreach ($mProperty in $mElement.Properties){
If ($mProperty.Name -eq 'SizeX'){
$mPrSizeX = $mProperty.Value
}
elseIf ($mProperty.Name -eq 'SizeY'){
$mPrSizeY = $mProperty.Value
}
else{
$mExportString+='
$m'+$mElement.Name+'.'+$mProperty.Name +'="'+$mProperty.Value+'"'
}
}
$mExportString+='
$m'+$mElement.Name+'.Size = New-Object System.Drawing.Size('+$mPrSizeX+','+$mPrSizeY+')
$MyForm.Controls.Add($m'+$mElement.Name+')
'
}
$mExportString+= '$MyForm.ShowDialog()'
$mFileName=''
$mFileName = get-filename 'C:\'
if ($mFileName -notlike ''){
$mExportString > $mFileName
}
}
Function Get-FileName($initialDirectory) {
$SaveFileDialog = New-Object System.Windows.Forms.SaveFileDialog
$SaveFileDialog.initialDirectory = $initialDirectory
$SaveFileDialog.filter = Powershell Script (*.ps1)|*.ps1|All files (*.*)|*.*
$SaveFileDialog.ShowDialog() | Out-Null
$SaveFileDialog.filename
}
$mForm = New-Object System.Windows.Forms.Form
$mForm.AutoSize = $true
$mForm.Text='FormsMaker'
$mControlType = New-Object System.Windows.Forms.ComboBoX
$mControlType.Anchor = 'Left,Top'
$mControlType.Size = New-Object System.Drawing.Size(100,23)
$mControlType.Left = 5
$mControlType.Top = 5
$mControlType.Items.Add("TextBox")
$mControlType.Items.Add("ListBox")
$mControlType.Items.Add("ComboBoX")
$mControlType.Items.Add("Label")
$mControlType.Items.Add("DataGrid")
$mControlType.Items.Add("Button")
$mControlType.Items.Add("CheckBox")
$mControlType.Items.Add("DateTimePicker")
$mControlType.Items.Add("ListView")
$mControlType.Items.Add("PictureBox")
$mControlType.Items.Add("RichTextBox")
$mControlType.Items.Add("TreeView")
$mControlType.Items.Add("WebBrowser")
$mForm.Controls.Add($mControlType)
$mAddButton = New-Object System.Windows.Forms.Button
$mAddButton.Anchor = 'Left,Top'
$mAddButton.Text = 'Add'
$mAddButton.Left = 110
$mAddButton.Top = 5
$mAddButton.Size = New-Object System.Drawing.Size(50,23)
$mAddButton.Add_Click({AddElement})
$mForm.Controls.Add($mAddButton)
$mFormLabel = New-Object System.Windows.Forms.Label
$mFormLabel.Text = 'Form Size:'
$mFormLabel.Top = 5
$mFormLabel.Left = 165
$mFormLabel.Anchor = 'Left,Top'
$mFormLabel.Size = New-Object System.Drawing.Size(80,23)
$mFormLabel.TextAlign='MiddleRight'
$mForm.Controls.Add($mFormLabel)
$mFormXTextBox = New-Object System.Windows.Forms.TextBox
$mFormXTextBox.left = 250
$mFormXTextBox.top = 5
$mFormXTextBox.Size = New-Object System.Drawing.Size(30,23)
$mFormXTextBox.Anchor = 'Left,Top'
$mFormXTextBox.Text=300
$mForm.Controls.Add($mFormXTextBox)
$mFormXLabel = New-Object System.Windows.Forms.Label
$mFormXLabel.Text = 'X'
$mFormXLabel.Top = 5
$mFormXLabel.Left = 280
$mFormXLabel.Anchor = 'Left,Top'
$mFormXLabel.Size = New-Object System.Drawing.Size(20,23)
$mFormXLabel.TextAlign='MiddleCenter'
$mFormXTextBox.Add_TextChanged({EditFormSize $mFormXTextBox.Text $mFormYTextBox.Text })
$mForm.Controls.Add($mFormXLabel)
$mFormYTextBox = New-Object System.Windows.Forms.TextBox
$mFormYTextBox.left = 300
$mFormYTextBox.top = 5
$mFormYTextBox.Size = New-Object System.Drawing.Size(30,23)
$mFormYTextBox.Anchor = 'Left,Top'
$mFormYTextBox.Text= 300
$mFormYTextBox.Add_TextChanged({EditFormSize $mFormXTextBox.Text $mFormYTextBox.Text})
$mForm.Controls.Add($mFormYTextBox)
$mFormGroupBox = New-Object System.Windows.Forms.GroupBox
$mFormGroupBox.left = 350
$mFormGroupBox.top = 5
$mFormGroupBox.Anchor = 'Left,Top'
$mFormGroupBox.Size = New-Object System.Drawing.Size($mFormXTextBox.Text,$mFormYTextBox.Text)
$mFormGroupBox.Text = 'New Form'
$mForm.Controls.Add($mFormGroupBox)
$mElemetnsGrid = New-Object System.Windows.Forms.DataGridView
$mElemetnsGrid.size = New-Object System.Drawing.Size(155,600)
$mElemetnsGrid.left=5
$mElemetnsGrid.top=33
$mElemetnsGrid.Anchor='Top,Left'
$mElemetnsGrid.RowHeadersVisible =$false
$mElemetnsGrid.Add_CellContentClick({ElementsChanged})
$mElemetnsGrid.Add_CellEndEdit({ElementsEndEdit})
$mForm.Controls.Add($mElemetnsGrid)
$mPropertiesGrid = New-Object System.Windows.Forms.DataGridView
$mPropertiesGrid.size = New-Object System.Drawing.Size(155,600)
$mPropertiesGrid.left=180
$mPropertiesGrid.top=33
$mPropertiesGrid.Anchor='Top,Left'
$mPropertiesGrid.ColumnHeadersVisible=$true
$mPropertiesGrid.RowHeadersVisible =$false
$mPropertiesGrid.Add_CellEndEdit({PropertiesEndEdit})
$mForm.Controls.Add($mPropertiesGrid)
$mDeleteButton = New-Object System.Windows.Forms.Button
$mDeleteButton.size = New-Object System.Drawing.Size(155,23)
$mDeleteButton.Text = 'Delete'
$mDeleteButton.Left = 5
$mDeleteButton.Top = 638
$mDeleteButton.Anchor = 'Top,Left'
$mDeleteButton.Add_Click({DeleteElement})
$mForm.Controls.Add($mDeleteButton)
$mExportButton = New-Object System.Windows.Forms.Button
$mExportButton.size = New-Object System.Drawing.Size(155,23)
$mExportButton.text = 'Export'
$mExportButton.Left = 180
$mExportButton.top = 638
$mExportButton.Anchor='Top,Left'
$mExportButton.Add_Click({ExportForm})
$mForm.Controls.Add($mExportButton)
$Global:mFormObj = new-object PSCustomObject
$Global:mFormObj | Add-Member -Name 'SizeX' -MemberType NoteProperty -Value 300
$Global:mFormObj | Add-Member -Name 'SizeY' -MemberType NoteProperty -Value 300
$Global:mFormObj | Add-Member -Name 'Elements' -MemberType NoteProperty -Value @()
$Global:mCurFirstX =0
$Global:mCurFirstY =0
$mForm.ShowDialog()

View File

@@ -0,0 +1,208 @@
#------------------------------------------------------------------------
# Source File Information (DO NOT MODIFY)
# Source ID: 676f8db7-35c7-452d-b353-a4b40f26243a
# Source File: Form-Template.psf
#------------------------------------------------------------------------
#region File Recovery Data (DO NOT MODIFY)
<#RecoveryData:
RAUAAB+LCAAAAAAABAC9VNtKwzAYvhd8h5Dr2oPd3AZtYXTuxtNwQ72TrP07o2lSknSzPr3p2g1x
QkHGKJSk+Q7/KQ0eIRFrkNWEaILMQlHBQ3xpezg6P0MoeJB0RTlhU8rgnuQQTYXMLxaQF4xosAuV
Bc4BpmEu3yHRSFcFhHheKQ25/Ux5KjbKrkWat4X+OrLQUxtKz3brx0JxyXQpIeRQakmYhWblktHk
BqqF+AAeLgcD0k/6V97I74E7HGHETSghzoyeh1HyRlkqDQ7HgmspmGoSNIHOpChA6qoljEst5glh
MKE58DoIA72ykOcHzg7aRb0TKWBTKq47OTGjwPWcfhnCwDU+/nDYSaqrjKNtap3YBXxqvG3bIfR6
bbxb3K0gaav5Wq8DZ3vaNNNputlsxkpBbooPaqfTfqmiXCVCMro8QgMDZ6/626UZmVN4HH0sux3r
m3gaI0k2lK/+4+X6WT8bZJ6X9l3ik26vl5ydJKdYSDi+0X7bjHzg/PxrRt9OzyrdRAUAAA==#>
#endregion
<#
.NOTES
--------------------------------------------------------------------------------
Code generated by: SAPIEN Technologies, Inc., PowerShell Studio 2017 v5.4.141
Generated on: 8/29/2017 11:53 AM
Generated by: Haidey2
--------------------------------------------------------------------------------
.DESCRIPTION
GUI script generated by PowerShell Studio 2017
#>
#----------------------------------------------
#region Application Functions
#----------------------------------------------
#endregion Application Functions
#----------------------------------------------
# Generated Form Function
#----------------------------------------------
function Show-Form-Template_psf {
#----------------------------------------------
#region Import the Assemblies
#----------------------------------------------
[void][reflection.assembly]::Load('System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
[void][reflection.assembly]::Load('System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
[void][reflection.assembly]::Load('System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a')
#endregion Import Assemblies
#----------------------------------------------
#region Generated Form Objects
#----------------------------------------------
[System.Windows.Forms.Application]::EnableVisualStyles()
$form1 = New-Object 'System.Windows.Forms.Form'
$InitialFormWindowState = New-Object 'System.Windows.Forms.FormWindowState'
$PanelEventLogs_Events = New-Object 'System.Windows.Forms.Panel'
$PanelEventLogs_Filter = New-Object 'System.Windows.Forms.Panel'
$Text_ELogs_ServerName = New-Object 'System.Windows.Forms.TextBox'
$Text_ELogs_EventID = New-Object 'System.Windows.Forms.TextBox'
$Text_Elogs_DaysBack = New-Object 'System.Windows.Forms.TextBox'
$Button_ELogs_Connect = New-Object 'System.Windows.Forms.Button'
#endregion Generated Form Objects
#----------------------------------------------
# User Generated Script
#----------------------------------------------
$form1_Load={
#TODO: Initialize Form Controls here
}
# --End User Generated Script--
#----------------------------------------------
#region Generated Events
#----------------------------------------------
$Form_StateCorrection_Load=
{
#Correct the initial state of the form to prevent the .Net maximized form issue
$form1.WindowState = $InitialFormWindowState
}
$Form_Cleanup_FormClosed=
{
#Remove all event handlers from the controls
try
{
$form1.remove_Load($form1_Load)
$form1.remove_Load($Form_StateCorrection_Load)
$form1.remove_FormClosed($Form_Cleanup_FormClosed)
$PanelEventLogs_Events.remove_Paint($PanelEventLogs_Events_Paint)
$PanelEventLogs_Filter.remove_Paint($PanelEventLogs_Filter_Paint)
$Text_Elogs_DaysBack.remove_TextChanged($Text_Elogs_DaysBack_TextChanged)
$Text_ELogs_ServerName.remove_TextChanged($Text_ELogs_ServerName_TextChanged)
$Text_ELogs_EventID.remove_TextChanged($Text_ELogs_EventID_TextChanged)
}
catch { Out-Null <# Prevent PSScriptAnalyzer warning #> }
}
$PanelEventLogs_Events_Paint=[System.Windows.Forms.PaintEventHandler]{ <#Event Argument: $_ = [System.Windows.Forms.PaintEventArgs]#> }
$PanelEventLogs_Filter_Paint=[System.Windows.Forms.PaintEventHandler]{ }
$Text_ELogs_ServerName_TextChanged={}
$Text_Elogs_DaysBack_TextChanged={}
#endregion Generated Events
#----------------------------------------------
#region Generated Form Code
#----------------------------------------------
#
# form1
#
$form1.Controls.Add($PanelEventLogs_Events)
$form1.Controls.Add($PanelEventLogs_Filter)
$form1.AutoScaleDimensions = '6, 13'
$form1.AutoScaleMode = 'Font'
$form1.ClientSize = '1200, 780'
$form1.Name = 'form1'
$form1.Text = 'Form'
$form1.add_Load($form1_Load)
#endregion Generated Form Code
#----------------------------------------------
$PanelEventLogs_Events.Controls.Add($Text_ELogs_ServerName)
$PanelEventLogs_Events.Controls.Add($Button_ELogs_Connect)
$PanelEventLogs_Events.Controls.Add($Button_ELogs_View)
$PanelEventLogs_Events.Controls.Add($Combobox_EventLogs_LogsList)
$PanelEventLogs_Events.Controls.Add($VCenterUserPassword)
$PanelEventLogs_Events.Controls.Add($CheckBoxUseWindowsLogin)
$PanelEventLogs_Events.Controls.Add($labelVCenterUserName)
$PanelEventLogs_Events.Controls.Add($labelVCenterPassword)
$PanelEventLogs_Events.BackColor = '153,153,153'
$PanelEventLogs_Events.Location = '6, 6'
$PanelEventLogs_Events.Name = 'panelEventLogs_Events'
$PanelEventLogs_Events.Size = '598, 56'
$PanelEventLogs_Events.TabIndex = 0
$PanelEventLogs_Events.add_Paint($PanelEventLogs_Events_Paint)
$PanelEventLogs_Filter.Controls.Add($Combobox_ELogsFilter_Level)
$PanelEventLogs_Filter.Controls.Add($Text_ELogs_EventID)
$PanelEventLogs_Filter.Controls.Add($Text_Elogs_DaysBack)
$PanelEventLogs_Filter.Controls.Add($label_ELogs_Level)
$PanelEventLogs_Filter.Controls.Add($label_ELogs_EventID)
$PanelEventLogs_Filter.Controls.Add($label_ELogs_DaysBack)
$PanelEventLogs_Filter.BackColor = '255,255,212'
$PanelEventLogs_Filter.Location = '6, 62'
$PanelEventLogs_Filter.Name = 'PanelEventLogs_Filter'
$PanelEventLogs_Filter.Size = '598, 56'
$PanelEventLogs_Filter.BorderStyle = 'FixedSingle'
$PanelEventLogs_Filter.TabIndex = 0
$PanelEventLogs_Filter.add_Paint($PanelEventLogs_Filter_Paint)
#
# $Text_ELogs_ServerName
#
$Text_ELogs_ServerName.Location = '8, 26'
$Text_ELogs_ServerName.Name = '$Text_ELogs_ServerName'
$Text_ELogs_ServerName.Size = '100, 20'
$Text_ELogs_ServerName.text = "l2012"
$Text_ELogs_ServerName.TabIndex = 6
$Text_ELogs_ServerName.add_TextChanged($Text_ELogs_ServerName_TextChanged)
#
#
# Text_ELogs_EventID
#
$Text_ELogs_EventID.Location = '115, 26'
$Text_ELogs_EventID.Name = 'Text_ELogs_EventID'
$Text_ELogs_EventID.Size = '40, 20'
$Text_ELogs_EventID.TabIndex = 7
$Text_ELogs_EventID.add_TextChanged($Text_ELogs_EventID_TextChanged)
#
# Text_Elogs_DaysBack
#
$Text_Elogs_DaysBack.Location = '175, 26'
$Text_Elogs_DaysBack.Name = 'Text_Elogs_DaysBack'
$Text_Elogs_DaysBack.Size = '40, 20'
$Text_Elogs_DaysBack.TabIndex = 7
$Text_Elogs_DaysBack.add_TextChanged($Text_Elogs_DaysBack_TextChanged)
#
#Save the initial state of the form
$InitialFormWindowState = $form1.WindowState
#Init the OnLoad event to correct the initial state of the form
$form1.add_Load($Form_StateCorrection_Load)
#Clean up the control events
$form1.add_FormClosed($Form_Cleanup_FormClosed)
#Show the Form
return $form1.ShowDialog()
} #End Function
#Call the form
Show-Form-Template_psf | Out-Null

View File

@@ -0,0 +1,948 @@
#------------------------------------------------------------------------
# Source File Information (DO NOT MODIFY)
# Source ID: 676f8db7-35c7-452d-b353-a4b40f26243a
# Source File: Form-Template.psf
#------------------------------------------------------------------------
#region File Recovery Data (DO NOT MODIFY)
<#RecoveryData:
RAUAAB+LCAAAAAAABAC9VNtKwzAYvhd8h5Dr2oPd3AZtYXTuxtNwQ72TrP07o2lSknSzPr3p2g1x
QkHGKJSk+Q7/KQ0eIRFrkNWEaILMQlHBQ3xpezg6P0MoeJB0RTlhU8rgnuQQTYXMLxaQF4xosAuV
Bc4BpmEu3yHRSFcFhHheKQ25/Ux5KjbKrkWat4X+OrLQUxtKz3brx0JxyXQpIeRQakmYhWblktHk
BqqF+AAeLgcD0k/6V97I74E7HGHETSghzoyeh1HyRlkqDQ7HgmspmGoSNIHOpChA6qoljEst5glh
MKE58DoIA72ykOcHzg7aRb0TKWBTKq47OTGjwPWcfhnCwDU+/nDYSaqrjKNtap3YBXxqvG3bIfR6
bbxb3K0gaav5Wq8DZ3vaNNNputlsxkpBbooPaqfTfqmiXCVCMro8QgMDZ6/626UZmVN4HH0sux3r
m3gaI0k2lK/+4+X6WT8bZJ6X9l3ik26vl5ydJKdYSDi+0X7bjHzg/PxrRt9OzyrdRAUAAA==#>
#endregion
<#
.NOTES
--------------------------------------------------------------------------------
Code generated by: SAPIEN Technologies, Inc., PowerShell Studio 2017 v5.4.141
Generated on: 8/29/2017 11:53 AM
Generated by: Haidey2
--------------------------------------------------------------------------------
.DESCRIPTION
GUI script generated by PowerShell Studio 2017
#>
#----------------------------------------------
#region Application Functions
#----------------------------------------------
#endregion Application Functions
#----------------------------------------------
# Generated Form Function
#----------------------------------------------
function Show-Form-Template_psf {
#----------------------------------------------
#region Import the Assemblies
#----------------------------------------------
[void][reflection.assembly]::Load('System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
[void][reflection.assembly]::Load('System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
[void][reflection.assembly]::Load('System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a')
#endregion Import Assemblies
#----------------------------------------------
#region Generated Form Objects
#----------------------------------------------
[System.Windows.Forms.Application]::EnableVisualStyles()
$form1 = New-Object 'System.Windows.Forms.Form'
$InitialFormWindowState = New-Object 'System.Windows.Forms.FormWindowState'
$Script:Output = New-Object System.Windows.Forms.TextBox
$Script:Output_Left = New-Object System.Windows.Forms.TextBox
$Script:Output_Right = New-Object System.Windows.Forms.TextBox
$Script:Collection_DropDownBox = New-Object System.Windows.Forms.ComboBox
$Script:Deployment_DropDownBox = New-Object System.Windows.Forms.ComboBox
$Script:Combobox_Tools = New-Object System.Windows.Forms.ComboBox
$GroupBox = New-Object System.Windows.Forms.GroupBox
$GroupBox_Info = New-Object System.Windows.Forms.GroupBox
$Script:RadioButton_Window = New-Object System.Windows.Forms.RadioButton
$Script:RadioButton_GridView = New-Object System.Windows.Forms.RadioButton
$Script:RadioButton_CSV = New-Object System.Windows.Forms.RadioButton
$Button_Go = New-Object System.Windows.Forms.Button
$Script:TextBox_CollectionName = New-Object System.Windows.Forms.TextBox
#$PanelEventLogs_Events = New-Object 'System.Windows.Forms.Panel'
#$PanelEventLogs_Filter = New-Object 'System.Windows.Forms.Panel'
#$Text_ELogs_ServerName = New-Object 'System.Windows.Forms.TextBox'
#$Text_ELogs_EventID = New-Object 'System.Windows.Forms.TextBox'
#$Text_Elogs_DaysBack = New-Object 'System.Windows.Forms.TextBox'
$label_CollectionName = New-Object 'System.Windows.Forms.Label'
$label_CollectionName_Value = New-Object 'System.Windows.Forms.Label'
$label_DeploymentName = New-Object 'System.Windows.Forms.Label'
$label_DeploymentName_Value = New-Object 'System.Windows.Forms.Label'
$label_DeploymentTime = New-Object 'System.Windows.Forms.Label'
$label_DeploymentTime_Value = New-Object 'System.Windows.Forms.Label'
$label_DeviceCount = New-Object 'System.Windows.Forms.Label'
$label_DeviceCount_Value = New-Object 'System.Windows.Forms.Label'
$label_ServersResponding = New-Object 'System.Windows.Forms.Label'
$label_ServersResponding_Value = New-Object 'System.Windows.Forms.Label'
$label_ServersNOTResponding = New-Object 'System.Windows.Forms.Label'
$label_ServersNOTResponding_Value = New-Object 'System.Windows.Forms.Label'
$label_ServersPinging = New-Object 'System.Windows.Forms.Label'
$label_ServersPinging_Value = New-Object 'System.Windows.Forms.Label'
#$Button_ELogs_Connect = New-Object 'System.Windows.Forms.Button'
# $Location = Split-Path $MyInvocation.MyCommand.Path -Parent
$Script:ALL_Patch_Servers = @()
$Script:Responding = @()
$Script:NotResponding = @()
$Global:DeviceCollection_ServerNames1 = ""
$Global:Collection_Name = ""
$Global:Select_Tool
$Global:Output_Type = ""
$Global:Deployments = ""
#endregion Generated Form Objects
#----------------------------------------------
# User Generated Script
#----------------------------------------------
$form1_Load={
#TODO: Initialize Form Controls here
}
$Script:Collection_DropDownBox_SelectedIndexChanged={
$Script:Output.Text = $Script:Collection_DropDownBox.Text
$T = Get-CMDeviceCollection -Name $Script:Collection_DropDownBox.text | select Name,MemberCount
$label_DeviceCount_Value.Text = $T.MemberCount
}
$Script:Deployment_DropDownBox_SelectedIndexChanged={
Reset-Forms -Form_Selection 1
Deployed-to-Collections
$Script:Output.Text = $Script:Deployment_DropDownBox.Text
}
$Script:Combobox_Tools_SelectedIndexChanged= {
$Script:Output.Text = $Script:Combobox_Tools.Text
}
$Button_Go_Click = {
temp
#SCCM-Module
# $Global:Collection_Name = $Script:TextBox_CollectionName.Text #$Script:TextBox_CollectionName.Text
# $Global:Select_Tool = $Script:Combobox_Tools.Text
#$Output.Text = "$Global:Collection_Name --- $Global:Select_Tool " | Out-String
#$Output.Text = | Out-String
}
##################################################################################################################
Function ConnectTo-SCCM {
If(!(Get-PSDrive).Name -ne "CCX") {
#
# Press 'F5' to run this script. Running this script will load the ConfigurationManager
# module for Windows PowerShell and will connect to the site.
#
# This script was auto-generated at '2/18/2021 10:12:39 AM'.
# Uncomment the line below if running in an environment where script signing is
# required.
#Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process
# Site configuration
$SiteCode = "CCX" # Site code
$ProviderMachineName = "PNCRASCCM001.ccx.carecentrix.com" # SMS Provider machine name
# Customizations
$initParams = @{}
#$initParams.Add("Verbose", $true) # Uncomment this line to enable verbose logging
#$initParams.Add("ErrorAction", "Stop") # Uncomment this line to stop the script on any errors
# Do not change anything below this line
# Import the ConfigurationManager.psd1 module
if((Get-Module ConfigurationManager) -eq $null) {
Import-Module "$($ENV:SMS_ADMIN_UI_PATH)\..\ConfigurationManager.psd1" @initParams
}
# Connect to the site's drive if it is not already present
if((Get-PSDrive -Name $SiteCode -PSProvider CMSite -ErrorAction SilentlyContinue) -eq $null) {
New-PSDrive -Name $SiteCode -PSProvider CMSite -Root $ProviderMachineName @initParams
}
# Set the current location to be the site code.
Set-Location "$($SiteCode):\" @initParams
#$Script:Output.Text = "inside connectoSCCM function"
}#endIf
}#endFunction
##################################################################################################################
Function SCCM-Module {
Write-Host "Inside SCCM function" -ForegroundColor Cyan
If(!(Get-PSDrive).Name -eq "sccm-drive") {
Import-Module 'C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1'
New-PSDrive -Name SCCM-Drive -PSProvider "AdminUI.PS.Provider\CMSite" -Root "PNCRASCCM001.ccx.carecentrix.com" -Description "SCCM Site"
}#endIf
$Script:Output.Text | Get-PSDrive | ft -AutoSize | Out-String
CD sccm-drive:
}#endFunction
##################################################################################################################
Function Update-Dropdown1 {
# $Collections += $Script:Collection_DropDownBox.text
$Collections = @("Collection-Servers","Ping-Collection","Check_Uptime","Test-Service","Remotely Update Policy","Software Update Status","Test-Sccm")
$Collections | % { $Script:Combobox_Tools.Items.Add($_) }
}
##################################################################################################################
Function Reset-Forms {
Param($Form_Selection)
Switch ($Form_Selection) {
1 { $Collection_DropDownBox.Items.Clear(); $Collection_DropDownBox.Text = "--Deployed to Collections--" }
2 {}
}
}
##################################################################################################################
Function temp {
$Script:Output.Clear()
$Script:Output_Left.Clear()
$Script:Output_Right.Clear()
#$Script:Script:Output.text = $Script:Collection_DropDownBox.text | Out-String
#$Global:Collection_Name = $Script:TextBox_CollectionName.Text #$Script:TextBox_CollectionName.Text
$Global:Collection_Name = $Script:Collection_DropDownBox.Text
$Global:Select_Tool = $Script:Combobox_Tools.Text
If ($Script:RadioButton_Window.Checked -eq $true) { $Global:Output_Type = "Window" <#; $Script:Output.Text = "Window_Radio1 Checked: $($Script:RadioButton_Window.Checked)" | Out-String #> }
ElseIf ($Script:RadioButton_GridView.Checked -eq $true) { $Global:Output_Type = "Gridview" <#; $Script:Output.Text = "Gridview_Radio2 Checked: $($Script:RadioButton_GridView.Checked)" | Out-String #> }
ElseIf ($Script:RadioButton_CSV.Checked -eq $true) { $Global:Output_Type = "Export" <#; $Script:Output.Text = "CSV_Radio3 Checked: $($Script:RadioButton_CSV.Checked)" | Out-String #> }
If($Global:Collection_Name -and $Global:Select_Tool) {
# If($Script:Collection_DropDownBox.text = "Tool1"){gcc}
Run-Tool
#$Script:TextBox_CollectionName.clear()
$Script:Collection_DropDownBox.text = "----Select Collection----"
#Clear-Variables
}#endIf
Else { #$T = { Write-Host "You must enter Collection Name ............!!" -ForegroundColor Red }
$Script:Output.SelectionColor = 'red'
$Script:Output.Text = "You must select 'Tool' and enter Collection Name............!!"
}
Run-Defaults
}#endFunction
##################################################################################################################
Function Run-Tool {
Switch($Global:Select_Tool) {
Collection-Servers { Collection-Servers; Write-Host "Tool Selected: $Global:Select_Tool" }
Ping-Collection { Ping_Collection }
Check_Uptime { Check_Uptime }
Test-Service { Test-Service }
Test-SCCM { SCCM-Module }
#"Remotely Update Policy" { $Script:Output.Text = Invoke-Expression $Location\Tool-Remotely-Restart-SCCMSyncCycle.ps1 | ft -AutoSize | Out-String }
"Remotely Update Policy" { $Script:Output.Text = Invoke-Expression $Location\Tool-Remotely-Restart-SCCMSyncCycle.ps1 | ft -AutoSize | Out-String }
"Software Update Status" { $Script:Output.Text = & "$Location\Tool-Get-SCCMSoftwareUpdateStatus.ps1" -Dep_ID 16778048 | ft -AutoSize | Out-String}
}#endSwitch
#Clear-Variables
}#endFunction
##################################################################################################################
Function Run-Defaults {
#$Script:TextBox_CollectionName.Text = "Nabil - Test Collection"
$Script:RadioButton_Window.Checked = $true
<#
If(!$Location) {
$Location = Split-Path $MyInvocation.MyCommand.Path -Parent
}
#>
}
##################################################################################################################
Function xClear-Variables {
$Global:Collection_Name = ""
$Global:Select_Tool = ""
$Global:Output_Type = ""
$Script:ALL_Patch_Servers = @()
}
##################################################################################################################
Function Display-Results {
#Param($Global:Output_Type,$Final_Result)
Write-Host "DisplayType: $($Global:Output_Type)"
Switch ($Global:Output_Type){
Window { $Script:Output.Text = $Script:ALL_Patch_Servers | Out-String}
Gridview { $Script:ALL_Patch_Servers | Out-GridView }
Export { $Script:ALL_Patch_Servers | Export-Csv -Path $Location\Results.csv -NoTypeInformation; ii $Location\Results.csv }
}#endSwitch
}
#############################################################################################################################################################
Function Collection-Servers {
#Param($Coll_Name)
Write-Host "Collection:$Global:Collection_Name"
$Script:ALL_Patch_Servers = @()
ConnectTo-SCCM
NA-Set-Stage -Select_Stage OutputStage2
#SCCM-Module
#CD sccm-drive:
$Script:DeviceCollection_MemberCount = Get-CMDeviceCollection -Name $Global:Collection_Name | select Name,MemberCount
$Script:DeviceCollection_ServerNames = Collection-Members #Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name,IsClient #| Export-Csv "E:\SCCM-Files\SCCM-Scripts\Files\$Global:Collection_Name.csv" -NoTypeInformation
#$ServerName = $DeviceCollection_ServerNames.Name
#Set-Location c:
#$Script:Temp = Get-CMCollectionMember -CollectionName $Global:Collection_Name #| select Name,IsClient
$Script:DeviceCollection_ServerNames | % {
$Obj = New-Object -TypeName PSObject
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $_.Name
$Obj | Add-Member -MemberType NoteProperty -Name ClientInstalled -Value $_.IsClient
$Obj | Add-Member -MemberType NoteProperty -Name CollectionName -Value $Global:Collection_Name
#$Obj | Add-Member -MemberType NoteProperty -Name CollectionMemberCount -Value {(Get-CMCollectionMember -Name $Global:Collection_Name).MemberCount}
$Obj
$Script:ALL_Patch_Servers += $Obj
}#end%
# $Script:Output.Text = $Script:ALL_Patch_Servers | Out-String
Display-Results #-Final_Result $Script:ALL_Patch_Servers
Write-Host "$Script:ALL_Patch_Servers"
# $Script:ALL_Patch_Servers | Export-Csv $Location\Current-Collection-Servers.csv -NoTypeInformation
}#endFunction
#############################################################################################################################################################
Function Collection-Members {
Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name,IsClient
}
#############################################################################################################################################################
Function NA-Set-Stage {
Param($Select_Stage)
Switch($Select_Stage) {
OutputStage1 { $Script:Output.Visible = $false
$Script:Output_Left.Visible = $True
$Script:Output_Right.Visible = $True
$label_ServersResponding.Visible = $True
$label_ServersResponding_Value.Visible = $True
$label_ServersNOTResponding.Visible = $True
$label_ServersNOTResponding_Value.Visible = $True
$label_ServersPinging.Visible = $True
$label_ServersPinging_Value.Visible = $True
#Write-Host "output-stage1" -ForegroundColor Yellow
}
OutputStage2 { $Script:Output.Visible = $True
$label_ServersResponding.Visible = $false
$label_ServersResponding_Value.Visible = $false
$label_ServersNOTResponding.Visible = $False
$label_ServersNOTResponding_Value.Visible = $false
$Script:Output_Left.Visible = $false
$Script:Output_Right.Visible = $false
$label_ServersPinging.Visible = $false
$label_ServersPinging_Value.Visible = $false
}
test { $Script:Output.Text = "inside na set stage function"}
}#endSwitch
$Script:Output.Text = "outside switch inside na set stage function - param: $Select_Stage"
}#endFunction
#############################################################################################################################################################
Function Ping_Collection {
$Ping_Result = @()
$NotResponding = @()
$Responding = @()
ConnectTo-SCCM
NA-Set-Stage -Select_Stage OutputStage1
#$Script:Output.Visible = $false
#$Script:Output_Left.Visible = $True
#$Script:Output_Right.Visible = $True
$Global:DeviceCollection_ServerNames1 = Collection-Members #Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name
#Set-Location c:
Write-Host "Total Server Count: $($Global:DeviceCollection_ServerNames1.count)" -ForegroundColor Green
Write-Host ""
############
# $Script:Output.Text = "CollectionName: $($Global:Collection_Name) ------ hello "
############
$Global:DeviceCollection_ServerNames1.Name | % {
$Server = $_
$label_ServersPinging_Value.Text = $Server
$Obj = New-Object -TypeName PSObject
$Count = $Global:DeviceCollection_ServerNames1.count
#$Script:Output.Text = "Checking: $Server ----- Servers left: $($Count--) Please Wait !!!" | Out-String
If (Test-Connection $Server -Count 1 -ErrorAction SilentlyContinue ) {
#Write-Host "Responding:---- $_ " -ForegroundColor Green
#$Script:Output.AppendText("Responding: $_")
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $Server
$Obj | Add-Member -MemberType NoteProperty -Name Responding -Value "Yes"
$Ping_Result += $Obj
#$Responding += $Server
$Responding += $Obj
# $Script:Output.text += $Obj | Out-String
}#endIf
Else {
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $Server
$Obj | Add-Member -MemberType NoteProperty -Name Responding -Value "No!"
$Ping_Result += $Obj
#$NotResponding += $Server
$NotResponding += $Obj
# $Script:Output.text += $Obj | Out-String
}
}#end%
#$Script:Output.Text = $Ping_Result | ft -AutoSize | Out-String
$Script:Output_Left.Text = $Responding | Out-String
$Script:Output_Right.Text = $NotResponding | Out-String
$label_ServersPinging_Value.Text = "Done !"
$label_ServersResponding_Value.Text = $Responding.Count
$label_ServersNOTResponding_Value.Text = $NotResponding.Count
write-host "-------------------------------------------------------"
Write-host "$($Responding.count) / $($DeviceCollection_ServerNames1.count) -- Responding" -foregroundcolor Green
Write-host "$($NotResponding.count) / $($DeviceCollection_ServerNames1.count) -- NOT Responding" -foregroundcolor Red
#Write-Host "Servers NOT Responding: $NotResponding " -ForegroundColor Red
}#endFunction
#############################################################################################################################################################
Function Check_Uptime {
ConnectTo-SCCM
$Global:DeviceCollection_ServerNames1 = Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name
$Script:Output.Text = $Global:DeviceCollection_ServerNames1.name | % { gwmi win32_operatingsystem -ComputerName $_ -ErrorAction SilentlyContinue | select @{n="Server";e={$_.PSComputername}},@{n="LastReboot";e={$_.Converttodatetime($_.LastBootUpTime)}}} | sort LastBootup -descending | Out-String
}
#############################################################################################################################################################
Function Deployment-List {
Param($Deployment_History)
# SCCM-Module
$Global:Deployments = Get-CMDeployment | ? { $_.deploymenttime -gt ((Get-Date).AddDays(-"$Deployment_History")) }
#$T | select ApplicationName,CollectionName,DeploymentTime,AssignmentID,SoftwareName | % { $Deployment_DropDownBox.Items.Add($_) }
$i = 0
$Q = "" #@()
$Global:Deployments.ApplicationName | % { $Script:Deployment_DropDownBox.Items.Add($_)}
<#
foreach ($D in $Deployments) {
$Q = $D.ApplicationName + "-------------------------------------------------------" + $D.CollectionName
$Deployment_DropDownBox.Items.Add($Q)
$i++
}
#>
#$T.ApplicationName | % { $Deployment_DropDownBox.Items.Add($_) }
}#endFunction
#############################################################################################################################################################
Function Deployed-to-Collections {
$T = $Global:Deployments | ? { $_.ApplicationName -eq "$($Script:Deployment_DropDownBox.text)" } | Select -ExpandProperty CollectionName
$Script:Collection_DropDownBox.Items.Clear()
$T | % { $Script:Collection_DropDownBox.Items.Add("$_")}
}
#############################################################################################################################################################
Function Test-Service {
$Script:Output.Text = "test-service function"
#$T = Get-Service
#$Script:Output.Text = $T | ft -AutoSize | Out-String
}
##################################################################################################################
##################################################################################################################
# --End User Generated Script--
#----------------------------------------------
#region Generated Events
#----------------------------------------------
$Form_StateCorrection_Load=
{
#Correct the initial state of the form to prevent the .Net maximized form issue
$form1.WindowState = $InitialFormWindowState
}
$Form_Cleanup_FormClosed=
{
#Remove all event handlers from the controls
try
{
$form1.remove_Load($form1_Load)
$form1.remove_Load($Form_StateCorrection_Load)
$form1.remove_FormClosed($Form_Cleanup_FormClosed)
#$PanelEventLogs_Events.remove_Paint($PanelEventLogs_Events_Paint)
#$PanelEventLogs_Filter.remove_Paint($PanelEventLogs_Filter_Paint)
$Text_Elogs_DaysBack.remove_TextChanged($Text_Elogs_DaysBack_TextChanged)
$Text_ELogs_ServerName.remove_TextChanged($Text_ELogs_ServerName_TextChanged)
$Text_ELogs_EventID.remove_TextChanged($Text_ELogs_EventID_TextChanged)
$Script:Output.remove_TextChanged($Output_TextChanged)
$Script:Output_Left.remove_TextChanged($Script:Output_Left_TextChanged)
$Script:Output_Right.remove_TextChanged($Script:Output_Right_TextChanged)
$Script:Collection_DropDownBox.remove_SelectedIndexChanged($Script:Collection_DropDownBox_SelectedIndexChanged)
$Script:Deployment_DropDownBox.remove_SelectedIndexChanged($Script:Deployment_DropDownBox_SelectedIndexChanged)
$Script:Combobox_Tools.remove_SelectedIndexChanged($Script:Combobox_Tools_SelectedIndexChanged)
$Script:RadioButton_Window.remove_SelectedIndexChanged($Script:RadioButton_Window_SelectedIndexChanged)
$Script:RadioButton_GridView.remove_SelectedIndexChanged($Script:RadioButton_GridView_SelectedIndexChanged)
$Script:RadioButton_CSV.remove_SelectedIndexChanged($Script:RadioButton_CSV_SelectedIndexChanged)
$Button_Go.remove_Click($Button_Go_Click)
}
catch { Out-Null <# Prevent PSScriptAnalyzer warning #> }
}
#$PanelEventLogs_Events_Paint=[System.Windows.Forms.PaintEventHandler]{ <#Event Argument: $_ = [System.Windows.Forms.PaintEventArgs]#> }
#$PanelEventLogs_Filter_Paint=[System.Windows.Forms.PaintEventHandler]{ }
$Text_ELogs_ServerName_TextChanged={}
$Text_Elogs_DaysBack_TextChanged={}
#endregion Generated Events
#----------------------------------------------
#region Generated Form Code
#----------------------------------------------
#
# form1
#
#$form1.Controls.Add($PanelEventLogs_Events)
#$form1.Controls.Add($PanelEventLogs_Filter)
$form1.Controls.Add($Script:Output)
$form1.Controls.Add($Script:Output_Left)
$form1.Controls.Add($Script:Output_Right)
$form1.Controls.Add($Script:Collection_DropDownBox)
$form1.Controls.Add($Script:Deployment_DropDownBox)
$form1.Controls.Add($Script:Combobox_Tools)
$form1.Controls.Add($GroupBox)
$form1.Controls.Add($GroupBox_Info)
$form1.controls.Add($Script:RadioButton_Window)
$form1.controls.Add($Script:RadioButton_GridView)
$form1.Controls.Add($Script:RadioButton_CSV)
$form1.Controls.Add($Button_Go)
$form1.Controls.Add($Script:TextBox_CollectionName)
$form1.Controls.Add($label_CollectionName)
$form1.Controls.Add($label_CollectionName_Value)
$form1.Controls.Add($label_DeploymentName)
$form1.controls.Add($label_DeploymentName_Value)
$form1.Controls.Add($label_DeploymentTime)
$form1.Controls.Add($label_DeploymentTime_Value)
$form1.Controls.Add($label_DeviceCount)
$form1.Controls.Add($label_DeviceCount_Value)
$form1.Controls.Add($label_ServersResponding)
$form1.Controls.Add($label_ServersResponding_Value)
$form1.Controls.Add($label_ServersNOTResponding)
$form1.Controls.Add($label_ServersNOTResponding_Value)
$form1.Controls.Add($label_ServersPinging)
$form1.Controls.Add($label_ServersPinging_Value)
$form1.AutoScaleDimensions = '6, 13'
$form1.AutoScaleMode = 'Font'
$form1.ClientSize = '1000, 800'
$form1.Name = 'form1'
$form1.Text = 'Form'
$form1.add_Load($form1_Load)
#endregion Generated Form Code
#----------------------------------------------
<#
$PanelEventLogs_Events.Controls.Add($Text_ELogs_ServerName)
$PanelEventLogs_Events.Controls.Add($Button_ELogs_Connect)
$PanelEventLogs_Events.Controls.Add($Button_ELogs_View)
$PanelEventLogs_Events.Controls.Add($Combobox_EventLogs_LogsList)
$PanelEventLogs_Events.Controls.Add($VCenterUserPassword)
$PanelEventLogs_Events.Controls.Add($CheckBoxUseWindowsLogin)
$PanelEventLogs_Events.Controls.Add($labelVCenterUserName)
$PanelEventLogs_Events.Controls.Add($labelVCenterPassword)
$PanelEventLogs_Events.Controls.Add($Script:Collection_DropDownBox)
$PanelEventLogs_Events.BackColor = '153,153,153'
$PanelEventLogs_Events.Location = '6, 6'
$PanelEventLogs_Events.Name = 'panelEventLogs_Events'
$PanelEventLogs_Events.Size = '598, 56'
$PanelEventLogs_Events.TabIndex = 0
$PanelEventLogs_Events.add_Paint($PanelEventLogs_Events_Paint)
$PanelEventLogs_Filter.Controls.Add($Combobox_ELogsFilter_Level)
$PanelEventLogs_Filter.Controls.Add($Text_ELogs_EventID)
$PanelEventLogs_Filter.Controls.Add($Text_Elogs_DaysBack)
$PanelEventLogs_Filter.Controls.Add($label_ELogs_Level)
$PanelEventLogs_Filter.Controls.Add($label_ELogs_EventID)
$PanelEventLogs_Filter.Controls.Add($label_ELogs_DaysBack)
$PanelEventLogs_Filter.BackColor = '255,255,212'
$PanelEventLogs_Filter.Location = '6, 62'
$PanelEventLogs_Filter.Name = 'PanelEventLogs_Filter'
$PanelEventLogs_Filter.Size = '598, 56'
$PanelEventLogs_Filter.BorderStyle = 'FixedSingle'
$PanelEventLogs_Filter.TabIndex = 0
$PanelEventLogs_Filter.add_Paint($PanelEventLogs_Filter_Paint)
#>
#
# $Text_ELogs_ServerName
<#
$Text_ELogs_ServerName.Location = '8, 26'
$Text_ELogs_ServerName.Name = '$Text_ELogs_ServerName'
$Text_ELogs_ServerName.Size = '100, 20'
$Text_ELogs_ServerName.text = "l2012"
$Text_ELogs_ServerName.TabIndex = 6
$Text_ELogs_ServerName.add_TextChanged($Text_ELogs_ServerName_TextChanged)
#
#
# Text_ELogs_EventID
#
$Text_ELogs_EventID.Location = '115, 26'
$Text_ELogs_EventID.Name = 'Text_ELogs_EventID'
$Text_ELogs_EventID.Size = '40, 20'
$Text_ELogs_EventID.TabIndex = 7
$Text_ELogs_EventID.add_TextChanged($Text_ELogs_EventID_TextChanged)
#
# Text_Elogs_DaysBack
#
$Text_Elogs_DaysBack.Location = '175, 26'
$Text_Elogs_DaysBack.Name = 'Text_Elogs_DaysBack'
$Text_Elogs_DaysBack.Size = '40, 20'
$Text_Elogs_DaysBack.TabIndex = 7
$Text_Elogs_DaysBack.add_TextChanged($Text_Elogs_DaysBack_TextChanged)
#>
# Output
#
$Script:Output.Location = '10, 250'
$Script:Output.Multiline = $True
$Script:Output.Name = 'Output'
$Script:Output.ScrollBars = 'both'
$Script:Output.Size = '965, 500'
$Script:Output.Font = 'Consolas, 8.25pt'
$Script:Output.WordWrap = $False
$Script:Output.TabIndex = 5
$Script:Output.add_TextChanged($Output_TextChanged)
$Script:Output.Visible = $True
#
$Script:Output_Left.Location = '20, 250'
$Script:Output_Left.Multiline = $True
$Script:Output_Left.Name = 'Output_Left'
$Script:Output_Left.ScrollBars = 'both'
$Script:Output_Left.Size = '470, 500'
$Script:Output_Left.Font = 'Consolas, 8.25pt'
$Script:Output_Left.WordWrap = $False
#$Script:Output_Left.TabIndex = 5
$Script:Output_Left.add_TextChanged($Output_Left_TextChanged)
#
$Script:Output_Right.Location = '510, 250'
$Script:Output_Right.Multiline = $True
$Script:Output_Right.Name = 'Output_Right'
$Script:Output_Right.ScrollBars = 'both'
$Script:Output_Right.Size = '470, 500'
$Script:Output_Right.Font = 'Consolas, 8.25pt'
$Script:Output_Right.WordWrap = $False
#$Script:Output_Right.TabIndex = 5
$Script:Output_Right.add_TextChanged($Output_Right_TextChanged)
#
# ComboboxServiceStartMode
#
$Script:Collection_DropDownBox.FormattingEnabled = $True
$Script:Collection_DropDownBox.Location = '20, 80'
$Script:Collection_DropDownBox.Name = 'Script:Collection_DropDownBox'
$Script:Collection_DropDownBox.Size = '180, 20'
$Script:Collection_DropDownBox.TabIndex = 2
$Script:Collection_DropDownBox.Text = '--Deployed to Collections--'
$Script:Collection_DropDownBox.add_SelectedIndexChanged($Script:Collection_DropDownBox_SelectedIndexChanged)
#
$Script:Deployment_DropDownBox.Location = '20,30'
#$Script:Deployment_DropDownBox.Size = New-Object System.Drawing.Size(580,50)
$Script:Deployment_DropDownBox.Size = '580,50'
#$Script:Deployment_DropDownBox.DropDownHeight = 200
$Script:Deployment_DropDownBox.text = "----Select Deployment----"
#$Script:Deployment_DropDownBox.Visible = $false
$Script:Deployment_DropDownBox.add_SelectedIndexChanged($Script:Deployment_DropDownBox_SelectedIndexChanged)
#
#$Script:Combobox_Tools.Size = New-Object System.Drawing.Size(180,20)
#$Script:Combobox_Tools.DropDownHeight = 200
$Script:Combobox_Tools.text = "----Select Tool----!"
$Script:Combobox_Tools.Location = '20,170'
$Script:Combobox_Tools.Size = '180,10'
$Script:Combobox_Tools.add_SelectedIndexChanged($Script:Combobox_Tools_SelectedIndexChanged)
#
$groupBox.Location = '270,70'
$groupBox.size = ('150,90') #New-Object System.Drawing.Size(150,90)
$groupBox.text = "Select Output:"
$GroupBox.Controls.Add($Script:RadioButton_Window)
$GroupBox.Controls.Add($Script:RadioButton_GridView)
$GroupBox.Controls.Add($Script:RadioButton_CSV)
#
$GroupBox_Info.Location = '670,25'
$GroupBox_Info.Size = '300,160'
$GroupBox_Info.Text = "Deployment Info"
############
$GroupBox_Info.Controls.Add($label_CollectionName)
$GroupBox_Info.Controls.Add($label_CollectionName_Value)
$GroupBox_Info.Controls.Add($label_DeploymentName)
$GroupBox_Info.Controls.Add($label_DeploymentName_Value)
$GroupBox_Info.Controls.Add($label_DeploymentTime)
$GroupBox_Info.Controls.Add($label_DeploymentTime_Value)
$GroupBox_Info.Controls.Add($label_DeviceCount)
$GroupBox_Info.Controls.Add($label_DeviceCount_Value)
############
$label_CollectionName.AutoSize = $True
$label_CollectionName.Font = 'Microsoft Sans Serif, 9.0pt' #, style=Bold'
#$label_CollectionName.ForeColor = 'DarkGreen'
#$label_CollectionName.TextAlign = 'MiddleRight'
$label_CollectionName.Location = '20,25'
$label_CollectionName.Name = 'Collection_Name'
$label_CollectionName.Size = '41, 13'
#$label_CollectionName.TabIndex = 6
$label_CollectionName.Text = 'Collection Name:'
#$label_CollectionName.add_Click($label_CollectionName_Click)
############ Value ###############
$label_CollectionName_Value.AutoSize = $True
$label_CollectionName_Value.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_CollectionName_Value.ForeColor = 'DarkGreen'
#$label_CollectionName_Value.TextAlign = 'MiddleRight'
$label_CollectionName_Value.Location = '140,25'
$label_CollectionName_Value.Name = 'Collection_Name_Value'
$label_CollectionName_Value.Size = '41, 13'
#$label_CollectionName_Value.TabIndex = 6
$label_CollectionName_Value.Text = '_'
#$label_CollectionName_Value.add_Click($label_CollectionName_Value_Click)
############
$label_DeploymentName.AutoSize = $True
$label_DeploymentName.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_DeploymentName.ForeColor = 'DarkGreen'
#$label_DeploymentName.TextAlign = 'MiddleRight'
$label_DeploymentName.Location = '20,45'
$label_DeploymentName.Name = 'Deployment_Name'
$label_DeploymentName.Size = '41, 13'
#$label_DeploymentName.TabIndex = 6
$label_DeploymentName.Text = 'Deployment Name:'
#$label_DeploymentName.add_Click($label_DeploymentName_Click)
############ Value ############
$label_DeploymentName_Value.AutoSize = $True
$label_DeploymentName_Value.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_DeploymentName_Value.ForeColor = 'DarkGreen'
#$label_DeploymentName_Value.TextAlign = 'MiddleRight'
$label_DeploymentName_Value.Location = '140,45'
$label_DeploymentName_Value.Name = 'Deployment_Name_Value'
$label_DeploymentName_Value.Size = '41, 13'
#$label_DeploymentName_Value.TabIndex = 6
$label_DeploymentName_Value.Text = '_'
#$label_DeploymentName_Value.add_Click($label_DeploymentName_Value_Click)
#############
$label_DeploymentTime.AutoSize = $True
$label_DeploymentTime.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_DeploymentTime.ForeColor = 'DarkGreen'
#$label_DeploymentTime.TextAlign = 'MiddleRight'
$label_DeploymentTime.Location = '20,65'
$label_DeploymentTime.Name = 'Deployment_Time'
$label_DeploymentTime.Size = '41, 13'
#$label_DeploymentTime.TabIndex = 6
$label_DeploymentTime.Text = 'Deployment Time:'
#$label_DeploymentTime.add_Click($label_CollectionName_Click)
############ Value ############
$label_DeploymentTime_Value.AutoSize = $True
$label_DeploymentTime_Value.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_DeploymentTime_Value.ForeColor = 'DarkGreen'
#$label_DeploymentTime_Value.TextAlign = 'MiddleRight'
$label_DeploymentTime_Value.Location = '140,65'
$label_DeploymentTime_Value.Name = 'Deployment_Time_Value'
$label_DeploymentTime_Value.Size = '41, 13'
#$label_DeploymentTime_Value.TabIndex = 6
$label_DeploymentTime_Value.Text = '_'
#$label_DeploymentTime_Value.add_Click($label_DeploymentTime_Value_Click)
###########
$label_DeviceCount.AutoSize = $True
$label_DeviceCount.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_DeviceCount.ForeColor = 'DarkGreen'
#$label_DeviceCount.TextAlign = 'MiddleRight'
$label_DeviceCount.Location = '20,85'
$label_DeviceCount.Name = 'Device_Count'
$label_DeviceCount.Size = '41, 13'
#$label_DeviceCount.TabIndex = 6
$label_DeviceCount.Text = 'Device Count'
#$label_DeviceCount.add_Click($label_DeviceCount_Click)
############ Value ############
$label_DeviceCount_Value.AutoSize = $True
$label_DeviceCount_Value.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_DeviceCount_Value.ForeColor = 'DarkGreen'
#$label_DeviceCount_Value.TextAlign = 'MiddleRight'
$label_DeviceCount_Value.Location = '140,85'
$label_DeviceCount_Value.Name = 'Device_Count_Value'
$label_DeviceCount_Value.Size = '41, 13'
#$label_DeviceCount_Value.TabIndex = 6
$label_DeviceCount_Value.Text = '_'
#$label_DeviceCount_Value.add_Click($label_DeviceCount_Value_Click)
############
$label_ServersResponding.AutoSize = $True
$label_ServersResponding.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_ServersResponding.ForeColor = 'DarkGreen'
#$label_ServersResponding.TextAlign = 'MiddleRight'
$label_ServersResponding.Location = '15,225'
$label_ServersResponding.Name = 'Servers Responding'
$label_ServersResponding.Size = '41, 13'
#$label_ServersResponding.TabIndex = 6
$label_ServersResponding.Text = 'Servers Responding: '
$label_ServersResponding.Visible = $False
#$label_ServersResponding.add_Click($label_ServersResponding_Click)
############
$label_ServersResponding_Value.AutoSize = $True
$label_ServersResponding_Value.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_ServersResponding_Value.ForeColor = 'DarkGreen'
#$label_ServersResponding.TextAlign = 'MiddleRight'
$label_ServersResponding_Value.Location = '155,225'
$label_ServersResponding_Value.Name = 'Servers Responding Vlue'
$label_ServersResponding_Value.Size = '41, 13'
#$label_ServersResponding_Value.TabIndex = 6
$label_ServersResponding_Value.Text = '-'
$label_ServersResponding_Value.Visible = $False
#$label_ServersResponding_Value.add_Click($label_ServersResponding_Value_Click)
############
$label_ServersNOTResponding.AutoSize = $True
$label_ServersNOTResponding.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_ServersNOTResponding.ForeColor = 'Red'
#$label_ServersNOTResponding.TextAlign = 'MiddleRight'
$label_ServersNOTResponding.Location = '510,225'
$label_ServersNOTResponding.Name = 'Servers Not Responding'
$label_ServersNOTResponding.Size = '41, 13'
#$label_ServersNOTResponding.TabIndex = 6
$label_ServersNOTResponding.Text = 'Servers NOT Responding: '
$label_ServersNOTResponding.Visible = $False
#$label_ServersNOTResponding.add_Click($label_ServersNOTResponding_Click)
############
$label_ServersNOTResponding_Value.AutoSize = $True
$label_ServersNOTResponding_Value.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_ServersNOTResponding_Value.ForeColor = 'Red'
#$label_ServersNOTResponding_Value.TextAlign = 'MiddleRight'
$label_ServersNOTResponding_Value.Location = '670,225'
$label_ServersNOTResponding_Value.Name = 'Servers Not Responding Value'
$label_ServersNOTResponding_Value.Size = '41, 13'
#$label_ServersNOTResponding_Value.TabIndex = 6
$label_ServersNOTResponding_Value.Text = '- '
$label_ServersNOTResponding_Value.Visible = $False
#$label_ServersNOTResponding_Value.add_Click($label_ServersNOTResponding_Value_Click)
############
$label_ServersPinging.AutoSize = $True
$label_ServersPinging.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_ServersPinging.ForeColor = 'Green'
#$label_ServersPinging.TextAlign = 'MiddleRight'
$label_ServersPinging.Location = '15,210'
$label_ServersPinging.Name = 'Servers Pinging'
$label_ServersPinging.Size = '41, 13'
#$label_ServersPinging.TabIndex = 6
$label_ServersPinging.Text = 'Checking Servers: '
$label_ServersPinging.Visible = $False
#$label_ServersPinging.add_Click($label_ServersPinging_Click)
############
$label_ServersPinging_Value.AutoSize = $True
$label_ServersPinging_Value.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_ServersPinging_Value.ForeColor = 'Green'
#$label_ServersPinging_Value.TextAlign = 'MiddleRight'
$label_ServersPinging_Value.Location = '165,210'
$label_ServersPinging_Value.Name = 'Servers Pinging Value'
$label_ServersPinging_Value.Size = '41, 13'
$label_ServersPinging_Value.Text = '- '
$label_ServersPinging_Value.Visible = $False
#$label_ServersPinging_Value.add_Click($label_ServersPinging_Value_Click)
############
$Script:RadioButton_Window.Location = new-object System.Drawing.Point(15,15)
$Script:RadioButton_Window.size = New-Object System.Drawing.Size(130,20)
$Script:RadioButton_Window.Checked = $true
$Script:RadioButton_Window.Text = "Window"
#$Script:RadioButton_Window.
#
$Script:RadioButton_GridView.Location = new-object System.Drawing.Point(15,35)
$Script:RadioButton_GridView.size = New-Object System.Drawing.Size(80,20)
$Script:RadioButton_GridView.Checked = $False
$Script:RadioButton_GridView.Text = "GridView"
#
$Script:RadioButton_CSV.Location = new-object System.Drawing.Point(15,55)
$Script:RadioButton_CSV.size = New-Object System.Drawing.Size(80,20)
$Script:RadioButton_CSV.Checked = $False
$Script:RadioButton_CSV.Text = "CSV"
#
$Button_Go.Location = New-Object System.Drawing.Size(450,75)
$Button_Go.Size = New-Object System.Drawing.Size(110,80)
$Button_Go.Text = "Go"
#$Button_Go.Add_Click({temp})
$Button_Go.Add_Click($Button_Go_Click)
#
$Script:TextBox_CollectionName.Left = 20;
$Script:TextBox_CollectionName.Top = 130;
$Script:TextBox_CollectionName.width = 200;
$Script:TextBox_CollectionName.Text = "Nabil - Test Collection"
#
############################################################################
Update-Dropdown1
ConnectTo-SCCM
Deployment-List -Deployment_History 10
$Script:Output.Text = "helloooooooo"
#cd c:
############################################################################
#Save the initial state of the form
$InitialFormWindowState = $form1.WindowState
#Init the OnLoad event to correct the initial state of the form
$form1.add_Load($Form_StateCorrection_Load)
#Clean up the control events
$form1.add_FormClosed($Form_Cleanup_FormClosed)
#Show the Form
return $form1.ShowDialog()
} #End Function
#Call the form
Show-Form-Template_psf | Out-Null

View File

@@ -0,0 +1,960 @@
#------------------------------------------------------------------------
# Source File Information (DO NOT MODIFY)
# Source ID: 676f8db7-35c7-452d-b353-a4b40f26243a
# Source File: Form-Template.psf
#------------------------------------------------------------------------
#region File Recovery Data (DO NOT MODIFY)
<#RecoveryData:
RAUAAB+LCAAAAAAABAC9VNtKwzAYvhd8h5Dr2oPd3AZtYXTuxtNwQ72TrP07o2lSknSzPr3p2g1x
QkHGKJSk+Q7/KQ0eIRFrkNWEaILMQlHBQ3xpezg6P0MoeJB0RTlhU8rgnuQQTYXMLxaQF4xosAuV
Bc4BpmEu3yHRSFcFhHheKQ25/Ux5KjbKrkWat4X+OrLQUxtKz3brx0JxyXQpIeRQakmYhWblktHk
BqqF+AAeLgcD0k/6V97I74E7HGHETSghzoyeh1HyRlkqDQ7HgmspmGoSNIHOpChA6qoljEst5glh
MKE58DoIA72ykOcHzg7aRb0TKWBTKq47OTGjwPWcfhnCwDU+/nDYSaqrjKNtap3YBXxqvG3bIfR6
bbxb3K0gaav5Wq8DZ3vaNNNputlsxkpBbooPaqfTfqmiXCVCMro8QgMDZ6/626UZmVN4HH0sux3r
m3gaI0k2lK/+4+X6WT8bZJ6X9l3ik26vl5ydJKdYSDi+0X7bjHzg/PxrRt9OzyrdRAUAAA==#>
#endregion
<#
.NOTES
--------------------------------------------------------------------------------
Code generated by: SAPIEN Technologies, Inc., PowerShell Studio 2017 v5.4.141
Generated on: 8/29/2017 11:53 AM
Generated by: Haidey2
--------------------------------------------------------------------------------
.DESCRIPTION
GUI script generated by PowerShell Studio 2017
#>
#----------------------------------------------
#region Application Functions
#----------------------------------------------
#endregion Application Functions
#----------------------------------------------
# Generated Form Function
#----------------------------------------------
function Show-Form-Template_psf {
#----------------------------------------------
#region Import the Assemblies
#----------------------------------------------
[void][reflection.assembly]::Load('System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
[void][reflection.assembly]::Load('System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
[void][reflection.assembly]::Load('System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a')
#endregion Import Assemblies
#----------------------------------------------
#region Generated Form Objects
#----------------------------------------------
[System.Windows.Forms.Application]::EnableVisualStyles()
$form1 = New-Object 'System.Windows.Forms.Form'
$InitialFormWindowState = New-Object 'System.Windows.Forms.FormWindowState'
$Script:Output = New-Object System.Windows.Forms.TextBox
$Script:Output_Left = New-Object System.Windows.Forms.TextBox
$Script:Output_Right = New-Object System.Windows.Forms.TextBox
$Script:Collection_DropDownBox = New-Object System.Windows.Forms.ComboBox
$Script:Deployment_DropDownBox = New-Object System.Windows.Forms.ComboBox
$Script:Combobox_Tools = New-Object System.Windows.Forms.ComboBox
$GroupBox = New-Object System.Windows.Forms.GroupBox
$GroupBox_Info = New-Object System.Windows.Forms.GroupBox
$Script:RadioButton_Window = New-Object System.Windows.Forms.RadioButton
$Script:RadioButton_GridView = New-Object System.Windows.Forms.RadioButton
$Script:RadioButton_CSV = New-Object System.Windows.Forms.RadioButton
$Button_Go = New-Object System.Windows.Forms.Button
$Script:TextBox_CollectionName = New-Object System.Windows.Forms.TextBox
#$PanelEventLogs_Events = New-Object 'System.Windows.Forms.Panel'
#$PanelEventLogs_Filter = New-Object 'System.Windows.Forms.Panel'
#$Text_ELogs_ServerName = New-Object 'System.Windows.Forms.TextBox'
#$Text_ELogs_EventID = New-Object 'System.Windows.Forms.TextBox'
#$Text_Elogs_DaysBack = New-Object 'System.Windows.Forms.TextBox'
$label_CollectionName = New-Object 'System.Windows.Forms.Label'
$label_CollectionName_Value = New-Object 'System.Windows.Forms.Label'
$label_DeploymentName = New-Object 'System.Windows.Forms.Label'
$label_DeploymentName_Value = New-Object 'System.Windows.Forms.Label'
$label_DeploymentTime = New-Object 'System.Windows.Forms.Label'
$label_DeploymentTime_Value = New-Object 'System.Windows.Forms.Label'
$label_DeviceCount = New-Object 'System.Windows.Forms.Label'
$label_DeviceCount_Value = New-Object 'System.Windows.Forms.Label'
$label_ServersResponding = New-Object 'System.Windows.Forms.Label'
$label_ServersResponding_Value = New-Object 'System.Windows.Forms.Label'
$label_ServersNOTResponding = New-Object 'System.Windows.Forms.Label'
$label_ServersNOTResponding_Value = New-Object 'System.Windows.Forms.Label'
$label_ServersPinging = New-Object 'System.Windows.Forms.Label'
$label_ServersPinging_Value = New-Object 'System.Windows.Forms.Label'
#$Button_ELogs_Connect = New-Object 'System.Windows.Forms.Button'
# $Location = Split-Path $MyInvocation.MyCommand.Path -Parent
$Script:ALL_Patch_Servers = @()
$Script:Responding = @()
$Script:NotResponding = @()
$Global:DeviceCollection_ServerNames1 = ""
$Global:Collection_Name = ""
$Global:Select_Tool
$Global:Output_Type = ""
$Global:Deployments = ""
#endregion Generated Form Objects
#----------------------------------------------
# User Generated Script
#----------------------------------------------
$form1_Load={
#TODO: Initialize Form Controls here
}
$Script:Collection_DropDownBox_SelectedIndexChanged={
$Script:Output.Text = $Script:Collection_DropDownBox.Text
$T = Get-CMDeviceCollection -Name $Script:Collection_DropDownBox.text | select Name,MemberCount
$Info = $Global:Deployments | ? { $_.applicationname -eq "$($Script:Deployment_DropDownBox.text)" -and $_.collectionname -eq "$($Script:Collection_DropDownBox.text)" } | select applicationname,collectionname,deploymenttime
$label_DeploymentName_Value.Text = $Info.ApplicationName
$label_DeploymentTime_Value.Text = $Info.DeploymentTime
$label_CollectionName_Value.Text = $Script:Collection_DropDownBox.Text #$T.CollectionName
$label_DeviceCount_Value.Text = $T.MemberCount
}
$Script:Deployment_DropDownBox_SelectedIndexChanged={
Reset-Forms -Form_Selection 1
Deployed-to-Collections
$Script:Output.Text = $Script:Deployment_DropDownBox.Text
}
$Script:Combobox_Tools_SelectedIndexChanged= {
$Script:Output.Text = $Script:Combobox_Tools.Text
}
$Button_Go_Click = {
temp
#SCCM-Module
# $Global:Collection_Name = $Script:TextBox_CollectionName.Text #$Script:TextBox_CollectionName.Text
# $Global:Select_Tool = $Script:Combobox_Tools.Text
#$Output.Text = "$Global:Collection_Name --- $Global:Select_Tool " | Out-String
#$Output.Text = | Out-String
}
##################################################################################################################
Function ConnectTo-SCCM {
If(!(Get-PSDrive).Name -ne "CCX") {
#
# Press 'F5' to run this script. Running this script will load the ConfigurationManager
# module for Windows PowerShell and will connect to the site.
#
# This script was auto-generated at '2/18/2021 10:12:39 AM'.
# Uncomment the line below if running in an environment where script signing is
# required.
#Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process
# Site configuration
$SiteCode = "CCX" # Site code
$ProviderMachineName = "PNCRASCCM001.ccx.carecentrix.com" # SMS Provider machine name
# Customizations
$initParams = @{}
#$initParams.Add("Verbose", $true) # Uncomment this line to enable verbose logging
#$initParams.Add("ErrorAction", "Stop") # Uncomment this line to stop the script on any errors
# Do not change anything below this line
# Import the ConfigurationManager.psd1 module
if((Get-Module ConfigurationManager) -eq $null) {
Import-Module "$($ENV:SMS_ADMIN_UI_PATH)\..\ConfigurationManager.psd1" @initParams
}
# Connect to the site's drive if it is not already present
if((Get-PSDrive -Name $SiteCode -PSProvider CMSite -ErrorAction SilentlyContinue) -eq $null) {
New-PSDrive -Name $SiteCode -PSProvider CMSite -Root $ProviderMachineName @initParams
}
# Set the current location to be the site code.
Set-Location "$($SiteCode):\" @initParams
#$Script:Output.Text = "inside connectoSCCM function"
}#endIf
}#endFunction
##################################################################################################################
Function SCCM-Module {
Write-Host "Inside SCCM function" -ForegroundColor Cyan
If(!(Get-PSDrive).Name -eq "sccm-drive") {
Import-Module 'C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1'
New-PSDrive -Name SCCM-Drive -PSProvider "AdminUI.PS.Provider\CMSite" -Root "PNCRASCCM001.ccx.carecentrix.com" -Description "SCCM Site"
}#endIf
$Script:Output.Text | Get-PSDrive | ft -AutoSize | Out-String
CD sccm-drive:
}#endFunction
##################################################################################################################
Function Update-Dropdown1 {
# $Collections += $Script:Collection_DropDownBox.text
$Collections = @("Collection-Servers","Ping-Collection","Check_Uptime","Test-Service","Remotely Update Policy","Software Update Status","Test-Sccm")
$Collections | % { $Script:Combobox_Tools.Items.Add($_) }
}
##################################################################################################################
Function Reset-Forms {
Param($Form_Selection)
Switch ($Form_Selection) {
1 { $Collection_DropDownBox.Items.Clear(); $Collection_DropDownBox.Text = "--Deployed to Collections--" }
2 {}
}
}
##################################################################################################################
Function temp {
$Script:Output.Clear()
$Script:Output_Left.Clear()
$Script:Output_Right.Clear()
#$Script:Script:Output.text = $Script:Collection_DropDownBox.text | Out-String
#$Global:Collection_Name = $Script:TextBox_CollectionName.Text #$Script:TextBox_CollectionName.Text
$Global:Collection_Name = $Script:Collection_DropDownBox.Text
$Global:Select_Tool = $Script:Combobox_Tools.Text
#$Script:Collection_DropDownBox.BackColor
If ($Script:RadioButton_Window.Checked -eq $true) { $Global:Output_Type = "Window" <#; $Script:Output.Text = "Window_Radio1 Checked: $($Script:RadioButton_Window.Checked)" | Out-String #> }
ElseIf ($Script:RadioButton_GridView.Checked -eq $true) { $Global:Output_Type = "Gridview" <#; $Script:Output.Text = "Gridview_Radio2 Checked: $($Script:RadioButton_GridView.Checked)" | Out-String #> }
ElseIf ($Script:RadioButton_CSV.Checked -eq $true) { $Global:Output_Type = "Export" <#; $Script:Output.Text = "CSV_Radio3 Checked: $($Script:RadioButton_CSV.Checked)" | Out-String #> }
If($Global:Collection_Name -and $Global:Select_Tool) {
$Script:Output.Text = "CollectionName: $Global:Collection_Name ----- SelectTool: $Global:Select_Tool"
# If($Script:Collection_DropDownBox.text = "Tool1"){gcc}
Run-Tool
#$Script:TextBox_CollectionName.clear()
$Script:Collection_DropDownBox.text = "----Select Collection----"
#Clear-Variables
}#endIf
Else { #$T = { Write-Host "You must enter Collection Name ............!!" -ForegroundColor Red }
$Script:Output.SelectionColor = 'red'
$Script:Output.Text = "You must select 'Tool' and enter Collection Name............!!"
}
Run-Defaults
}#endFunction
##################################################################################################################
Function Run-Tool {
Switch($Global:Select_Tool) {
Collection-Servers { Collection-Servers; Write-Host "Tool Selected: $Global:Select_Tool" }
Ping-Collection { Ping_Collection }
Check_Uptime { Check_Uptime }
Test-Service { Test-Service }
Test-SCCM { SCCM-Module }
#"Remotely Update Policy" { $Script:Output.Text = Invoke-Expression $Location\Tool-Remotely-Restart-SCCMSyncCycle.ps1 | ft -AutoSize | Out-String }
"Remotely Update Policy" { $Script:Output.Text = Invoke-Expression $Location\Tool-Remotely-Restart-SCCMSyncCycle.ps1 | ft -AutoSize | Out-String }
"Software Update Status" { $Script:Output.Text = & "$Location\Tool-Get-SCCMSoftwareUpdateStatus.ps1" -Dep_ID 16778048 | ft -AutoSize | Out-String}
}#endSwitch
#Clear-Variables
}#endFunction
##################################################################################################################
Function Run-Defaults {
#$Script:TextBox_CollectionName.Text = "Nabil - Test Collection"
$Script:RadioButton_Window.Checked = $true
<#
If(!$Location) {
$Location = Split-Path $MyInvocation.MyCommand.Path -Parent
}
#>
}
##################################################################################################################
Function xClear-Variables {
$Global:Collection_Name = ""
$Global:Select_Tool = ""
$Global:Output_Type = ""
$Script:ALL_Patch_Servers = @()
}
##################################################################################################################
Function Display-Results {
#Param($Global:Output_Type,$Final_Result)
Write-Host "DisplayType: $($Global:Output_Type)"
Switch ($Global:Output_Type){
Window { $Script:Output.Text = $Script:ALL_Patch_Servers | Out-String}
Gridview { $Script:ALL_Patch_Servers | Out-GridView }
Export { $Script:ALL_Patch_Servers | Export-Csv -Path $Location\Results.csv -NoTypeInformation; ii $Location\Results.csv }
}#endSwitch
}
#############################################################################################################################################################
Function Collection-Servers {
#Param($Coll_Name)
Write-Host "Collection:$Global:Collection_Name"
$Script:ALL_Patch_Servers = @()
ConnectTo-SCCM
NA-Set-Stage -Select_Stage OutputStage2
#SCCM-Module
#CD sccm-drive:
$Script:DeviceCollection_MemberCount = Get-CMDeviceCollection -Name $Global:Collection_Name | select Name,MemberCount
$Script:DeviceCollection_ServerNames = Collection-Members #Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name,IsClient #| Export-Csv "E:\SCCM-Files\SCCM-Scripts\Files\$Global:Collection_Name.csv" -NoTypeInformation
#$ServerName = $DeviceCollection_ServerNames.Name
#Set-Location c:
#$Script:Temp = Get-CMCollectionMember -CollectionName $Global:Collection_Name #| select Name,IsClient
$Script:DeviceCollection_ServerNames | % {
$Obj = New-Object -TypeName PSObject
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $_.Name
$Obj | Add-Member -MemberType NoteProperty -Name ClientInstalled -Value $_.IsClient
$Obj | Add-Member -MemberType NoteProperty -Name CollectionName -Value $Global:Collection_Name
#$Obj | Add-Member -MemberType NoteProperty -Name CollectionMemberCount -Value {(Get-CMCollectionMember -Name $Global:Collection_Name).MemberCount}
$Obj
$Script:ALL_Patch_Servers += $Obj
}#end%
# $Script:Output.Text = $Script:ALL_Patch_Servers | Out-String
Display-Results #-Final_Result $Script:ALL_Patch_Servers
Write-Host "$Script:ALL_Patch_Servers"
# $Script:ALL_Patch_Servers | Export-Csv $Location\Current-Collection-Servers.csv -NoTypeInformation
}#endFunction
#############################################################################################################################################################
Function Collection-Members {
Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name,IsClient
}
#############################################################################################################################################################
Function NA-Set-Stage {
Param($Select_Stage)
Switch($Select_Stage) {
OutputStage1 { $Script:Output.Visible = $false
$Script:Output_Left.Visible = $True
$Script:Output_Right.Visible = $True
$label_ServersResponding.Visible = $True
$label_ServersResponding_Value.Visible = $True
$label_ServersNOTResponding.Visible = $True
$label_ServersNOTResponding_Value.Visible = $True
$label_ServersPinging.Visible = $True
$label_ServersPinging_Value.Visible = $True
#Write-Host "output-stage1" -ForegroundColor Yellow
}
OutputStage2 { $Script:Output.Visible = $True
$label_ServersResponding.Visible = $false
$label_ServersResponding_Value.Visible = $false
$label_ServersNOTResponding.Visible = $False
$label_ServersNOTResponding_Value.Visible = $false
$Script:Output_Left.Visible = $false
$Script:Output_Right.Visible = $false
$label_ServersPinging.Visible = $false
$label_ServersPinging_Value.Visible = $false
}
test { $Script:Output.Text = "inside na set stage function"}
}#endSwitch
$Script:Output.Text = "outside switch inside na set stage function - param: $Select_Stage"
}#endFunction
#############################################################################################################################################################
Function Ping_Collection {
$Ping_Result = @()
$NotResponding = @()
$Responding = @()
ConnectTo-SCCM
NA-Set-Stage -Select_Stage OutputStage1
#$Script:Output.Visible = $false
#$Script:Output_Left.Visible = $True
#$Script:Output_Right.Visible = $True
$Global:DeviceCollection_ServerNames1 = Collection-Members -CollectionName $Global:Collection_Name | select Name #Get-CMCollectionMember
#Set-Location c:
Write-Host "Total Server Count: $($Global:DeviceCollection_ServerNames1.count)" -ForegroundColor Green
Write-Host ""
############
# $Script:Output.Text = "CollectionName: $($Global:Collection_Name) ------ hello "
############
$Global:DeviceCollection_ServerNames1.Name | % {
$Server = $_
$label_ServersPinging_Value.Text = $Server
$Obj = New-Object -TypeName PSObject
$Count = $Global:DeviceCollection_ServerNames1.count
#$Script:Output.Text = "Checking: $Server ----- Servers left: $($Count--) Please Wait !!!" | Out-String
If (Test-Connection $Server -Count 1 -ErrorAction SilentlyContinue ) {
#Write-Host "Responding:---- $_ " -ForegroundColor Green
#$Script:Output.AppendText("Responding: $_")
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $Server
$Obj | Add-Member -MemberType NoteProperty -Name Responding -Value "Yes"
$Ping_Result += $Obj
#$Responding += $Server
$Responding += $Obj
# $Script:Output.text += $Obj | Out-String
}#endIf
Else {
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $Server
$Obj | Add-Member -MemberType NoteProperty -Name Responding -Value "No!"
$Ping_Result += $Obj
#$NotResponding += $Server
$NotResponding += $Obj
# $Script:Output.text += $Obj | Out-String
}
$label_ServersResponding_Value.Text = $Responding.Count
$label_ServersNOTResponding_Value.Text = $NotResponding.Count
}#end%
#$Script:Output.Text = $Ping_Result | ft -AutoSize | Out-String
$Script:Output_Left.Text = $Responding | Out-String
$Script:Output_Right.Text = $NotResponding | Out-String
$label_ServersPinging_Value.Text = "Done !"
write-host "-------------------------------------------------------"
Write-host "$($Responding.count) / $($DeviceCollection_ServerNames1.count) -- Responding" -foregroundcolor Green
Write-host "$($NotResponding.count) / $($DeviceCollection_ServerNames1.count) -- NOT Responding" -foregroundcolor Red
#Write-Host "Servers NOT Responding: $NotResponding " -ForegroundColor Red
}#endFunction
#############################################################################################################################################################
Function Check_Uptime {
ConnectTo-SCCM
$Global:DeviceCollection_ServerNames1 = Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name
$Script:Output.Text = $Global:DeviceCollection_ServerNames1.name | % { gwmi win32_operatingsystem -ComputerName $_ -ErrorAction SilentlyContinue | select @{n="Server";e={$_.PSComputername}},@{n="LastReboot";e={$_.Converttodatetime($_.LastBootUpTime)}}} | sort LastBootup -descending | Out-String
}
#############################################################################################################################################################
Function Deployment-List {
Param($Deployment_History)
# SCCM-Module
$Global:Deployments = Get-CMDeployment | ? { $_.deploymenttime -gt ((Get-Date).AddDays(-"$Deployment_History")) }
#$T | select ApplicationName,CollectionName,DeploymentTime,AssignmentID,SoftwareName | % { $Deployment_DropDownBox.Items.Add($_) }
$i = 0
$Q = "" #@()
$Global:Deployments.ApplicationName | % { $Script:Deployment_DropDownBox.Items.Add($_)}
<#
foreach ($D in $Deployments) {
$Q = $D.ApplicationName + "-------------------------------------------------------" + $D.CollectionName
$Deployment_DropDownBox.Items.Add($Q)
$i++
}
#>
#$T.ApplicationName | % { $Deployment_DropDownBox.Items.Add($_) }
}#endFunction
#############################################################################################################################################################
Function Deployed-to-Collections {
$T = $Global:Deployments | ? { $_.ApplicationName -eq "$($Script:Deployment_DropDownBox.text)" } #| Select -ExpandProperty CollectionName
$Script:Collection_DropDownBox.Items.Clear()
$T.CollectionName | % { $Script:Collection_DropDownBox.Items.Add("$_")}
}
#############################################################################################################################################################
Function Test-Service {
$Script:Output.Text = "test-service function"
#$T = Get-Service
#$Script:Output.Text = $T | ft -AutoSize | Out-String
}
##################################################################################################################
##################################################################################################################
# --End User Generated Script--
#----------------------------------------------
#region Generated Events
#----------------------------------------------
$Form_StateCorrection_Load=
{
#Correct the initial state of the form to prevent the .Net maximized form issue
$form1.WindowState = $InitialFormWindowState
}
$Form_Cleanup_FormClosed=
{
#Remove all event handlers from the controls
try
{
$form1.remove_Load($form1_Load)
$form1.remove_Load($Form_StateCorrection_Load)
$form1.remove_FormClosed($Form_Cleanup_FormClosed)
#$PanelEventLogs_Events.remove_Paint($PanelEventLogs_Events_Paint)
#$PanelEventLogs_Filter.remove_Paint($PanelEventLogs_Filter_Paint)
$Text_Elogs_DaysBack.remove_TextChanged($Text_Elogs_DaysBack_TextChanged)
$Text_ELogs_ServerName.remove_TextChanged($Text_ELogs_ServerName_TextChanged)
$Text_ELogs_EventID.remove_TextChanged($Text_ELogs_EventID_TextChanged)
$Script:Output.remove_TextChanged($Output_TextChanged)
$Script:Output_Left.remove_TextChanged($Script:Output_Left_TextChanged)
$Script:Output_Right.remove_TextChanged($Script:Output_Right_TextChanged)
$Script:Collection_DropDownBox.remove_SelectedIndexChanged($Script:Collection_DropDownBox_SelectedIndexChanged)
$Script:Deployment_DropDownBox.remove_SelectedIndexChanged($Script:Deployment_DropDownBox_SelectedIndexChanged)
$Script:Combobox_Tools.remove_SelectedIndexChanged($Script:Combobox_Tools_SelectedIndexChanged)
$Script:RadioButton_Window.remove_SelectedIndexChanged($Script:RadioButton_Window_SelectedIndexChanged)
$Script:RadioButton_GridView.remove_SelectedIndexChanged($Script:RadioButton_GridView_SelectedIndexChanged)
$Script:RadioButton_CSV.remove_SelectedIndexChanged($Script:RadioButton_CSV_SelectedIndexChanged)
$Button_Go.remove_Click($Button_Go_Click)
}
catch { Out-Null <# Prevent PSScriptAnalyzer warning #> }
}
#$PanelEventLogs_Events_Paint=[System.Windows.Forms.PaintEventHandler]{ <#Event Argument: $_ = [System.Windows.Forms.PaintEventArgs]#> }
#$PanelEventLogs_Filter_Paint=[System.Windows.Forms.PaintEventHandler]{ }
$Text_ELogs_ServerName_TextChanged={}
$Text_Elogs_DaysBack_TextChanged={}
#endregion Generated Events
#----------------------------------------------
#region Generated Form Code
#----------------------------------------------
#
# form1
#
#$form1.Controls.Add($PanelEventLogs_Events)
#$form1.Controls.Add($PanelEventLogs_Filter)
$form1.Controls.Add($Script:Output)
$form1.Controls.Add($Script:Output_Left)
$form1.Controls.Add($Script:Output_Right)
$form1.Controls.Add($Script:Collection_DropDownBox)
$form1.Controls.Add($Script:Deployment_DropDownBox)
$form1.Controls.Add($Script:Combobox_Tools)
$form1.Controls.Add($GroupBox)
$form1.Controls.Add($GroupBox_Info)
$form1.controls.Add($Script:RadioButton_Window)
$form1.controls.Add($Script:RadioButton_GridView)
$form1.Controls.Add($Script:RadioButton_CSV)
$form1.Controls.Add($Button_Go)
$form1.Controls.Add($Script:TextBox_CollectionName)
$form1.Controls.Add($label_CollectionName)
$form1.Controls.Add($label_CollectionName_Value)
$form1.Controls.Add($label_DeploymentName)
$form1.controls.Add($label_DeploymentName_Value)
$form1.Controls.Add($label_DeploymentTime)
$form1.Controls.Add($label_DeploymentTime_Value)
$form1.Controls.Add($label_DeviceCount)
$form1.Controls.Add($label_DeviceCount_Value)
$form1.Controls.Add($label_ServersResponding)
$form1.Controls.Add($label_ServersResponding_Value)
$form1.Controls.Add($label_ServersNOTResponding)
$form1.Controls.Add($label_ServersNOTResponding_Value)
$form1.Controls.Add($label_ServersPinging)
$form1.Controls.Add($label_ServersPinging_Value)
$form1.AutoScaleDimensions = '6, 13'
$form1.AutoScaleMode = 'Font'
$form1.ClientSize = '1000, 800'
$form1.Name = 'form1'
$form1.Text = 'Form'
$form1.add_Load($form1_Load)
#endregion Generated Form Code
#----------------------------------------------
<#
$PanelEventLogs_Events.Controls.Add($Text_ELogs_ServerName)
$PanelEventLogs_Events.Controls.Add($Button_ELogs_Connect)
$PanelEventLogs_Events.Controls.Add($Button_ELogs_View)
$PanelEventLogs_Events.Controls.Add($Combobox_EventLogs_LogsList)
$PanelEventLogs_Events.Controls.Add($VCenterUserPassword)
$PanelEventLogs_Events.Controls.Add($CheckBoxUseWindowsLogin)
$PanelEventLogs_Events.Controls.Add($labelVCenterUserName)
$PanelEventLogs_Events.Controls.Add($labelVCenterPassword)
$PanelEventLogs_Events.Controls.Add($Script:Collection_DropDownBox)
$PanelEventLogs_Events.BackColor = '153,153,153'
$PanelEventLogs_Events.Location = '6, 6'
$PanelEventLogs_Events.Name = 'panelEventLogs_Events'
$PanelEventLogs_Events.Size = '598, 56'
$PanelEventLogs_Events.TabIndex = 0
$PanelEventLogs_Events.add_Paint($PanelEventLogs_Events_Paint)
$PanelEventLogs_Filter.Controls.Add($Combobox_ELogsFilter_Level)
$PanelEventLogs_Filter.Controls.Add($Text_ELogs_EventID)
$PanelEventLogs_Filter.Controls.Add($Text_Elogs_DaysBack)
$PanelEventLogs_Filter.Controls.Add($label_ELogs_Level)
$PanelEventLogs_Filter.Controls.Add($label_ELogs_EventID)
$PanelEventLogs_Filter.Controls.Add($label_ELogs_DaysBack)
$PanelEventLogs_Filter.BackColor = '255,255,212'
$PanelEventLogs_Filter.Location = '6, 62'
$PanelEventLogs_Filter.Name = 'PanelEventLogs_Filter'
$PanelEventLogs_Filter.Size = '598, 56'
$PanelEventLogs_Filter.BorderStyle = 'FixedSingle'
$PanelEventLogs_Filter.TabIndex = 0
$PanelEventLogs_Filter.add_Paint($PanelEventLogs_Filter_Paint)
#>
#
# $Text_ELogs_ServerName
<#
$Text_ELogs_ServerName.Location = '8, 26'
$Text_ELogs_ServerName.Name = '$Text_ELogs_ServerName'
$Text_ELogs_ServerName.Size = '100, 20'
$Text_ELogs_ServerName.text = "l2012"
$Text_ELogs_ServerName.TabIndex = 6
$Text_ELogs_ServerName.add_TextChanged($Text_ELogs_ServerName_TextChanged)
#
#
# Text_ELogs_EventID
#
$Text_ELogs_EventID.Location = '115, 26'
$Text_ELogs_EventID.Name = 'Text_ELogs_EventID'
$Text_ELogs_EventID.Size = '40, 20'
$Text_ELogs_EventID.TabIndex = 7
$Text_ELogs_EventID.add_TextChanged($Text_ELogs_EventID_TextChanged)
#
# Text_Elogs_DaysBack
#
$Text_Elogs_DaysBack.Location = '175, 26'
$Text_Elogs_DaysBack.Name = 'Text_Elogs_DaysBack'
$Text_Elogs_DaysBack.Size = '40, 20'
$Text_Elogs_DaysBack.TabIndex = 7
$Text_Elogs_DaysBack.add_TextChanged($Text_Elogs_DaysBack_TextChanged)
#>
# Output
#
$Script:Output.Location = '10, 250'
$Script:Output.Multiline = $True
$Script:Output.Name = 'Output'
$Script:Output.ScrollBars = 'both'
$Script:Output.Size = '965, 500'
$Script:Output.Font = 'Consolas, 8.25pt'
$Script:Output.WordWrap = $False
$Script:Output.TabIndex = 5
$Script:Output.add_TextChanged($Output_TextChanged)
$Script:Output.Visible = $True
#
$Script:Output_Left.Location = '20, 250'
$Script:Output_Left.Multiline = $True
$Script:Output_Left.Name = 'Output_Left'
$Script:Output_Left.ScrollBars = 'both'
$Script:Output_Left.Size = '470, 500'
$Script:Output_Left.Font = 'Consolas, 8.25pt'
$Script:Output_Left.WordWrap = $False
#$Script:Output_Left.TabIndex = 5
$Script:Output_Left.add_TextChanged($Output_Left_TextChanged)
#
$Script:Output_Right.Location = '510, 250'
$Script:Output_Right.Multiline = $True
$Script:Output_Right.Name = 'Output_Right'
$Script:Output_Right.ScrollBars = 'both'
$Script:Output_Right.Size = '470, 500'
$Script:Output_Right.Font = 'Consolas, 8.25pt'
$Script:Output_Right.WordWrap = $False
#$Script:Output_Right.TabIndex = 5
$Script:Output_Right.add_TextChanged($Output_Right_TextChanged)
#
# ComboboxServiceStartMode
#
$Script:Collection_DropDownBox.FormattingEnabled = $True
$Script:Collection_DropDownBox.Location = '20, 80'
$Script:Collection_DropDownBox.Name = 'Script:Collection_DropDownBox'
$Script:Collection_DropDownBox.Size = '180, 20'
$Script:Collection_DropDownBox.TabIndex = 2
$Script:Collection_DropDownBox.Text = '--Deployed to Collections--'
$Script:Collection_DropDownBox.add_SelectedIndexChanged($Script:Collection_DropDownBox_SelectedIndexChanged)
#
$Script:Deployment_DropDownBox.Location = '20,30'
#$Script:Deployment_DropDownBox.Size = New-Object System.Drawing.Size(580,50)
$Script:Deployment_DropDownBox.Size = '500,50'
#$Script:Deployment_DropDownBox.DropDownHeight = 200
$Script:Deployment_DropDownBox.text = "----Select Deployment----"
#$Script:Deployment_DropDownBox.Visible = $false
$Script:Deployment_DropDownBox.add_SelectedIndexChanged($Script:Deployment_DropDownBox_SelectedIndexChanged)
#
#$Script:Combobox_Tools.Size = New-Object System.Drawing.Size(180,20)
#$Script:Combobox_Tools.DropDownHeight = 200
$Script:Combobox_Tools.text = "----Select Tool----!"
$Script:Combobox_Tools.Location = '20,170'
$Script:Combobox_Tools.Size = '180,10'
$Script:Combobox_Tools.add_SelectedIndexChanged($Script:Combobox_Tools_SelectedIndexChanged)
#
$groupBox.Location = '270,70'
$groupBox.size = ('150,90') #New-Object System.Drawing.Size(150,90)
$groupBox.text = "Select Output:"
$GroupBox.Controls.Add($Script:RadioButton_Window)
$GroupBox.Controls.Add($Script:RadioButton_GridView)
$GroupBox.Controls.Add($Script:RadioButton_CSV)
#
$GroupBox_Info.Location = '570,25'
$GroupBox_Info.Size = '410,160'
$GroupBox_Info.Text = "Deployment Info"
$GroupBox_Info.Controls.Add($label_CollectionName)
$GroupBox_Info.Controls.Add($label_CollectionName_Value)
$GroupBox_Info.Controls.Add($label_DeploymentName)
$GroupBox_Info.Controls.Add($label_DeploymentName_Value)
$GroupBox_Info.Controls.Add($label_DeploymentTime)
$GroupBox_Info.Controls.Add($label_DeploymentTime_Value)
$GroupBox_Info.Controls.Add($label_DeviceCount)
$GroupBox_Info.Controls.Add($label_DeviceCount_Value)
############
$label_CollectionName.AutoSize = $True
$label_CollectionName.Font = 'Microsoft Sans Serif, 9.0pt' #, style=Bold'
#$label_CollectionName.ForeColor = 'DarkGreen'
#$label_CollectionName.TextAlign = 'MiddleRight'
$label_CollectionName.Location = '20,25'
$label_CollectionName.Name = 'Collection_Name'
$label_CollectionName.Size = '41, 13'
#$label_CollectionName.TabIndex = 6
$label_CollectionName.Text = 'Collection Name:'
#$label_CollectionName.add_Click($label_CollectionName_Click)
############ Value ###############
$label_CollectionName_Value.AutoSize = $True
$label_CollectionName_Value.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_CollectionName_Value.ForeColor = 'DarkGreen'
#$label_CollectionName_Value.TextAlign = 'MiddleRight'
$label_CollectionName_Value.Location = '140,25'
$label_CollectionName_Value.Name = 'Collection_Name_Value'
$label_CollectionName_Value.Size = '41, 13'
#$label_CollectionName_Value.TabIndex = 6
$label_CollectionName_Value.Text = '_'
#$label_CollectionName_Value.add_Click($label_CollectionName_Value_Click)
############
$label_DeploymentName.AutoSize = $True
$label_DeploymentName.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_DeploymentName.ForeColor = 'DarkGreen'
#$label_DeploymentName.TextAlign = 'MiddleRight'
$label_DeploymentName.Location = '20,45'
$label_DeploymentName.Name = 'Deployment_Name'
$label_DeploymentName.Size = '41, 13'
#$label_DeploymentName.TabIndex = 6
$label_DeploymentName.Text = 'Deployment Name:'
#$label_DeploymentName.add_Click($label_DeploymentName_Click)
############ Value ############
$label_DeploymentName_Value.AutoSize = $True
$label_DeploymentName_Value.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_DeploymentName_Value.ForeColor = 'DarkGreen'
#$label_DeploymentName_Value.TextAlign = 'MiddleRight'
$label_DeploymentName_Value.Location = '140,45'
$label_DeploymentName_Value.Name = 'Deployment_Name_Value'
$label_DeploymentName_Value.Size = '41, 13'
#$label_DeploymentName_Value.TabIndex = 6
$label_DeploymentName_Value.Text = '_'
#$label_DeploymentName_Value.add_Click($label_DeploymentName_Value_Click)
#############
$label_DeploymentTime.AutoSize = $True
$label_DeploymentTime.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_DeploymentTime.ForeColor = 'DarkGreen'
#$label_DeploymentTime.TextAlign = 'MiddleRight'
$label_DeploymentTime.Location = '20,65'
$label_DeploymentTime.Name = 'Deployment_Time'
$label_DeploymentTime.Size = '41, 13'
#$label_DeploymentTime.TabIndex = 6
$label_DeploymentTime.Text = 'Deployment Time:'
#$label_DeploymentTime.add_Click($label_CollectionName_Click)
############ Value ############
$label_DeploymentTime_Value.AutoSize = $True
$label_DeploymentTime_Value.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_DeploymentTime_Value.ForeColor = 'DarkGreen'
#$label_DeploymentTime_Value.TextAlign = 'MiddleRight'
$label_DeploymentTime_Value.Location = '140,65'
$label_DeploymentTime_Value.Name = 'Deployment_Time_Value'
$label_DeploymentTime_Value.Size = '41, 13'
#$label_DeploymentTime_Value.TabIndex = 6
$label_DeploymentTime_Value.Text = '_'
#$label_DeploymentTime_Value.add_Click($label_DeploymentTime_Value_Click)
###########
$label_DeviceCount.AutoSize = $True
$label_DeviceCount.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_DeviceCount.ForeColor = 'DarkGreen'
#$label_DeviceCount.TextAlign = 'MiddleRight'
$label_DeviceCount.Location = '20,85'
$label_DeviceCount.Name = 'Device_Count'
$label_DeviceCount.Size = '41, 13'
#$label_DeviceCount.TabIndex = 6
$label_DeviceCount.Text = 'Device Count'
#$label_DeviceCount.add_Click($label_DeviceCount_Click)
############ Value ############
$label_DeviceCount_Value.AutoSize = $True
$label_DeviceCount_Value.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_DeviceCount_Value.ForeColor = 'DarkGreen'
#$label_DeviceCount_Value.TextAlign = 'MiddleRight'
$label_DeviceCount_Value.Location = '140,85'
$label_DeviceCount_Value.Name = 'Device_Count_Value'
$label_DeviceCount_Value.Size = '41, 13'
#$label_DeviceCount_Value.TabIndex = 6
$label_DeviceCount_Value.Text = '_'
#$label_DeviceCount_Value.add_Click($label_DeviceCount_Value_Click)
############
$label_ServersResponding.AutoSize = $True
$label_ServersResponding.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_ServersResponding.ForeColor = 'DarkGreen'
#$label_ServersResponding.TextAlign = 'MiddleRight'
$label_ServersResponding.Location = '15,225'
$label_ServersResponding.Name = 'Servers Responding'
$label_ServersResponding.Size = '41, 13'
#$label_ServersResponding.TabIndex = 6
$label_ServersResponding.Text = 'Servers Responding: '
$label_ServersResponding.Visible = $False
#$label_ServersResponding.add_Click($label_ServersResponding_Click)
############
$label_ServersResponding_Value.AutoSize = $True
$label_ServersResponding_Value.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_ServersResponding_Value.ForeColor = 'DarkGreen'
#$label_ServersResponding.TextAlign = 'MiddleRight'
$label_ServersResponding_Value.Location = '155,225'
$label_ServersResponding_Value.Name = 'Servers Responding Vlue'
$label_ServersResponding_Value.Size = '41, 13'
#$label_ServersResponding_Value.TabIndex = 6
$label_ServersResponding_Value.Text = '-'
$label_ServersResponding_Value.Visible = $False
#$label_ServersResponding_Value.add_Click($label_ServersResponding_Value_Click)
############
$label_ServersNOTResponding.AutoSize = $True
$label_ServersNOTResponding.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_ServersNOTResponding.ForeColor = 'Red'
#$label_ServersNOTResponding.TextAlign = 'MiddleRight'
$label_ServersNOTResponding.Location = '510,225'
$label_ServersNOTResponding.Name = 'Servers Not Responding'
$label_ServersNOTResponding.Size = '41, 13'
#$label_ServersNOTResponding.TabIndex = 6
$label_ServersNOTResponding.Text = 'Servers NOT Responding: '
$label_ServersNOTResponding.Visible = $False
#$label_ServersNOTResponding.add_Click($label_ServersNOTResponding_Click)
############
$label_ServersNOTResponding_Value.AutoSize = $True
$label_ServersNOTResponding_Value.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_ServersNOTResponding_Value.ForeColor = 'Red'
#$label_ServersNOTResponding_Value.TextAlign = 'MiddleRight'
$label_ServersNOTResponding_Value.Location = '670,225'
$label_ServersNOTResponding_Value.Name = 'Servers Not Responding Value'
$label_ServersNOTResponding_Value.Size = '41, 13'
#$label_ServersNOTResponding_Value.TabIndex = 6
$label_ServersNOTResponding_Value.Text = '- '
$label_ServersNOTResponding_Value.Visible = $False
#$label_ServersNOTResponding_Value.add_Click($label_ServersNOTResponding_Value_Click)
############
$label_ServersPinging.AutoSize = $True
$label_ServersPinging.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_ServersPinging.ForeColor = 'Green'
#$label_ServersPinging.TextAlign = 'MiddleRight'
$label_ServersPinging.Location = '15,210'
$label_ServersPinging.Name = 'Servers Pinging'
$label_ServersPinging.Size = '41, 13'
#$label_ServersPinging.TabIndex = 6
$label_ServersPinging.Text = 'Checking Servers: '
$label_ServersPinging.Visible = $False
#$label_ServersPinging.add_Click($label_ServersPinging_Click)
############
$label_ServersPinging_Value.AutoSize = $True
$label_ServersPinging_Value.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_ServersPinging_Value.ForeColor = 'Green'
#$label_ServersPinging_Value.TextAlign = 'MiddleRight'
$label_ServersPinging_Value.Location = '165,210'
$label_ServersPinging_Value.Name = 'Servers Pinging Value'
$label_ServersPinging_Value.Size = '41, 13'
$label_ServersPinging_Value.Text = '- '
$label_ServersPinging_Value.Visible = $False
#$label_ServersPinging_Value.add_Click($label_ServersPinging_Value_Click)
############
$Script:RadioButton_Window.Location = new-object System.Drawing.Point(15,15)
$Script:RadioButton_Window.size = New-Object System.Drawing.Size(130,20)
$Script:RadioButton_Window.Checked = $true
$Script:RadioButton_Window.Text = "Window"
#$Script:RadioButton_Window.
#
$Script:RadioButton_GridView.Location = new-object System.Drawing.Point(15,35)
$Script:RadioButton_GridView.size = New-Object System.Drawing.Size(80,20)
$Script:RadioButton_GridView.Checked = $False
$Script:RadioButton_GridView.Text = "GridView"
#
$Script:RadioButton_CSV.Location = new-object System.Drawing.Point(15,55)
$Script:RadioButton_CSV.size = New-Object System.Drawing.Size(80,20)
$Script:RadioButton_CSV.Checked = $False
$Script:RadioButton_CSV.Text = "CSV"
#
$Button_Go.Location = New-Object System.Drawing.Size(450,75)
$Button_Go.Size = New-Object System.Drawing.Size(110,80)
$Button_Go.Text = "Go"
#$Button_Go.Add_Click({temp})
$Button_Go.Add_Click($Button_Go_Click)
#
$Script:TextBox_CollectionName.Left = 20;
$Script:TextBox_CollectionName.Top = 130;
$Script:TextBox_CollectionName.width = 200;
$Script:TextBox_CollectionName.Text = "Nabil - Test Collection"
#
############################################################################
Update-Dropdown1
ConnectTo-SCCM
Deployment-List -Deployment_History 10
$Script:Output.Text = "helloooooooo"
#cd c:
############################################################################
#Save the initial state of the form
$InitialFormWindowState = $form1.WindowState
#Init the OnLoad event to correct the initial state of the form
$form1.add_Load($Form_StateCorrection_Load)
#Clean up the control events
$form1.add_FormClosed($Form_Cleanup_FormClosed)
#Show the Form
return $form1.ShowDialog()
} #End Function
#Call the form
Show-Form-Template_psf | Out-Null

View File

@@ -0,0 +1,960 @@
#------------------------------------------------------------------------
# Source File Information (DO NOT MODIFY)
# Source ID: 676f8db7-35c7-452d-b353-a4b40f26243a
# Source File: Form-Template.psf
#------------------------------------------------------------------------
#region File Recovery Data (DO NOT MODIFY)
<#RecoveryData:
RAUAAB+LCAAAAAAABAC9VNtKwzAYvhd8h5Dr2oPd3AZtYXTuxtNwQ72TrP07o2lSknSzPr3p2g1x
QkHGKJSk+Q7/KQ0eIRFrkNWEaILMQlHBQ3xpezg6P0MoeJB0RTlhU8rgnuQQTYXMLxaQF4xosAuV
Bc4BpmEu3yHRSFcFhHheKQ25/Ux5KjbKrkWat4X+OrLQUxtKz3brx0JxyXQpIeRQakmYhWblktHk
BqqF+AAeLgcD0k/6V97I74E7HGHETSghzoyeh1HyRlkqDQ7HgmspmGoSNIHOpChA6qoljEst5glh
MKE58DoIA72ykOcHzg7aRb0TKWBTKq47OTGjwPWcfhnCwDU+/nDYSaqrjKNtap3YBXxqvG3bIfR6
bbxb3K0gaav5Wq8DZ3vaNNNputlsxkpBbooPaqfTfqmiXCVCMro8QgMDZ6/626UZmVN4HH0sux3r
m3gaI0k2lK/+4+X6WT8bZJ6X9l3ik26vl5ydJKdYSDi+0X7bjHzg/PxrRt9OzyrdRAUAAA==#>
#endregion
<#
.NOTES
--------------------------------------------------------------------------------
Code generated by: SAPIEN Technologies, Inc., PowerShell Studio 2017 v5.4.141
Generated on: 8/29/2017 11:53 AM
Generated by: Haidey2
--------------------------------------------------------------------------------
.DESCRIPTION
GUI script generated by PowerShell Studio 2017
#>
#----------------------------------------------
#region Application Functions
#----------------------------------------------
#endregion Application Functions
#----------------------------------------------
# Generated Form Function
#----------------------------------------------
function Show-Form-Template_psf {
#----------------------------------------------
#region Import the Assemblies
#----------------------------------------------
[void][reflection.assembly]::Load('System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
[void][reflection.assembly]::Load('System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
[void][reflection.assembly]::Load('System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a')
#endregion Import Assemblies
#----------------------------------------------
#region Generated Form Objects
#----------------------------------------------
[System.Windows.Forms.Application]::EnableVisualStyles()
$form1 = New-Object 'System.Windows.Forms.Form'
$InitialFormWindowState = New-Object 'System.Windows.Forms.FormWindowState'
$Script:Output = New-Object System.Windows.Forms.TextBox
$Script:Output_Left = New-Object System.Windows.Forms.TextBox
$Script:Output_Right = New-Object System.Windows.Forms.TextBox
$Script:Collection_DropDownBox = New-Object System.Windows.Forms.ComboBox
$Script:Deployment_DropDownBox = New-Object System.Windows.Forms.ComboBox
$Script:Combobox_Tools = New-Object System.Windows.Forms.ComboBox
$GroupBox = New-Object System.Windows.Forms.GroupBox
$GroupBox_Info = New-Object System.Windows.Forms.GroupBox
$Script:RadioButton_Window = New-Object System.Windows.Forms.RadioButton
$Script:RadioButton_GridView = New-Object System.Windows.Forms.RadioButton
$Script:RadioButton_CSV = New-Object System.Windows.Forms.RadioButton
$Button_Go = New-Object System.Windows.Forms.Button
$Script:TextBox_CollectionName = New-Object System.Windows.Forms.TextBox
#$PanelEventLogs_Events = New-Object 'System.Windows.Forms.Panel'
#$PanelEventLogs_Filter = New-Object 'System.Windows.Forms.Panel'
#$Text_ELogs_ServerName = New-Object 'System.Windows.Forms.TextBox'
#$Text_ELogs_EventID = New-Object 'System.Windows.Forms.TextBox'
#$Text_Elogs_DaysBack = New-Object 'System.Windows.Forms.TextBox'
$label_CollectionName = New-Object 'System.Windows.Forms.Label'
$label_CollectionName_Value = New-Object 'System.Windows.Forms.Label'
$label_DeploymentName = New-Object 'System.Windows.Forms.Label'
$label_DeploymentName_Value = New-Object 'System.Windows.Forms.Label'
$label_DeploymentTime = New-Object 'System.Windows.Forms.Label'
$label_DeploymentTime_Value = New-Object 'System.Windows.Forms.Label'
$label_DeviceCount = New-Object 'System.Windows.Forms.Label'
$label_DeviceCount_Value = New-Object 'System.Windows.Forms.Label'
$label_ServersResponding = New-Object 'System.Windows.Forms.Label'
$label_ServersResponding_Value = New-Object 'System.Windows.Forms.Label'
$label_ServersNOTResponding = New-Object 'System.Windows.Forms.Label'
$label_ServersNOTResponding_Value = New-Object 'System.Windows.Forms.Label'
$label_ServersPinging = New-Object 'System.Windows.Forms.Label'
$label_ServersPinging_Value = New-Object 'System.Windows.Forms.Label'
#$Button_ELogs_Connect = New-Object 'System.Windows.Forms.Button'
# $Location = Split-Path $MyInvocation.MyCommand.Path -Parent
$Script:ALL_Patch_Servers = @()
$Script:Responding = @()
$Script:NotResponding = @()
$Global:DeviceCollection_ServerNames1 = ""
$Global:Collection_Name = ""
$Global:Select_Tool
$Global:Output_Type = ""
$Global:Deployments = ""
#endregion Generated Form Objects
#----------------------------------------------
# User Generated Script
#----------------------------------------------
$form1_Load={
#TODO: Initialize Form Controls here
}
$Script:Collection_DropDownBox_SelectedIndexChanged={
$Script:Output.Text = $Script:Collection_DropDownBox.Text
$T = Get-CMDeviceCollection -Name $Script:Collection_DropDownBox.text | select Name,MemberCount
$Info = $Global:Deployments | ? { $_.applicationname -eq "$($Script:Deployment_DropDownBox.text)" -and $_.collectionname -eq "$($Script:Collection_DropDownBox.text)" } | select applicationname,collectionname,deploymenttime
$label_DeploymentName_Value.Text = $Info.ApplicationName
$label_DeploymentTime_Value.Text = $Info.DeploymentTime
$label_CollectionName_Value.Text = $Script:Collection_DropDownBox.Text #$T.CollectionName
$label_DeviceCount_Value.Text = $T.MemberCount
}
$Script:Deployment_DropDownBox_SelectedIndexChanged={
Reset-Forms -Form_Selection 1
Deployed-to-Collections
$Script:Output.Text = $Script:Deployment_DropDownBox.Text
}
$Script:Combobox_Tools_SelectedIndexChanged= {
$Script:Output.Text = $Script:Combobox_Tools.Text
}
$Button_Go_Click = {
temp
#SCCM-Module
# $Global:Collection_Name = $Script:TextBox_CollectionName.Text #$Script:TextBox_CollectionName.Text
# $Global:Select_Tool = $Script:Combobox_Tools.Text
#$Output.Text = "$Global:Collection_Name --- $Global:Select_Tool " | Out-String
#$Output.Text = | Out-String
}
##################################################################################################################
Function ConnectTo-SCCM {
If(!(Get-PSDrive).Name -ne "CCX") {
#
# Press 'F5' to run this script. Running this script will load the ConfigurationManager
# module for Windows PowerShell and will connect to the site.
#
# This script was auto-generated at '2/18/2021 10:12:39 AM'.
# Uncomment the line below if running in an environment where script signing is
# required.
#Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process
# Site configuration
$SiteCode = "CCX" # Site code
$ProviderMachineName = "PNCRASCCM001.ccx.carecentrix.com" # SMS Provider machine name
# Customizations
$initParams = @{}
#$initParams.Add("Verbose", $true) # Uncomment this line to enable verbose logging
#$initParams.Add("ErrorAction", "Stop") # Uncomment this line to stop the script on any errors
# Do not change anything below this line
# Import the ConfigurationManager.psd1 module
if((Get-Module ConfigurationManager) -eq $null) {
Import-Module "$($ENV:SMS_ADMIN_UI_PATH)\..\ConfigurationManager.psd1" @initParams
}
# Connect to the site's drive if it is not already present
if((Get-PSDrive -Name $SiteCode -PSProvider CMSite -ErrorAction SilentlyContinue) -eq $null) {
New-PSDrive -Name $SiteCode -PSProvider CMSite -Root $ProviderMachineName @initParams
}
# Set the current location to be the site code.
Set-Location "$($SiteCode):\" @initParams
#$Script:Output.Text = "inside connectoSCCM function"
}#endIf
}#endFunction
##################################################################################################################
Function SCCM-Module {
Write-Host "Inside SCCM function" -ForegroundColor Cyan
If(!(Get-PSDrive).Name -eq "sccm-drive") {
Import-Module 'C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1'
New-PSDrive -Name SCCM-Drive -PSProvider "AdminUI.PS.Provider\CMSite" -Root "PNCRASCCM001.ccx.carecentrix.com" -Description "SCCM Site"
}#endIf
$Script:Output.Text | Get-PSDrive | ft -AutoSize | Out-String
CD sccm-drive:
}#endFunction
##################################################################################################################
Function Update-Dropdown1 {
# $Collections += $Script:Collection_DropDownBox.text
$Collections = @("Collection-Servers","Ping-Collection","Check_Uptime","Test-Service","Remotely Update Policy","Software Update Status","Test-Sccm")
$Collections | % { $Script:Combobox_Tools.Items.Add($_) }
}
##################################################################################################################
Function Reset-Forms {
Param($Form_Selection)
Switch ($Form_Selection) {
1 { $Collection_DropDownBox.Items.Clear(); $Collection_DropDownBox.Text = "--Deployed to Collections--" }
2 {}
}
}
##################################################################################################################
Function temp {
$Script:Output.Clear()
$Script:Output_Left.Clear()
$Script:Output_Right.Clear()
#$Script:Script:Output.text = $Script:Collection_DropDownBox.text | Out-String
#$Global:Collection_Name = $Script:TextBox_CollectionName.Text #$Script:TextBox_CollectionName.Text
$Global:Collection_Name = $Script:Collection_DropDownBox.Text
$Global:Select_Tool = $Script:Combobox_Tools.Text
#$Script:Collection_DropDownBox.BackColor
If ($Script:RadioButton_Window.Checked -eq $true) { $Global:Output_Type = "Window" <#; $Script:Output.Text = "Window_Radio1 Checked: $($Script:RadioButton_Window.Checked)" | Out-String #> }
ElseIf ($Script:RadioButton_GridView.Checked -eq $true) { $Global:Output_Type = "Gridview" <#; $Script:Output.Text = "Gridview_Radio2 Checked: $($Script:RadioButton_GridView.Checked)" | Out-String #> }
ElseIf ($Script:RadioButton_CSV.Checked -eq $true) { $Global:Output_Type = "Export" <#; $Script:Output.Text = "CSV_Radio3 Checked: $($Script:RadioButton_CSV.Checked)" | Out-String #> }
If($Global:Collection_Name -and $Global:Select_Tool) {
$Script:Output.Text = "CollectionName: $Global:Collection_Name ----- SelectTool: $Global:Select_Tool"
# If($Script:Collection_DropDownBox.text = "Tool1"){gcc}
Run-Tool
#$Script:TextBox_CollectionName.clear()
$Script:Collection_DropDownBox.text = "----Select Collection----"
#Clear-Variables
}#endIf
Else { #$T = { Write-Host "You must enter Collection Name ............!!" -ForegroundColor Red }
$Script:Output.SelectionColor = 'red'
$Script:Output.Text = "You must select 'Tool' and enter Collection Name............!!"
}
Run-Defaults
}#endFunction
##################################################################################################################
Function Run-Tool {
Switch($Global:Select_Tool) {
Collection-Servers { Collection-Servers; Write-Host "Tool Selected: $Global:Select_Tool" }
Ping-Collection { Ping_Collection }
Check_Uptime { Check_Uptime }
Test-Service { Test-Service }
Test-SCCM { SCCM-Module }
#"Remotely Update Policy" { $Script:Output.Text = Invoke-Expression $Location\Tool-Remotely-Restart-SCCMSyncCycle.ps1 | ft -AutoSize | Out-String }
"Remotely Update Policy" { $Script:Output.Text = Invoke-Expression $Location\Tool-Remotely-Restart-SCCMSyncCycle.ps1 | ft -AutoSize | Out-String }
"Software Update Status" { $Script:Output.Text = & "$Location\Tool-Get-SCCMSoftwareUpdateStatus.ps1" -Dep_ID 16778048 | ft -AutoSize | Out-String}
}#endSwitch
#Clear-Variables
}#endFunction
##################################################################################################################
Function Run-Defaults {
#$Script:TextBox_CollectionName.Text = "Nabil - Test Collection"
$Script:RadioButton_Window.Checked = $true
<#
If(!$Location) {
$Location = Split-Path $MyInvocation.MyCommand.Path -Parent
}
#>
}
##################################################################################################################
Function xClear-Variables {
$Global:Collection_Name = ""
$Global:Select_Tool = ""
$Global:Output_Type = ""
$Script:ALL_Patch_Servers = @()
}
##################################################################################################################
Function Display-Results {
#Param($Global:Output_Type,$Final_Result)
Write-Host "DisplayType: $($Global:Output_Type)"
Switch ($Global:Output_Type){
Window { $Script:Output.Text = $Script:ALL_Patch_Servers | Out-String}
Gridview { $Script:ALL_Patch_Servers | Out-GridView }
Export { $Script:ALL_Patch_Servers | Export-Csv -Path $Location\Results.csv -NoTypeInformation; ii $Location\Results.csv }
}#endSwitch
}
#############################################################################################################################################################
Function Collection-Servers {
#Param($Coll_Name)
Write-Host "Collection:$Global:Collection_Name"
$Script:ALL_Patch_Servers = @()
ConnectTo-SCCM
NA-Set-Stage -Select_Stage OutputStage2
#SCCM-Module
#CD sccm-drive:
$Script:DeviceCollection_MemberCount = Get-CMDeviceCollection -Name $Global:Collection_Name | select Name,MemberCount
$Script:DeviceCollection_ServerNames = Collection-Members #Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name,IsClient #| Export-Csv "E:\SCCM-Files\SCCM-Scripts\Files\$Global:Collection_Name.csv" -NoTypeInformation
#$ServerName = $DeviceCollection_ServerNames.Name
#Set-Location c:
#$Script:Temp = Get-CMCollectionMember -CollectionName $Global:Collection_Name #| select Name,IsClient
$Script:DeviceCollection_ServerNames | % {
$Obj = New-Object -TypeName PSObject
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $_.Name
$Obj | Add-Member -MemberType NoteProperty -Name ClientInstalled -Value $_.IsClient
$Obj | Add-Member -MemberType NoteProperty -Name CollectionName -Value $Global:Collection_Name
#$Obj | Add-Member -MemberType NoteProperty -Name CollectionMemberCount -Value {(Get-CMCollectionMember -Name $Global:Collection_Name).MemberCount}
$Obj
$Script:ALL_Patch_Servers += $Obj
}#end%
# $Script:Output.Text = $Script:ALL_Patch_Servers | Out-String
Display-Results #-Final_Result $Script:ALL_Patch_Servers
Write-Host "$Script:ALL_Patch_Servers"
# $Script:ALL_Patch_Servers | Export-Csv $Location\Current-Collection-Servers.csv -NoTypeInformation
}#endFunction
#############################################################################################################################################################
Function Collection-Members {
Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name,IsClient
}
#############################################################################################################################################################
Function NA-Set-Stage {
Param($Select_Stage)
Switch($Select_Stage) {
OutputStage1 { $Script:Output.Visible = $false
$Script:Output_Left.Visible = $True
$Script:Output_Right.Visible = $True
$label_ServersResponding.Visible = $True
$label_ServersResponding_Value.Visible = $True
$label_ServersNOTResponding.Visible = $True
$label_ServersNOTResponding_Value.Visible = $True
$label_ServersPinging.Visible = $True
$label_ServersPinging_Value.Visible = $True
#Write-Host "output-stage1" -ForegroundColor Yellow
}
OutputStage2 { $Script:Output.Visible = $True
$label_ServersResponding.Visible = $false
$label_ServersResponding_Value.Visible = $false
$label_ServersNOTResponding.Visible = $False
$label_ServersNOTResponding_Value.Visible = $false
$Script:Output_Left.Visible = $false
$Script:Output_Right.Visible = $false
$label_ServersPinging.Visible = $false
$label_ServersPinging_Value.Visible = $false
}
test { $Script:Output.Text = "inside na set stage function"}
}#endSwitch
$Script:Output.Text = "outside switch inside na set stage function - param: $Select_Stage"
}#endFunction
#############################################################################################################################################################
Function Ping_Collection {
$Ping_Result = @()
$NotResponding = @()
$Responding = @()
ConnectTo-SCCM
NA-Set-Stage -Select_Stage OutputStage1
$Global:DeviceCollection_ServerNames1 = Collection-Members -CollectionName $Global:Collection_Name | select Name #Get-CMCollectionMember
#Set-Location c:
Write-Host "Total Server Count: $($Global:DeviceCollection_ServerNames1.count)" -ForegroundColor Green
Write-Host ""
If($Script:Collection_DropDownBox.Text -like "-*") {
$Script:Collection_DropDownBox.BackColor = 'red'
}
Else {
$Script:Collection_DropDownBox.BackColor = 'white'
############
# $Script:Output.Text = "CollectionName: $($Global:Collection_Name) ------ hello "
############
$Global:DeviceCollection_ServerNames1.Name | % {
$Server = $_
$label_ServersPinging_Value.Text = $Server
$Obj = New-Object -TypeName PSObject
$Count = $Global:DeviceCollection_ServerNames1.count
#$Script:Output.Text = "Checking: $Server ----- Servers left: $($Count--) Please Wait !!!" | Out-String
If (Test-Connection $Server -Count 1 -ErrorAction SilentlyContinue ) {
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $Server
$Obj | Add-Member -MemberType NoteProperty -Name Responding -Value "Yes"
$Ping_Result += $Obj
#$Responding += $Server
$Responding += $Obj
# $Script:Output.text += $Obj | Out-String
}#endIf
Else {
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $Server
$Obj | Add-Member -MemberType NoteProperty -Name Responding -Value "No!"
$Ping_Result += $Obj
#$NotResponding += $Server
$NotResponding += $Obj
# $Script:Output.text += $Obj | Out-String
}
$label_ServersResponding_Value.Text = $Responding.Count
$label_ServersNOTResponding_Value.Text = $NotResponding.Count
}#end%
#$Script:Output.Text = $Ping_Result | ft -AutoSize | Out-String
$Script:Output_Left.Text = $Responding | Out-String
$Script:Output_Right.Text = $NotResponding | Out-String
$label_ServersPinging_Value.Text = "Done !"
write-host "-------------------------------------------------------"
Write-host "$($Responding.count) / $($DeviceCollection_ServerNames1.count) -- Responding" -foregroundcolor Green
Write-host "$($NotResponding.count) / $($DeviceCollection_ServerNames1.count) -- NOT Responding" -foregroundcolor Red
}#endElse
}#endFunction
#############################################################################################################################################################
Function Check_Uptime {
ConnectTo-SCCM
NA-Set-Stage -Select_Stage OutputStage2
$Global:DeviceCollection_ServerNames1 = Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name
$Script:Output.Text = $Global:DeviceCollection_ServerNames1.name | % { gwmi win32_operatingsystem -ComputerName $_ -ErrorAction SilentlyContinue | select @{n="Server";e={$_.PSComputername}},@{n="LastReboot";e={$_.Converttodatetime($_.LastBootUpTime)}}} | sort LastBootup -descending | Out-String
}
#############################################################################################################################################################
Function Deployment-List {
Param($Deployment_History)
# SCCM-Module
$Global:Deployments = Get-CMDeployment | ? { $_.deploymenttime -gt ((Get-Date).AddDays(-"$Deployment_History")) }
#$T | select ApplicationName,CollectionName,DeploymentTime,AssignmentID,SoftwareName | % { $Deployment_DropDownBox.Items.Add($_) }
$i = 0
$Q = "" #@()
$Global:Deployments.ApplicationName | % { $Script:Deployment_DropDownBox.Items.Add($_)}
<#
foreach ($D in $Deployments) {
$Q = $D.ApplicationName + "-------------------------------------------------------" + $D.CollectionName
$Deployment_DropDownBox.Items.Add($Q)
$i++
}
#>
#$T.ApplicationName | % { $Deployment_DropDownBox.Items.Add($_) }
}#endFunction
#############################################################################################################################################################
Function Deployed-to-Collections {
$T = $Global:Deployments | ? { $_.ApplicationName -eq "$($Script:Deployment_DropDownBox.text)" } #| Select -ExpandProperty CollectionName
$Script:Collection_DropDownBox.Items.Clear()
$T.CollectionName | % { $Script:Collection_DropDownBox.Items.Add("$_")}
}
#############################################################################################################################################################
Function Test-Service {
$Script:Output.Text = "test-service function"
#$T = Get-Service
#$Script:Output.Text = $T | ft -AutoSize | Out-String
}
##################################################################################################################
##################################################################################################################
# --End User Generated Script--
#----------------------------------------------
#region Generated Events
#----------------------------------------------
$Form_StateCorrection_Load=
{
#Correct the initial state of the form to prevent the .Net maximized form issue
$form1.WindowState = $InitialFormWindowState
}
$Form_Cleanup_FormClosed=
{
#Remove all event handlers from the controls
try
{
$form1.remove_Load($form1_Load)
$form1.remove_Load($Form_StateCorrection_Load)
$form1.remove_FormClosed($Form_Cleanup_FormClosed)
#$PanelEventLogs_Events.remove_Paint($PanelEventLogs_Events_Paint)
#$PanelEventLogs_Filter.remove_Paint($PanelEventLogs_Filter_Paint)
$Text_Elogs_DaysBack.remove_TextChanged($Text_Elogs_DaysBack_TextChanged)
$Text_ELogs_ServerName.remove_TextChanged($Text_ELogs_ServerName_TextChanged)
$Text_ELogs_EventID.remove_TextChanged($Text_ELogs_EventID_TextChanged)
$Script:Output.remove_TextChanged($Output_TextChanged)
$Script:Output_Left.remove_TextChanged($Script:Output_Left_TextChanged)
$Script:Output_Right.remove_TextChanged($Script:Output_Right_TextChanged)
$Script:Collection_DropDownBox.remove_SelectedIndexChanged($Script:Collection_DropDownBox_SelectedIndexChanged)
$Script:Deployment_DropDownBox.remove_SelectedIndexChanged($Script:Deployment_DropDownBox_SelectedIndexChanged)
$Script:Combobox_Tools.remove_SelectedIndexChanged($Script:Combobox_Tools_SelectedIndexChanged)
$Script:RadioButton_Window.remove_SelectedIndexChanged($Script:RadioButton_Window_SelectedIndexChanged)
$Script:RadioButton_GridView.remove_SelectedIndexChanged($Script:RadioButton_GridView_SelectedIndexChanged)
$Script:RadioButton_CSV.remove_SelectedIndexChanged($Script:RadioButton_CSV_SelectedIndexChanged)
$Button_Go.remove_Click($Button_Go_Click)
}
catch { Out-Null <# Prevent PSScriptAnalyzer warning #> }
}
#$PanelEventLogs_Events_Paint=[System.Windows.Forms.PaintEventHandler]{ <#Event Argument: $_ = [System.Windows.Forms.PaintEventArgs]#> }
#$PanelEventLogs_Filter_Paint=[System.Windows.Forms.PaintEventHandler]{ }
$Text_ELogs_ServerName_TextChanged={}
$Text_Elogs_DaysBack_TextChanged={}
#endregion Generated Events
#----------------------------------------------
#region Generated Form Code
#----------------------------------------------
#
# form1
#
#$form1.Controls.Add($PanelEventLogs_Events)
#$form1.Controls.Add($PanelEventLogs_Filter)
$form1.Controls.Add($Script:Output)
$form1.Controls.Add($Script:Output_Left)
$form1.Controls.Add($Script:Output_Right)
$form1.Controls.Add($Script:Collection_DropDownBox)
$form1.Controls.Add($Script:Deployment_DropDownBox)
$form1.Controls.Add($Script:Combobox_Tools)
$form1.Controls.Add($GroupBox)
$form1.Controls.Add($GroupBox_Info)
$form1.controls.Add($Script:RadioButton_Window)
$form1.controls.Add($Script:RadioButton_GridView)
$form1.Controls.Add($Script:RadioButton_CSV)
$form1.Controls.Add($Button_Go)
$form1.Controls.Add($Script:TextBox_CollectionName)
$form1.Controls.Add($label_CollectionName)
$form1.Controls.Add($label_CollectionName_Value)
$form1.Controls.Add($label_DeploymentName)
$form1.controls.Add($label_DeploymentName_Value)
$form1.Controls.Add($label_DeploymentTime)
$form1.Controls.Add($label_DeploymentTime_Value)
$form1.Controls.Add($label_DeviceCount)
$form1.Controls.Add($label_DeviceCount_Value)
$form1.Controls.Add($label_ServersResponding)
$form1.Controls.Add($label_ServersResponding_Value)
$form1.Controls.Add($label_ServersNOTResponding)
$form1.Controls.Add($label_ServersNOTResponding_Value)
$form1.Controls.Add($label_ServersPinging)
$form1.Controls.Add($label_ServersPinging_Value)
$form1.AutoScaleDimensions = '6, 13'
$form1.AutoScaleMode = 'Font'
$form1.ClientSize = '1000, 800'
$form1.Name = 'form1'
$form1.Text = 'Form'
$form1.add_Load($form1_Load)
#endregion Generated Form Code
#----------------------------------------------
<#
$PanelEventLogs_Events.Controls.Add($Text_ELogs_ServerName)
$PanelEventLogs_Events.Controls.Add($Button_ELogs_Connect)
$PanelEventLogs_Events.Controls.Add($Button_ELogs_View)
$PanelEventLogs_Events.Controls.Add($Combobox_EventLogs_LogsList)
$PanelEventLogs_Events.Controls.Add($VCenterUserPassword)
$PanelEventLogs_Events.Controls.Add($CheckBoxUseWindowsLogin)
$PanelEventLogs_Events.Controls.Add($labelVCenterUserName)
$PanelEventLogs_Events.Controls.Add($labelVCenterPassword)
$PanelEventLogs_Events.Controls.Add($Script:Collection_DropDownBox)
$PanelEventLogs_Events.BackColor = '153,153,153'
$PanelEventLogs_Events.Location = '6, 6'
$PanelEventLogs_Events.Name = 'panelEventLogs_Events'
$PanelEventLogs_Events.Size = '598, 56'
$PanelEventLogs_Events.TabIndex = 0
$PanelEventLogs_Events.add_Paint($PanelEventLogs_Events_Paint)
$PanelEventLogs_Filter.Controls.Add($Combobox_ELogsFilter_Level)
$PanelEventLogs_Filter.Controls.Add($Text_ELogs_EventID)
$PanelEventLogs_Filter.Controls.Add($Text_Elogs_DaysBack)
$PanelEventLogs_Filter.Controls.Add($label_ELogs_Level)
$PanelEventLogs_Filter.Controls.Add($label_ELogs_EventID)
$PanelEventLogs_Filter.Controls.Add($label_ELogs_DaysBack)
$PanelEventLogs_Filter.BackColor = '255,255,212'
$PanelEventLogs_Filter.Location = '6, 62'
$PanelEventLogs_Filter.Name = 'PanelEventLogs_Filter'
$PanelEventLogs_Filter.Size = '598, 56'
$PanelEventLogs_Filter.BorderStyle = 'FixedSingle'
$PanelEventLogs_Filter.TabIndex = 0
$PanelEventLogs_Filter.add_Paint($PanelEventLogs_Filter_Paint)
#>
#
# $Text_ELogs_ServerName
<#
$Text_ELogs_ServerName.Location = '8, 26'
$Text_ELogs_ServerName.Name = '$Text_ELogs_ServerName'
$Text_ELogs_ServerName.Size = '100, 20'
$Text_ELogs_ServerName.text = "l2012"
$Text_ELogs_ServerName.TabIndex = 6
$Text_ELogs_ServerName.add_TextChanged($Text_ELogs_ServerName_TextChanged)
#
#
# Text_ELogs_EventID
#
$Text_ELogs_EventID.Location = '115, 26'
$Text_ELogs_EventID.Name = 'Text_ELogs_EventID'
$Text_ELogs_EventID.Size = '40, 20'
$Text_ELogs_EventID.TabIndex = 7
$Text_ELogs_EventID.add_TextChanged($Text_ELogs_EventID_TextChanged)
#
# Text_Elogs_DaysBack
#
$Text_Elogs_DaysBack.Location = '175, 26'
$Text_Elogs_DaysBack.Name = 'Text_Elogs_DaysBack'
$Text_Elogs_DaysBack.Size = '40, 20'
$Text_Elogs_DaysBack.TabIndex = 7
$Text_Elogs_DaysBack.add_TextChanged($Text_Elogs_DaysBack_TextChanged)
#>
# Output
#
$Script:Output.Location = '10, 250'
$Script:Output.Multiline = $True
$Script:Output.Name = 'Output'
$Script:Output.ScrollBars = 'both'
$Script:Output.Size = '965, 500'
$Script:Output.Font = 'Consolas, 8.25pt'
$Script:Output.WordWrap = $False
$Script:Output.TabIndex = 5
$Script:Output.add_TextChanged($Output_TextChanged)
$Script:Output.Visible = $True
#
$Script:Output_Left.Location = '20, 250'
$Script:Output_Left.Multiline = $True
$Script:Output_Left.Name = 'Output_Left'
$Script:Output_Left.ScrollBars = 'both'
$Script:Output_Left.Size = '470, 500'
$Script:Output_Left.Font = 'Consolas, 8.25pt'
$Script:Output_Left.WordWrap = $False
#$Script:Output_Left.TabIndex = 5
$Script:Output_Left.add_TextChanged($Output_Left_TextChanged)
#
$Script:Output_Right.Location = '510, 250'
$Script:Output_Right.Multiline = $True
$Script:Output_Right.Name = 'Output_Right'
$Script:Output_Right.ScrollBars = 'both'
$Script:Output_Right.Size = '470, 500'
$Script:Output_Right.Font = 'Consolas, 8.25pt'
$Script:Output_Right.WordWrap = $False
#$Script:Output_Right.TabIndex = 5
$Script:Output_Right.add_TextChanged($Output_Right_TextChanged)
#
# ComboboxServiceStartMode
#
$Script:Collection_DropDownBox.FormattingEnabled = $True
$Script:Collection_DropDownBox.Location = '20, 80'
$Script:Collection_DropDownBox.Name = 'Script:Collection_DropDownBox'
$Script:Collection_DropDownBox.Size = '180, 20'
$Script:Collection_DropDownBox.TabIndex = 2
$Script:Collection_DropDownBox.Text = '--Deployed to Collections--'
$Script:Collection_DropDownBox.add_SelectedIndexChanged($Script:Collection_DropDownBox_SelectedIndexChanged)
#
$Script:Deployment_DropDownBox.Location = '20,30'
#$Script:Deployment_DropDownBox.Size = New-Object System.Drawing.Size(580,50)
$Script:Deployment_DropDownBox.Size = '500,50'
#$Script:Deployment_DropDownBox.DropDownHeight = 200
$Script:Deployment_DropDownBox.text = "----Select Deployment----"
#$Script:Deployment_DropDownBox.Visible = $false
$Script:Deployment_DropDownBox.add_SelectedIndexChanged($Script:Deployment_DropDownBox_SelectedIndexChanged)
#
#$Script:Combobox_Tools.Size = New-Object System.Drawing.Size(180,20)
#$Script:Combobox_Tools.DropDownHeight = 200
$Script:Combobox_Tools.text = "----Select Tool----!"
$Script:Combobox_Tools.Location = '20,170'
$Script:Combobox_Tools.Size = '180,10'
$Script:Combobox_Tools.add_SelectedIndexChanged($Script:Combobox_Tools_SelectedIndexChanged)
#
$groupBox.Location = '270,70'
$groupBox.size = ('150,90') #New-Object System.Drawing.Size(150,90)
$groupBox.text = "Select Output:"
$GroupBox.Controls.Add($Script:RadioButton_Window)
$GroupBox.Controls.Add($Script:RadioButton_GridView)
$GroupBox.Controls.Add($Script:RadioButton_CSV)
#
$GroupBox_Info.Location = '570,25'
$GroupBox_Info.Size = '410,160'
$GroupBox_Info.Text = "Deployment Info"
$GroupBox_Info.Controls.Add($label_CollectionName)
$GroupBox_Info.Controls.Add($label_CollectionName_Value)
$GroupBox_Info.Controls.Add($label_DeploymentName)
$GroupBox_Info.Controls.Add($label_DeploymentName_Value)
$GroupBox_Info.Controls.Add($label_DeploymentTime)
$GroupBox_Info.Controls.Add($label_DeploymentTime_Value)
$GroupBox_Info.Controls.Add($label_DeviceCount)
$GroupBox_Info.Controls.Add($label_DeviceCount_Value)
############
$label_CollectionName.AutoSize = $True
$label_CollectionName.Font = 'Microsoft Sans Serif, 9.0pt' #, style=Bold'
#$label_CollectionName.ForeColor = 'DarkGreen'
#$label_CollectionName.TextAlign = 'MiddleRight'
$label_CollectionName.Location = '20,25'
$label_CollectionName.Name = 'Collection_Name'
$label_CollectionName.Size = '41, 13'
#$label_CollectionName.TabIndex = 6
$label_CollectionName.Text = 'Collection Name:'
#$label_CollectionName.add_Click($label_CollectionName_Click)
############ Value ###############
$label_CollectionName_Value.AutoSize = $True
$label_CollectionName_Value.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_CollectionName_Value.ForeColor = 'DarkGreen'
#$label_CollectionName_Value.TextAlign = 'MiddleRight'
$label_CollectionName_Value.Location = '140,25'
$label_CollectionName_Value.Name = 'Collection_Name_Value'
$label_CollectionName_Value.Size = '41, 13'
#$label_CollectionName_Value.TabIndex = 6
$label_CollectionName_Value.Text = '_'
#$label_CollectionName_Value.add_Click($label_CollectionName_Value_Click)
############
$label_DeploymentName.AutoSize = $True
$label_DeploymentName.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_DeploymentName.ForeColor = 'DarkGreen'
#$label_DeploymentName.TextAlign = 'MiddleRight'
$label_DeploymentName.Location = '20,45'
$label_DeploymentName.Name = 'Deployment_Name'
$label_DeploymentName.Size = '41, 13'
#$label_DeploymentName.TabIndex = 6
$label_DeploymentName.Text = 'Deployment Name:'
#$label_DeploymentName.add_Click($label_DeploymentName_Click)
############ Value ############
$label_DeploymentName_Value.AutoSize = $True
$label_DeploymentName_Value.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_DeploymentName_Value.ForeColor = 'DarkGreen'
#$label_DeploymentName_Value.TextAlign = 'MiddleRight'
$label_DeploymentName_Value.Location = '140,45'
$label_DeploymentName_Value.Name = 'Deployment_Name_Value'
$label_DeploymentName_Value.Size = '41, 13'
#$label_DeploymentName_Value.TabIndex = 6
$label_DeploymentName_Value.Text = '_'
#$label_DeploymentName_Value.add_Click($label_DeploymentName_Value_Click)
#############
$label_DeploymentTime.AutoSize = $True
$label_DeploymentTime.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_DeploymentTime.ForeColor = 'DarkGreen'
#$label_DeploymentTime.TextAlign = 'MiddleRight'
$label_DeploymentTime.Location = '20,65'
$label_DeploymentTime.Name = 'Deployment_Time'
$label_DeploymentTime.Size = '41, 13'
#$label_DeploymentTime.TabIndex = 6
$label_DeploymentTime.Text = 'Deployment Time:'
#$label_DeploymentTime.add_Click($label_CollectionName_Click)
############ Value ############
$label_DeploymentTime_Value.AutoSize = $True
$label_DeploymentTime_Value.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_DeploymentTime_Value.ForeColor = 'DarkGreen'
#$label_DeploymentTime_Value.TextAlign = 'MiddleRight'
$label_DeploymentTime_Value.Location = '140,65'
$label_DeploymentTime_Value.Name = 'Deployment_Time_Value'
$label_DeploymentTime_Value.Size = '41, 13'
#$label_DeploymentTime_Value.TabIndex = 6
$label_DeploymentTime_Value.Text = '_'
#$label_DeploymentTime_Value.add_Click($label_DeploymentTime_Value_Click)
###########
$label_DeviceCount.AutoSize = $True
$label_DeviceCount.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_DeviceCount.ForeColor = 'DarkGreen'
#$label_DeviceCount.TextAlign = 'MiddleRight'
$label_DeviceCount.Location = '20,85'
$label_DeviceCount.Name = 'Device_Count'
$label_DeviceCount.Size = '41, 13'
#$label_DeviceCount.TabIndex = 6
$label_DeviceCount.Text = 'Device Count:'
#$label_DeviceCount.add_Click($label_DeviceCount_Click)
############ Value ############
$label_DeviceCount_Value.AutoSize = $True
$label_DeviceCount_Value.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_DeviceCount_Value.ForeColor = 'DarkGreen'
#$label_DeviceCount_Value.TextAlign = 'MiddleRight'
$label_DeviceCount_Value.Location = '140,85'
$label_DeviceCount_Value.Name = 'Device_Count_Value'
$label_DeviceCount_Value.Size = '41, 13'
#$label_DeviceCount_Value.TabIndex = 6
$label_DeviceCount_Value.Text = '_'
#$label_DeviceCount_Value.add_Click($label_DeviceCount_Value_Click)
############
$label_ServersResponding.AutoSize = $True
$label_ServersResponding.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_ServersResponding.ForeColor = 'DarkGreen'
#$label_ServersResponding.TextAlign = 'MiddleRight'
$label_ServersResponding.Location = '15,225'
$label_ServersResponding.Name = 'Servers Responding'
$label_ServersResponding.Size = '41, 13'
#$label_ServersResponding.TabIndex = 6
$label_ServersResponding.Text = 'Servers Responding: '
$label_ServersResponding.Visible = $False
#$label_ServersResponding.add_Click($label_ServersResponding_Click)
############
$label_ServersResponding_Value.AutoSize = $True
$label_ServersResponding_Value.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_ServersResponding_Value.ForeColor = 'DarkGreen'
#$label_ServersResponding.TextAlign = 'MiddleRight'
$label_ServersResponding_Value.Location = '155,225'
$label_ServersResponding_Value.Name = 'Servers Responding Vlue'
$label_ServersResponding_Value.Size = '41, 13'
#$label_ServersResponding_Value.TabIndex = 6
$label_ServersResponding_Value.Text = '-'
$label_ServersResponding_Value.Visible = $False
#$label_ServersResponding_Value.add_Click($label_ServersResponding_Value_Click)
############
$label_ServersNOTResponding.AutoSize = $True
$label_ServersNOTResponding.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_ServersNOTResponding.ForeColor = 'Red'
#$label_ServersNOTResponding.TextAlign = 'MiddleRight'
$label_ServersNOTResponding.Location = '510,225'
$label_ServersNOTResponding.Name = 'Servers Not Responding'
$label_ServersNOTResponding.Size = '41, 13'
#$label_ServersNOTResponding.TabIndex = 6
$label_ServersNOTResponding.Text = 'Servers NOT Responding: '
$label_ServersNOTResponding.Visible = $False
#$label_ServersNOTResponding.add_Click($label_ServersNOTResponding_Click)
############
$label_ServersNOTResponding_Value.AutoSize = $True
$label_ServersNOTResponding_Value.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_ServersNOTResponding_Value.ForeColor = 'Red'
#$label_ServersNOTResponding_Value.TextAlign = 'MiddleRight'
$label_ServersNOTResponding_Value.Location = '670,225'
$label_ServersNOTResponding_Value.Name = 'Servers Not Responding Value'
$label_ServersNOTResponding_Value.Size = '41, 13'
#$label_ServersNOTResponding_Value.TabIndex = 6
$label_ServersNOTResponding_Value.Text = '- '
$label_ServersNOTResponding_Value.Visible = $False
#$label_ServersNOTResponding_Value.add_Click($label_ServersNOTResponding_Value_Click)
############
$label_ServersPinging.AutoSize = $True
$label_ServersPinging.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_ServersPinging.ForeColor = 'Green'
#$label_ServersPinging.TextAlign = 'MiddleRight'
$label_ServersPinging.Location = '15,210'
$label_ServersPinging.Name = 'Servers Pinging'
$label_ServersPinging.Size = '41, 13'
#$label_ServersPinging.TabIndex = 6
$label_ServersPinging.Text = 'Checking Servers: '
$label_ServersPinging.Visible = $False
#$label_ServersPinging.add_Click($label_ServersPinging_Click)
############
$label_ServersPinging_Value.AutoSize = $True
$label_ServersPinging_Value.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_ServersPinging_Value.ForeColor = 'Green'
#$label_ServersPinging_Value.TextAlign = 'MiddleRight'
$label_ServersPinging_Value.Location = '165,210'
$label_ServersPinging_Value.Name = 'Servers Pinging Value'
$label_ServersPinging_Value.Size = '41, 13'
$label_ServersPinging_Value.Text = '- '
$label_ServersPinging_Value.Visible = $False
#$label_ServersPinging_Value.add_Click($label_ServersPinging_Value_Click)
############
$Script:RadioButton_Window.Location = new-object System.Drawing.Point(15,15)
$Script:RadioButton_Window.size = New-Object System.Drawing.Size(130,20)
$Script:RadioButton_Window.Checked = $true
$Script:RadioButton_Window.Text = "Window"
#$Script:RadioButton_Window.
#
$Script:RadioButton_GridView.Location = new-object System.Drawing.Point(15,35)
$Script:RadioButton_GridView.size = New-Object System.Drawing.Size(80,20)
$Script:RadioButton_GridView.Checked = $False
$Script:RadioButton_GridView.Text = "GridView"
#
$Script:RadioButton_CSV.Location = new-object System.Drawing.Point(15,55)
$Script:RadioButton_CSV.size = New-Object System.Drawing.Size(80,20)
$Script:RadioButton_CSV.Checked = $False
$Script:RadioButton_CSV.Text = "CSV"
#
$Button_Go.Location = New-Object System.Drawing.Size(450,75)
$Button_Go.Size = New-Object System.Drawing.Size(110,80)
$Button_Go.Text = "Go"
#$Button_Go.Add_Click({temp})
$Button_Go.Add_Click($Button_Go_Click)
#
$Script:TextBox_CollectionName.Left = 20;
$Script:TextBox_CollectionName.Top = 130;
$Script:TextBox_CollectionName.width = 200;
$Script:TextBox_CollectionName.Text = "Nabil - Test Collection"
#
############################################################################
Update-Dropdown1
ConnectTo-SCCM
Deployment-List -Deployment_History 5
$Script:Output.Text = "helloooooooo"
#cd c:
############################################################################
#Save the initial state of the form
$InitialFormWindowState = $form1.WindowState
#Init the OnLoad event to correct the initial state of the form
$form1.add_Load($Form_StateCorrection_Load)
#Clean up the control events
$form1.add_FormClosed($Form_Cleanup_FormClosed)
#Show the Form
return $form1.ShowDialog()
} #End Function
#Call the form
Show-Form-Template_psf | Out-Null

View File

@@ -0,0 +1,318 @@
$Location = Split-Path $MyInvocation.MyCommand.Path -Parent
$Script:ALL_Patch_Servers = @()
$Script:Responding = @()
$Script:NotResponding = @()
$Global:Collection_Name = ""
$Global:Select_Tool
$Global:Output_Type = ""
If(!(Get-PSDrive -Name SCCM-Drive -ErrorAction SilentlyContinue)) {
Import-Module 'C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1'
New-PSDrive -Name SCCM-Drive -PSProvider "AdminUI.PS.Provider\CMSite" -Root "PNCRASCCM001.ccx.carecentrix.com" -Description "SCCM Site"
}
#########################################################################################################################################################
Function Start-Form {
#$Global:Collection_Name = ""
#$Global:Select_Tool = ""
#$Global:Output_Type = ""
$Temp = ""
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
$Form = New-Object System.Windows.Forms.Form
$Form.Size = New-Object System.Drawing.Size(1000,800)
##############################################
#$Form_Load={ $Script:outputBox.text = "Welcome" }
############################################## Start functions
<# function pingInfo {
if ($RadioButton1.Checked -eq $true) {$nrOfPings=1}
if ($RadioButton2.Checked -eq $true) {$nrOfPings=2}
if ($RadioButton3.Checked -eq $true) {$nrOfPings=3}
$computer=$DropDownBox.SelectedItem.ToString() #populate the var with the value you selected
$pingResult=ping $wks -n $nrOfPings | fl | out-string;
$Script:outputBox.text=$pingResult
} #end pingInfo
#>
############################################## end functions
Function SCCM-Module {
If(!(Get-PSDrive).Name -eq "sccm-drive") {
Import-Module 'C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1'
New-PSDrive -Name SCCM-Drive -PSProvider "AdminUI.PS.Provider\CMSite" -Root "PNCRASCCM001.ccx.carecentrix.com" -Description "SCCM Site"
}#endIf
CD sccm-drive:
}#endFunction
##############################################
Function Update-Dropdown1 {
# $Collections += $textBox1.text
$Collections = @("Collection-Servers","Ping-Collection","Check_Uptime","Test-Service","Remotely Update Policy","Tool6","Tool7")
$Collections | % { $DropDownBox.Items.Add($_) }
}
##############################################
Function temp {
$outputBox.Clear()
#$Script:outputBox.text = $textBox1.text | Out-String
$Global:Collection_Name = $textBox1.Text
#$Global:Select_Tool = $RadioButton1.Checked
$Global:Select_Tool = $DropDownBox.text
#$Global:Output_Type =
If ($RadioButton1.Checked -eq $true) { $Global:Output_Type = "Window"; $outputBox.Text = "Radio1 Checked: $($RadioButton1.Checked)" | Out-String }
ElseIf ($RadioButton2.Checked -eq $true) { $Global:Output_Type = "Gridview"; $outputBox.Text = "Radio2 Checked: $RadioButton2.Checked" | Out-String }
ElseIf ($RadioButton3.Checked -eq $true) { $Global:Output_Type = "Export"; $outputBox.Text = "Radio3 Checked: $RadioButton2.Checked" | Out-String }
If($Global:Collection_Name -and $Global:Select_Tool) {
# If($DropDownBox.text = "Tool1"){gcc}
Run-Tool
$textBox1.clear()
$DropDownBox.text = "----Select Tool----"
Clear-Variables
}#endIf
Else { #$T = { Write-Host "You must enter Collection Name ............!!" -ForegroundColor Red }
$Script:outputBox.SelectionColor = 'red'
$Script:outputBox.Text = "You must select 'Tool' and enter Collection Name............!!"
}
Run-Defaults
}#endFunction
##############################################
Function Run-Tool {
Switch($Global:Select_Tool) {
Collection-Servers { Collection-Servers; Write-Host "Tool Selected: $Global:Select_Tool" }
Ping-Collection { Ping_Collection }
Check_Uptime { Check_Uptime }
Test-Service { Test-Service }
#"Remotely Update Policy" { $outputBox.Text = Invoke-Expression $Location\Tool-Remotely-Restart-SCCMSyncCycle.ps1 | ft -AutoSize | Out-String }
"Remotely Update Policy" { $outputBox.Text = Invoke-Expression $Location\Tool-Remotely-Restart-SCCMSyncCycle.ps1 | ft -AutoSize | Out-String }
"Software Update Status" { $outputBox.Text = Invoke-Expression $Location\Tool-Get-SCCMSoftwareUpdateStatus.ps1 | ft -AutoSize | Out-String}
}#endSwitch
#Clear-Variables
}#endFunction
##############################################
Function Run-Defaults {
$Script:textBox1.Text = "Nabil - Test Collection"
$Script:RadioButton1.Checked = $true
}
##############################################
Function gcc {
$Script:outputBox.text = Get-Service | Out-String
}
##############################################
Function Clear-Variables {
$Global:Collection_Name = ""
$Global:Select_Tool = ""
$Global:Output_Type = ""
$Script:ALL_Patch_Servers = @()
}
#region Controls
############################################## Start group boxes
$groupBox = New-Object System.Windows.Forms.GroupBox
$groupBox.Location = New-Object System.Drawing.Size(270,20)
$groupBox.size = New-Object System.Drawing.Size(150,110)
$groupBox.text = "Select Output:"
$Form.Controls.Add($groupBox)
############################################## end group boxes
############################################## Start radio buttons
$Script:RadioButton1 = New-Object System.Windows.Forms.RadioButton
$Script:RadioButton1.Location = new-object System.Drawing.Point(15,15)
$Script:RadioButton1.size = New-Object System.Drawing.Size(130,20)
$Script:RadioButton1.Checked = $true
$Script:RadioButton1.Text = "Window"
$groupBox.Controls.Add($RadioButton1)
$Script:RadioButton2 = New-Object System.Windows.Forms.RadioButton
$Script:RadioButton2.Location = new-object System.Drawing.Point(15,35)
$Script:RadioButton2.size = New-Object System.Drawing.Size(80,20)
$Script:RadioButton2.Text = "Gridview"
$groupBox.Controls.Add($RadioButton2)
$Script:RadioButton3 = New-Object System.Windows.Forms.RadioButton
$Script:RadioButton3.Location = new-object System.Drawing.Point(15,55)
$Script:RadioButton3.size = New-Object System.Drawing.Size(80,20)
$Script:RadioButton3.Text = "Export csv"
$groupBox.Controls.Add($RadioButton3)
############################################## end radio buttons
########### Text Box ###########
############Define text box1 for input
$Script:textBox1 = New-Object System.Windows.Forms.TextBox;
$Script:textBox1.Left = 20;
$Script:textBox1.Top = 30;
$Script:textBox1.width = 200;
$Script:textBox1.Text = "Nabil - Test Collection"
$Form.Controls.Add($textBox1)
############################################## Start drop down boxes
$Script:DropDownBox = New-Object System.Windows.Forms.ComboBox
$Script:DropDownBox.Location = New-Object System.Drawing.Size(20,80)
$Script:DropDownBox.Size = New-Object System.Drawing.Size(180,20)
$Script:DropDownBox.DropDownHeight = 200
$Script:DropDownBox.text = "----Select Tool----"
$Form.Controls.Add($DropDownBox)
############################################## end drop down boxes
<############################################## Start text fields
$Script:outputBox = New-Object System.Windows.Forms.TextBox
$Script:outputBox.Location = New-Object System.Drawing.Size(10,150)
$Script:outputBox.Size = New-Object System.Drawing.Size(865,300)
$Script:outputBox.MultiLine = $True
$Script:outputBox.ScrollBars = "Vertical"
$Form.Controls.Add($Script:outputBox)
###########>
$SCRIPT:outputBox=New-Object System.Windows.Forms.RichTextBox
$outputBox.Location=New-Object System.Drawing.Size(10,150)
$outputBox.Size=New-Object System.Drawing.Size(965,600)
$outputBox.Multiline=$True
$outputBox.ReadOnly = $True
$outputBox.BackColor = [Drawing.Color]::White
$outputBox.ScrollBars = "both"
$outputBox.WordWrap = $false
$outputBox.Font = 'Consolas, 8.25pt'
$form.Controls.Add($Script:outputBox)
############################################## end text fields
############################################## Start buttons
$Button = New-Object System.Windows.Forms.Button
$Button.Location = New-Object System.Drawing.Size(450,30)
$Button.Size = New-Object System.Drawing.Size(110,80)
$Button.Text = "Go"
$Button.Add_Click({temp})
$Form.Controls.Add($Button)
#endregion Controls
############################################## end buttons
Update-Dropdown1
$Form.Add_Shown({$Form.Activate()})
[void] $Form.ShowDialog()
}
#########################################################################################################################################################
<# Function Input-Box {
[void][System.Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic')
$Global:Collection_Name = [Microsoft.VisualBasic.Interaction]::InputBox("Enter your name", "Name", "Enter Collection Name")
}
#>
#############################################################################################################################################################
Function Display-Results {
#Param($Global:Output_Type,$Final_Result)
Write-Host "DisplayType: $($Global:Output_Type)"
Switch ($Global:Output_Type){
Window { $Script:outputBox.Text = $Script:ALL_Patch_Servers | Out-String}
Gridview { $Script:ALL_Patch_Servers | Out-GridView }
Export { $Script:ALL_Patch_Servers | Export-Csv -Path $Location\Results.csv -NoTypeInformation; ii $Location\Results.csv }
}#endSwitch
}
#############################################################################################################################################################
Function Collection-Servers {
#Param($Coll_Name)
Write-Host "Collection:$Global:Collection_Name"
SCCM-Module
#CD sccm-drive:
$Script:DeviceCollection_MemberCount = Get-CMDeviceCollection -Name $Global:Collection_Name | select Name,MemberCount
$Script:DeviceCollection_ServerNames = Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name,IsClient #| Export-Csv "E:\SCCM-Files\SCCM-Scripts\Files\$Global:Collection_Name.csv" -NoTypeInformation
#$ServerName = $DeviceCollection_ServerNames.Name
Set-Location c:
#$Script:Temp = Get-CMCollectionMember -CollectionName $Global:Collection_Name #| select Name,IsClient
$Script:DeviceCollection_ServerNames | % {
$Obj = New-Object -TypeName PSObject
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $_.Name
$Obj | Add-Member -MemberType NoteProperty -Name ClientInstalled -Value $_.IsClient
$Obj | Add-Member -MemberType NoteProperty -Name CollectionName -Value $Global:Collection_Name
#$Obj | Add-Member -MemberType NoteProperty -Name CollectionMemberCount -Value {(Get-CMCollectionMember -Name $Global:Collection_Name).MemberCount}
$Obj
$Script:ALL_Patch_Servers += $Obj
}#end%
# $Script:outputBox.Text = $Script:ALL_Patch_Servers | Out-String
Display-Results #-Final_Result $Script:ALL_Patch_Servers
Write-Host "$Script:ALL_Patch_Servers"
$Script:ALL_Patch_Servers | Export-Csv $Location\Current-Collection-Servers.csv -NoTypeInformation
}#endFunction
#############################################################################################################################################################
Function Ping_Collection {
$Ping_Result = @()
Write-Host "Total Server Count: $($Script:ALL_Patch_Servers.count)" -ForegroundColor Green
Write-Host ""
SCCM-Module
#CD sccm-drive:
$Script:DeviceCollection_ServerNames1 = Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name
Set-Location c:
$Script:DeviceCollection_ServerNames1.Name | % {
$Obj = New-Object -TypeName PSObject
If (Test-Connection $_ -Count 1 -ErrorAction SilentlyContinue ) {
#Write-Host "Responding:---- $_ " -ForegroundColor Green
#$Script:outputBox.AppendText("Responding: $_")
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $_
$Obj | Add-Member -MemberType NoteProperty -Name Responding -Value "No!"
$Ping_Result += $Obj
}#endIf
Else {
#$Script:outputBox.AppendText("NOT Responding: $_")
$NotResponding += $_
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $_
$Obj | Add-Member -MemberType NoteProperty -Name Responding -Value "No!"
$Ping_Result += $Obj
}
}#end%
$Script:outputBox.Text = $Ping_Result | ft -AutoSize | Out-String
write-host "-------------------------------------------------------"
Write-host "$($Responding.count) / $($DeviceCollection_ServerNames1.count) -- Responding" -foregroundcolor Green
Write-host "$($NotResponding.count) / $($DeviceCollection_ServerNames1.count) -- NOT Responding" -foregroundcolor Red
Write-Host "Servers NOT Responding: $NotResponding " -ForegroundColor Red
}#endFunction
#############################################################################################################################################################
Function Check_Uptime {
SCCM-Module
$Script:DeviceCollection_ServerNames1 = Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name
$Script:outputBox.Text = $Script:DeviceCollection_ServerNames1.name | % { gwmi win32_operatingsystem -ComputerName $_ -ErrorAction SilentlyContinue | select @{n="Server";e={$_.PSComputername}},@{n="LastBootup";e={$_.Converttodatetime($_.LastBootUpTime)}}} | sort LastBootup -descending | Out-String
}
#############################################################################################################################################################
Function Test-Service {
$T = Get-Service
$outputBox.Text = $T | ft -AutoSize | Out-String
}
#############################################################################################################################################################
#############################################################################################################################################################
Start-Form

View File

@@ -0,0 +1,377 @@
$Location = Split-Path $MyInvocation.MyCommand.Path -Parent
$Script:ALL_Patch_Servers = @()
$Script:Responding = @()
$Script:NotResponding = @()
$Global:Collection_Name = ""
$Global:Select_Tool
$Global:Output_Type = ""
If(!(Get-PSDrive -Name SCCM-Drive -ErrorAction SilentlyContinue)) {
Import-Module 'C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1'
New-PSDrive -Name SCCM-Drive -PSProvider "AdminUI.PS.Provider\CMSite" -Root "PNCRASCCM001.ccx.carecentrix.com" -Description "SCCM Site"
}
#########################################################################################################################################################
Function Start-Form {
#$Global:Collection_Name = ""
#$Global:Select_Tool = ""
#$Global:Output_Type = ""
$Temp = ""
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
$Form = New-Object System.Windows.Forms.Form
$Form.Size = New-Object System.Drawing.Size(1000,800)
##############################################
#$Form_Load={ $Script:outputBox.text = "Welcome" }
############################################## Start functions
<# function pingInfo {
if ($RadioButton1.Checked -eq $true) {$nrOfPings=1}
if ($RadioButton2.Checked -eq $true) {$nrOfPings=2}
if ($RadioButton3.Checked -eq $true) {$nrOfPings=3}
$computer=$DropDownBox.SelectedItem.ToString() #populate the var with the value you selected
$pingResult=ping $wks -n $nrOfPings | fl | out-string;
$Script:outputBox.text=$pingResult
} #end pingInfo
#>
############################################## end functions
Function SCCM-Module {
If(!(Get-PSDrive).Name -eq "sccm-drive") {
Import-Module 'C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1'
New-PSDrive -Name SCCM-Drive -PSProvider "AdminUI.PS.Provider\CMSite" -Root "PNCRASCCM001.ccx.carecentrix.com" -Description "SCCM Site"
}#endIf
CD sccm-drive:
}#endFunction
##############################################
Function Update-Dropdown1 {
# $Collections += $textBox1.text
$Collections = @("Collection-Servers","Ping-Collection","Check_Uptime","Test-Service","Remotely Update Policy","Software Update Status","Tool7")
$Collections | % { $DropDownBox.Items.Add($_) }
}
##############################################
Function temp {
$outputBox.Clear()
#$Script:outputBox.text = $textBox1.text | Out-String
$Global:Collection_Name = $textBox1.Text
#$Global:Select_Tool = $RadioButton1.Checked
$Global:Select_Tool = $DropDownBox.text
#$Global:Output_Type =
If ($RadioButton1.Checked -eq $true) { $Global:Output_Type = "Window"; $outputBox.Text = "Radio1 Checked: $($RadioButton1.Checked)" | Out-String }
ElseIf ($RadioButton2.Checked -eq $true) { $Global:Output_Type = "Gridview"; $outputBox.Text = "Radio2 Checked: $RadioButton2.Checked" | Out-String }
ElseIf ($RadioButton3.Checked -eq $true) { $Global:Output_Type = "Export"; $outputBox.Text = "Radio3 Checked: $RadioButton2.Checked" | Out-String }
If($Global:Collection_Name -and $Global:Select_Tool) {
# If($DropDownBox.text = "Tool1"){gcc}
Run-Tool
$textBox1.clear()
$DropDownBox.text = "----Select Tool----"
Clear-Variables
}#endIf
Else { #$T = { Write-Host "You must enter Collection Name ............!!" -ForegroundColor Red }
$Script:outputBox.SelectionColor = 'red'
$Script:outputBox.Text = "You must select 'Tool' and enter Collection Name............!!"
}
Run-Defaults
}#endFunction
##############################################
Function Run-Tool {
Switch($Global:Select_Tool) {
Collection-Servers { Collection-Servers; Write-Host "Tool Selected: $Global:Select_Tool" }
Ping-Collection { Ping_Collection }
Check_Uptime { Check_Uptime }
Test-Service { Test-Service }
#"Remotely Update Policy" { $outputBox.Text = Invoke-Expression $Location\Tool-Remotely-Restart-SCCMSyncCycle.ps1 | ft -AutoSize | Out-String }
"Remotely Update Policy" { $outputBox.Text = Invoke-Expression $Location\Tool-Remotely-Restart-SCCMSyncCycle.ps1 | ft -AutoSize | Out-String }
"Software Update Status" { $outputBox.Text = & "$Location\Tool-Get-SCCMSoftwareUpdateStatus.ps1" -Dep_ID 16778048 | ft -AutoSize | Out-String}
}#endSwitch
#Clear-Variables
}#endFunction
##############################################
Function Run-Defaults {
$Script:textBox1.Text = "Nabil - Test Collection"
$Script:RadioButton1.Checked = $true
}
##############################################
Function gcc {
$Script:outputBox.text = Get-Service | Out-String
}
##############################################
Function Clear-Variables {
$Global:Collection_Name = ""
$Global:Select_Tool = ""
$Global:Output_Type = ""
$Script:ALL_Patch_Servers = @()
}
#region Controls
############################################## Start group boxes
$groupBox = New-Object System.Windows.Forms.GroupBox
$groupBox.Location = New-Object System.Drawing.Size(270,20)
$groupBox.size = New-Object System.Drawing.Size(150,90)
$groupBox.text = "Select Output:"
$Form.Controls.Add($groupBox)
############################################## end group boxes
############################################## Start radio buttons
$Script:RadioButton1 = New-Object System.Windows.Forms.RadioButton
$Script:RadioButton1.Location = new-object System.Drawing.Point(15,15)
$Script:RadioButton1.size = New-Object System.Drawing.Size(130,20)
$Script:RadioButton1.Checked = $true
$Script:RadioButton1.Text = "Window"
$groupBox.Controls.Add($RadioButton1)
$Script:RadioButton2 = New-Object System.Windows.Forms.RadioButton
$Script:RadioButton2.Location = new-object System.Drawing.Point(15,35)
$Script:RadioButton2.size = New-Object System.Drawing.Size(80,20)
$Script:RadioButton2.Text = "Gridview"
$groupBox.Controls.Add($RadioButton2)
$Script:RadioButton3 = New-Object System.Windows.Forms.RadioButton
$Script:RadioButton3.Location = new-object System.Drawing.Point(15,55)
$Script:RadioButton3.size = New-Object System.Drawing.Size(80,20)
$Script:RadioButton3.Text = "Export csv"
$groupBox.Controls.Add($RadioButton3)
############################################## end radio buttons
########### Text Box ###########
############Define text box1 for input
$Script:textBox1 = New-Object System.Windows.Forms.TextBox;
$Script:textBox1.Left = 20;
$Script:textBox1.Top = 30;
$Script:textBox1.width = 200;
$Script:textBox1.Text = "Nabil - Test Collection"
$Form.Controls.Add($textBox1)
############################################## Start drop down boxes
$Script:DropDownBox = New-Object System.Windows.Forms.ComboBox
$Script:DropDownBox.Location = New-Object System.Drawing.Size(20,80)
$Script:DropDownBox.Size = New-Object System.Drawing.Size(180,20)
$Script:DropDownBox.DropDownHeight = 200
$Script:DropDownBox.text = "----Select Tool----"
$Form.Controls.Add($DropDownBox)
############################################## end drop down boxes
$Script:Deployment_DropDownBox = New-Object System.Windows.Forms.ComboBox
$Script:Deployment_DropDownBox.Location = New-Object System.Drawing.Size(20,150)
$Script:Deployment_DropDownBox.Size = New-Object System.Drawing.Size(580,50)
$Script:Deployment_DropDownBox.DropDownHeight = 200
$Script:Deployment_DropDownBox.text = "----Select Deployment----"
#$Script:Deployment_DropDownBox.Visible = $false
$Form.Controls.Add($Deployment_DropDownBox)
##############################################
$Script:DeploymentCollection_DropDownBox = New-Object System.Windows.Forms.ComboBox
$Script:DeploymentCollection_DropDownBox.Location = New-Object System.Drawing.Size(20,180)
$Script:DeploymentCollection_DropDownBox.Size = New-Object System.Drawing.Size(280,50)
$Script:DeploymentCollection_DropDownBox.DropDownHeight = 200
$Script:DeploymentCollection_DropDownBox.text = "----Deployment Collections----"
#$Script:DeploymentCollection_DropDownBox.Visible = $false
$Form.Controls.Add($DeploymentCollection_DropDownBox)
<############################################## Start text fields
$Script:outputBox = New-Object System.Windows.Forms.TextBox
$Script:outputBox.Location = New-Object System.Drawing.Size(10,150)
$Script:outputBox.Size = New-Object System.Drawing.Size(865,300)
$Script:outputBox.MultiLine = $True
$Script:outputBox.ScrollBars = "Vertical"
$Form.Controls.Add($Script:outputBox)
###########>
$SCRIPT:outputBox=New-Object System.Windows.Forms.RichTextBox
$OutputBox.Location=New-Object System.Drawing.Size(10,250)
$OutputBox.Size=New-Object System.Drawing.Size(965,500)
$OutputBox.Multiline=$True
$OutputBox.ReadOnly = $True
$OutputBox.BackColor = [Drawing.Color]::White
$OutputBox.ScrollBars = "both"
$OutputBox.WordWrap = $false
$OutputBox.Font = 'Consolas, 8.25pt'
$form.Controls.Add($SCRIPT:OutputBox)
############################################## end text fields
############################################## Start buttons
$Button = New-Object System.Windows.Forms.Button
$Button.Location = New-Object System.Drawing.Size(450,30)
$Button.Size = New-Object System.Drawing.Size(110,80)
$Button.Text = "Go"
$Button.Add_Click({temp})
$Form.Controls.Add($Button)
#endregion Controls
############################################## end buttons
Update-Dropdown1
Deployment-List -Deployment_History 2
$OutputBox.Text = "hello"
##############################################
$Script:Deployment_DropDownBox_SelectedIndexChanged={
#$Script:DeploymentCollection_DropDownBox.Text
$OutputBox.Text = "hello111111" #$Script:Deployment_DropDownBox.Text
}
$Form.Add_Shown({$Form.Activate()})
[void] $Form.ShowDialog()
}
#########################################################################################################################################################
<# Function Input-Box {
[void][System.Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic')
$Global:Collection_Name = [Microsoft.VisualBasic.Interaction]::InputBox("Enter your name", "Name", "Enter Collection Name")
}
#>
#############################################################################################################################################################
Function Display-Results {
#Param($Global:Output_Type,$Final_Result)
Write-Host "DisplayType: $($Global:Output_Type)"
Switch ($Global:Output_Type){
Window { $Script:outputBox.Text = $Script:ALL_Patch_Servers | Out-String}
Gridview { $Script:ALL_Patch_Servers | Out-GridView }
Export { $Script:ALL_Patch_Servers | Export-Csv -Path $Location\Results.csv -NoTypeInformation; ii $Location\Results.csv }
}#endSwitch
}
#############################################################################################################################################################
Function Collection-Servers {
#Param($Coll_Name)
Write-Host "Collection:$Global:Collection_Name"
SCCM-Module
#CD sccm-drive:
$Script:DeviceCollection_MemberCount = Get-CMDeviceCollection -Name $Global:Collection_Name | select Name,MemberCount
$Script:DeviceCollection_ServerNames = Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name,IsClient #| Export-Csv "E:\SCCM-Files\SCCM-Scripts\Files\$Global:Collection_Name.csv" -NoTypeInformation
#$ServerName = $DeviceCollection_ServerNames.Name
Set-Location c:
#$Script:Temp = Get-CMCollectionMember -CollectionName $Global:Collection_Name #| select Name,IsClient
$Script:DeviceCollection_ServerNames | % {
$Obj = New-Object -TypeName PSObject
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $_.Name
$Obj | Add-Member -MemberType NoteProperty -Name ClientInstalled -Value $_.IsClient
$Obj | Add-Member -MemberType NoteProperty -Name CollectionName -Value $Global:Collection_Name
#$Obj | Add-Member -MemberType NoteProperty -Name CollectionMemberCount -Value {(Get-CMCollectionMember -Name $Global:Collection_Name).MemberCount}
$Obj
$Script:ALL_Patch_Servers += $Obj
}#end%
# $Script:outputBox.Text = $Script:ALL_Patch_Servers | Out-String
Display-Results #-Final_Result $Script:ALL_Patch_Servers
Write-Host "$Script:ALL_Patch_Servers"
$Script:ALL_Patch_Servers | Export-Csv $Location\Current-Collection-Servers.csv -NoTypeInformation
}#endFunction
#############################################################################################################################################################
Function Ping_Collection {
$Ping_Result = @()
Write-Host "Total Server Count: $($Script:ALL_Patch_Servers.count)" -ForegroundColor Green
Write-Host ""
SCCM-Module
#CD sccm-drive:
$Script:DeviceCollection_ServerNames1 = Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name
Set-Location c:
$Script:DeviceCollection_ServerNames1.Name | % {
$Obj = New-Object -TypeName PSObject
If (Test-Connection $_ -Count 1 -ErrorAction SilentlyContinue ) {
#Write-Host "Responding:---- $_ " -ForegroundColor Green
#$Script:outputBox.AppendText("Responding: $_")
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $_
$Obj | Add-Member -MemberType NoteProperty -Name Responding -Value "No!"
$Ping_Result += $Obj
}#endIf
Else {
#$Script:outputBox.AppendText("NOT Responding: $_")
$NotResponding += $_
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $_
$Obj | Add-Member -MemberType NoteProperty -Name Responding -Value "No!"
$Ping_Result += $Obj
}
}#end%
$Script:outputBox.Text = $Ping_Result | ft -AutoSize | Out-String
write-host "-------------------------------------------------------"
Write-host "$($Responding.count) / $($DeviceCollection_ServerNames1.count) -- Responding" -foregroundcolor Green
Write-host "$($NotResponding.count) / $($DeviceCollection_ServerNames1.count) -- NOT Responding" -foregroundcolor Red
Write-Host "Servers NOT Responding: $NotResponding " -ForegroundColor Red
}#endFunction
#############################################################################################################################################################
Function Check_Uptime {
SCCM-Module
$Script:DeviceCollection_ServerNames1 = Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name
$Script:outputBox.Text = $Script:DeviceCollection_ServerNames1.name | % { gwmi win32_operatingsystem -ComputerName $_ -ErrorAction SilentlyContinue | select @{n="Server";e={$_.PSComputername}},@{n="LastBootup";e={$_.Converttodatetime($_.LastBootUpTime)}}} | sort LastBootup -descending | Out-String
}
#############################################################################################################################################################
Function Deployment-List {
Param($Deployment_History)
SCCM-Module
$Deployments = Get-CMDeployment | ? { $_.deploymenttime -gt ((Get-Date).AddDays(-"$Deployment_History")) }
#$T | select ApplicationName,CollectionName,DeploymentTime,AssignmentID,SoftwareName | % { $Deployment_DropDownBox.Items.Add($_) }
$i = 0
$Q = "" #@()
foreach ($D in $Deployments) {
$Q = $D.ApplicationName + "-------------------------------------------------------" + $D.CollectionName
$Deployment_DropDownBox.Items.Add($Q)
$i++
}
#$T.ApplicationName | % { $Deployment_DropDownBox.Items.Add($_) }
}#endFunction
#############################################################################################################################################################
Function Test-Service {
$T = Get-Service
$outputBox.Text = $T | ft -AutoSize | Out-String
}
#############################################################################################################################################################
#############################################################################################################################################################
Start-Form

View File

@@ -0,0 +1,518 @@
#------------------------------------------------------------------------
# Source File Information (DO NOT MODIFY)
# Source ID: 676f8db7-35c7-452d-b353-a4b40f26243a
# Source File: Form-Template.psf
#------------------------------------------------------------------------
#region File Recovery Data (DO NOT MODIFY)
<#RecoveryData:
RAUAAB+LCAAAAAAABAC9VNtKwzAYvhd8h5Dr2oPd3AZtYXTuxtNwQ72TrP07o2lSknSzPr3p2g1x
QkHGKJSk+Q7/KQ0eIRFrkNWEaILMQlHBQ3xpezg6P0MoeJB0RTlhU8rgnuQQTYXMLxaQF4xosAuV
Bc4BpmEu3yHRSFcFhHheKQ25/Ux5KjbKrkWat4X+OrLQUxtKz3brx0JxyXQpIeRQakmYhWblktHk
BqqF+AAeLgcD0k/6V97I74E7HGHETSghzoyeh1HyRlkqDQ7HgmspmGoSNIHOpChA6qoljEst5glh
MKE58DoIA72ykOcHzg7aRb0TKWBTKq47OTGjwPWcfhnCwDU+/nDYSaqrjKNtap3YBXxqvG3bIfR6
bbxb3K0gaav5Wq8DZ3vaNNNputlsxkpBbooPaqfTfqmiXCVCMro8QgMDZ6/626UZmVN4HH0sux3r
m3gaI0k2lK/+4+X6WT8bZJ6X9l3ik26vl5ydJKdYSDi+0X7bjHzg/PxrRt9OzyrdRAUAAA==#>
#endregion
<#
.NOTES
--------------------------------------------------------------------------------
Code generated by: SAPIEN Technologies, Inc., PowerShell Studio 2017 v5.4.141
Generated on: 8/29/2017 11:53 AM
Generated by: Haidey2
--------------------------------------------------------------------------------
.DESCRIPTION
GUI script generated by PowerShell Studio 2017
#>
#----------------------------------------------
#region Application Functions
#----------------------------------------------
#endregion Application Functions
#----------------------------------------------
# Generated Form Function
#----------------------------------------------
function Show-Form-Template_psf {
#----------------------------------------------
#region Import the Assemblies
#----------------------------------------------
[void][reflection.assembly]::Load('System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
[void][reflection.assembly]::Load('System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
[void][reflection.assembly]::Load('System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a')
#endregion Import Assemblies
#----------------------------------------------
#region Generated Form Objects
#----------------------------------------------
[System.Windows.Forms.Application]::EnableVisualStyles()
$form1 = New-Object 'System.Windows.Forms.Form'
$InitialFormWindowState = New-Object 'System.Windows.Forms.FormWindowState'
$Script:Output = New-Object System.Windows.Forms.TextBox
$Script:Collection_DropDownBox = New-Object System.Windows.Forms.ComboBox
$Script:Deployment_DropDownBox = New-Object System.Windows.Forms.ComboBox
$GroupBox = New-Object System.Windows.Forms.GroupBox
$Script:RadioButton_Window = New-Object System.Windows.Forms.RadioButton
$Script:RadioButton_GridView = New-Object System.Windows.Forms.RadioButton
$Script:RadioButton_CSV = New-Object System.Windows.Forms.RadioButton
$Button_Go = New-Object System.Windows.Forms.Button
$Script:TextBox_CollectionName = New-Object System.Windows.Forms.TextBox
#$PanelEventLogs_Events = New-Object 'System.Windows.Forms.Panel'
#$PanelEventLogs_Filter = New-Object 'System.Windows.Forms.Panel'
$Text_ELogs_ServerName = New-Object 'System.Windows.Forms.TextBox'
$Text_ELogs_EventID = New-Object 'System.Windows.Forms.TextBox'
$Text_Elogs_DaysBack = New-Object 'System.Windows.Forms.TextBox'
$Button_ELogs_Connect = New-Object 'System.Windows.Forms.Button'
$Location = Split-Path $MyInvocation.MyCommand.Path -Parent
$Script:ALL_Patch_Servers = @()
$Script:Responding = @()
$Script:NotResponding = @()
$Global:Collection_Name = ""
$Global:Select_Tool
$Global:Output_Type = ""
#endregion Generated Form Objects
#----------------------------------------------
# User Generated Script
#----------------------------------------------
$form1_Load={
#TODO: Initialize Form Controls here
}
$Script:Collection_DropDownBox_SelectedIndexChanged={
$Script:Output.Text = $Script:Collection_DropDownBox.Text
}
$Button_Go_Click = { $Script:Output.Text = "Button clicked" }
##############################################
Function Update-Dropdown1 {
# $Collections += $Script:Collection_DropDownBox.text
$Collections = @("Collection-Servers","Ping-Collection","Check_Uptime","Test-Service","Remotely Update Policy","Software Update Status","Tool7")
$Collections | % { $Script:Collection_DropDownBox.Items.Add($_) }
}
##################################################################################################################
Function temp {
$outputBox.Clear()
#$Script:outputBox.text = $Script:Collection_DropDownBox.text | Out-String
$Global:Collection_Name = $Script:TextBox_CollectionName.Text
#$Global:Select_Tool = $RadioButton1.Checked
$Global:Select_Tool = $DropDownBox.text
#$Global:Output_Type =
If ($Script:RadioButton_Window.Checked -eq $true) { $Global:Output_Type = "Window"; $outputBox.Text = "Window_Radio1 Checked: $($Script:RadioButton_Window.Checked)" | Out-String }
ElseIf ($Script:RadioButton_GridView.Checked -eq $true) { $Global:Output_Type = "Gridview"; $outputBox.Text = "Gridview_Radio2 Checked: $Script:RadioButton_GridView.Checked" | Out-String }
ElseIf ($Script:RadioButton_CSV.Checked -eq $true) { $Global:Output_Type = "Export"; $outputBox.Text = "CSV_Radio3 Checked: $Script:RadioButton_CSV.Checked" | Out-String }
If($Global:Collection_Name -and $Global:Select_Tool) {
# If($DropDownBox.text = "Tool1"){gcc}
Run-Tool
$Script:TextBox_CollectionName.clear()
$DropDownBox.text = "----Select Tool----"
Clear-Variables
}#endIf
Else { #$T = { Write-Host "You must enter Collection Name ............!!" -ForegroundColor Red }
$Script:outputBox.SelectionColor = 'red'
$Script:outputBox.Text = "You must select 'Tool' and enter Collection Name............!!"
}
Run-Defaults
}#endFunction
##################################################################################################################
Function SCCM-Module {
If(!(Get-PSDrive).Name -eq "sccm-drive") {
Import-Module 'C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1'
New-PSDrive -Name SCCM-Drive -PSProvider "AdminUI.PS.Provider\CMSite" -Root "PNCRASCCM001.ccx.carecentrix.com" -Description "SCCM Site"
}#endIf
CD sccm-drive:
}#endFunction
##################################################################################################################
Function Run-Tool {
Switch($Global:Select_Tool) {
Collection-Servers { Collection-Servers; Write-Host "Tool Selected: $Global:Select_Tool" }
Ping-Collection { Ping_Collection }
Check_Uptime { Check_Uptime }
Test-Service { Test-Service }
#"Remotely Update Policy" { $outputBox.Text = Invoke-Expression $Location\Tool-Remotely-Restart-SCCMSyncCycle.ps1 | ft -AutoSize | Out-String }
"Remotely Update Policy" { $outputBox.Text = Invoke-Expression $Location\Tool-Remotely-Restart-SCCMSyncCycle.ps1 | ft -AutoSize | Out-String }
"Software Update Status" { $outputBox.Text = & "$Location\Tool-Get-SCCMSoftwareUpdateStatus.ps1" -Dep_ID 16778048 | ft -AutoSize | Out-String}
}#endSwitch
#Clear-Variables
}#endFunction
##################################################################################################################
Function Run-Defaults {
$Script:TextBox_CollectionName.Text = "Nabil - Test Collection"
$Script:RadioButton1.Checked = $true
}
##################################################################################################################
Function Clear-Variables {
$Global:Collection_Name = ""
$Global:Select_Tool = ""
$Global:Output_Type = ""
$Script:ALL_Patch_Servers = @()
}
##################################################################################################################
Function Display-Results {
#Param($Global:Output_Type,$Final_Result)
Write-Host "DisplayType: $($Global:Output_Type)"
Switch ($Global:Output_Type){
Window { $Script:outputBox.Text = $Script:ALL_Patch_Servers | Out-String}
Gridview { $Script:ALL_Patch_Servers | Out-GridView }
Export { $Script:ALL_Patch_Servers | Export-Csv -Path $Location\Results.csv -NoTypeInformation; ii $Location\Results.csv }
}#endSwitch
}
#############################################################################################################################################################
Function Collection-Servers {
#Param($Coll_Name)
Write-Host "Collection:$Global:Collection_Name"
SCCM-Module
#CD sccm-drive:
$Script:DeviceCollection_MemberCount = Get-CMDeviceCollection -Name $Global:Collection_Name | select Name,MemberCount
$Script:DeviceCollection_ServerNames = Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name,IsClient #| Export-Csv "E:\SCCM-Files\SCCM-Scripts\Files\$Global:Collection_Name.csv" -NoTypeInformation
#$ServerName = $DeviceCollection_ServerNames.Name
Set-Location c:
#$Script:Temp = Get-CMCollectionMember -CollectionName $Global:Collection_Name #| select Name,IsClient
$Script:DeviceCollection_ServerNames | % {
$Obj = New-Object -TypeName PSObject
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $_.Name
$Obj | Add-Member -MemberType NoteProperty -Name ClientInstalled -Value $_.IsClient
$Obj | Add-Member -MemberType NoteProperty -Name CollectionName -Value $Global:Collection_Name
#$Obj | Add-Member -MemberType NoteProperty -Name CollectionMemberCount -Value {(Get-CMCollectionMember -Name $Global:Collection_Name).MemberCount}
$Obj
$Script:ALL_Patch_Servers += $Obj
}#end%
# $Script:outputBox.Text = $Script:ALL_Patch_Servers | Out-String
Display-Results #-Final_Result $Script:ALL_Patch_Servers
Write-Host "$Script:ALL_Patch_Servers"
$Script:ALL_Patch_Servers | Export-Csv $Location\Current-Collection-Servers.csv -NoTypeInformation
}#endFunction
#############################################################################################################################################################
Function Ping_Collection {
$Ping_Result = @()
Write-Host "Total Server Count: $($Script:ALL_Patch_Servers.count)" -ForegroundColor Green
Write-Host ""
SCCM-Module
#CD sccm-drive:
$Script:DeviceCollection_ServerNames1 = Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name
Set-Location c:
$Script:DeviceCollection_ServerNames1.Name | % {
$Obj = New-Object -TypeName PSObject
If (Test-Connection $_ -Count 1 -ErrorAction SilentlyContinue ) {
#Write-Host "Responding:---- $_ " -ForegroundColor Green
#$Script:outputBox.AppendText("Responding: $_")
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $_
$Obj | Add-Member -MemberType NoteProperty -Name Responding -Value "No!"
$Ping_Result += $Obj
}#endIf
Else {
#$Script:outputBox.AppendText("NOT Responding: $_")
$NotResponding += $_
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $_
$Obj | Add-Member -MemberType NoteProperty -Name Responding -Value "No!"
$Ping_Result += $Obj
}
}#end%
$Script:outputBox.Text = $Ping_Result | ft -AutoSize | Out-String
write-host "-------------------------------------------------------"
Write-host "$($Responding.count) / $($DeviceCollection_ServerNames1.count) -- Responding" -foregroundcolor Green
Write-host "$($NotResponding.count) / $($DeviceCollection_ServerNames1.count) -- NOT Responding" -foregroundcolor Red
Write-Host "Servers NOT Responding: $NotResponding " -ForegroundColor Red
}#endFunction
#############################################################################################################################################################
Function Check_Uptime {
SCCM-Module
$Script:DeviceCollection_ServerNames1 = Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name
$Script:outputBox.Text = $Script:DeviceCollection_ServerNames1.name | % { gwmi win32_operatingsystem -ComputerName $_ -ErrorAction SilentlyContinue | select @{n="Server";e={$_.PSComputername}},@{n="LastBootup";e={$_.Converttodatetime($_.LastBootUpTime)}}} | sort LastBootup -descending | Out-String
}
#############################################################################################################################################################
Function Deployment-List {
Param($Deployment_History)
SCCM-Module
$Deployments = Get-CMDeployment | ? { $_.deploymenttime -gt ((Get-Date).AddDays(-"$Deployment_History")) }
#$T | select ApplicationName,CollectionName,DeploymentTime,AssignmentID,SoftwareName | % { $Deployment_DropDownBox.Items.Add($_) }
$i = 0
$Q = "" #@()
foreach ($D in $Deployments) {
$Q = $D.ApplicationName + "-------------------------------------------------------" + $D.CollectionName
$Deployment_DropDownBox.Items.Add($Q)
$i++
}
#$T.ApplicationName | % { $Deployment_DropDownBox.Items.Add($_) }
}#endFunction
#############################################################################################################################################################
Function Test-Service {
$T = Get-Service
$outputBox.Text = $T | ft -AutoSize | Out-String
}
##################################################################################################################
##################################################################################################################
# --End User Generated Script--
#----------------------------------------------
#region Generated Events
#----------------------------------------------
$Form_StateCorrection_Load=
{
#Correct the initial state of the form to prevent the .Net maximized form issue
$form1.WindowState = $InitialFormWindowState
}
$Form_Cleanup_FormClosed=
{
#Remove all event handlers from the controls
try
{
$form1.remove_Load($form1_Load)
$form1.remove_Load($Form_StateCorrection_Load)
$form1.remove_FormClosed($Form_Cleanup_FormClosed)
#$PanelEventLogs_Events.remove_Paint($PanelEventLogs_Events_Paint)
#$PanelEventLogs_Filter.remove_Paint($PanelEventLogs_Filter_Paint)
$Text_Elogs_DaysBack.remove_TextChanged($Text_Elogs_DaysBack_TextChanged)
$Text_ELogs_ServerName.remove_TextChanged($Text_ELogs_ServerName_TextChanged)
$Text_ELogs_EventID.remove_TextChanged($Text_ELogs_EventID_TextChanged)
$Script:Output.remove_TextChanged($Output_TextChanged)
$Script:Collection_DropDownBox.remove_SelectedIndexChanged($Script:Collection_DropDownBox_SelectedIndexChanged)
$Script:Deployment_DropDownBox.remove_SelectedIndexChanged($Script:Deployment_DropDownBox_SelectedIndexChanged)
$Script:RadioButton_Window.remove_SelectedIndexChanged($Script:RadioButton_Window_SelectedIndexChanged)
$Script:RadioButton_GridView.remove_SelectedIndexChanged($Script:RadioButton_GridView_SelectedIndexChanged)
$Script:RadioButton_CSV.remove_SelectedIndexChanged($Script:RadioButton_CSV_SelectedIndexChanged)
$Button_Go.remove_Click($Button_Go_Click)
}
catch { Out-Null <# Prevent PSScriptAnalyzer warning #> }
}
#$PanelEventLogs_Events_Paint=[System.Windows.Forms.PaintEventHandler]{ <#Event Argument: $_ = [System.Windows.Forms.PaintEventArgs]#> }
#$PanelEventLogs_Filter_Paint=[System.Windows.Forms.PaintEventHandler]{ }
$Text_ELogs_ServerName_TextChanged={}
$Text_Elogs_DaysBack_TextChanged={}
#endregion Generated Events
#----------------------------------------------
#region Generated Form Code
#----------------------------------------------
#
# form1
#
#$form1.Controls.Add($PanelEventLogs_Events)
#$form1.Controls.Add($PanelEventLogs_Filter)
$form1.Controls.Add($Output)
$form1.Controls.Add($Script:Collection_DropDownBox)
$form1.Controls.Add($Script:Deployment_DropDownBox)
$form1.Controls.Add($GroupBox)
$form1.controls.Add($Script:RadioButton_Window)
$form1.controls.Add($Script:RadioButton_GridView)
$form1.Controls.Add($Script:RadioButton_CSV)
$form1.Controls.Add($Button_Go)
$form1.Controls.Add($Script:TextBox_CollectionName)
$form1.AutoScaleDimensions = '6, 13'
$form1.AutoScaleMode = 'Font'
$form1.ClientSize = '1000, 800'
$form1.Name = 'form1'
$form1.Text = 'Form'
$form1.add_Load($form1_Load)
#endregion Generated Form Code
#----------------------------------------------
<#
$PanelEventLogs_Events.Controls.Add($Text_ELogs_ServerName)
$PanelEventLogs_Events.Controls.Add($Button_ELogs_Connect)
$PanelEventLogs_Events.Controls.Add($Button_ELogs_View)
$PanelEventLogs_Events.Controls.Add($Combobox_EventLogs_LogsList)
$PanelEventLogs_Events.Controls.Add($VCenterUserPassword)
$PanelEventLogs_Events.Controls.Add($CheckBoxUseWindowsLogin)
$PanelEventLogs_Events.Controls.Add($labelVCenterUserName)
$PanelEventLogs_Events.Controls.Add($labelVCenterPassword)
$PanelEventLogs_Events.Controls.Add($Script:Collection_DropDownBox)
$PanelEventLogs_Events.BackColor = '153,153,153'
$PanelEventLogs_Events.Location = '6, 6'
$PanelEventLogs_Events.Name = 'panelEventLogs_Events'
$PanelEventLogs_Events.Size = '598, 56'
$PanelEventLogs_Events.TabIndex = 0
$PanelEventLogs_Events.add_Paint($PanelEventLogs_Events_Paint)
$PanelEventLogs_Filter.Controls.Add($Combobox_ELogsFilter_Level)
$PanelEventLogs_Filter.Controls.Add($Text_ELogs_EventID)
$PanelEventLogs_Filter.Controls.Add($Text_Elogs_DaysBack)
$PanelEventLogs_Filter.Controls.Add($label_ELogs_Level)
$PanelEventLogs_Filter.Controls.Add($label_ELogs_EventID)
$PanelEventLogs_Filter.Controls.Add($label_ELogs_DaysBack)
$PanelEventLogs_Filter.BackColor = '255,255,212'
$PanelEventLogs_Filter.Location = '6, 62'
$PanelEventLogs_Filter.Name = 'PanelEventLogs_Filter'
$PanelEventLogs_Filter.Size = '598, 56'
$PanelEventLogs_Filter.BorderStyle = 'FixedSingle'
$PanelEventLogs_Filter.TabIndex = 0
$PanelEventLogs_Filter.add_Paint($PanelEventLogs_Filter_Paint)
#>
#
# $Text_ELogs_ServerName
#
$Text_ELogs_ServerName.Location = '8, 26'
$Text_ELogs_ServerName.Name = '$Text_ELogs_ServerName'
$Text_ELogs_ServerName.Size = '100, 20'
$Text_ELogs_ServerName.text = "l2012"
$Text_ELogs_ServerName.TabIndex = 6
$Text_ELogs_ServerName.add_TextChanged($Text_ELogs_ServerName_TextChanged)
#
#
# Text_ELogs_EventID
#
$Text_ELogs_EventID.Location = '115, 26'
$Text_ELogs_EventID.Name = 'Text_ELogs_EventID'
$Text_ELogs_EventID.Size = '40, 20'
$Text_ELogs_EventID.TabIndex = 7
$Text_ELogs_EventID.add_TextChanged($Text_ELogs_EventID_TextChanged)
#
# Text_Elogs_DaysBack
#
$Text_Elogs_DaysBack.Location = '175, 26'
$Text_Elogs_DaysBack.Name = 'Text_Elogs_DaysBack'
$Text_Elogs_DaysBack.Size = '40, 20'
$Text_Elogs_DaysBack.TabIndex = 7
$Text_Elogs_DaysBack.add_TextChanged($Text_Elogs_DaysBack_TextChanged)
#
# Output
#
$Output.Location = '10, 250'
$Output.Multiline = $True
$Output.Name = 'Output'
$Output.ScrollBars = 'both'
$Output.Size = '965, 500'
$Output.Font = 'Consolas, 8.25pt'
$Output.WordWrap = $False
$Output.TabIndex = 5
$Output.add_TextChanged($Output_TextChanged)
#
# ComboboxServiceStartMode
#
$Script:Collection_DropDownBox.FormattingEnabled = $True
$Script:Collection_DropDownBox.Location = '20, 80'
$Script:Collection_DropDownBox.Name = 'Script:Collection_DropDownBox'
$Script:Collection_DropDownBox.Size = '180, 20'
$Script:Collection_DropDownBox.TabIndex = 2
$Script:Collection_DropDownBox.Text = '--Tools--'
$Script:Collection_DropDownBox.add_SelectedIndexChanged($Script:Collection_DropDownBox_SelectedIndexChanged)
#
$Script:Deployment_DropDownBox.Location = '20,30'
$Script:Deployment_DropDownBox.Size = New-Object System.Drawing.Size(580,50)
$Script:Deployment_DropDownBox.DropDownHeight = 200
$Script:Deployment_DropDownBox.text = "----Select Deployment----"
#$Script:Deployment_DropDownBox.Visible = $false
#
$groupBox.Location = '270,70'
$groupBox.size = New-Object System.Drawing.Size(150,90)
$groupBox.text = "Select Output:"
$GroupBox.Controls.Add($Script:RadioButton_Window)
$GroupBox.Controls.Add($Script:RadioButton_GridView)
$GroupBox.Controls.Add($Script:RadioButton_CSV)
#
$Script:RadioButton_Window.Location = new-object System.Drawing.Point(15,15)
$Script:RadioButton_Window.size = New-Object System.Drawing.Size(130,20)
$Script:RadioButton_Window.Checked = $true
$Script:RadioButton_Window.Text = "Window"
#
$Script:RadioButton_GridView.Location = new-object System.Drawing.Point(15,35)
$Script:RadioButton_GridView.size = New-Object System.Drawing.Size(80,20)
$Script:RadioButton_GridView.Checked = $False
$Script:RadioButton_GridView.Text = "GridView"
#
$Script:RadioButton_CSV.Location = new-object System.Drawing.Point(15,55)
$Script:RadioButton_CSV.size = New-Object System.Drawing.Size(80,20)
$Script:RadioButton_CSV.Checked = $False
$Script:RadioButton_CSV.Text = "CSV"
#
$Button_Go.Location = New-Object System.Drawing.Size(450,75)
$Button_Go.Size = New-Object System.Drawing.Size(110,80)
$Button_Go.Text = "Go"
#$Button_Go.Add_Click({temp})
$Button_Go.Add_Click($Button_Go_Click)
#
$Script:TextBox_CollectionName.Left = 20;
$Script:TextBox_CollectionName.Top = 130;
$Script:TextBox_CollectionName.width = 200;
$Script:TextBox_CollectionName.Text = "Nabil - Test Collection"
#
############################################################################
Update-Dropdown1
$Script:Output.Text = "hello"
############################################################################
#Save the initial state of the form
$InitialFormWindowState = $form1.WindowState
#Init the OnLoad event to correct the initial state of the form
$form1.add_Load($Form_StateCorrection_Load)
#Clean up the control events
$form1.add_FormClosed($Form_Cleanup_FormClosed)
#Show the Form
return $form1.ShowDialog()
} #End Function
#Call the form
Show-Form-Template_psf | Out-Null

View File

@@ -0,0 +1,626 @@
#------------------------------------------------------------------------
# Source File Information (DO NOT MODIFY)
# Source ID: 676f8db7-35c7-452d-b353-a4b40f26243a
# Source File: Form-Template.psf
#------------------------------------------------------------------------
#region File Recovery Data (DO NOT MODIFY)
<#RecoveryData:
RAUAAB+LCAAAAAAABAC9VNtKwzAYvhd8h5Dr2oPd3AZtYXTuxtNwQ72TrP07o2lSknSzPr3p2g1x
QkHGKJSk+Q7/KQ0eIRFrkNWEaILMQlHBQ3xpezg6P0MoeJB0RTlhU8rgnuQQTYXMLxaQF4xosAuV
Bc4BpmEu3yHRSFcFhHheKQ25/Ux5KjbKrkWat4X+OrLQUxtKz3brx0JxyXQpIeRQakmYhWblktHk
BqqF+AAeLgcD0k/6V97I74E7HGHETSghzoyeh1HyRlkqDQ7HgmspmGoSNIHOpChA6qoljEst5glh
MKE58DoIA72ykOcHzg7aRb0TKWBTKq47OTGjwPWcfhnCwDU+/nDYSaqrjKNtap3YBXxqvG3bIfR6
bbxb3K0gaav5Wq8DZ3vaNNNputlsxkpBbooPaqfTfqmiXCVCMro8QgMDZ6/626UZmVN4HH0sux3r
m3gaI0k2lK/+4+X6WT8bZJ6X9l3ik26vl5ydJKdYSDi+0X7bjHzg/PxrRt9OzyrdRAUAAA==#>
#endregion
<#
.NOTES
--------------------------------------------------------------------------------
Code generated by: SAPIEN Technologies, Inc., PowerShell Studio 2017 v5.4.141
Generated on: 8/29/2017 11:53 AM
Generated by: Haidey2
--------------------------------------------------------------------------------
.DESCRIPTION
GUI script generated by PowerShell Studio 2017
#>
#----------------------------------------------
#region Application Functions
#----------------------------------------------
#endregion Application Functions
#----------------------------------------------
# Generated Form Function
#----------------------------------------------
function Show-Form-Template_psf {
#----------------------------------------------
#region Import the Assemblies
#----------------------------------------------
[void][reflection.assembly]::Load('System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
[void][reflection.assembly]::Load('System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
[void][reflection.assembly]::Load('System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a')
#endregion Import Assemblies
#----------------------------------------------
#region Generated Form Objects
#----------------------------------------------
[System.Windows.Forms.Application]::EnableVisualStyles()
$form1 = New-Object 'System.Windows.Forms.Form'
$InitialFormWindowState = New-Object 'System.Windows.Forms.FormWindowState'
$Script:Output = New-Object System.Windows.Forms.TextBox
$Script:Collection_DropDownBox = New-Object System.Windows.Forms.ComboBox
$Script:Deployment_DropDownBox = New-Object System.Windows.Forms.ComboBox
$Script:Combobox_Tools = New-Object System.Windows.Forms.ComboBox
$GroupBox = New-Object System.Windows.Forms.GroupBox
$Script:RadioButton_Window = New-Object System.Windows.Forms.RadioButton
$Script:RadioButton_GridView = New-Object System.Windows.Forms.RadioButton
$Script:RadioButton_CSV = New-Object System.Windows.Forms.RadioButton
$Button_Go = New-Object System.Windows.Forms.Button
$Script:TextBox_CollectionName = New-Object System.Windows.Forms.TextBox
#$PanelEventLogs_Events = New-Object 'System.Windows.Forms.Panel'
#$PanelEventLogs_Filter = New-Object 'System.Windows.Forms.Panel'
$Text_ELogs_ServerName = New-Object 'System.Windows.Forms.TextBox'
$Text_ELogs_EventID = New-Object 'System.Windows.Forms.TextBox'
$Text_Elogs_DaysBack = New-Object 'System.Windows.Forms.TextBox'
$Button_ELogs_Connect = New-Object 'System.Windows.Forms.Button'
# $Location = Split-Path $MyInvocation.MyCommand.Path -Parent
$Script:ALL_Patch_Servers = @()
$Script:Responding = @()
$Script:NotResponding = @()
$Global:Collection_Name = ""
$Global:Select_Tool
$Global:Output_Type = ""
$Global:Deployments = ""
#endregion Generated Form Objects
#----------------------------------------------
# User Generated Script
#----------------------------------------------
$form1_Load={
#TODO: Initialize Form Controls here
}
$Script:Collection_DropDownBox_SelectedIndexChanged={
$Script:Output.Text = $Script:Collection_DropDownBox.Text
}
$Script:Deployment_DropDownBox_SelectedIndexChanged={
Deployed-to-Collections
$Script:Output.Text = $Script:Deployment_DropDownBox.Text
}
$Script:Combobox_Tools_SelectedIndexChanged= {
$Script:Output.Text = $Script:Combobox_Tools.Text
}
$Button_Go_Click = {
temp
#SCCM-Module
# $Global:Collection_Name = $Script:TextBox_CollectionName.Text #$Script:TextBox_CollectionName.Text
# $Global:Select_Tool = $Script:Combobox_Tools.Text
#$Output.Text = "$Global:Collection_Name --- $Global:Select_Tool " | Out-String
#$Output.Text = | Out-String
}
##################################################################################################################
Function ConnectTo-SCCM {
If(!(Get-PSDrive).Name -ne "CCX") {
#
# Press 'F5' to run this script. Running this script will load the ConfigurationManager
# module for Windows PowerShell and will connect to the site.
#
# This script was auto-generated at '2/18/2021 10:12:39 AM'.
# Uncomment the line below if running in an environment where script signing is
# required.
#Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process
# Site configuration
$SiteCode = "CCX" # Site code
$ProviderMachineName = "PNCRASCCM001.ccx.carecentrix.com" # SMS Provider machine name
# Customizations
$initParams = @{}
#$initParams.Add("Verbose", $true) # Uncomment this line to enable verbose logging
#$initParams.Add("ErrorAction", "Stop") # Uncomment this line to stop the script on any errors
# Do not change anything below this line
# Import the ConfigurationManager.psd1 module
if((Get-Module ConfigurationManager) -eq $null) {
Import-Module "$($ENV:SMS_ADMIN_UI_PATH)\..\ConfigurationManager.psd1" @initParams
}
# Connect to the site's drive if it is not already present
if((Get-PSDrive -Name $SiteCode -PSProvider CMSite -ErrorAction SilentlyContinue) -eq $null) {
New-PSDrive -Name $SiteCode -PSProvider CMSite -Root $ProviderMachineName @initParams
}
# Set the current location to be the site code.
Set-Location "$($SiteCode):\" @initParams
#$Script:Output.Text = "inside connectoSCCM function"
}#endIf
}#endFunction
##################################################################################################################
Function SCCM-Module {
Write-Host "Inside SCCM function" -ForegroundColor Cyan
If(!(Get-PSDrive).Name -eq "sccm-drive") {
Import-Module 'C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1'
New-PSDrive -Name SCCM-Drive -PSProvider "AdminUI.PS.Provider\CMSite" -Root "PNCRASCCM001.ccx.carecentrix.com" -Description "SCCM Site"
}#endIf
$Script:Output.Text | Get-PSDrive | ft -AutoSize | Out-String
CD sccm-drive:
}#endFunction
##################################################################################################################
Function Update-Dropdown1 {
# $Collections += $Script:Collection_DropDownBox.text
$Collections = @("Collection-Servers","Ping-Collection","Check_Uptime","Test-Service","Remotely Update Policy","Software Update Status","Test-Sccm")
$Collections | % { $Script:Combobox_Tools.Items.Add($_) }
}
##################################################################################################################
Function temp {
$Script:Output.Clear()
#$Script:Script:Output.text = $Script:Collection_DropDownBox.text | Out-String
$Global:Collection_Name = $Script:TextBox_CollectionName.Text #$Script:TextBox_CollectionName.Text
$Global:Select_Tool = $Script:Combobox_Tools.Text
If ($Script:RadioButton_Window.Checked -eq $true) { $Global:Output_Type = "Window" <#; $Script:Output.Text = "Window_Radio1 Checked: $($Script:RadioButton_Window.Checked)" | Out-String #> }
ElseIf ($Script:RadioButton_GridView.Checked -eq $true) { $Global:Output_Type = "Gridview" <#; $Script:Output.Text = "Gridview_Radio2 Checked: $($Script:RadioButton_GridView.Checked)" | Out-String #> }
ElseIf ($Script:RadioButton_CSV.Checked -eq $true) { $Global:Output_Type = "Export" <#; $Script:Output.Text = "CSV_Radio3 Checked: $($Script:RadioButton_CSV.Checked)" | Out-String #> }
If($Global:Collection_Name -and $Global:Select_Tool) {
# If($Script:Collection_DropDownBox.text = "Tool1"){gcc}
Run-Tool
#$Script:TextBox_CollectionName.clear()
$Script:Collection_DropDownBox.text = "----Select Tool----"
#Clear-Variables
}#endIf
Else { #$T = { Write-Host "You must enter Collection Name ............!!" -ForegroundColor Red }
$Script:Output.SelectionColor = 'red'
$Script:Output.Text = "You must select 'Tool' and enter Collection Name............!!"
}
Run-Defaults
}#endFunction
##################################################################################################################
Function Run-Tool {
Switch($Global:Select_Tool) {
Collection-Servers { Collection-Servers; Write-Host "Tool Selected: $Global:Select_Tool" }
Ping-Collection { Ping_Collection }
Check_Uptime { Check_Uptime }
Test-Service { Test-Service }
Test-SCCM { SCCM-Module }
#"Remotely Update Policy" { $Script:Output.Text = Invoke-Expression $Location\Tool-Remotely-Restart-SCCMSyncCycle.ps1 | ft -AutoSize | Out-String }
"Remotely Update Policy" { $Script:Output.Text = Invoke-Expression $Location\Tool-Remotely-Restart-SCCMSyncCycle.ps1 | ft -AutoSize | Out-String }
"Software Update Status" { $Script:Output.Text = & "$Location\Tool-Get-SCCMSoftwareUpdateStatus.ps1" -Dep_ID 16778048 | ft -AutoSize | Out-String}
}#endSwitch
#Clear-Variables
}#endFunction
##################################################################################################################
Function Run-Defaults {
#$Script:TextBox_CollectionName.Text = "Nabil - Test Collection"
$Script:RadioButton_Window.Checked = $true
<#
If(!$Location) {
$Location = Split-Path $MyInvocation.MyCommand.Path -Parent
}
#>
}
##################################################################################################################
Function xClear-Variables {
$Global:Collection_Name = ""
$Global:Select_Tool = ""
$Global:Output_Type = ""
$Script:ALL_Patch_Servers = @()
}
##################################################################################################################
Function Display-Results {
#Param($Global:Output_Type,$Final_Result)
Write-Host "DisplayType: $($Global:Output_Type)"
Switch ($Global:Output_Type){
Window { $Script:Output.Text = $Script:ALL_Patch_Servers | Out-String}
Gridview { $Script:ALL_Patch_Servers | Out-GridView }
Export { $Script:ALL_Patch_Servers | Export-Csv -Path $Location\Results.csv -NoTypeInformation; ii $Location\Results.csv }
}#endSwitch
}
#############################################################################################################################################################
Function Collection-Servers {
#Param($Coll_Name)
Write-Host "Collection:$Global:Collection_Name"
$Script:ALL_Patch_Servers = @()
ConnectTo-SCCM
#SCCM-Module
#CD sccm-drive:
$Script:DeviceCollection_MemberCount = Get-CMDeviceCollection -Name $Global:Collection_Name | select Name,MemberCount
$Script:DeviceCollection_ServerNames = Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name,IsClient #| Export-Csv "E:\SCCM-Files\SCCM-Scripts\Files\$Global:Collection_Name.csv" -NoTypeInformation
#$ServerName = $DeviceCollection_ServerNames.Name
#Set-Location c:
#$Script:Temp = Get-CMCollectionMember -CollectionName $Global:Collection_Name #| select Name,IsClient
$Script:DeviceCollection_ServerNames | % {
$Obj = New-Object -TypeName PSObject
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $_.Name
$Obj | Add-Member -MemberType NoteProperty -Name ClientInstalled -Value $_.IsClient
$Obj | Add-Member -MemberType NoteProperty -Name CollectionName -Value $Global:Collection_Name
#$Obj | Add-Member -MemberType NoteProperty -Name CollectionMemberCount -Value {(Get-CMCollectionMember -Name $Global:Collection_Name).MemberCount}
$Obj
$Script:ALL_Patch_Servers += $Obj
}#end%
# $Script:Output.Text = $Script:ALL_Patch_Servers | Out-String
Display-Results #-Final_Result $Script:ALL_Patch_Servers
Write-Host "$Script:ALL_Patch_Servers"
$Script:ALL_Patch_Servers | Export-Csv $Location\Current-Collection-Servers.csv -NoTypeInformation
}#endFunction
#############################################################################################################################################################
Function Ping_Collection {
$Ping_Result = @()
$NotResponding = @()
$Responding = @()
ConnectTo-SCCM
#SCCM-Module
#CD sccm-drive:
$Script:DeviceCollection_ServerNames1 = Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name
#Set-Location c:
Write-Host "Total Server Count: $($Script:ALL_Patch_Servers.count)" -ForegroundColor Green
Write-Host ""
############
# $Script:Output.Text = "CollectionName: $($Global:Collection_Name) ------ hello "
############
$Script:DeviceCollection_ServerNames1.Name | % {
$Server = $_
$Obj = New-Object -TypeName PSObject
If (Test-Connection $Server -Count 1 -ErrorAction SilentlyContinue ) {
#Write-Host "Responding:---- $_ " -ForegroundColor Green
#$Script:Output.AppendText("Responding: $_")
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $Server
$Obj | Add-Member -MemberType NoteProperty -Name Responding -Value "Yes"
$Ping_Result += $Obj
$Responding += $Server
}#endIf
Else {
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $Server
$Obj | Add-Member -MemberType NoteProperty -Name Responding -Value "No!"
$Ping_Result += $Obj
$NotResponding += $Server
}
}#end%
$Script:Output.Text = $Ping_Result | ft -AutoSize | Out-String
write-host "-------------------------------------------------------"
Write-host "$($Responding.count) / $($DeviceCollection_ServerNames1.count) -- Responding" -foregroundcolor Green
Write-host "$($NotResponding.count) / $($DeviceCollection_ServerNames1.count) -- NOT Responding" -foregroundcolor Red
#Write-Host "Servers NOT Responding: $NotResponding " -ForegroundColor Red
}#endFunction
#############################################################################################################################################################
Function Check_Uptime {
ConnectTo-SCCM
$Script:DeviceCollection_ServerNames1 = Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name
$Script:Output.Text = $Script:DeviceCollection_ServerNames1.name | % { gwmi win32_operatingsystem -ComputerName $_ -ErrorAction SilentlyContinue | select @{n="Server";e={$_.PSComputername}},@{n="LastReboot";e={$_.Converttodatetime($_.LastBootUpTime)}}} | sort LastBootup -descending | Out-String
}
#############################################################################################################################################################
Function Deployment-List {
Param($Deployment_History)
# SCCM-Module
$Global:Deployments = Get-CMDeployment | ? { $_.deploymenttime -gt ((Get-Date).AddDays(-"$Deployment_History")) }
#$T | select ApplicationName,CollectionName,DeploymentTime,AssignmentID,SoftwareName | % { $Deployment_DropDownBox.Items.Add($_) }
$i = 0
$Q = "" #@()
$Global:Deployments.ApplicationName | % { $Script:Deployment_DropDownBox.Items.Add($_)}
<#
foreach ($D in $Deployments) {
$Q = $D.ApplicationName + "-------------------------------------------------------" + $D.CollectionName
$Deployment_DropDownBox.Items.Add($Q)
$i++
}
#>
#$T.ApplicationName | % { $Deployment_DropDownBox.Items.Add($_) }
}#endFunction
#############################################################################################################################################################
Function Deployed-to-Collections {
$T = $Global:Deployments | ? { $_.ApplicationName -eq "$($Script:Deployment_DropDownBox.text)" } | Select -ExpandProperty CollectionName
$Script:Collection_DropDownBox.Items.Clear()
$T | % { $Script:Collection_DropDownBox.Items.Add("$_")}
}
#############################################################################################################################################################
Function Test-Service {
$T = Get-Service
$Script:Output.Text = $T | ft -AutoSize | Out-String
}
##################################################################################################################
##################################################################################################################
# --End User Generated Script--
#----------------------------------------------
#region Generated Events
#----------------------------------------------
$Form_StateCorrection_Load=
{
#Correct the initial state of the form to prevent the .Net maximized form issue
$form1.WindowState = $InitialFormWindowState
}
$Form_Cleanup_FormClosed=
{
#Remove all event handlers from the controls
try
{
$form1.remove_Load($form1_Load)
$form1.remove_Load($Form_StateCorrection_Load)
$form1.remove_FormClosed($Form_Cleanup_FormClosed)
#$PanelEventLogs_Events.remove_Paint($PanelEventLogs_Events_Paint)
#$PanelEventLogs_Filter.remove_Paint($PanelEventLogs_Filter_Paint)
$Text_Elogs_DaysBack.remove_TextChanged($Text_Elogs_DaysBack_TextChanged)
$Text_ELogs_ServerName.remove_TextChanged($Text_ELogs_ServerName_TextChanged)
$Text_ELogs_EventID.remove_TextChanged($Text_ELogs_EventID_TextChanged)
$Script:Output.remove_TextChanged($Output_TextChanged)
$Script:Collection_DropDownBox.remove_SelectedIndexChanged($Script:Collection_DropDownBox_SelectedIndexChanged)
$Script:Deployment_DropDownBox.remove_SelectedIndexChanged($Script:Deployment_DropDownBox_SelectedIndexChanged)
$Script:Combobox_Tools.remove_SelectedIndexChanged($Script:Combobox_Tools_SelectedIndexChanged)
$Script:RadioButton_Window.remove_SelectedIndexChanged($Script:RadioButton_Window_SelectedIndexChanged)
$Script:RadioButton_GridView.remove_SelectedIndexChanged($Script:RadioButton_GridView_SelectedIndexChanged)
$Script:RadioButton_CSV.remove_SelectedIndexChanged($Script:RadioButton_CSV_SelectedIndexChanged)
$Button_Go.remove_Click($Button_Go_Click)
}
catch { Out-Null <# Prevent PSScriptAnalyzer warning #> }
}
#$PanelEventLogs_Events_Paint=[System.Windows.Forms.PaintEventHandler]{ <#Event Argument: $_ = [System.Windows.Forms.PaintEventArgs]#> }
#$PanelEventLogs_Filter_Paint=[System.Windows.Forms.PaintEventHandler]{ }
$Text_ELogs_ServerName_TextChanged={}
$Text_Elogs_DaysBack_TextChanged={}
#endregion Generated Events
#----------------------------------------------
#region Generated Form Code
#----------------------------------------------
#
# form1
#
#$form1.Controls.Add($PanelEventLogs_Events)
#$form1.Controls.Add($PanelEventLogs_Filter)
$form1.Controls.Add($Output)
$form1.Controls.Add($Script:Collection_DropDownBox)
$form1.Controls.Add($Script:Deployment_DropDownBox)
$form1.Controls.Add($Script:Combobox_Tools)
$form1.Controls.Add($GroupBox)
$form1.controls.Add($Script:RadioButton_Window)
$form1.controls.Add($Script:RadioButton_GridView)
$form1.Controls.Add($Script:RadioButton_CSV)
$form1.Controls.Add($Button_Go)
$form1.Controls.Add($Script:TextBox_CollectionName)
$form1.AutoScaleDimensions = '6, 13'
$form1.AutoScaleMode = 'Font'
$form1.ClientSize = '1000, 800'
$form1.Name = 'form1'
$form1.Text = 'Form'
$form1.add_Load($form1_Load)
#endregion Generated Form Code
#----------------------------------------------
<#
$PanelEventLogs_Events.Controls.Add($Text_ELogs_ServerName)
$PanelEventLogs_Events.Controls.Add($Button_ELogs_Connect)
$PanelEventLogs_Events.Controls.Add($Button_ELogs_View)
$PanelEventLogs_Events.Controls.Add($Combobox_EventLogs_LogsList)
$PanelEventLogs_Events.Controls.Add($VCenterUserPassword)
$PanelEventLogs_Events.Controls.Add($CheckBoxUseWindowsLogin)
$PanelEventLogs_Events.Controls.Add($labelVCenterUserName)
$PanelEventLogs_Events.Controls.Add($labelVCenterPassword)
$PanelEventLogs_Events.Controls.Add($Script:Collection_DropDownBox)
$PanelEventLogs_Events.BackColor = '153,153,153'
$PanelEventLogs_Events.Location = '6, 6'
$PanelEventLogs_Events.Name = 'panelEventLogs_Events'
$PanelEventLogs_Events.Size = '598, 56'
$PanelEventLogs_Events.TabIndex = 0
$PanelEventLogs_Events.add_Paint($PanelEventLogs_Events_Paint)
$PanelEventLogs_Filter.Controls.Add($Combobox_ELogsFilter_Level)
$PanelEventLogs_Filter.Controls.Add($Text_ELogs_EventID)
$PanelEventLogs_Filter.Controls.Add($Text_Elogs_DaysBack)
$PanelEventLogs_Filter.Controls.Add($label_ELogs_Level)
$PanelEventLogs_Filter.Controls.Add($label_ELogs_EventID)
$PanelEventLogs_Filter.Controls.Add($label_ELogs_DaysBack)
$PanelEventLogs_Filter.BackColor = '255,255,212'
$PanelEventLogs_Filter.Location = '6, 62'
$PanelEventLogs_Filter.Name = 'PanelEventLogs_Filter'
$PanelEventLogs_Filter.Size = '598, 56'
$PanelEventLogs_Filter.BorderStyle = 'FixedSingle'
$PanelEventLogs_Filter.TabIndex = 0
$PanelEventLogs_Filter.add_Paint($PanelEventLogs_Filter_Paint)
#>
#
# $Text_ELogs_ServerName
<#
$Text_ELogs_ServerName.Location = '8, 26'
$Text_ELogs_ServerName.Name = '$Text_ELogs_ServerName'
$Text_ELogs_ServerName.Size = '100, 20'
$Text_ELogs_ServerName.text = "l2012"
$Text_ELogs_ServerName.TabIndex = 6
$Text_ELogs_ServerName.add_TextChanged($Text_ELogs_ServerName_TextChanged)
#
#
# Text_ELogs_EventID
#
$Text_ELogs_EventID.Location = '115, 26'
$Text_ELogs_EventID.Name = 'Text_ELogs_EventID'
$Text_ELogs_EventID.Size = '40, 20'
$Text_ELogs_EventID.TabIndex = 7
$Text_ELogs_EventID.add_TextChanged($Text_ELogs_EventID_TextChanged)
#
# Text_Elogs_DaysBack
#
$Text_Elogs_DaysBack.Location = '175, 26'
$Text_Elogs_DaysBack.Name = 'Text_Elogs_DaysBack'
$Text_Elogs_DaysBack.Size = '40, 20'
$Text_Elogs_DaysBack.TabIndex = 7
$Text_Elogs_DaysBack.add_TextChanged($Text_Elogs_DaysBack_TextChanged)
#>
# Output
#
$Output.Location = '10, 250'
$Output.Multiline = $True
$Output.Name = 'Output'
$Output.ScrollBars = 'both'
$Output.Size = '965, 500'
$Output.Font = 'Consolas, 8.25pt'
$Output.WordWrap = $False
$Output.TabIndex = 5
$Output.add_TextChanged($Output_TextChanged)
#
# ComboboxServiceStartMode
#
$Script:Collection_DropDownBox.FormattingEnabled = $True
$Script:Collection_DropDownBox.Location = '20, 80'
$Script:Collection_DropDownBox.Name = 'Script:Collection_DropDownBox'
$Script:Collection_DropDownBox.Size = '180, 20'
$Script:Collection_DropDownBox.TabIndex = 2
$Script:Collection_DropDownBox.Text = '--Deployed to Collections--'
$Script:Collection_DropDownBox.add_SelectedIndexChanged($Script:Collection_DropDownBox_SelectedIndexChanged)
#
$Script:Deployment_DropDownBox.Location = '20,30'
#$Script:Deployment_DropDownBox.Size = New-Object System.Drawing.Size(580,50)
$Script:Deployment_DropDownBox.Size = '580,50'
#$Script:Deployment_DropDownBox.DropDownHeight = 200
$Script:Deployment_DropDownBox.text = "----Select Deployment----"
#$Script:Deployment_DropDownBox.Visible = $false
$Script:Deployment_DropDownBox.add_SelectedIndexChanged($Script:Deployment_DropDownBox_SelectedIndexChanged)
#
#$Script:Combobox_Tools.Size = New-Object System.Drawing.Size(180,20)
#$Script:Combobox_Tools.DropDownHeight = 200
$Script:Combobox_Tools.text = "----Select Tool----"
$Script:Combobox_Tools.Location = '20,170'
$Script:Combobox_Tools.Size = '180,10'
$Script:Combobox_Tools.add_SelectedIndexChanged($Script:Combobox_Tools_SelectedIndexChanged)
#
$groupBox.Location = '270,70'
$groupBox.size = New-Object System.Drawing.Size(150,90)
$groupBox.text = "Select Output:"
$GroupBox.Controls.Add($Script:RadioButton_Window)
$GroupBox.Controls.Add($Script:RadioButton_GridView)
$GroupBox.Controls.Add($Script:RadioButton_CSV)
#
$Script:RadioButton_Window.Location = new-object System.Drawing.Point(15,15)
$Script:RadioButton_Window.size = New-Object System.Drawing.Size(130,20)
$Script:RadioButton_Window.Checked = $true
$Script:RadioButton_Window.Text = "Window"
#$Script:RadioButton_Window.
#
$Script:RadioButton_GridView.Location = new-object System.Drawing.Point(15,35)
$Script:RadioButton_GridView.size = New-Object System.Drawing.Size(80,20)
$Script:RadioButton_GridView.Checked = $False
$Script:RadioButton_GridView.Text = "GridView"
#
$Script:RadioButton_CSV.Location = new-object System.Drawing.Point(15,55)
$Script:RadioButton_CSV.size = New-Object System.Drawing.Size(80,20)
$Script:RadioButton_CSV.Checked = $False
$Script:RadioButton_CSV.Text = "CSV"
#
$Button_Go.Location = New-Object System.Drawing.Size(450,75)
$Button_Go.Size = New-Object System.Drawing.Size(110,80)
$Button_Go.Text = "Go"
#$Button_Go.Add_Click({temp})
$Button_Go.Add_Click($Button_Go_Click)
#
$Script:TextBox_CollectionName.Left = 20;
$Script:TextBox_CollectionName.Top = 130;
$Script:TextBox_CollectionName.width = 200;
$Script:TextBox_CollectionName.Text = "Nabil - Test Collection"
#
############################################################################
Update-Dropdown1
ConnectTo-SCCM
Deployment-List -Deployment_History 10
$Script:Output.Text = "helloooooooo"
#cd c:
############################################################################
#Save the initial state of the form
$InitialFormWindowState = $form1.WindowState
#Init the OnLoad event to correct the initial state of the form
$form1.add_Load($Form_StateCorrection_Load)
#Clean up the control events
$form1.add_FormClosed($Form_Cleanup_FormClosed)
#Show the Form
return $form1.ShowDialog()
} #End Function
#Call the form
Show-Form-Template_psf | Out-Null

View File

@@ -0,0 +1,693 @@
#------------------------------------------------------------------------
# Source File Information (DO NOT MODIFY)
# Source ID: 676f8db7-35c7-452d-b353-a4b40f26243a
# Source File: Form-Template.psf
#------------------------------------------------------------------------
#region File Recovery Data (DO NOT MODIFY)
<#RecoveryData:
RAUAAB+LCAAAAAAABAC9VNtKwzAYvhd8h5Dr2oPd3AZtYXTuxtNwQ72TrP07o2lSknSzPr3p2g1x
QkHGKJSk+Q7/KQ0eIRFrkNWEaILMQlHBQ3xpezg6P0MoeJB0RTlhU8rgnuQQTYXMLxaQF4xosAuV
Bc4BpmEu3yHRSFcFhHheKQ25/Ux5KjbKrkWat4X+OrLQUxtKz3brx0JxyXQpIeRQakmYhWblktHk
BqqF+AAeLgcD0k/6V97I74E7HGHETSghzoyeh1HyRlkqDQ7HgmspmGoSNIHOpChA6qoljEst5glh
MKE58DoIA72ykOcHzg7aRb0TKWBTKq47OTGjwPWcfhnCwDU+/nDYSaqrjKNtap3YBXxqvG3bIfR6
bbxb3K0gaav5Wq8DZ3vaNNNputlsxkpBbooPaqfTfqmiXCVCMro8QgMDZ6/626UZmVN4HH0sux3r
m3gaI0k2lK/+4+X6WT8bZJ6X9l3ik26vl5ydJKdYSDi+0X7bjHzg/PxrRt9OzyrdRAUAAA==#>
#endregion
<#
.NOTES
--------------------------------------------------------------------------------
Code generated by: SAPIEN Technologies, Inc., PowerShell Studio 2017 v5.4.141
Generated on: 8/29/2017 11:53 AM
Generated by: Haidey2
--------------------------------------------------------------------------------
.DESCRIPTION
GUI script generated by PowerShell Studio 2017
#>
#----------------------------------------------
#region Application Functions
#----------------------------------------------
#endregion Application Functions
#----------------------------------------------
# Generated Form Function
#----------------------------------------------
function Show-Form-Template_psf {
#----------------------------------------------
#region Import the Assemblies
#----------------------------------------------
[void][reflection.assembly]::Load('System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
[void][reflection.assembly]::Load('System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
[void][reflection.assembly]::Load('System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a')
#endregion Import Assemblies
#----------------------------------------------
#region Generated Form Objects
#----------------------------------------------
[System.Windows.Forms.Application]::EnableVisualStyles()
$form1 = New-Object 'System.Windows.Forms.Form'
$InitialFormWindowState = New-Object 'System.Windows.Forms.FormWindowState'
$Script:Output = New-Object System.Windows.Forms.TextBox
$Script:Collection_DropDownBox = New-Object System.Windows.Forms.ComboBox
$Script:Deployment_DropDownBox = New-Object System.Windows.Forms.ComboBox
$Script:Combobox_Tools = New-Object System.Windows.Forms.ComboBox
$GroupBox = New-Object System.Windows.Forms.GroupBox
$GroupBox_Info = New-Object System.Windows.Forms.GroupBox
$Script:RadioButton_Window = New-Object System.Windows.Forms.RadioButton
$Script:RadioButton_GridView = New-Object System.Windows.Forms.RadioButton
$Script:RadioButton_CSV = New-Object System.Windows.Forms.RadioButton
$Button_Go = New-Object System.Windows.Forms.Button
$Script:TextBox_CollectionName = New-Object System.Windows.Forms.TextBox
#$PanelEventLogs_Events = New-Object 'System.Windows.Forms.Panel'
#$PanelEventLogs_Filter = New-Object 'System.Windows.Forms.Panel'
#$Text_ELogs_ServerName = New-Object 'System.Windows.Forms.TextBox'
#$Text_ELogs_EventID = New-Object 'System.Windows.Forms.TextBox'
#$Text_Elogs_DaysBack = New-Object 'System.Windows.Forms.TextBox'
$label_CollectionName = New-Object 'System.Windows.Forms.Label'
$label_DeploymentName = New-Object 'System.Windows.Forms.Label'
$label_DeploymentTime = New-Object 'System.Windows.Forms.Label'
$label_DeviceCount = New-Object 'System.Windows.Forms.Label'
$Button_ELogs_Connect = New-Object 'System.Windows.Forms.Button'
# $Location = Split-Path $MyInvocation.MyCommand.Path -Parent
$Script:ALL_Patch_Servers = @()
$Script:Responding = @()
$Script:NotResponding = @()
$Global:Collection_Name = ""
$Global:Select_Tool
$Global:Output_Type = ""
$Global:Deployments = ""
#endregion Generated Form Objects
#----------------------------------------------
# User Generated Script
#----------------------------------------------
$form1_Load={
#TODO: Initialize Form Controls here
}
$Script:Collection_DropDownBox_SelectedIndexChanged={
$Script:Output.Text = $Script:Collection_DropDownBox.Text
}
$Script:Deployment_DropDownBox_SelectedIndexChanged={
Deployed-to-Collections
$Script:Output.Text = $Script:Deployment_DropDownBox.Text
}
$Script:Combobox_Tools_SelectedIndexChanged= {
$Script:Output.Text = $Script:Combobox_Tools.Text
}
$Button_Go_Click = {
temp
#SCCM-Module
# $Global:Collection_Name = $Script:TextBox_CollectionName.Text #$Script:TextBox_CollectionName.Text
# $Global:Select_Tool = $Script:Combobox_Tools.Text
#$Output.Text = "$Global:Collection_Name --- $Global:Select_Tool " | Out-String
#$Output.Text = | Out-String
}
##################################################################################################################
Function ConnectTo-SCCM {
If(!(Get-PSDrive).Name -ne "CCX") {
#
# Press 'F5' to run this script. Running this script will load the ConfigurationManager
# module for Windows PowerShell and will connect to the site.
#
# This script was auto-generated at '2/18/2021 10:12:39 AM'.
# Uncomment the line below if running in an environment where script signing is
# required.
#Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process
# Site configuration
$SiteCode = "CCX" # Site code
$ProviderMachineName = "PNCRASCCM001.ccx.carecentrix.com" # SMS Provider machine name
# Customizations
$initParams = @{}
#$initParams.Add("Verbose", $true) # Uncomment this line to enable verbose logging
#$initParams.Add("ErrorAction", "Stop") # Uncomment this line to stop the script on any errors
# Do not change anything below this line
# Import the ConfigurationManager.psd1 module
if((Get-Module ConfigurationManager) -eq $null) {
Import-Module "$($ENV:SMS_ADMIN_UI_PATH)\..\ConfigurationManager.psd1" @initParams
}
# Connect to the site's drive if it is not already present
if((Get-PSDrive -Name $SiteCode -PSProvider CMSite -ErrorAction SilentlyContinue) -eq $null) {
New-PSDrive -Name $SiteCode -PSProvider CMSite -Root $ProviderMachineName @initParams
}
# Set the current location to be the site code.
Set-Location "$($SiteCode):\" @initParams
#$Script:Output.Text = "inside connectoSCCM function"
}#endIf
}#endFunction
##################################################################################################################
Function SCCM-Module {
Write-Host "Inside SCCM function" -ForegroundColor Cyan
If(!(Get-PSDrive).Name -eq "sccm-drive") {
Import-Module 'C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1'
New-PSDrive -Name SCCM-Drive -PSProvider "AdminUI.PS.Provider\CMSite" -Root "PNCRASCCM001.ccx.carecentrix.com" -Description "SCCM Site"
}#endIf
$Script:Output.Text | Get-PSDrive | ft -AutoSize | Out-String
CD sccm-drive:
}#endFunction
##################################################################################################################
Function Update-Dropdown1 {
# $Collections += $Script:Collection_DropDownBox.text
$Collections = @("Collection-Servers","Ping-Collection","Check_Uptime","Test-Service","Remotely Update Policy","Software Update Status","Test-Sccm")
$Collections | % { $Script:Combobox_Tools.Items.Add($_) }
}
##################################################################################################################
Function temp {
$Script:Output.Clear()
#$Script:Script:Output.text = $Script:Collection_DropDownBox.text | Out-String
$Global:Collection_Name = $Script:TextBox_CollectionName.Text #$Script:TextBox_CollectionName.Text
$Global:Select_Tool = $Script:Combobox_Tools.Text
If ($Script:RadioButton_Window.Checked -eq $true) { $Global:Output_Type = "Window" <#; $Script:Output.Text = "Window_Radio1 Checked: $($Script:RadioButton_Window.Checked)" | Out-String #> }
ElseIf ($Script:RadioButton_GridView.Checked -eq $true) { $Global:Output_Type = "Gridview" <#; $Script:Output.Text = "Gridview_Radio2 Checked: $($Script:RadioButton_GridView.Checked)" | Out-String #> }
ElseIf ($Script:RadioButton_CSV.Checked -eq $true) { $Global:Output_Type = "Export" <#; $Script:Output.Text = "CSV_Radio3 Checked: $($Script:RadioButton_CSV.Checked)" | Out-String #> }
If($Global:Collection_Name -and $Global:Select_Tool) {
# If($Script:Collection_DropDownBox.text = "Tool1"){gcc}
Run-Tool
#$Script:TextBox_CollectionName.clear()
$Script:Collection_DropDownBox.text = "----Select Tool----"
#Clear-Variables
}#endIf
Else { #$T = { Write-Host "You must enter Collection Name ............!!" -ForegroundColor Red }
$Script:Output.SelectionColor = 'red'
$Script:Output.Text = "You must select 'Tool' and enter Collection Name............!!"
}
Run-Defaults
}#endFunction
##################################################################################################################
Function Run-Tool {
Switch($Global:Select_Tool) {
Collection-Servers { Collection-Servers; Write-Host "Tool Selected: $Global:Select_Tool" }
Ping-Collection { Ping_Collection }
Check_Uptime { Check_Uptime }
Test-Service { Test-Service }
Test-SCCM { SCCM-Module }
#"Remotely Update Policy" { $Script:Output.Text = Invoke-Expression $Location\Tool-Remotely-Restart-SCCMSyncCycle.ps1 | ft -AutoSize | Out-String }
"Remotely Update Policy" { $Script:Output.Text = Invoke-Expression $Location\Tool-Remotely-Restart-SCCMSyncCycle.ps1 | ft -AutoSize | Out-String }
"Software Update Status" { $Script:Output.Text = & "$Location\Tool-Get-SCCMSoftwareUpdateStatus.ps1" -Dep_ID 16778048 | ft -AutoSize | Out-String}
}#endSwitch
#Clear-Variables
}#endFunction
##################################################################################################################
Function Run-Defaults {
#$Script:TextBox_CollectionName.Text = "Nabil - Test Collection"
$Script:RadioButton_Window.Checked = $true
<#
If(!$Location) {
$Location = Split-Path $MyInvocation.MyCommand.Path -Parent
}
#>
}
##################################################################################################################
Function xClear-Variables {
$Global:Collection_Name = ""
$Global:Select_Tool = ""
$Global:Output_Type = ""
$Script:ALL_Patch_Servers = @()
}
##################################################################################################################
Function Display-Results {
#Param($Global:Output_Type,$Final_Result)
Write-Host "DisplayType: $($Global:Output_Type)"
Switch ($Global:Output_Type){
Window { $Script:Output.Text = $Script:ALL_Patch_Servers | Out-String}
Gridview { $Script:ALL_Patch_Servers | Out-GridView }
Export { $Script:ALL_Patch_Servers | Export-Csv -Path $Location\Results.csv -NoTypeInformation; ii $Location\Results.csv }
}#endSwitch
}
#############################################################################################################################################################
Function Collection-Servers {
#Param($Coll_Name)
Write-Host "Collection:$Global:Collection_Name"
$Script:ALL_Patch_Servers = @()
ConnectTo-SCCM
#SCCM-Module
#CD sccm-drive:
$Script:DeviceCollection_MemberCount = Get-CMDeviceCollection -Name $Global:Collection_Name | select Name,MemberCount
$Script:DeviceCollection_ServerNames = Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name,IsClient #| Export-Csv "E:\SCCM-Files\SCCM-Scripts\Files\$Global:Collection_Name.csv" -NoTypeInformation
#$ServerName = $DeviceCollection_ServerNames.Name
#Set-Location c:
#$Script:Temp = Get-CMCollectionMember -CollectionName $Global:Collection_Name #| select Name,IsClient
$Script:DeviceCollection_ServerNames | % {
$Obj = New-Object -TypeName PSObject
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $_.Name
$Obj | Add-Member -MemberType NoteProperty -Name ClientInstalled -Value $_.IsClient
$Obj | Add-Member -MemberType NoteProperty -Name CollectionName -Value $Global:Collection_Name
#$Obj | Add-Member -MemberType NoteProperty -Name CollectionMemberCount -Value {(Get-CMCollectionMember -Name $Global:Collection_Name).MemberCount}
$Obj
$Script:ALL_Patch_Servers += $Obj
}#end%
# $Script:Output.Text = $Script:ALL_Patch_Servers | Out-String
Display-Results #-Final_Result $Script:ALL_Patch_Servers
Write-Host "$Script:ALL_Patch_Servers"
$Script:ALL_Patch_Servers | Export-Csv $Location\Current-Collection-Servers.csv -NoTypeInformation
}#endFunction
#############################################################################################################################################################
Function Ping_Collection {
$Ping_Result = @()
$NotResponding = @()
$Responding = @()
ConnectTo-SCCM
#SCCM-Module
#CD sccm-drive:
$Script:DeviceCollection_ServerNames1 = Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name
#Set-Location c:
Write-Host "Total Server Count: $($Script:ALL_Patch_Servers.count)" -ForegroundColor Green
Write-Host ""
############
# $Script:Output.Text = "CollectionName: $($Global:Collection_Name) ------ hello "
############
$Script:DeviceCollection_ServerNames1.Name | % {
$Server = $_
$Obj = New-Object -TypeName PSObject
If (Test-Connection $Server -Count 1 -ErrorAction SilentlyContinue ) {
#Write-Host "Responding:---- $_ " -ForegroundColor Green
#$Script:Output.AppendText("Responding: $_")
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $Server
$Obj | Add-Member -MemberType NoteProperty -Name Responding -Value "Yes"
$Ping_Result += $Obj
$Responding += $Server
}#endIf
Else {
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $Server
$Obj | Add-Member -MemberType NoteProperty -Name Responding -Value "No!"
$Ping_Result += $Obj
$NotResponding += $Server
}
}#end%
$Script:Output.Text = $Ping_Result | ft -AutoSize | Out-String
write-host "-------------------------------------------------------"
Write-host "$($Responding.count) / $($DeviceCollection_ServerNames1.count) -- Responding" -foregroundcolor Green
Write-host "$($NotResponding.count) / $($DeviceCollection_ServerNames1.count) -- NOT Responding" -foregroundcolor Red
#Write-Host "Servers NOT Responding: $NotResponding " -ForegroundColor Red
}#endFunction
#############################################################################################################################################################
Function Check_Uptime {
ConnectTo-SCCM
$Script:DeviceCollection_ServerNames1 = Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name
$Script:Output.Text = $Script:DeviceCollection_ServerNames1.name | % { gwmi win32_operatingsystem -ComputerName $_ -ErrorAction SilentlyContinue | select @{n="Server";e={$_.PSComputername}},@{n="LastReboot";e={$_.Converttodatetime($_.LastBootUpTime)}}} | sort LastBootup -descending | Out-String
}
#############################################################################################################################################################
Function Deployment-List {
Param($Deployment_History)
# SCCM-Module
$Global:Deployments = Get-CMDeployment | ? { $_.deploymenttime -gt ((Get-Date).AddDays(-"$Deployment_History")) }
#$T | select ApplicationName,CollectionName,DeploymentTime,AssignmentID,SoftwareName | % { $Deployment_DropDownBox.Items.Add($_) }
$i = 0
$Q = "" #@()
$Global:Deployments.ApplicationName | % { $Script:Deployment_DropDownBox.Items.Add($_)}
<#
foreach ($D in $Deployments) {
$Q = $D.ApplicationName + "-------------------------------------------------------" + $D.CollectionName
$Deployment_DropDownBox.Items.Add($Q)
$i++
}
#>
#$T.ApplicationName | % { $Deployment_DropDownBox.Items.Add($_) }
}#endFunction
#############################################################################################################################################################
Function Deployed-to-Collections {
$T = $Global:Deployments | ? { $_.ApplicationName -eq "$($Script:Deployment_DropDownBox.text)" } | Select -ExpandProperty CollectionName
$Script:Collection_DropDownBox.Items.Clear()
$T | % { $Script:Collection_DropDownBox.Items.Add("$_")}
}
#############################################################################################################################################################
Function Test-Service {
$T = Get-Service
$Script:Output.Text = $T | ft -AutoSize | Out-String
}
##################################################################################################################
##################################################################################################################
# --End User Generated Script--
#----------------------------------------------
#region Generated Events
#----------------------------------------------
$Form_StateCorrection_Load=
{
#Correct the initial state of the form to prevent the .Net maximized form issue
$form1.WindowState = $InitialFormWindowState
}
$Form_Cleanup_FormClosed=
{
#Remove all event handlers from the controls
try
{
$form1.remove_Load($form1_Load)
$form1.remove_Load($Form_StateCorrection_Load)
$form1.remove_FormClosed($Form_Cleanup_FormClosed)
#$PanelEventLogs_Events.remove_Paint($PanelEventLogs_Events_Paint)
#$PanelEventLogs_Filter.remove_Paint($PanelEventLogs_Filter_Paint)
$Text_Elogs_DaysBack.remove_TextChanged($Text_Elogs_DaysBack_TextChanged)
$Text_ELogs_ServerName.remove_TextChanged($Text_ELogs_ServerName_TextChanged)
$Text_ELogs_EventID.remove_TextChanged($Text_ELogs_EventID_TextChanged)
$Script:Output.remove_TextChanged($Output_TextChanged)
$Script:Collection_DropDownBox.remove_SelectedIndexChanged($Script:Collection_DropDownBox_SelectedIndexChanged)
$Script:Deployment_DropDownBox.remove_SelectedIndexChanged($Script:Deployment_DropDownBox_SelectedIndexChanged)
$Script:Combobox_Tools.remove_SelectedIndexChanged($Script:Combobox_Tools_SelectedIndexChanged)
$Script:RadioButton_Window.remove_SelectedIndexChanged($Script:RadioButton_Window_SelectedIndexChanged)
$Script:RadioButton_GridView.remove_SelectedIndexChanged($Script:RadioButton_GridView_SelectedIndexChanged)
$Script:RadioButton_CSV.remove_SelectedIndexChanged($Script:RadioButton_CSV_SelectedIndexChanged)
$Button_Go.remove_Click($Button_Go_Click)
}
catch { Out-Null <# Prevent PSScriptAnalyzer warning #> }
}
#$PanelEventLogs_Events_Paint=[System.Windows.Forms.PaintEventHandler]{ <#Event Argument: $_ = [System.Windows.Forms.PaintEventArgs]#> }
#$PanelEventLogs_Filter_Paint=[System.Windows.Forms.PaintEventHandler]{ }
$Text_ELogs_ServerName_TextChanged={}
$Text_Elogs_DaysBack_TextChanged={}
#endregion Generated Events
#----------------------------------------------
#region Generated Form Code
#----------------------------------------------
#
# form1
#
#$form1.Controls.Add($PanelEventLogs_Events)
#$form1.Controls.Add($PanelEventLogs_Filter)
$form1.Controls.Add($Output)
$form1.Controls.Add($Script:Collection_DropDownBox)
$form1.Controls.Add($Script:Deployment_DropDownBox)
$form1.Controls.Add($Script:Combobox_Tools)
$form1.Controls.Add($GroupBox)
$form1.Controls.Add($GroupBox_Info)
$form1.controls.Add($Script:RadioButton_Window)
$form1.controls.Add($Script:RadioButton_GridView)
$form1.Controls.Add($Script:RadioButton_CSV)
$form1.Controls.Add($Button_Go)
$form1.Controls.Add($Script:TextBox_CollectionName)
$form1.Controls.Add($label_CollectionName)
$form1.Controls.Add($label_DeploymentName)
$form1.Controls.Add($label_DeploymentTime)
$form1.Controls.Add($label_DeviceCount)
$form1.AutoScaleDimensions = '6, 13'
$form1.AutoScaleMode = 'Font'
$form1.ClientSize = '1000, 800'
$form1.Name = 'form1'
$form1.Text = 'Form'
$form1.add_Load($form1_Load)
#endregion Generated Form Code
#----------------------------------------------
<#
$PanelEventLogs_Events.Controls.Add($Text_ELogs_ServerName)
$PanelEventLogs_Events.Controls.Add($Button_ELogs_Connect)
$PanelEventLogs_Events.Controls.Add($Button_ELogs_View)
$PanelEventLogs_Events.Controls.Add($Combobox_EventLogs_LogsList)
$PanelEventLogs_Events.Controls.Add($VCenterUserPassword)
$PanelEventLogs_Events.Controls.Add($CheckBoxUseWindowsLogin)
$PanelEventLogs_Events.Controls.Add($labelVCenterUserName)
$PanelEventLogs_Events.Controls.Add($labelVCenterPassword)
$PanelEventLogs_Events.Controls.Add($Script:Collection_DropDownBox)
$PanelEventLogs_Events.BackColor = '153,153,153'
$PanelEventLogs_Events.Location = '6, 6'
$PanelEventLogs_Events.Name = 'panelEventLogs_Events'
$PanelEventLogs_Events.Size = '598, 56'
$PanelEventLogs_Events.TabIndex = 0
$PanelEventLogs_Events.add_Paint($PanelEventLogs_Events_Paint)
$PanelEventLogs_Filter.Controls.Add($Combobox_ELogsFilter_Level)
$PanelEventLogs_Filter.Controls.Add($Text_ELogs_EventID)
$PanelEventLogs_Filter.Controls.Add($Text_Elogs_DaysBack)
$PanelEventLogs_Filter.Controls.Add($label_ELogs_Level)
$PanelEventLogs_Filter.Controls.Add($label_ELogs_EventID)
$PanelEventLogs_Filter.Controls.Add($label_ELogs_DaysBack)
$PanelEventLogs_Filter.BackColor = '255,255,212'
$PanelEventLogs_Filter.Location = '6, 62'
$PanelEventLogs_Filter.Name = 'PanelEventLogs_Filter'
$PanelEventLogs_Filter.Size = '598, 56'
$PanelEventLogs_Filter.BorderStyle = 'FixedSingle'
$PanelEventLogs_Filter.TabIndex = 0
$PanelEventLogs_Filter.add_Paint($PanelEventLogs_Filter_Paint)
#>
#
# $Text_ELogs_ServerName
<#
$Text_ELogs_ServerName.Location = '8, 26'
$Text_ELogs_ServerName.Name = '$Text_ELogs_ServerName'
$Text_ELogs_ServerName.Size = '100, 20'
$Text_ELogs_ServerName.text = "l2012"
$Text_ELogs_ServerName.TabIndex = 6
$Text_ELogs_ServerName.add_TextChanged($Text_ELogs_ServerName_TextChanged)
#
#
# Text_ELogs_EventID
#
$Text_ELogs_EventID.Location = '115, 26'
$Text_ELogs_EventID.Name = 'Text_ELogs_EventID'
$Text_ELogs_EventID.Size = '40, 20'
$Text_ELogs_EventID.TabIndex = 7
$Text_ELogs_EventID.add_TextChanged($Text_ELogs_EventID_TextChanged)
#
# Text_Elogs_DaysBack
#
$Text_Elogs_DaysBack.Location = '175, 26'
$Text_Elogs_DaysBack.Name = 'Text_Elogs_DaysBack'
$Text_Elogs_DaysBack.Size = '40, 20'
$Text_Elogs_DaysBack.TabIndex = 7
$Text_Elogs_DaysBack.add_TextChanged($Text_Elogs_DaysBack_TextChanged)
#>
# Output
#
$Output.Location = '10, 250'
$Output.Multiline = $True
$Output.Name = 'Output'
$Output.ScrollBars = 'both'
$Output.Size = '965, 500'
$Output.Font = 'Consolas, 8.25pt'
$Output.WordWrap = $False
$Output.TabIndex = 5
$Output.add_TextChanged($Output_TextChanged)
#
# ComboboxServiceStartMode
#
$Script:Collection_DropDownBox.FormattingEnabled = $True
$Script:Collection_DropDownBox.Location = '20, 80'
$Script:Collection_DropDownBox.Name = 'Script:Collection_DropDownBox'
$Script:Collection_DropDownBox.Size = '180, 20'
$Script:Collection_DropDownBox.TabIndex = 2
$Script:Collection_DropDownBox.Text = '--Deployed to Collections--'
$Script:Collection_DropDownBox.add_SelectedIndexChanged($Script:Collection_DropDownBox_SelectedIndexChanged)
#
$Script:Deployment_DropDownBox.Location = '20,30'
#$Script:Deployment_DropDownBox.Size = New-Object System.Drawing.Size(580,50)
$Script:Deployment_DropDownBox.Size = '580,50'
#$Script:Deployment_DropDownBox.DropDownHeight = 200
$Script:Deployment_DropDownBox.text = "----Select Deployment----"
#$Script:Deployment_DropDownBox.Visible = $false
$Script:Deployment_DropDownBox.add_SelectedIndexChanged($Script:Deployment_DropDownBox_SelectedIndexChanged)
#
#$Script:Combobox_Tools.Size = New-Object System.Drawing.Size(180,20)
#$Script:Combobox_Tools.DropDownHeight = 200
$Script:Combobox_Tools.text = "----Select Tool----!"
$Script:Combobox_Tools.Location = '20,170'
$Script:Combobox_Tools.Size = '180,10'
$Script:Combobox_Tools.add_SelectedIndexChanged($Script:Combobox_Tools_SelectedIndexChanged)
#
$groupBox.Location = '270,70'
$groupBox.size = New-Object System.Drawing.Size(150,90)
$groupBox.text = "Select Output:"
$GroupBox.Controls.Add($Script:RadioButton_Window)
$GroupBox.Controls.Add($Script:RadioButton_GridView)
$GroupBox.Controls.Add($Script:RadioButton_CSV)
#
$GroupBox_Info.Location = '670,25'
$GroupBox_Info.Size = '300,200'
$GroupBox_Info.Text = "Deployment Info"
############
$GroupBox_Info.Controls.Add($label_CollectionName)
$GroupBox_Info.Controls.Add($label_DeploymentName)
$GroupBox_Info.Controls.Add($label_DeploymentTime)
$GroupBox_Info.Controls.Add($label_DeviceCount)
############
$label_CollectionName.AutoSize = $True
$label_CollectionName.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_CollectionName.ForeColor = 'DarkGreen'
#$label_CollectionName.TextAlign = 'MiddleRight'
$label_CollectionName.Location = '20,25'
$label_CollectionName.Name = 'Collection_Name'
$label_CollectionName.Size = '41, 13'
#$label_CollectionName.TabIndex = 6
$label_CollectionName.Text = 'Collection Name:'
#$label_CollectionName.add_Click($label_CollectionName_Click)
############
$label_DeploymentName.AutoSize = $True
$label_DeploymentName.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_DeploymentName.ForeColor = 'DarkGreen'
#$label_DeploymentName.TextAlign = 'MiddleRight'
$label_DeploymentName.Location = '20,45'
$label_DeploymentName.Name = 'Deployment_Name'
$label_DeploymentName.Size = '41, 13'
#$label_DeploymentName.TabIndex = 6
$label_DeploymentName.Text = 'Deployment Name:'
#$label_DeploymentName.add_Click($label_DeploymentName_Click)
############
$label_DeploymentTime.AutoSize = $True
$label_DeploymentTime.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_DeploymentTime.ForeColor = 'DarkGreen'
#$label_DeploymentTime.TextAlign = 'MiddleRight'
$label_DeploymentTime.Location = '20,65'
$label_DeploymentTime.Name = 'Deployment_Time'
$label_DeploymentTime.Size = '41, 13'
#$label_DeploymentTime.TabIndex = 6
$label_DeploymentTime.Text = 'Collection Name:'
#$label_DeploymentTime.add_Click($label_CollectionName_Click)
############
$label_DeviceCount.AutoSize = $True
$label_DeviceCount.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_DeviceCount.ForeColor = 'DarkGreen'
#$label_DeviceCount.TextAlign = 'MiddleRight'
$label_DeviceCount.Location = '20,85'
$label_DeviceCount.Name = 'Device_Count'
$label_DeviceCount.Size = '41, 13'
#$label_DeviceCount.TabIndex = 6
$label_DeviceCount.Text = 'Device Count:'
#$label_DeviceCount.add_Click($label_DeviceCount_Click)
############
$Script:RadioButton_Window.Location = new-object System.Drawing.Point(15,15)
$Script:RadioButton_Window.size = New-Object System.Drawing.Size(130,20)
$Script:RadioButton_Window.Checked = $true
$Script:RadioButton_Window.Text = "Window"
#$Script:RadioButton_Window.
#
$Script:RadioButton_GridView.Location = new-object System.Drawing.Point(15,35)
$Script:RadioButton_GridView.size = New-Object System.Drawing.Size(80,20)
$Script:RadioButton_GridView.Checked = $False
$Script:RadioButton_GridView.Text = "GridView"
#
$Script:RadioButton_CSV.Location = new-object System.Drawing.Point(15,55)
$Script:RadioButton_CSV.size = New-Object System.Drawing.Size(80,20)
$Script:RadioButton_CSV.Checked = $False
$Script:RadioButton_CSV.Text = "CSV"
#
$Button_Go.Location = New-Object System.Drawing.Size(450,75)
$Button_Go.Size = New-Object System.Drawing.Size(110,80)
$Button_Go.Text = "Go"
#$Button_Go.Add_Click({temp})
$Button_Go.Add_Click($Button_Go_Click)
#
$Script:TextBox_CollectionName.Left = 20;
$Script:TextBox_CollectionName.Top = 130;
$Script:TextBox_CollectionName.width = 200;
$Script:TextBox_CollectionName.Text = "Nabil - Test Collection"
#
############################################################################
Update-Dropdown1
ConnectTo-SCCM
Deployment-List -Deployment_History 10
$Script:Output.Text = "helloooooooo"
#cd c:
############################################################################
#Save the initial state of the form
$InitialFormWindowState = $form1.WindowState
#Init the OnLoad event to correct the initial state of the form
$form1.add_Load($Form_StateCorrection_Load)
#Clean up the control events
$form1.add_FormClosed($Form_Cleanup_FormClosed)
#Show the Form
return $form1.ShowDialog()
} #End Function
#Call the form
Show-Form-Template_psf | Out-Null

View File

@@ -0,0 +1,713 @@
#------------------------------------------------------------------------
# Source File Information (DO NOT MODIFY)
# Source ID: 676f8db7-35c7-452d-b353-a4b40f26243a
# Source File: Form-Template.psf
#------------------------------------------------------------------------
#region File Recovery Data (DO NOT MODIFY)
<#RecoveryData:
RAUAAB+LCAAAAAAABAC9VNtKwzAYvhd8h5Dr2oPd3AZtYXTuxtNwQ72TrP07o2lSknSzPr3p2g1x
QkHGKJSk+Q7/KQ0eIRFrkNWEaILMQlHBQ3xpezg6P0MoeJB0RTlhU8rgnuQQTYXMLxaQF4xosAuV
Bc4BpmEu3yHRSFcFhHheKQ25/Ux5KjbKrkWat4X+OrLQUxtKz3brx0JxyXQpIeRQakmYhWblktHk
BqqF+AAeLgcD0k/6V97I74E7HGHETSghzoyeh1HyRlkqDQ7HgmspmGoSNIHOpChA6qoljEst5glh
MKE58DoIA72ykOcHzg7aRb0TKWBTKq47OTGjwPWcfhnCwDU+/nDYSaqrjKNtap3YBXxqvG3bIfR6
bbxb3K0gaav5Wq8DZ3vaNNNputlsxkpBbooPaqfTfqmiXCVCMro8QgMDZ6/626UZmVN4HH0sux3r
m3gaI0k2lK/+4+X6WT8bZJ6X9l3ik26vl5ydJKdYSDi+0X7bjHzg/PxrRt9OzyrdRAUAAA==#>
#endregion
<#
.NOTES
--------------------------------------------------------------------------------
Code generated by: SAPIEN Technologies, Inc., PowerShell Studio 2017 v5.4.141
Generated on: 8/29/2017 11:53 AM
Generated by: Haidey2
--------------------------------------------------------------------------------
.DESCRIPTION
GUI script generated by PowerShell Studio 2017
#>
#----------------------------------------------
#region Application Functions
#----------------------------------------------
#endregion Application Functions
#----------------------------------------------
# Generated Form Function
#----------------------------------------------
function Show-Form-Template_psf {
#----------------------------------------------
#region Import the Assemblies
#----------------------------------------------
[void][reflection.assembly]::Load('System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
[void][reflection.assembly]::Load('System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
[void][reflection.assembly]::Load('System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a')
#endregion Import Assemblies
#----------------------------------------------
#region Generated Form Objects
#----------------------------------------------
[System.Windows.Forms.Application]::EnableVisualStyles()
$form1 = New-Object 'System.Windows.Forms.Form'
$InitialFormWindowState = New-Object 'System.Windows.Forms.FormWindowState'
$Script:Output = New-Object System.Windows.Forms.TextBox
$Script:Collection_DropDownBox = New-Object System.Windows.Forms.ComboBox
$Script:Deployment_DropDownBox = New-Object System.Windows.Forms.ComboBox
$Script:Combobox_Tools = New-Object System.Windows.Forms.ComboBox
$GroupBox = New-Object System.Windows.Forms.GroupBox
$GroupBox_Info = New-Object System.Windows.Forms.GroupBox
$Script:RadioButton_Window = New-Object System.Windows.Forms.RadioButton
$Script:RadioButton_GridView = New-Object System.Windows.Forms.RadioButton
$Script:RadioButton_CSV = New-Object System.Windows.Forms.RadioButton
$Button_Go = New-Object System.Windows.Forms.Button
$Script:TextBox_CollectionName = New-Object System.Windows.Forms.TextBox
#$PanelEventLogs_Events = New-Object 'System.Windows.Forms.Panel'
#$PanelEventLogs_Filter = New-Object 'System.Windows.Forms.Panel'
#$Text_ELogs_ServerName = New-Object 'System.Windows.Forms.TextBox'
#$Text_ELogs_EventID = New-Object 'System.Windows.Forms.TextBox'
#$Text_Elogs_DaysBack = New-Object 'System.Windows.Forms.TextBox'
$label_CollectionName = New-Object 'System.Windows.Forms.Label'
$label_CollectionName_Value = New-Object 'System.Windows.Forms.Label'
$label_DeploymentName = New-Object 'System.Windows.Forms.Label'
$label_DeploymentTime = New-Object 'System.Windows.Forms.Label'
$label_DeviceCount = New-Object 'System.Windows.Forms.Label'
$Button_ELogs_Connect = New-Object 'System.Windows.Forms.Button'
# $Location = Split-Path $MyInvocation.MyCommand.Path -Parent
$Script:ALL_Patch_Servers = @()
$Script:Responding = @()
$Script:NotResponding = @()
$Global:Collection_Name = ""
$Global:Select_Tool
$Global:Output_Type = ""
$Global:Deployments = ""
#endregion Generated Form Objects
#----------------------------------------------
# User Generated Script
#----------------------------------------------
$form1_Load={
#TODO: Initialize Form Controls here
}
$Script:Collection_DropDownBox_SelectedIndexChanged={
$Script:Output.Text = $Script:Collection_DropDownBox.Text
$T = Get-CMDeviceCollection -Name $Script:Collection_DropDownBox.text | select Name,MemberCount
$label_CollectionName_Value.Text = $T.MemberCount
}
$Script:Deployment_DropDownBox_SelectedIndexChanged={
Deployed-to-Collections
$Script:Output.Text = $Script:Deployment_DropDownBox.Text
}
$Script:Combobox_Tools_SelectedIndexChanged= {
$Script:Output.Text = $Script:Combobox_Tools.Text
}
$Button_Go_Click = {
temp
#SCCM-Module
# $Global:Collection_Name = $Script:TextBox_CollectionName.Text #$Script:TextBox_CollectionName.Text
# $Global:Select_Tool = $Script:Combobox_Tools.Text
#$Output.Text = "$Global:Collection_Name --- $Global:Select_Tool " | Out-String
#$Output.Text = | Out-String
}
##################################################################################################################
Function ConnectTo-SCCM {
If(!(Get-PSDrive).Name -ne "CCX") {
#
# Press 'F5' to run this script. Running this script will load the ConfigurationManager
# module for Windows PowerShell and will connect to the site.
#
# This script was auto-generated at '2/18/2021 10:12:39 AM'.
# Uncomment the line below if running in an environment where script signing is
# required.
#Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process
# Site configuration
$SiteCode = "CCX" # Site code
$ProviderMachineName = "PNCRASCCM001.ccx.carecentrix.com" # SMS Provider machine name
# Customizations
$initParams = @{}
#$initParams.Add("Verbose", $true) # Uncomment this line to enable verbose logging
#$initParams.Add("ErrorAction", "Stop") # Uncomment this line to stop the script on any errors
# Do not change anything below this line
# Import the ConfigurationManager.psd1 module
if((Get-Module ConfigurationManager) -eq $null) {
Import-Module "$($ENV:SMS_ADMIN_UI_PATH)\..\ConfigurationManager.psd1" @initParams
}
# Connect to the site's drive if it is not already present
if((Get-PSDrive -Name $SiteCode -PSProvider CMSite -ErrorAction SilentlyContinue) -eq $null) {
New-PSDrive -Name $SiteCode -PSProvider CMSite -Root $ProviderMachineName @initParams
}
# Set the current location to be the site code.
Set-Location "$($SiteCode):\" @initParams
#$Script:Output.Text = "inside connectoSCCM function"
}#endIf
}#endFunction
##################################################################################################################
Function SCCM-Module {
Write-Host "Inside SCCM function" -ForegroundColor Cyan
If(!(Get-PSDrive).Name -eq "sccm-drive") {
Import-Module 'C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1'
New-PSDrive -Name SCCM-Drive -PSProvider "AdminUI.PS.Provider\CMSite" -Root "PNCRASCCM001.ccx.carecentrix.com" -Description "SCCM Site"
}#endIf
$Script:Output.Text | Get-PSDrive | ft -AutoSize | Out-String
CD sccm-drive:
}#endFunction
##################################################################################################################
Function Update-Dropdown1 {
# $Collections += $Script:Collection_DropDownBox.text
$Collections = @("Collection-Servers","Ping-Collection","Check_Uptime","Test-Service","Remotely Update Policy","Software Update Status","Test-Sccm")
$Collections | % { $Script:Combobox_Tools.Items.Add($_) }
}
##################################################################################################################
Function temp {
$Script:Output.Clear()
#$Script:Script:Output.text = $Script:Collection_DropDownBox.text | Out-String
$Global:Collection_Name = $Script:TextBox_CollectionName.Text #$Script:TextBox_CollectionName.Text
$Global:Select_Tool = $Script:Combobox_Tools.Text
If ($Script:RadioButton_Window.Checked -eq $true) { $Global:Output_Type = "Window" <#; $Script:Output.Text = "Window_Radio1 Checked: $($Script:RadioButton_Window.Checked)" | Out-String #> }
ElseIf ($Script:RadioButton_GridView.Checked -eq $true) { $Global:Output_Type = "Gridview" <#; $Script:Output.Text = "Gridview_Radio2 Checked: $($Script:RadioButton_GridView.Checked)" | Out-String #> }
ElseIf ($Script:RadioButton_CSV.Checked -eq $true) { $Global:Output_Type = "Export" <#; $Script:Output.Text = "CSV_Radio3 Checked: $($Script:RadioButton_CSV.Checked)" | Out-String #> }
If($Global:Collection_Name -and $Global:Select_Tool) {
# If($Script:Collection_DropDownBox.text = "Tool1"){gcc}
Run-Tool
#$Script:TextBox_CollectionName.clear()
$Script:Collection_DropDownBox.text = "----Select Collection----"
#Clear-Variables
}#endIf
Else { #$T = { Write-Host "You must enter Collection Name ............!!" -ForegroundColor Red }
$Script:Output.SelectionColor = 'red'
$Script:Output.Text = "You must select 'Tool' and enter Collection Name............!!"
}
Run-Defaults
}#endFunction
##################################################################################################################
Function Run-Tool {
Switch($Global:Select_Tool) {
Collection-Servers { Collection-Servers; Write-Host "Tool Selected: $Global:Select_Tool" }
Ping-Collection { Ping_Collection }
Check_Uptime { Check_Uptime }
Test-Service { Test-Service }
Test-SCCM { SCCM-Module }
#"Remotely Update Policy" { $Script:Output.Text = Invoke-Expression $Location\Tool-Remotely-Restart-SCCMSyncCycle.ps1 | ft -AutoSize | Out-String }
"Remotely Update Policy" { $Script:Output.Text = Invoke-Expression $Location\Tool-Remotely-Restart-SCCMSyncCycle.ps1 | ft -AutoSize | Out-String }
"Software Update Status" { $Script:Output.Text = & "$Location\Tool-Get-SCCMSoftwareUpdateStatus.ps1" -Dep_ID 16778048 | ft -AutoSize | Out-String}
}#endSwitch
#Clear-Variables
}#endFunction
##################################################################################################################
Function Run-Defaults {
#$Script:TextBox_CollectionName.Text = "Nabil - Test Collection"
$Script:RadioButton_Window.Checked = $true
<#
If(!$Location) {
$Location = Split-Path $MyInvocation.MyCommand.Path -Parent
}
#>
}
##################################################################################################################
Function xClear-Variables {
$Global:Collection_Name = ""
$Global:Select_Tool = ""
$Global:Output_Type = ""
$Script:ALL_Patch_Servers = @()
}
##################################################################################################################
Function Display-Results {
#Param($Global:Output_Type,$Final_Result)
Write-Host "DisplayType: $($Global:Output_Type)"
Switch ($Global:Output_Type){
Window { $Script:Output.Text = $Script:ALL_Patch_Servers | Out-String}
Gridview { $Script:ALL_Patch_Servers | Out-GridView }
Export { $Script:ALL_Patch_Servers | Export-Csv -Path $Location\Results.csv -NoTypeInformation; ii $Location\Results.csv }
}#endSwitch
}
#############################################################################################################################################################
Function Collection-Servers {
#Param($Coll_Name)
Write-Host "Collection:$Global:Collection_Name"
$Script:ALL_Patch_Servers = @()
ConnectTo-SCCM
#SCCM-Module
#CD sccm-drive:
$Script:DeviceCollection_MemberCount = Get-CMDeviceCollection -Name $Global:Collection_Name | select Name,MemberCount
$Script:DeviceCollection_ServerNames = Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name,IsClient #| Export-Csv "E:\SCCM-Files\SCCM-Scripts\Files\$Global:Collection_Name.csv" -NoTypeInformation
#$ServerName = $DeviceCollection_ServerNames.Name
#Set-Location c:
#$Script:Temp = Get-CMCollectionMember -CollectionName $Global:Collection_Name #| select Name,IsClient
$Script:DeviceCollection_ServerNames | % {
$Obj = New-Object -TypeName PSObject
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $_.Name
$Obj | Add-Member -MemberType NoteProperty -Name ClientInstalled -Value $_.IsClient
$Obj | Add-Member -MemberType NoteProperty -Name CollectionName -Value $Global:Collection_Name
#$Obj | Add-Member -MemberType NoteProperty -Name CollectionMemberCount -Value {(Get-CMCollectionMember -Name $Global:Collection_Name).MemberCount}
$Obj
$Script:ALL_Patch_Servers += $Obj
}#end%
# $Script:Output.Text = $Script:ALL_Patch_Servers | Out-String
Display-Results #-Final_Result $Script:ALL_Patch_Servers
Write-Host "$Script:ALL_Patch_Servers"
$Script:ALL_Patch_Servers | Export-Csv $Location\Current-Collection-Servers.csv -NoTypeInformation
}#endFunction
#############################################################################################################################################################
Function Ping_Collection {
$Ping_Result = @()
$NotResponding = @()
$Responding = @()
ConnectTo-SCCM
#SCCM-Module
#CD sccm-drive:
$Script:DeviceCollection_ServerNames1 = Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name
#Set-Location c:
Write-Host "Total Server Count: $($Script:ALL_Patch_Servers.count)" -ForegroundColor Green
Write-Host ""
############
# $Script:Output.Text = "CollectionName: $($Global:Collection_Name) ------ hello "
############
$Script:DeviceCollection_ServerNames1.Name | % {
$Server = $_
$Obj = New-Object -TypeName PSObject
If (Test-Connection $Server -Count 1 -ErrorAction SilentlyContinue ) {
#Write-Host "Responding:---- $_ " -ForegroundColor Green
#$Script:Output.AppendText("Responding: $_")
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $Server
$Obj | Add-Member -MemberType NoteProperty -Name Responding -Value "Yes"
$Ping_Result += $Obj
$Responding += $Server
}#endIf
Else {
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $Server
$Obj | Add-Member -MemberType NoteProperty -Name Responding -Value "No!"
$Ping_Result += $Obj
$NotResponding += $Server
}
}#end%
$Script:Output.Text = $Ping_Result | ft -AutoSize | Out-String
write-host "-------------------------------------------------------"
Write-host "$($Responding.count) / $($DeviceCollection_ServerNames1.count) -- Responding" -foregroundcolor Green
Write-host "$($NotResponding.count) / $($DeviceCollection_ServerNames1.count) -- NOT Responding" -foregroundcolor Red
#Write-Host "Servers NOT Responding: $NotResponding " -ForegroundColor Red
}#endFunction
#############################################################################################################################################################
Function Check_Uptime {
ConnectTo-SCCM
$Script:DeviceCollection_ServerNames1 = Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name
$Script:Output.Text = $Script:DeviceCollection_ServerNames1.name | % { gwmi win32_operatingsystem -ComputerName $_ -ErrorAction SilentlyContinue | select @{n="Server";e={$_.PSComputername}},@{n="LastReboot";e={$_.Converttodatetime($_.LastBootUpTime)}}} | sort LastBootup -descending | Out-String
}
#############################################################################################################################################################
Function Deployment-List {
Param($Deployment_History)
# SCCM-Module
$Global:Deployments = Get-CMDeployment | ? { $_.deploymenttime -gt ((Get-Date).AddDays(-"$Deployment_History")) }
#$T | select ApplicationName,CollectionName,DeploymentTime,AssignmentID,SoftwareName | % { $Deployment_DropDownBox.Items.Add($_) }
$i = 0
$Q = "" #@()
$Global:Deployments.ApplicationName | % { $Script:Deployment_DropDownBox.Items.Add($_)}
<#
foreach ($D in $Deployments) {
$Q = $D.ApplicationName + "-------------------------------------------------------" + $D.CollectionName
$Deployment_DropDownBox.Items.Add($Q)
$i++
}
#>
#$T.ApplicationName | % { $Deployment_DropDownBox.Items.Add($_) }
}#endFunction
#############################################################################################################################################################
Function Deployed-to-Collections {
$T = $Global:Deployments | ? { $_.ApplicationName -eq "$($Script:Deployment_DropDownBox.text)" } | Select -ExpandProperty CollectionName
$Script:Collection_DropDownBox.Items.Clear()
$T | % { $Script:Collection_DropDownBox.Items.Add("$_")}
}
#############################################################################################################################################################
Function Test-Service {
$T = Get-Service
$Script:Output.Text = $T | ft -AutoSize | Out-String
}
##################################################################################################################
##################################################################################################################
# --End User Generated Script--
#----------------------------------------------
#region Generated Events
#----------------------------------------------
$Form_StateCorrection_Load=
{
#Correct the initial state of the form to prevent the .Net maximized form issue
$form1.WindowState = $InitialFormWindowState
}
$Form_Cleanup_FormClosed=
{
#Remove all event handlers from the controls
try
{
$form1.remove_Load($form1_Load)
$form1.remove_Load($Form_StateCorrection_Load)
$form1.remove_FormClosed($Form_Cleanup_FormClosed)
#$PanelEventLogs_Events.remove_Paint($PanelEventLogs_Events_Paint)
#$PanelEventLogs_Filter.remove_Paint($PanelEventLogs_Filter_Paint)
$Text_Elogs_DaysBack.remove_TextChanged($Text_Elogs_DaysBack_TextChanged)
$Text_ELogs_ServerName.remove_TextChanged($Text_ELogs_ServerName_TextChanged)
$Text_ELogs_EventID.remove_TextChanged($Text_ELogs_EventID_TextChanged)
$Script:Output.remove_TextChanged($Output_TextChanged)
$Script:Collection_DropDownBox.remove_SelectedIndexChanged($Script:Collection_DropDownBox_SelectedIndexChanged)
$Script:Deployment_DropDownBox.remove_SelectedIndexChanged($Script:Deployment_DropDownBox_SelectedIndexChanged)
$Script:Combobox_Tools.remove_SelectedIndexChanged($Script:Combobox_Tools_SelectedIndexChanged)
$Script:RadioButton_Window.remove_SelectedIndexChanged($Script:RadioButton_Window_SelectedIndexChanged)
$Script:RadioButton_GridView.remove_SelectedIndexChanged($Script:RadioButton_GridView_SelectedIndexChanged)
$Script:RadioButton_CSV.remove_SelectedIndexChanged($Script:RadioButton_CSV_SelectedIndexChanged)
$Button_Go.remove_Click($Button_Go_Click)
}
catch { Out-Null <# Prevent PSScriptAnalyzer warning #> }
}
#$PanelEventLogs_Events_Paint=[System.Windows.Forms.PaintEventHandler]{ <#Event Argument: $_ = [System.Windows.Forms.PaintEventArgs]#> }
#$PanelEventLogs_Filter_Paint=[System.Windows.Forms.PaintEventHandler]{ }
$Text_ELogs_ServerName_TextChanged={}
$Text_Elogs_DaysBack_TextChanged={}
#endregion Generated Events
#----------------------------------------------
#region Generated Form Code
#----------------------------------------------
#
# form1
#
#$form1.Controls.Add($PanelEventLogs_Events)
#$form1.Controls.Add($PanelEventLogs_Filter)
$form1.Controls.Add($Output)
$form1.Controls.Add($Script:Collection_DropDownBox)
$form1.Controls.Add($Script:Deployment_DropDownBox)
$form1.Controls.Add($Script:Combobox_Tools)
$form1.Controls.Add($GroupBox)
$form1.Controls.Add($GroupBox_Info)
$form1.controls.Add($Script:RadioButton_Window)
$form1.controls.Add($Script:RadioButton_GridView)
$form1.Controls.Add($Script:RadioButton_CSV)
$form1.Controls.Add($Button_Go)
$form1.Controls.Add($Script:TextBox_CollectionName)
$form1.Controls.Add($label_CollectionName)
$form1.Controls.Add($label_CollectionName_Value)
$form1.Controls.Add($label_DeploymentName)
$form1.Controls.Add($label_DeploymentTime)
$form1.Controls.Add($label_DeviceCount)
$form1.AutoScaleDimensions = '6, 13'
$form1.AutoScaleMode = 'Font'
$form1.ClientSize = '1000, 800'
$form1.Name = 'form1'
$form1.Text = 'Form'
$form1.add_Load($form1_Load)
#endregion Generated Form Code
#----------------------------------------------
<#
$PanelEventLogs_Events.Controls.Add($Text_ELogs_ServerName)
$PanelEventLogs_Events.Controls.Add($Button_ELogs_Connect)
$PanelEventLogs_Events.Controls.Add($Button_ELogs_View)
$PanelEventLogs_Events.Controls.Add($Combobox_EventLogs_LogsList)
$PanelEventLogs_Events.Controls.Add($VCenterUserPassword)
$PanelEventLogs_Events.Controls.Add($CheckBoxUseWindowsLogin)
$PanelEventLogs_Events.Controls.Add($labelVCenterUserName)
$PanelEventLogs_Events.Controls.Add($labelVCenterPassword)
$PanelEventLogs_Events.Controls.Add($Script:Collection_DropDownBox)
$PanelEventLogs_Events.BackColor = '153,153,153'
$PanelEventLogs_Events.Location = '6, 6'
$PanelEventLogs_Events.Name = 'panelEventLogs_Events'
$PanelEventLogs_Events.Size = '598, 56'
$PanelEventLogs_Events.TabIndex = 0
$PanelEventLogs_Events.add_Paint($PanelEventLogs_Events_Paint)
$PanelEventLogs_Filter.Controls.Add($Combobox_ELogsFilter_Level)
$PanelEventLogs_Filter.Controls.Add($Text_ELogs_EventID)
$PanelEventLogs_Filter.Controls.Add($Text_Elogs_DaysBack)
$PanelEventLogs_Filter.Controls.Add($label_ELogs_Level)
$PanelEventLogs_Filter.Controls.Add($label_ELogs_EventID)
$PanelEventLogs_Filter.Controls.Add($label_ELogs_DaysBack)
$PanelEventLogs_Filter.BackColor = '255,255,212'
$PanelEventLogs_Filter.Location = '6, 62'
$PanelEventLogs_Filter.Name = 'PanelEventLogs_Filter'
$PanelEventLogs_Filter.Size = '598, 56'
$PanelEventLogs_Filter.BorderStyle = 'FixedSingle'
$PanelEventLogs_Filter.TabIndex = 0
$PanelEventLogs_Filter.add_Paint($PanelEventLogs_Filter_Paint)
#>
#
# $Text_ELogs_ServerName
<#
$Text_ELogs_ServerName.Location = '8, 26'
$Text_ELogs_ServerName.Name = '$Text_ELogs_ServerName'
$Text_ELogs_ServerName.Size = '100, 20'
$Text_ELogs_ServerName.text = "l2012"
$Text_ELogs_ServerName.TabIndex = 6
$Text_ELogs_ServerName.add_TextChanged($Text_ELogs_ServerName_TextChanged)
#
#
# Text_ELogs_EventID
#
$Text_ELogs_EventID.Location = '115, 26'
$Text_ELogs_EventID.Name = 'Text_ELogs_EventID'
$Text_ELogs_EventID.Size = '40, 20'
$Text_ELogs_EventID.TabIndex = 7
$Text_ELogs_EventID.add_TextChanged($Text_ELogs_EventID_TextChanged)
#
# Text_Elogs_DaysBack
#
$Text_Elogs_DaysBack.Location = '175, 26'
$Text_Elogs_DaysBack.Name = 'Text_Elogs_DaysBack'
$Text_Elogs_DaysBack.Size = '40, 20'
$Text_Elogs_DaysBack.TabIndex = 7
$Text_Elogs_DaysBack.add_TextChanged($Text_Elogs_DaysBack_TextChanged)
#>
# Output
#
$Output.Location = '10, 250'
$Output.Multiline = $True
$Output.Name = 'Output'
$Output.ScrollBars = 'both'
$Output.Size = '965, 500'
$Output.Font = 'Consolas, 8.25pt'
$Output.WordWrap = $False
$Output.TabIndex = 5
$Output.add_TextChanged($Output_TextChanged)
#
# ComboboxServiceStartMode
#
$Script:Collection_DropDownBox.FormattingEnabled = $True
$Script:Collection_DropDownBox.Location = '20, 80'
$Script:Collection_DropDownBox.Name = 'Script:Collection_DropDownBox'
$Script:Collection_DropDownBox.Size = '180, 20'
$Script:Collection_DropDownBox.TabIndex = 2
$Script:Collection_DropDownBox.Text = '--Deployed to Collections--'
$Script:Collection_DropDownBox.add_SelectedIndexChanged($Script:Collection_DropDownBox_SelectedIndexChanged)
#
$Script:Deployment_DropDownBox.Location = '20,30'
#$Script:Deployment_DropDownBox.Size = New-Object System.Drawing.Size(580,50)
$Script:Deployment_DropDownBox.Size = '580,50'
#$Script:Deployment_DropDownBox.DropDownHeight = 200
$Script:Deployment_DropDownBox.text = "----Select Deployment----"
#$Script:Deployment_DropDownBox.Visible = $false
$Script:Deployment_DropDownBox.add_SelectedIndexChanged($Script:Deployment_DropDownBox_SelectedIndexChanged)
#
#$Script:Combobox_Tools.Size = New-Object System.Drawing.Size(180,20)
#$Script:Combobox_Tools.DropDownHeight = 200
$Script:Combobox_Tools.text = "----Select Tool----!"
$Script:Combobox_Tools.Location = '20,170'
$Script:Combobox_Tools.Size = '180,10'
$Script:Combobox_Tools.add_SelectedIndexChanged($Script:Combobox_Tools_SelectedIndexChanged)
#
$groupBox.Location = '270,70'
$groupBox.size = New-Object System.Drawing.Size(150,90)
$groupBox.text = "Select Output:"
$GroupBox.Controls.Add($Script:RadioButton_Window)
$GroupBox.Controls.Add($Script:RadioButton_GridView)
$GroupBox.Controls.Add($Script:RadioButton_CSV)
#
$GroupBox_Info.Location = '670,25'
$GroupBox_Info.Size = '300,200'
$GroupBox_Info.Text = "Deployment Info"
############
$GroupBox_Info.Controls.Add($label_CollectionName)
$GroupBox_Info.Controls.Add($label_CollectionName_Value)
$GroupBox_Info.Controls.Add($label_DeploymentName)
$GroupBox_Info.Controls.Add($label_DeploymentTime)
$GroupBox_Info.Controls.Add($label_DeviceCount)
############
$label_CollectionName.AutoSize = $True
$label_CollectionName.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
#$label_CollectionName.ForeColor = 'DarkGreen'
#$label_CollectionName.TextAlign = 'MiddleRight'
$label_CollectionName.Location = '20,25'
$label_CollectionName.Name = 'Collection_Name'
$label_CollectionName.Size = '41, 13'
#$label_CollectionName.TabIndex = 6
$label_CollectionName.Text = 'Collection Name:'
#$label_CollectionName.add_Click($label_CollectionName_Click)
############
$label_CollectionName_Value.AutoSize = $True
$label_CollectionName_Value.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_CollectionName_Value.ForeColor = 'DarkGreen'
#$label_CollectionName_Value.TextAlign = 'MiddleRight'
$label_CollectionName_Value.Location = '130,25'
$label_CollectionName_Value.Name = 'Collection_Name_Value'
$label_CollectionName_Value.Size = '41, 13'
#$label_CollectionName_Value.TabIndex = 6
$label_CollectionName_Value.Text = '_'
#$label_CollectionName_Value.add_Click($label_CollectionName_Value_Click)
############
$label_DeploymentName.AutoSize = $True
$label_DeploymentName.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_DeploymentName.ForeColor = 'DarkGreen'
#$label_DeploymentName.TextAlign = 'MiddleRight'
$label_DeploymentName.Location = '20,45'
$label_DeploymentName.Name = 'Deployment_Name'
$label_DeploymentName.Size = '41, 13'
#$label_DeploymentName.TabIndex = 6
$label_DeploymentName.Text = 'Deployment Name:'
#$label_DeploymentName.add_Click($label_DeploymentName_Click)
############
$label_DeploymentTime.AutoSize = $True
$label_DeploymentTime.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_DeploymentTime.ForeColor = 'DarkGreen'
#$label_DeploymentTime.TextAlign = 'MiddleRight'
$label_DeploymentTime.Location = '20,65'
$label_DeploymentTime.Name = 'Deployment_Time'
$label_DeploymentTime.Size = '41, 13'
#$label_DeploymentTime.TabIndex = 6
$label_DeploymentTime.Text = 'Collection Name:'
#$label_DeploymentTime.add_Click($label_CollectionName_Click)
############
$label_DeviceCount.AutoSize = $True
$label_DeviceCount.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_DeviceCount.ForeColor = 'DarkGreen'
#$label_DeviceCount.TextAlign = 'MiddleRight'
$label_DeviceCount.Location = '20,85'
$label_DeviceCount.Name = 'Device_Count'
$label_DeviceCount.Size = '41, 13'
#$label_DeviceCount.TabIndex = 6
$label_DeviceCount.Text = 'Device Count:'
#$label_DeviceCount.add_Click($label_DeviceCount_Click)
############
$Script:RadioButton_Window.Location = new-object System.Drawing.Point(15,15)
$Script:RadioButton_Window.size = New-Object System.Drawing.Size(130,20)
$Script:RadioButton_Window.Checked = $true
$Script:RadioButton_Window.Text = "Window"
#$Script:RadioButton_Window.
#
$Script:RadioButton_GridView.Location = new-object System.Drawing.Point(15,35)
$Script:RadioButton_GridView.size = New-Object System.Drawing.Size(80,20)
$Script:RadioButton_GridView.Checked = $False
$Script:RadioButton_GridView.Text = "GridView"
#
$Script:RadioButton_CSV.Location = new-object System.Drawing.Point(15,55)
$Script:RadioButton_CSV.size = New-Object System.Drawing.Size(80,20)
$Script:RadioButton_CSV.Checked = $False
$Script:RadioButton_CSV.Text = "CSV"
#
$Button_Go.Location = New-Object System.Drawing.Size(450,75)
$Button_Go.Size = New-Object System.Drawing.Size(110,80)
$Button_Go.Text = "Go"
#$Button_Go.Add_Click({temp})
$Button_Go.Add_Click($Button_Go_Click)
#
$Script:TextBox_CollectionName.Left = 20;
$Script:TextBox_CollectionName.Top = 130;
$Script:TextBox_CollectionName.width = 200;
$Script:TextBox_CollectionName.Text = "Nabil - Test Collection"
#
############################################################################
Update-Dropdown1
ConnectTo-SCCM
Deployment-List -Deployment_History 10
$Script:Output.Text = "helloooooooo"
#cd c:
############################################################################
#Save the initial state of the form
$InitialFormWindowState = $form1.WindowState
#Init the OnLoad event to correct the initial state of the form
$form1.add_Load($Form_StateCorrection_Load)
#Clean up the control events
$form1.add_FormClosed($Form_Cleanup_FormClosed)
#Show the Form
return $form1.ShowDialog()
} #End Function
#Call the form
Show-Form-Template_psf | Out-Null

View File

@@ -0,0 +1,770 @@
#------------------------------------------------------------------------
# Source File Information (DO NOT MODIFY)
# Source ID: 676f8db7-35c7-452d-b353-a4b40f26243a
# Source File: Form-Template.psf
#------------------------------------------------------------------------
#region File Recovery Data (DO NOT MODIFY)
<#RecoveryData:
RAUAAB+LCAAAAAAABAC9VNtKwzAYvhd8h5Dr2oPd3AZtYXTuxtNwQ72TrP07o2lSknSzPr3p2g1x
QkHGKJSk+Q7/KQ0eIRFrkNWEaILMQlHBQ3xpezg6P0MoeJB0RTlhU8rgnuQQTYXMLxaQF4xosAuV
Bc4BpmEu3yHRSFcFhHheKQ25/Ux5KjbKrkWat4X+OrLQUxtKz3brx0JxyXQpIeRQakmYhWblktHk
BqqF+AAeLgcD0k/6V97I74E7HGHETSghzoyeh1HyRlkqDQ7HgmspmGoSNIHOpChA6qoljEst5glh
MKE58DoIA72ykOcHzg7aRb0TKWBTKq47OTGjwPWcfhnCwDU+/nDYSaqrjKNtap3YBXxqvG3bIfR6
bbxb3K0gaav5Wq8DZ3vaNNNputlsxkpBbooPaqfTfqmiXCVCMro8QgMDZ6/626UZmVN4HH0sux3r
m3gaI0k2lK/+4+X6WT8bZJ6X9l3ik26vl5ydJKdYSDi+0X7bjHzg/PxrRt9OzyrdRAUAAA==#>
#endregion
<#
.NOTES
--------------------------------------------------------------------------------
Code generated by: SAPIEN Technologies, Inc., PowerShell Studio 2017 v5.4.141
Generated on: 8/29/2017 11:53 AM
Generated by: Haidey2
--------------------------------------------------------------------------------
.DESCRIPTION
GUI script generated by PowerShell Studio 2017
#>
#----------------------------------------------
#region Application Functions
#----------------------------------------------
#endregion Application Functions
#----------------------------------------------
# Generated Form Function
#----------------------------------------------
function Show-Form-Template_psf {
#----------------------------------------------
#region Import the Assemblies
#----------------------------------------------
[void][reflection.assembly]::Load('System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
[void][reflection.assembly]::Load('System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
[void][reflection.assembly]::Load('System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a')
#endregion Import Assemblies
#----------------------------------------------
#region Generated Form Objects
#----------------------------------------------
[System.Windows.Forms.Application]::EnableVisualStyles()
$form1 = New-Object 'System.Windows.Forms.Form'
$InitialFormWindowState = New-Object 'System.Windows.Forms.FormWindowState'
$Script:Output = New-Object System.Windows.Forms.TextBox
$Script:Collection_DropDownBox = New-Object System.Windows.Forms.ComboBox
$Script:Deployment_DropDownBox = New-Object System.Windows.Forms.ComboBox
$Script:Combobox_Tools = New-Object System.Windows.Forms.ComboBox
$GroupBox = New-Object System.Windows.Forms.GroupBox
$GroupBox_Info = New-Object System.Windows.Forms.GroupBox
$Script:RadioButton_Window = New-Object System.Windows.Forms.RadioButton
$Script:RadioButton_GridView = New-Object System.Windows.Forms.RadioButton
$Script:RadioButton_CSV = New-Object System.Windows.Forms.RadioButton
$Button_Go = New-Object System.Windows.Forms.Button
$Script:TextBox_CollectionName = New-Object System.Windows.Forms.TextBox
#$PanelEventLogs_Events = New-Object 'System.Windows.Forms.Panel'
#$PanelEventLogs_Filter = New-Object 'System.Windows.Forms.Panel'
#$Text_ELogs_ServerName = New-Object 'System.Windows.Forms.TextBox'
#$Text_ELogs_EventID = New-Object 'System.Windows.Forms.TextBox'
#$Text_Elogs_DaysBack = New-Object 'System.Windows.Forms.TextBox'
$label_CollectionName = New-Object 'System.Windows.Forms.Label'
$label_CollectionName_Value = New-Object 'System.Windows.Forms.Label'
$label_DeploymentName = New-Object 'System.Windows.Forms.Label'
$label_DeploymentName_Value = New-Object 'System.Windows.Forms.Label'
$label_DeploymentTime = New-Object 'System.Windows.Forms.Label'
$label_DeploymentTime_Value = New-Object 'System.Windows.Forms.Label'
$label_DeviceCount = New-Object 'System.Windows.Forms.Label'
$label_DeviceCount_Value = New-Object 'System.Windows.Forms.Label'
$Button_ELogs_Connect = New-Object 'System.Windows.Forms.Button'
# $Location = Split-Path $MyInvocation.MyCommand.Path -Parent
$Script:ALL_Patch_Servers = @()
$Script:Responding = @()
$Script:NotResponding = @()
$Global:Collection_Name = ""
$Global:Select_Tool
$Global:Output_Type = ""
$Global:Deployments = ""
#endregion Generated Form Objects
#----------------------------------------------
# User Generated Script
#----------------------------------------------
$form1_Load={
#TODO: Initialize Form Controls here
}
$Script:Collection_DropDownBox_SelectedIndexChanged={
$Script:Output.Text = $Script:Collection_DropDownBox.Text
$T = Get-CMDeviceCollection -Name $Script:Collection_DropDownBox.text | select Name,MemberCount
$label_CollectionName_Value.Text = $T.MemberCount
}
$Script:Deployment_DropDownBox_SelectedIndexChanged={
Reset-Forms -Form_Selection 1
Deployed-to-Collections
$Script:Output.Text = $Script:Deployment_DropDownBox.Text
}
$Script:Combobox_Tools_SelectedIndexChanged= {
$Script:Output.Text = $Script:Combobox_Tools.Text
}
$Button_Go_Click = {
temp
#SCCM-Module
# $Global:Collection_Name = $Script:TextBox_CollectionName.Text #$Script:TextBox_CollectionName.Text
# $Global:Select_Tool = $Script:Combobox_Tools.Text
#$Output.Text = "$Global:Collection_Name --- $Global:Select_Tool " | Out-String
#$Output.Text = | Out-String
}
##################################################################################################################
Function ConnectTo-SCCM {
If(!(Get-PSDrive).Name -ne "CCX") {
#
# Press 'F5' to run this script. Running this script will load the ConfigurationManager
# module for Windows PowerShell and will connect to the site.
#
# This script was auto-generated at '2/18/2021 10:12:39 AM'.
# Uncomment the line below if running in an environment where script signing is
# required.
#Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process
# Site configuration
$SiteCode = "CCX" # Site code
$ProviderMachineName = "PNCRASCCM001.ccx.carecentrix.com" # SMS Provider machine name
# Customizations
$initParams = @{}
#$initParams.Add("Verbose", $true) # Uncomment this line to enable verbose logging
#$initParams.Add("ErrorAction", "Stop") # Uncomment this line to stop the script on any errors
# Do not change anything below this line
# Import the ConfigurationManager.psd1 module
if((Get-Module ConfigurationManager) -eq $null) {
Import-Module "$($ENV:SMS_ADMIN_UI_PATH)\..\ConfigurationManager.psd1" @initParams
}
# Connect to the site's drive if it is not already present
if((Get-PSDrive -Name $SiteCode -PSProvider CMSite -ErrorAction SilentlyContinue) -eq $null) {
New-PSDrive -Name $SiteCode -PSProvider CMSite -Root $ProviderMachineName @initParams
}
# Set the current location to be the site code.
Set-Location "$($SiteCode):\" @initParams
#$Script:Output.Text = "inside connectoSCCM function"
}#endIf
}#endFunction
##################################################################################################################
Function SCCM-Module {
Write-Host "Inside SCCM function" -ForegroundColor Cyan
If(!(Get-PSDrive).Name -eq "sccm-drive") {
Import-Module 'C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1'
New-PSDrive -Name SCCM-Drive -PSProvider "AdminUI.PS.Provider\CMSite" -Root "PNCRASCCM001.ccx.carecentrix.com" -Description "SCCM Site"
}#endIf
$Script:Output.Text | Get-PSDrive | ft -AutoSize | Out-String
CD sccm-drive:
}#endFunction
##################################################################################################################
Function Update-Dropdown1 {
# $Collections += $Script:Collection_DropDownBox.text
$Collections = @("Collection-Servers","Ping-Collection","Check_Uptime","Test-Service","Remotely Update Policy","Software Update Status","Test-Sccm")
$Collections | % { $Script:Combobox_Tools.Items.Add($_) }
}
##################################################################################################################
Function Reset-Forms {
Param($Form_Selection)
Switch ($Form_Selection) {
1 { $Collection_DropDownBox.Items.Clear(); $Collection_DropDownBox.Text = "--Deployed to Collections--" }
2 {}
}
}
##################################################################################################################
Function temp {
$Script:Output.Clear()
#$Script:Script:Output.text = $Script:Collection_DropDownBox.text | Out-String
#$Global:Collection_Name = $Script:TextBox_CollectionName.Text #$Script:TextBox_CollectionName.Text
$Global:Collection_Name = $Script:Collection_DropDownBox.Text
$Global:Select_Tool = $Script:Combobox_Tools.Text
If ($Script:RadioButton_Window.Checked -eq $true) { $Global:Output_Type = "Window" <#; $Script:Output.Text = "Window_Radio1 Checked: $($Script:RadioButton_Window.Checked)" | Out-String #> }
ElseIf ($Script:RadioButton_GridView.Checked -eq $true) { $Global:Output_Type = "Gridview" <#; $Script:Output.Text = "Gridview_Radio2 Checked: $($Script:RadioButton_GridView.Checked)" | Out-String #> }
ElseIf ($Script:RadioButton_CSV.Checked -eq $true) { $Global:Output_Type = "Export" <#; $Script:Output.Text = "CSV_Radio3 Checked: $($Script:RadioButton_CSV.Checked)" | Out-String #> }
If($Global:Collection_Name -and $Global:Select_Tool) {
# If($Script:Collection_DropDownBox.text = "Tool1"){gcc}
Run-Tool
#$Script:TextBox_CollectionName.clear()
$Script:Collection_DropDownBox.text = "----Select Collection----"
#Clear-Variables
}#endIf
Else { #$T = { Write-Host "You must enter Collection Name ............!!" -ForegroundColor Red }
$Script:Output.SelectionColor = 'red'
$Script:Output.Text = "You must select 'Tool' and enter Collection Name............!!"
}
Run-Defaults
}#endFunction
##################################################################################################################
Function Run-Tool {
Switch($Global:Select_Tool) {
Collection-Servers { Collection-Servers; Write-Host "Tool Selected: $Global:Select_Tool" }
Ping-Collection { Ping_Collection }
Check_Uptime { Check_Uptime }
Test-Service { Test-Service }
Test-SCCM { SCCM-Module }
#"Remotely Update Policy" { $Script:Output.Text = Invoke-Expression $Location\Tool-Remotely-Restart-SCCMSyncCycle.ps1 | ft -AutoSize | Out-String }
"Remotely Update Policy" { $Script:Output.Text = Invoke-Expression $Location\Tool-Remotely-Restart-SCCMSyncCycle.ps1 | ft -AutoSize | Out-String }
"Software Update Status" { $Script:Output.Text = & "$Location\Tool-Get-SCCMSoftwareUpdateStatus.ps1" -Dep_ID 16778048 | ft -AutoSize | Out-String}
}#endSwitch
#Clear-Variables
}#endFunction
##################################################################################################################
Function Run-Defaults {
#$Script:TextBox_CollectionName.Text = "Nabil - Test Collection"
$Script:RadioButton_Window.Checked = $true
<#
If(!$Location) {
$Location = Split-Path $MyInvocation.MyCommand.Path -Parent
}
#>
}
##################################################################################################################
Function xClear-Variables {
$Global:Collection_Name = ""
$Global:Select_Tool = ""
$Global:Output_Type = ""
$Script:ALL_Patch_Servers = @()
}
##################################################################################################################
Function Display-Results {
#Param($Global:Output_Type,$Final_Result)
Write-Host "DisplayType: $($Global:Output_Type)"
Switch ($Global:Output_Type){
Window { $Script:Output.Text = $Script:ALL_Patch_Servers | Out-String}
Gridview { $Script:ALL_Patch_Servers | Out-GridView }
Export { $Script:ALL_Patch_Servers | Export-Csv -Path $Location\Results.csv -NoTypeInformation; ii $Location\Results.csv }
}#endSwitch
}
#############################################################################################################################################################
Function Collection-Servers {
#Param($Coll_Name)
Write-Host "Collection:$Global:Collection_Name"
$Script:ALL_Patch_Servers = @()
ConnectTo-SCCM
#SCCM-Module
#CD sccm-drive:
$Script:DeviceCollection_MemberCount = Get-CMDeviceCollection -Name $Global:Collection_Name | select Name,MemberCount
$Script:DeviceCollection_ServerNames = Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name,IsClient #| Export-Csv "E:\SCCM-Files\SCCM-Scripts\Files\$Global:Collection_Name.csv" -NoTypeInformation
#$ServerName = $DeviceCollection_ServerNames.Name
#Set-Location c:
#$Script:Temp = Get-CMCollectionMember -CollectionName $Global:Collection_Name #| select Name,IsClient
$Script:DeviceCollection_ServerNames | % {
$Obj = New-Object -TypeName PSObject
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $_.Name
$Obj | Add-Member -MemberType NoteProperty -Name ClientInstalled -Value $_.IsClient
$Obj | Add-Member -MemberType NoteProperty -Name CollectionName -Value $Global:Collection_Name
#$Obj | Add-Member -MemberType NoteProperty -Name CollectionMemberCount -Value {(Get-CMCollectionMember -Name $Global:Collection_Name).MemberCount}
$Obj
$Script:ALL_Patch_Servers += $Obj
}#end%
# $Script:Output.Text = $Script:ALL_Patch_Servers | Out-String
Display-Results #-Final_Result $Script:ALL_Patch_Servers
Write-Host "$Script:ALL_Patch_Servers"
$Script:ALL_Patch_Servers | Export-Csv $Location\Current-Collection-Servers.csv -NoTypeInformation
}#endFunction
#############################################################################################################################################################
Function Ping_Collection {
$Ping_Result = @()
$NotResponding = @()
$Responding = @()
ConnectTo-SCCM
#SCCM-Module
#CD sccm-drive:
$Script:DeviceCollection_ServerNames1 = Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name
#Set-Location c:
Write-Host "Total Server Count: $($Script:ALL_Patch_Servers.count)" -ForegroundColor Green
Write-Host ""
############
# $Script:Output.Text = "CollectionName: $($Global:Collection_Name) ------ hello "
############
$Script:DeviceCollection_ServerNames1.Name | % {
$Server = $_
$Obj = New-Object -TypeName PSObject
If (Test-Connection $Server -Count 1 -ErrorAction SilentlyContinue ) {
#Write-Host "Responding:---- $_ " -ForegroundColor Green
#$Script:Output.AppendText("Responding: $_")
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $Server
$Obj | Add-Member -MemberType NoteProperty -Name Responding -Value "Yes"
$Ping_Result += $Obj
$Responding += $Server
}#endIf
Else {
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $Server
$Obj | Add-Member -MemberType NoteProperty -Name Responding -Value "No!"
$Ping_Result += $Obj
$NotResponding += $Server
}
}#end%
$Script:Output.Text = $Ping_Result | ft -AutoSize | Out-String
write-host "-------------------------------------------------------"
Write-host "$($Responding.count) / $($DeviceCollection_ServerNames1.count) -- Responding" -foregroundcolor Green
Write-host "$($NotResponding.count) / $($DeviceCollection_ServerNames1.count) -- NOT Responding" -foregroundcolor Red
#Write-Host "Servers NOT Responding: $NotResponding " -ForegroundColor Red
}#endFunction
#############################################################################################################################################################
Function Check_Uptime {
ConnectTo-SCCM
$Script:DeviceCollection_ServerNames1 = Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name
$Script:Output.Text = $Script:DeviceCollection_ServerNames1.name | % { gwmi win32_operatingsystem -ComputerName $_ -ErrorAction SilentlyContinue | select @{n="Server";e={$_.PSComputername}},@{n="LastReboot";e={$_.Converttodatetime($_.LastBootUpTime)}}} | sort LastBootup -descending | Out-String
}
#############################################################################################################################################################
Function Deployment-List {
Param($Deployment_History)
# SCCM-Module
$Global:Deployments = Get-CMDeployment | ? { $_.deploymenttime -gt ((Get-Date).AddDays(-"$Deployment_History")) }
#$T | select ApplicationName,CollectionName,DeploymentTime,AssignmentID,SoftwareName | % { $Deployment_DropDownBox.Items.Add($_) }
$i = 0
$Q = "" #@()
$Global:Deployments.ApplicationName | % { $Script:Deployment_DropDownBox.Items.Add($_)}
<#
foreach ($D in $Deployments) {
$Q = $D.ApplicationName + "-------------------------------------------------------" + $D.CollectionName
$Deployment_DropDownBox.Items.Add($Q)
$i++
}
#>
#$T.ApplicationName | % { $Deployment_DropDownBox.Items.Add($_) }
}#endFunction
#############################################################################################################################################################
Function Deployed-to-Collections {
$T = $Global:Deployments | ? { $_.ApplicationName -eq "$($Script:Deployment_DropDownBox.text)" } | Select -ExpandProperty CollectionName
$Script:Collection_DropDownBox.Items.Clear()
$T | % { $Script:Collection_DropDownBox.Items.Add("$_")}
}
#############################################################################################################################################################
Function Test-Service {
$T = Get-Service
$Script:Output.Text = $T | ft -AutoSize | Out-String
}
##################################################################################################################
##################################################################################################################
# --End User Generated Script--
#----------------------------------------------
#region Generated Events
#----------------------------------------------
$Form_StateCorrection_Load=
{
#Correct the initial state of the form to prevent the .Net maximized form issue
$form1.WindowState = $InitialFormWindowState
}
$Form_Cleanup_FormClosed=
{
#Remove all event handlers from the controls
try
{
$form1.remove_Load($form1_Load)
$form1.remove_Load($Form_StateCorrection_Load)
$form1.remove_FormClosed($Form_Cleanup_FormClosed)
#$PanelEventLogs_Events.remove_Paint($PanelEventLogs_Events_Paint)
#$PanelEventLogs_Filter.remove_Paint($PanelEventLogs_Filter_Paint)
$Text_Elogs_DaysBack.remove_TextChanged($Text_Elogs_DaysBack_TextChanged)
$Text_ELogs_ServerName.remove_TextChanged($Text_ELogs_ServerName_TextChanged)
$Text_ELogs_EventID.remove_TextChanged($Text_ELogs_EventID_TextChanged)
$Script:Output.remove_TextChanged($Output_TextChanged)
$Script:Collection_DropDownBox.remove_SelectedIndexChanged($Script:Collection_DropDownBox_SelectedIndexChanged)
$Script:Deployment_DropDownBox.remove_SelectedIndexChanged($Script:Deployment_DropDownBox_SelectedIndexChanged)
$Script:Combobox_Tools.remove_SelectedIndexChanged($Script:Combobox_Tools_SelectedIndexChanged)
$Script:RadioButton_Window.remove_SelectedIndexChanged($Script:RadioButton_Window_SelectedIndexChanged)
$Script:RadioButton_GridView.remove_SelectedIndexChanged($Script:RadioButton_GridView_SelectedIndexChanged)
$Script:RadioButton_CSV.remove_SelectedIndexChanged($Script:RadioButton_CSV_SelectedIndexChanged)
$Button_Go.remove_Click($Button_Go_Click)
}
catch { Out-Null <# Prevent PSScriptAnalyzer warning #> }
}
#$PanelEventLogs_Events_Paint=[System.Windows.Forms.PaintEventHandler]{ <#Event Argument: $_ = [System.Windows.Forms.PaintEventArgs]#> }
#$PanelEventLogs_Filter_Paint=[System.Windows.Forms.PaintEventHandler]{ }
$Text_ELogs_ServerName_TextChanged={}
$Text_Elogs_DaysBack_TextChanged={}
#endregion Generated Events
#----------------------------------------------
#region Generated Form Code
#----------------------------------------------
#
# form1
#
#$form1.Controls.Add($PanelEventLogs_Events)
#$form1.Controls.Add($PanelEventLogs_Filter)
$form1.Controls.Add($Output)
$form1.Controls.Add($Script:Collection_DropDownBox)
$form1.Controls.Add($Script:Deployment_DropDownBox)
$form1.Controls.Add($Script:Combobox_Tools)
$form1.Controls.Add($GroupBox)
$form1.Controls.Add($GroupBox_Info)
$form1.controls.Add($Script:RadioButton_Window)
$form1.controls.Add($Script:RadioButton_GridView)
$form1.Controls.Add($Script:RadioButton_CSV)
$form1.Controls.Add($Button_Go)
$form1.Controls.Add($Script:TextBox_CollectionName)
$form1.Controls.Add($label_CollectionName)
$form1.Controls.Add($label_CollectionName_Value)
$form1.Controls.Add($label_DeploymentName)
$form1.controls.Add($label_DeploymentName_Value)
$form1.Controls.Add($label_DeploymentTime)
$form1.Controls.Add($label_DeploymentTime_Value)
$form1.Controls.Add($label_DeviceCount)
$form1.Controls.Add($label_DeviceCount_Value)
$form1.AutoScaleDimensions = '6, 13'
$form1.AutoScaleMode = 'Font'
$form1.ClientSize = '1000, 800'
$form1.Name = 'form1'
$form1.Text = 'Form'
$form1.add_Load($form1_Load)
#endregion Generated Form Code
#----------------------------------------------
<#
$PanelEventLogs_Events.Controls.Add($Text_ELogs_ServerName)
$PanelEventLogs_Events.Controls.Add($Button_ELogs_Connect)
$PanelEventLogs_Events.Controls.Add($Button_ELogs_View)
$PanelEventLogs_Events.Controls.Add($Combobox_EventLogs_LogsList)
$PanelEventLogs_Events.Controls.Add($VCenterUserPassword)
$PanelEventLogs_Events.Controls.Add($CheckBoxUseWindowsLogin)
$PanelEventLogs_Events.Controls.Add($labelVCenterUserName)
$PanelEventLogs_Events.Controls.Add($labelVCenterPassword)
$PanelEventLogs_Events.Controls.Add($Script:Collection_DropDownBox)
$PanelEventLogs_Events.BackColor = '153,153,153'
$PanelEventLogs_Events.Location = '6, 6'
$PanelEventLogs_Events.Name = 'panelEventLogs_Events'
$PanelEventLogs_Events.Size = '598, 56'
$PanelEventLogs_Events.TabIndex = 0
$PanelEventLogs_Events.add_Paint($PanelEventLogs_Events_Paint)
$PanelEventLogs_Filter.Controls.Add($Combobox_ELogsFilter_Level)
$PanelEventLogs_Filter.Controls.Add($Text_ELogs_EventID)
$PanelEventLogs_Filter.Controls.Add($Text_Elogs_DaysBack)
$PanelEventLogs_Filter.Controls.Add($label_ELogs_Level)
$PanelEventLogs_Filter.Controls.Add($label_ELogs_EventID)
$PanelEventLogs_Filter.Controls.Add($label_ELogs_DaysBack)
$PanelEventLogs_Filter.BackColor = '255,255,212'
$PanelEventLogs_Filter.Location = '6, 62'
$PanelEventLogs_Filter.Name = 'PanelEventLogs_Filter'
$PanelEventLogs_Filter.Size = '598, 56'
$PanelEventLogs_Filter.BorderStyle = 'FixedSingle'
$PanelEventLogs_Filter.TabIndex = 0
$PanelEventLogs_Filter.add_Paint($PanelEventLogs_Filter_Paint)
#>
#
# $Text_ELogs_ServerName
<#
$Text_ELogs_ServerName.Location = '8, 26'
$Text_ELogs_ServerName.Name = '$Text_ELogs_ServerName'
$Text_ELogs_ServerName.Size = '100, 20'
$Text_ELogs_ServerName.text = "l2012"
$Text_ELogs_ServerName.TabIndex = 6
$Text_ELogs_ServerName.add_TextChanged($Text_ELogs_ServerName_TextChanged)
#
#
# Text_ELogs_EventID
#
$Text_ELogs_EventID.Location = '115, 26'
$Text_ELogs_EventID.Name = 'Text_ELogs_EventID'
$Text_ELogs_EventID.Size = '40, 20'
$Text_ELogs_EventID.TabIndex = 7
$Text_ELogs_EventID.add_TextChanged($Text_ELogs_EventID_TextChanged)
#
# Text_Elogs_DaysBack
#
$Text_Elogs_DaysBack.Location = '175, 26'
$Text_Elogs_DaysBack.Name = 'Text_Elogs_DaysBack'
$Text_Elogs_DaysBack.Size = '40, 20'
$Text_Elogs_DaysBack.TabIndex = 7
$Text_Elogs_DaysBack.add_TextChanged($Text_Elogs_DaysBack_TextChanged)
#>
# Output
#
$Output.Location = '10, 250'
$Output.Multiline = $True
$Output.Name = 'Output'
$Output.ScrollBars = 'both'
$Output.Size = '965, 500'
$Output.Font = 'Consolas, 8.25pt'
$Output.WordWrap = $False
$Output.TabIndex = 5
$Output.add_TextChanged($Output_TextChanged)
#
# ComboboxServiceStartMode
#
$Script:Collection_DropDownBox.FormattingEnabled = $True
$Script:Collection_DropDownBox.Location = '20, 80'
$Script:Collection_DropDownBox.Name = 'Script:Collection_DropDownBox'
$Script:Collection_DropDownBox.Size = '180, 20'
$Script:Collection_DropDownBox.TabIndex = 2
$Script:Collection_DropDownBox.Text = '--Deployed to Collections--'
$Script:Collection_DropDownBox.add_SelectedIndexChanged($Script:Collection_DropDownBox_SelectedIndexChanged)
#
$Script:Deployment_DropDownBox.Location = '20,30'
#$Script:Deployment_DropDownBox.Size = New-Object System.Drawing.Size(580,50)
$Script:Deployment_DropDownBox.Size = '580,50'
#$Script:Deployment_DropDownBox.DropDownHeight = 200
$Script:Deployment_DropDownBox.text = "----Select Deployment----"
#$Script:Deployment_DropDownBox.Visible = $false
$Script:Deployment_DropDownBox.add_SelectedIndexChanged($Script:Deployment_DropDownBox_SelectedIndexChanged)
#
#$Script:Combobox_Tools.Size = New-Object System.Drawing.Size(180,20)
#$Script:Combobox_Tools.DropDownHeight = 200
$Script:Combobox_Tools.text = "----Select Tool----!"
$Script:Combobox_Tools.Location = '20,170'
$Script:Combobox_Tools.Size = '180,10'
$Script:Combobox_Tools.add_SelectedIndexChanged($Script:Combobox_Tools_SelectedIndexChanged)
#
$groupBox.Location = '270,70'
$groupBox.size = New-Object System.Drawing.Size(150,90)
$groupBox.text = "Select Output:"
$GroupBox.Controls.Add($Script:RadioButton_Window)
$GroupBox.Controls.Add($Script:RadioButton_GridView)
$GroupBox.Controls.Add($Script:RadioButton_CSV)
#
$GroupBox_Info.Location = '670,25'
$GroupBox_Info.Size = '300,200'
$GroupBox_Info.Text = "Deployment Info"
############
$GroupBox_Info.Controls.Add($label_CollectionName)
$GroupBox_Info.Controls.Add($label_CollectionName_Value)
$GroupBox_Info.Controls.Add($label_DeploymentName)
$GroupBox_Info.Controls.Add($label_DeploymentName_Value)
$GroupBox_Info.Controls.Add($label_DeploymentTime)
$GroupBox_Info.Controls.Add($label_DeploymentTime_Value)
$GroupBox_Info.Controls.Add($label_DeviceCount)
$GroupBox_Info.Controls.Add($label_DeviceCount_Value)
############
$label_CollectionName.AutoSize = $True
$label_CollectionName.Font = 'Microsoft Sans Serif, 9.0pt' #, style=Bold'
#$label_CollectionName.ForeColor = 'DarkGreen'
#$label_CollectionName.TextAlign = 'MiddleRight'
$label_CollectionName.Location = '20,25'
$label_CollectionName.Name = 'Collection_Name'
$label_CollectionName.Size = '41, 13'
#$label_CollectionName.TabIndex = 6
$label_CollectionName.Text = 'Collection Name:'
#$label_CollectionName.add_Click($label_CollectionName_Click)
############ Value ###############
$label_CollectionName_Value.AutoSize = $True
$label_CollectionName_Value.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_CollectionName_Value.ForeColor = 'DarkGreen'
#$label_CollectionName_Value.TextAlign = 'MiddleRight'
$label_CollectionName_Value.Location = '140,25'
$label_CollectionName_Value.Name = 'Collection_Name_Value'
$label_CollectionName_Value.Size = '41, 13'
#$label_CollectionName_Value.TabIndex = 6
$label_CollectionName_Value.Text = '_'
#$label_CollectionName_Value.add_Click($label_CollectionName_Value_Click)
############
$label_DeploymentName.AutoSize = $True
$label_DeploymentName.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_DeploymentName.ForeColor = 'DarkGreen'
#$label_DeploymentName.TextAlign = 'MiddleRight'
$label_DeploymentName.Location = '20,45'
$label_DeploymentName.Name = 'Deployment_Name'
$label_DeploymentName.Size = '41, 13'
#$label_DeploymentName.TabIndex = 6
$label_DeploymentName.Text = 'Deployment Name:'
#$label_DeploymentName.add_Click($label_DeploymentName_Click)
############ Value ############
$label_DeploymentName_Value.AutoSize = $True
$label_DeploymentName_Value.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_DeploymentName_Value.ForeColor = 'DarkGreen'
#$label_DeploymentName_Value.TextAlign = 'MiddleRight'
$label_DeploymentName_Value.Location = '140,45'
$label_DeploymentName_Value.Name = 'Deployment_Name_Value'
$label_DeploymentName_Value.Size = '41, 13'
#$label_DeploymentName_Value.TabIndex = 6
$label_DeploymentName_Value.Text = '_'
#$label_DeploymentName_Value.add_Click($label_DeploymentName_Value_Click)
#############
$label_DeploymentTime.AutoSize = $True
$label_DeploymentTime.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_DeploymentTime.ForeColor = 'DarkGreen'
#$label_DeploymentTime.TextAlign = 'MiddleRight'
$label_DeploymentTime.Location = '20,65'
$label_DeploymentTime.Name = 'Deployment_Time'
$label_DeploymentTime.Size = '41, 13'
#$label_DeploymentTime.TabIndex = 6
$label_DeploymentTime.Text = 'Deployment Time:'
#$label_DeploymentTime.add_Click($label_CollectionName_Click)
############ Value ############
$label_DeploymentTime_Value.AutoSize = $True
$label_DeploymentTime_Value.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_DeploymentTime_Value.ForeColor = 'DarkGreen'
#$label_DeploymentTime_Value.TextAlign = 'MiddleRight'
$label_DeploymentTime_Value.Location = '140,65'
$label_DeploymentTime_Value.Name = 'Deployment_Time_Value'
$label_DeploymentTime_Value.Size = '41, 13'
#$label_DeploymentTime_Value.TabIndex = 6
$label_DeploymentTime_Value.Text = '_'
#$label_DeploymentTime_Value.add_Click($label_DeploymentTime_Value_Click)
###########
$label_DeviceCount.AutoSize = $True
$label_DeviceCount.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_DeviceCount.ForeColor = 'DarkGreen'
#$label_DeviceCount.TextAlign = 'MiddleRight'
$label_DeviceCount.Location = '20,85'
$label_DeviceCount.Name = 'Device_Count'
$label_DeviceCount.Size = '41, 13'
#$label_DeviceCount.TabIndex = 6
$label_DeviceCount.Text = 'Device Count'
#$label_DeviceCount.add_Click($label_DeviceCount_Click)
############ Value ############
$label_DeviceCount_Value.AutoSize = $True
$label_DeviceCount_Value.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_DeviceCount_Value.ForeColor = 'DarkGreen'
#$label_DeviceCount_Value.TextAlign = 'MiddleRight'
$label_DeviceCount_Value.Location = '140,85'
$label_DeviceCount_Value.Name = 'Device_Count_Value'
$label_DeviceCount_Value.Size = '41, 13'
#$label_DeviceCount_Value.TabIndex = 6
$label_DeviceCount_Value.Text = '_'
#$label_DeviceCount_Value.add_Click($label_DeviceCount_Value_Click)
############
$Script:RadioButton_Window.Location = new-object System.Drawing.Point(15,15)
$Script:RadioButton_Window.size = New-Object System.Drawing.Size(130,20)
$Script:RadioButton_Window.Checked = $true
$Script:RadioButton_Window.Text = "Window"
#$Script:RadioButton_Window.
#
$Script:RadioButton_GridView.Location = new-object System.Drawing.Point(15,35)
$Script:RadioButton_GridView.size = New-Object System.Drawing.Size(80,20)
$Script:RadioButton_GridView.Checked = $False
$Script:RadioButton_GridView.Text = "GridView"
#
$Script:RadioButton_CSV.Location = new-object System.Drawing.Point(15,55)
$Script:RadioButton_CSV.size = New-Object System.Drawing.Size(80,20)
$Script:RadioButton_CSV.Checked = $False
$Script:RadioButton_CSV.Text = "CSV"
#
$Button_Go.Location = New-Object System.Drawing.Size(450,75)
$Button_Go.Size = New-Object System.Drawing.Size(110,80)
$Button_Go.Text = "Go"
#$Button_Go.Add_Click({temp})
$Button_Go.Add_Click($Button_Go_Click)
#
$Script:TextBox_CollectionName.Left = 20;
$Script:TextBox_CollectionName.Top = 130;
$Script:TextBox_CollectionName.width = 200;
$Script:TextBox_CollectionName.Text = "Nabil - Test Collection"
#
############################################################################
Update-Dropdown1
ConnectTo-SCCM
Deployment-List -Deployment_History 10
$Script:Output.Text = "helloooooooo"
#cd c:
############################################################################
#Save the initial state of the form
$InitialFormWindowState = $form1.WindowState
#Init the OnLoad event to correct the initial state of the form
$form1.add_Load($Form_StateCorrection_Load)
#Clean up the control events
$form1.add_FormClosed($Form_Cleanup_FormClosed)
#Show the Form
return $form1.ShowDialog()
} #End Function
#Call the form
Show-Form-Template_psf | Out-Null

View File

@@ -0,0 +1,782 @@
#------------------------------------------------------------------------
# Source File Information (DO NOT MODIFY)
# Source ID: 676f8db7-35c7-452d-b353-a4b40f26243a
# Source File: Form-Template.psf
#------------------------------------------------------------------------
#region File Recovery Data (DO NOT MODIFY)
<#RecoveryData:
RAUAAB+LCAAAAAAABAC9VNtKwzAYvhd8h5Dr2oPd3AZtYXTuxtNwQ72TrP07o2lSknSzPr3p2g1x
QkHGKJSk+Q7/KQ0eIRFrkNWEaILMQlHBQ3xpezg6P0MoeJB0RTlhU8rgnuQQTYXMLxaQF4xosAuV
Bc4BpmEu3yHRSFcFhHheKQ25/Ux5KjbKrkWat4X+OrLQUxtKz3brx0JxyXQpIeRQakmYhWblktHk
BqqF+AAeLgcD0k/6V97I74E7HGHETSghzoyeh1HyRlkqDQ7HgmspmGoSNIHOpChA6qoljEst5glh
MKE58DoIA72ykOcHzg7aRb0TKWBTKq47OTGjwPWcfhnCwDU+/nDYSaqrjKNtap3YBXxqvG3bIfR6
bbxb3K0gaav5Wq8DZ3vaNNNputlsxkpBbooPaqfTfqmiXCVCMro8QgMDZ6/626UZmVN4HH0sux3r
m3gaI0k2lK/+4+X6WT8bZJ6X9l3ik26vl5ydJKdYSDi+0X7bjHzg/PxrRt9OzyrdRAUAAA==#>
#endregion
<#
.NOTES
--------------------------------------------------------------------------------
Code generated by: SAPIEN Technologies, Inc., PowerShell Studio 2017 v5.4.141
Generated on: 8/29/2017 11:53 AM
Generated by: Haidey2
--------------------------------------------------------------------------------
.DESCRIPTION
GUI script generated by PowerShell Studio 2017
#>
#----------------------------------------------
#region Application Functions
#----------------------------------------------
#endregion Application Functions
#----------------------------------------------
# Generated Form Function
#----------------------------------------------
function Show-Form-Template_psf {
#----------------------------------------------
#region Import the Assemblies
#----------------------------------------------
[void][reflection.assembly]::Load('System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
[void][reflection.assembly]::Load('System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
[void][reflection.assembly]::Load('System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a')
#endregion Import Assemblies
#----------------------------------------------
#region Generated Form Objects
#----------------------------------------------
[System.Windows.Forms.Application]::EnableVisualStyles()
$form1 = New-Object 'System.Windows.Forms.Form'
$InitialFormWindowState = New-Object 'System.Windows.Forms.FormWindowState'
$Script:Output = New-Object System.Windows.Forms.TextBox
$Script:Collection_DropDownBox = New-Object System.Windows.Forms.ComboBox
$Script:Deployment_DropDownBox = New-Object System.Windows.Forms.ComboBox
$Script:Combobox_Tools = New-Object System.Windows.Forms.ComboBox
$GroupBox = New-Object System.Windows.Forms.GroupBox
$GroupBox_Info = New-Object System.Windows.Forms.GroupBox
$Script:RadioButton_Window = New-Object System.Windows.Forms.RadioButton
$Script:RadioButton_GridView = New-Object System.Windows.Forms.RadioButton
$Script:RadioButton_CSV = New-Object System.Windows.Forms.RadioButton
$Button_Go = New-Object System.Windows.Forms.Button
$Script:TextBox_CollectionName = New-Object System.Windows.Forms.TextBox
#$PanelEventLogs_Events = New-Object 'System.Windows.Forms.Panel'
#$PanelEventLogs_Filter = New-Object 'System.Windows.Forms.Panel'
#$Text_ELogs_ServerName = New-Object 'System.Windows.Forms.TextBox'
#$Text_ELogs_EventID = New-Object 'System.Windows.Forms.TextBox'
#$Text_Elogs_DaysBack = New-Object 'System.Windows.Forms.TextBox'
$label_CollectionName = New-Object 'System.Windows.Forms.Label'
$label_CollectionName_Value = New-Object 'System.Windows.Forms.Label'
$label_DeploymentName = New-Object 'System.Windows.Forms.Label'
$label_DeploymentName_Value = New-Object 'System.Windows.Forms.Label'
$label_DeploymentTime = New-Object 'System.Windows.Forms.Label'
$label_DeploymentTime_Value = New-Object 'System.Windows.Forms.Label'
$label_DeviceCount = New-Object 'System.Windows.Forms.Label'
$label_DeviceCount_Value = New-Object 'System.Windows.Forms.Label'
$Button_ELogs_Connect = New-Object 'System.Windows.Forms.Button'
# $Location = Split-Path $MyInvocation.MyCommand.Path -Parent
$Script:ALL_Patch_Servers = @()
$Script:Responding = @()
$Script:NotResponding = @()
$Global:DeviceCollection_ServerNames1 = ""
$Global:Collection_Name = ""
$Global:Select_Tool
$Global:Output_Type = ""
$Global:Deployments = ""
#endregion Generated Form Objects
#----------------------------------------------
# User Generated Script
#----------------------------------------------
$form1_Load={
#TODO: Initialize Form Controls here
}
$Script:Collection_DropDownBox_SelectedIndexChanged={
$Script:Output.Text = $Script:Collection_DropDownBox.Text
$T = Get-CMDeviceCollection -Name $Script:Collection_DropDownBox.text | select Name,MemberCount
$label_DeviceCount_Value.Text = $T.MemberCount
}
$Script:Deployment_DropDownBox_SelectedIndexChanged={
Reset-Forms -Form_Selection 1
Deployed-to-Collections
$Script:Output.Text = $Script:Deployment_DropDownBox.Text
}
$Script:Combobox_Tools_SelectedIndexChanged= {
$Script:Output.Text = $Script:Combobox_Tools.Text
}
$Button_Go_Click = {
temp
#SCCM-Module
# $Global:Collection_Name = $Script:TextBox_CollectionName.Text #$Script:TextBox_CollectionName.Text
# $Global:Select_Tool = $Script:Combobox_Tools.Text
#$Output.Text = "$Global:Collection_Name --- $Global:Select_Tool " | Out-String
#$Output.Text = | Out-String
}
##################################################################################################################
Function ConnectTo-SCCM {
If(!(Get-PSDrive).Name -ne "CCX") {
#
# Press 'F5' to run this script. Running this script will load the ConfigurationManager
# module for Windows PowerShell and will connect to the site.
#
# This script was auto-generated at '2/18/2021 10:12:39 AM'.
# Uncomment the line below if running in an environment where script signing is
# required.
#Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process
# Site configuration
$SiteCode = "CCX" # Site code
$ProviderMachineName = "PNCRASCCM001.ccx.carecentrix.com" # SMS Provider machine name
# Customizations
$initParams = @{}
#$initParams.Add("Verbose", $true) # Uncomment this line to enable verbose logging
#$initParams.Add("ErrorAction", "Stop") # Uncomment this line to stop the script on any errors
# Do not change anything below this line
# Import the ConfigurationManager.psd1 module
if((Get-Module ConfigurationManager) -eq $null) {
Import-Module "$($ENV:SMS_ADMIN_UI_PATH)\..\ConfigurationManager.psd1" @initParams
}
# Connect to the site's drive if it is not already present
if((Get-PSDrive -Name $SiteCode -PSProvider CMSite -ErrorAction SilentlyContinue) -eq $null) {
New-PSDrive -Name $SiteCode -PSProvider CMSite -Root $ProviderMachineName @initParams
}
# Set the current location to be the site code.
Set-Location "$($SiteCode):\" @initParams
#$Script:Output.Text = "inside connectoSCCM function"
}#endIf
}#endFunction
##################################################################################################################
Function SCCM-Module {
Write-Host "Inside SCCM function" -ForegroundColor Cyan
If(!(Get-PSDrive).Name -eq "sccm-drive") {
Import-Module 'C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1'
New-PSDrive -Name SCCM-Drive -PSProvider "AdminUI.PS.Provider\CMSite" -Root "PNCRASCCM001.ccx.carecentrix.com" -Description "SCCM Site"
}#endIf
$Script:Output.Text | Get-PSDrive | ft -AutoSize | Out-String
CD sccm-drive:
}#endFunction
##################################################################################################################
Function Update-Dropdown1 {
# $Collections += $Script:Collection_DropDownBox.text
$Collections = @("Collection-Servers","Ping-Collection","Check_Uptime","Test-Service","Remotely Update Policy","Software Update Status","Test-Sccm")
$Collections | % { $Script:Combobox_Tools.Items.Add($_) }
}
##################################################################################################################
Function Reset-Forms {
Param($Form_Selection)
Switch ($Form_Selection) {
1 { $Collection_DropDownBox.Items.Clear(); $Collection_DropDownBox.Text = "--Deployed to Collections--" }
2 {}
}
}
##################################################################################################################
Function temp {
$Script:Output.Clear()
#$Script:Script:Output.text = $Script:Collection_DropDownBox.text | Out-String
#$Global:Collection_Name = $Script:TextBox_CollectionName.Text #$Script:TextBox_CollectionName.Text
$Global:Collection_Name = $Script:Collection_DropDownBox.Text
$Global:Select_Tool = $Script:Combobox_Tools.Text
If ($Script:RadioButton_Window.Checked -eq $true) { $Global:Output_Type = "Window" <#; $Script:Output.Text = "Window_Radio1 Checked: $($Script:RadioButton_Window.Checked)" | Out-String #> }
ElseIf ($Script:RadioButton_GridView.Checked -eq $true) { $Global:Output_Type = "Gridview" <#; $Script:Output.Text = "Gridview_Radio2 Checked: $($Script:RadioButton_GridView.Checked)" | Out-String #> }
ElseIf ($Script:RadioButton_CSV.Checked -eq $true) { $Global:Output_Type = "Export" <#; $Script:Output.Text = "CSV_Radio3 Checked: $($Script:RadioButton_CSV.Checked)" | Out-String #> }
If($Global:Collection_Name -and $Global:Select_Tool) {
# If($Script:Collection_DropDownBox.text = "Tool1"){gcc}
Run-Tool
#$Script:TextBox_CollectionName.clear()
$Script:Collection_DropDownBox.text = "----Select Collection----"
#Clear-Variables
}#endIf
Else { #$T = { Write-Host "You must enter Collection Name ............!!" -ForegroundColor Red }
$Script:Output.SelectionColor = 'red'
$Script:Output.Text = "You must select 'Tool' and enter Collection Name............!!"
}
Run-Defaults
}#endFunction
##################################################################################################################
Function Run-Tool {
Switch($Global:Select_Tool) {
Collection-Servers { Collection-Servers; Write-Host "Tool Selected: $Global:Select_Tool" }
Ping-Collection { Ping_Collection }
Check_Uptime { Check_Uptime }
Test-Service { Test-Service }
Test-SCCM { SCCM-Module }
#"Remotely Update Policy" { $Script:Output.Text = Invoke-Expression $Location\Tool-Remotely-Restart-SCCMSyncCycle.ps1 | ft -AutoSize | Out-String }
"Remotely Update Policy" { $Script:Output.Text = Invoke-Expression $Location\Tool-Remotely-Restart-SCCMSyncCycle.ps1 | ft -AutoSize | Out-String }
"Software Update Status" { $Script:Output.Text = & "$Location\Tool-Get-SCCMSoftwareUpdateStatus.ps1" -Dep_ID 16778048 | ft -AutoSize | Out-String}
}#endSwitch
#Clear-Variables
}#endFunction
##################################################################################################################
Function Run-Defaults {
#$Script:TextBox_CollectionName.Text = "Nabil - Test Collection"
$Script:RadioButton_Window.Checked = $true
<#
If(!$Location) {
$Location = Split-Path $MyInvocation.MyCommand.Path -Parent
}
#>
}
##################################################################################################################
Function xClear-Variables {
$Global:Collection_Name = ""
$Global:Select_Tool = ""
$Global:Output_Type = ""
$Script:ALL_Patch_Servers = @()
}
##################################################################################################################
Function Display-Results {
#Param($Global:Output_Type,$Final_Result)
Write-Host "DisplayType: $($Global:Output_Type)"
Switch ($Global:Output_Type){
Window { $Script:Output.Text = $Script:ALL_Patch_Servers | Out-String}
Gridview { $Script:ALL_Patch_Servers | Out-GridView }
Export { $Script:ALL_Patch_Servers | Export-Csv -Path $Location\Results.csv -NoTypeInformation; ii $Location\Results.csv }
}#endSwitch
}
#############################################################################################################################################################
Function Collection-Servers {
#Param($Coll_Name)
Write-Host "Collection:$Global:Collection_Name"
$Script:ALL_Patch_Servers = @()
ConnectTo-SCCM
#SCCM-Module
#CD sccm-drive:
$Script:DeviceCollection_MemberCount = Get-CMDeviceCollection -Name $Global:Collection_Name | select Name,MemberCount
$Script:DeviceCollection_ServerNames = Collection-Members #Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name,IsClient #| Export-Csv "E:\SCCM-Files\SCCM-Scripts\Files\$Global:Collection_Name.csv" -NoTypeInformation
#$ServerName = $DeviceCollection_ServerNames.Name
#Set-Location c:
#$Script:Temp = Get-CMCollectionMember -CollectionName $Global:Collection_Name #| select Name,IsClient
$Script:DeviceCollection_ServerNames | % {
$Obj = New-Object -TypeName PSObject
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $_.Name
$Obj | Add-Member -MemberType NoteProperty -Name ClientInstalled -Value $_.IsClient
$Obj | Add-Member -MemberType NoteProperty -Name CollectionName -Value $Global:Collection_Name
#$Obj | Add-Member -MemberType NoteProperty -Name CollectionMemberCount -Value {(Get-CMCollectionMember -Name $Global:Collection_Name).MemberCount}
$Obj
$Script:ALL_Patch_Servers += $Obj
}#end%
# $Script:Output.Text = $Script:ALL_Patch_Servers | Out-String
Display-Results #-Final_Result $Script:ALL_Patch_Servers
Write-Host "$Script:ALL_Patch_Servers"
# $Script:ALL_Patch_Servers | Export-Csv $Location\Current-Collection-Servers.csv -NoTypeInformation
}#endFunction
#############################################################################################################################################################
Function Collection-Members {
Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name,IsClient
}
#############################################################################################################################################################
Function Ping_Collection {
$Ping_Result = @()
$NotResponding = @()
$Responding = @()
ConnectTo-SCCM
#SCCM-Module
#CD sccm-drive:
$Global:DeviceCollection_ServerNames1 = Collection-Members #Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name
#Set-Location c:
Write-Host "Total Server Count: $($Global:DeviceCollection_ServerNames1.count)" -ForegroundColor Green
Write-Host ""
############
# $Script:Output.Text = "CollectionName: $($Global:Collection_Name) ------ hello "
############
$Global:DeviceCollection_ServerNames1.Name | % {
$Server = $_
$Obj = New-Object -TypeName PSObject
$Count = $Global:DeviceCollection_ServerNames1.count
$Script:Output.Text = "Checking: $Server ----- Servers left: $($Count--) Please Wait !!!" | Out-String
If (Test-Connection $Server -Count 1 -ErrorAction SilentlyContinue ) {
#Write-Host "Responding:---- $_ " -ForegroundColor Green
#$Script:Output.AppendText("Responding: $_")
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $Server
$Obj | Add-Member -MemberType NoteProperty -Name Responding -Value "Yes"
$Ping_Result += $Obj
$Responding += $Server
# $Script:Output.text += $Obj | Out-String
}#endIf
Else {
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $Server
$Obj | Add-Member -MemberType NoteProperty -Name Responding -Value "No!"
$Ping_Result += $Obj
$NotResponding += $Server
# $Script:Output.text += $Obj | Out-String
}
}#end%
$Script:Output.Text = $Ping_Result | ft -AutoSize | Out-String
write-host "-------------------------------------------------------"
Write-host "$($Responding.count) / $($DeviceCollection_ServerNames1.count) -- Responding" -foregroundcolor Green
Write-host "$($NotResponding.count) / $($DeviceCollection_ServerNames1.count) -- NOT Responding" -foregroundcolor Red
#Write-Host "Servers NOT Responding: $NotResponding " -ForegroundColor Red
}#endFunction
#############################################################################################################################################################
Function Check_Uptime {
ConnectTo-SCCM
$Global:DeviceCollection_ServerNames1 = Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name
$Script:Output.Text = $Global:DeviceCollection_ServerNames1.name | % { gwmi win32_operatingsystem -ComputerName $_ -ErrorAction SilentlyContinue | select @{n="Server";e={$_.PSComputername}},@{n="LastReboot";e={$_.Converttodatetime($_.LastBootUpTime)}}} | sort LastBootup -descending | Out-String
}
#############################################################################################################################################################
Function Deployment-List {
Param($Deployment_History)
# SCCM-Module
$Global:Deployments = Get-CMDeployment | ? { $_.deploymenttime -gt ((Get-Date).AddDays(-"$Deployment_History")) }
#$T | select ApplicationName,CollectionName,DeploymentTime,AssignmentID,SoftwareName | % { $Deployment_DropDownBox.Items.Add($_) }
$i = 0
$Q = "" #@()
$Global:Deployments.ApplicationName | % { $Script:Deployment_DropDownBox.Items.Add($_)}
<#
foreach ($D in $Deployments) {
$Q = $D.ApplicationName + "-------------------------------------------------------" + $D.CollectionName
$Deployment_DropDownBox.Items.Add($Q)
$i++
}
#>
#$T.ApplicationName | % { $Deployment_DropDownBox.Items.Add($_) }
}#endFunction
#############################################################################################################################################################
Function Deployed-to-Collections {
$T = $Global:Deployments | ? { $_.ApplicationName -eq "$($Script:Deployment_DropDownBox.text)" } | Select -ExpandProperty CollectionName
$Script:Collection_DropDownBox.Items.Clear()
$T | % { $Script:Collection_DropDownBox.Items.Add("$_")}
}
#############################################################################################################################################################
Function Test-Service {
$T = Get-Service
$Script:Output.Text = $T | ft -AutoSize | Out-String
}
##################################################################################################################
##################################################################################################################
# --End User Generated Script--
#----------------------------------------------
#region Generated Events
#----------------------------------------------
$Form_StateCorrection_Load=
{
#Correct the initial state of the form to prevent the .Net maximized form issue
$form1.WindowState = $InitialFormWindowState
}
$Form_Cleanup_FormClosed=
{
#Remove all event handlers from the controls
try
{
$form1.remove_Load($form1_Load)
$form1.remove_Load($Form_StateCorrection_Load)
$form1.remove_FormClosed($Form_Cleanup_FormClosed)
#$PanelEventLogs_Events.remove_Paint($PanelEventLogs_Events_Paint)
#$PanelEventLogs_Filter.remove_Paint($PanelEventLogs_Filter_Paint)
$Text_Elogs_DaysBack.remove_TextChanged($Text_Elogs_DaysBack_TextChanged)
$Text_ELogs_ServerName.remove_TextChanged($Text_ELogs_ServerName_TextChanged)
$Text_ELogs_EventID.remove_TextChanged($Text_ELogs_EventID_TextChanged)
$Script:Output.remove_TextChanged($Output_TextChanged)
$Script:Collection_DropDownBox.remove_SelectedIndexChanged($Script:Collection_DropDownBox_SelectedIndexChanged)
$Script:Deployment_DropDownBox.remove_SelectedIndexChanged($Script:Deployment_DropDownBox_SelectedIndexChanged)
$Script:Combobox_Tools.remove_SelectedIndexChanged($Script:Combobox_Tools_SelectedIndexChanged)
$Script:RadioButton_Window.remove_SelectedIndexChanged($Script:RadioButton_Window_SelectedIndexChanged)
$Script:RadioButton_GridView.remove_SelectedIndexChanged($Script:RadioButton_GridView_SelectedIndexChanged)
$Script:RadioButton_CSV.remove_SelectedIndexChanged($Script:RadioButton_CSV_SelectedIndexChanged)
$Button_Go.remove_Click($Button_Go_Click)
}
catch { Out-Null <# Prevent PSScriptAnalyzer warning #> }
}
#$PanelEventLogs_Events_Paint=[System.Windows.Forms.PaintEventHandler]{ <#Event Argument: $_ = [System.Windows.Forms.PaintEventArgs]#> }
#$PanelEventLogs_Filter_Paint=[System.Windows.Forms.PaintEventHandler]{ }
$Text_ELogs_ServerName_TextChanged={}
$Text_Elogs_DaysBack_TextChanged={}
#endregion Generated Events
#----------------------------------------------
#region Generated Form Code
#----------------------------------------------
#
# form1
#
#$form1.Controls.Add($PanelEventLogs_Events)
#$form1.Controls.Add($PanelEventLogs_Filter)
$form1.Controls.Add($Output)
$form1.Controls.Add($Script:Collection_DropDownBox)
$form1.Controls.Add($Script:Deployment_DropDownBox)
$form1.Controls.Add($Script:Combobox_Tools)
$form1.Controls.Add($GroupBox)
$form1.Controls.Add($GroupBox_Info)
$form1.controls.Add($Script:RadioButton_Window)
$form1.controls.Add($Script:RadioButton_GridView)
$form1.Controls.Add($Script:RadioButton_CSV)
$form1.Controls.Add($Button_Go)
$form1.Controls.Add($Script:TextBox_CollectionName)
$form1.Controls.Add($label_CollectionName)
$form1.Controls.Add($label_CollectionName_Value)
$form1.Controls.Add($label_DeploymentName)
$form1.controls.Add($label_DeploymentName_Value)
$form1.Controls.Add($label_DeploymentTime)
$form1.Controls.Add($label_DeploymentTime_Value)
$form1.Controls.Add($label_DeviceCount)
$form1.Controls.Add($label_DeviceCount_Value)
$form1.AutoScaleDimensions = '6, 13'
$form1.AutoScaleMode = 'Font'
$form1.ClientSize = '1000, 800'
$form1.Name = 'form1'
$form1.Text = 'Form'
$form1.add_Load($form1_Load)
#endregion Generated Form Code
#----------------------------------------------
<#
$PanelEventLogs_Events.Controls.Add($Text_ELogs_ServerName)
$PanelEventLogs_Events.Controls.Add($Button_ELogs_Connect)
$PanelEventLogs_Events.Controls.Add($Button_ELogs_View)
$PanelEventLogs_Events.Controls.Add($Combobox_EventLogs_LogsList)
$PanelEventLogs_Events.Controls.Add($VCenterUserPassword)
$PanelEventLogs_Events.Controls.Add($CheckBoxUseWindowsLogin)
$PanelEventLogs_Events.Controls.Add($labelVCenterUserName)
$PanelEventLogs_Events.Controls.Add($labelVCenterPassword)
$PanelEventLogs_Events.Controls.Add($Script:Collection_DropDownBox)
$PanelEventLogs_Events.BackColor = '153,153,153'
$PanelEventLogs_Events.Location = '6, 6'
$PanelEventLogs_Events.Name = 'panelEventLogs_Events'
$PanelEventLogs_Events.Size = '598, 56'
$PanelEventLogs_Events.TabIndex = 0
$PanelEventLogs_Events.add_Paint($PanelEventLogs_Events_Paint)
$PanelEventLogs_Filter.Controls.Add($Combobox_ELogsFilter_Level)
$PanelEventLogs_Filter.Controls.Add($Text_ELogs_EventID)
$PanelEventLogs_Filter.Controls.Add($Text_Elogs_DaysBack)
$PanelEventLogs_Filter.Controls.Add($label_ELogs_Level)
$PanelEventLogs_Filter.Controls.Add($label_ELogs_EventID)
$PanelEventLogs_Filter.Controls.Add($label_ELogs_DaysBack)
$PanelEventLogs_Filter.BackColor = '255,255,212'
$PanelEventLogs_Filter.Location = '6, 62'
$PanelEventLogs_Filter.Name = 'PanelEventLogs_Filter'
$PanelEventLogs_Filter.Size = '598, 56'
$PanelEventLogs_Filter.BorderStyle = 'FixedSingle'
$PanelEventLogs_Filter.TabIndex = 0
$PanelEventLogs_Filter.add_Paint($PanelEventLogs_Filter_Paint)
#>
#
# $Text_ELogs_ServerName
<#
$Text_ELogs_ServerName.Location = '8, 26'
$Text_ELogs_ServerName.Name = '$Text_ELogs_ServerName'
$Text_ELogs_ServerName.Size = '100, 20'
$Text_ELogs_ServerName.text = "l2012"
$Text_ELogs_ServerName.TabIndex = 6
$Text_ELogs_ServerName.add_TextChanged($Text_ELogs_ServerName_TextChanged)
#
#
# Text_ELogs_EventID
#
$Text_ELogs_EventID.Location = '115, 26'
$Text_ELogs_EventID.Name = 'Text_ELogs_EventID'
$Text_ELogs_EventID.Size = '40, 20'
$Text_ELogs_EventID.TabIndex = 7
$Text_ELogs_EventID.add_TextChanged($Text_ELogs_EventID_TextChanged)
#
# Text_Elogs_DaysBack
#
$Text_Elogs_DaysBack.Location = '175, 26'
$Text_Elogs_DaysBack.Name = 'Text_Elogs_DaysBack'
$Text_Elogs_DaysBack.Size = '40, 20'
$Text_Elogs_DaysBack.TabIndex = 7
$Text_Elogs_DaysBack.add_TextChanged($Text_Elogs_DaysBack_TextChanged)
#>
# Output
#
$Output.Location = '10, 250'
$Output.Multiline = $True
$Output.Name = 'Output'
$Output.ScrollBars = 'both'
$Output.Size = '965, 500'
$Output.Font = 'Consolas, 8.25pt'
$Output.WordWrap = $False
$Output.TabIndex = 5
$Output.add_TextChanged($Output_TextChanged)
#
# ComboboxServiceStartMode
#
$Script:Collection_DropDownBox.FormattingEnabled = $True
$Script:Collection_DropDownBox.Location = '20, 80'
$Script:Collection_DropDownBox.Name = 'Script:Collection_DropDownBox'
$Script:Collection_DropDownBox.Size = '180, 20'
$Script:Collection_DropDownBox.TabIndex = 2
$Script:Collection_DropDownBox.Text = '--Deployed to Collections--'
$Script:Collection_DropDownBox.add_SelectedIndexChanged($Script:Collection_DropDownBox_SelectedIndexChanged)
#
$Script:Deployment_DropDownBox.Location = '20,30'
#$Script:Deployment_DropDownBox.Size = New-Object System.Drawing.Size(580,50)
$Script:Deployment_DropDownBox.Size = '580,50'
#$Script:Deployment_DropDownBox.DropDownHeight = 200
$Script:Deployment_DropDownBox.text = "----Select Deployment----"
#$Script:Deployment_DropDownBox.Visible = $false
$Script:Deployment_DropDownBox.add_SelectedIndexChanged($Script:Deployment_DropDownBox_SelectedIndexChanged)
#
#$Script:Combobox_Tools.Size = New-Object System.Drawing.Size(180,20)
#$Script:Combobox_Tools.DropDownHeight = 200
$Script:Combobox_Tools.text = "----Select Tool----!"
$Script:Combobox_Tools.Location = '20,170'
$Script:Combobox_Tools.Size = '180,10'
$Script:Combobox_Tools.add_SelectedIndexChanged($Script:Combobox_Tools_SelectedIndexChanged)
#
$groupBox.Location = '270,70'
$groupBox.size = New-Object System.Drawing.Size(150,90)
$groupBox.text = "Select Output:"
$GroupBox.Controls.Add($Script:RadioButton_Window)
$GroupBox.Controls.Add($Script:RadioButton_GridView)
$GroupBox.Controls.Add($Script:RadioButton_CSV)
#
$GroupBox_Info.Location = '670,25'
$GroupBox_Info.Size = '300,200'
$GroupBox_Info.Text = "Deployment Info"
############
$GroupBox_Info.Controls.Add($label_CollectionName)
$GroupBox_Info.Controls.Add($label_CollectionName_Value)
$GroupBox_Info.Controls.Add($label_DeploymentName)
$GroupBox_Info.Controls.Add($label_DeploymentName_Value)
$GroupBox_Info.Controls.Add($label_DeploymentTime)
$GroupBox_Info.Controls.Add($label_DeploymentTime_Value)
$GroupBox_Info.Controls.Add($label_DeviceCount)
$GroupBox_Info.Controls.Add($label_DeviceCount_Value)
############
$label_CollectionName.AutoSize = $True
$label_CollectionName.Font = 'Microsoft Sans Serif, 9.0pt' #, style=Bold'
#$label_CollectionName.ForeColor = 'DarkGreen'
#$label_CollectionName.TextAlign = 'MiddleRight'
$label_CollectionName.Location = '20,25'
$label_CollectionName.Name = 'Collection_Name'
$label_CollectionName.Size = '41, 13'
#$label_CollectionName.TabIndex = 6
$label_CollectionName.Text = 'Collection Name:'
#$label_CollectionName.add_Click($label_CollectionName_Click)
############ Value ###############
$label_CollectionName_Value.AutoSize = $True
$label_CollectionName_Value.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_CollectionName_Value.ForeColor = 'DarkGreen'
#$label_CollectionName_Value.TextAlign = 'MiddleRight'
$label_CollectionName_Value.Location = '140,25'
$label_CollectionName_Value.Name = 'Collection_Name_Value'
$label_CollectionName_Value.Size = '41, 13'
#$label_CollectionName_Value.TabIndex = 6
$label_CollectionName_Value.Text = '_'
#$label_CollectionName_Value.add_Click($label_CollectionName_Value_Click)
############
$label_DeploymentName.AutoSize = $True
$label_DeploymentName.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_DeploymentName.ForeColor = 'DarkGreen'
#$label_DeploymentName.TextAlign = 'MiddleRight'
$label_DeploymentName.Location = '20,45'
$label_DeploymentName.Name = 'Deployment_Name'
$label_DeploymentName.Size = '41, 13'
#$label_DeploymentName.TabIndex = 6
$label_DeploymentName.Text = 'Deployment Name:'
#$label_DeploymentName.add_Click($label_DeploymentName_Click)
############ Value ############
$label_DeploymentName_Value.AutoSize = $True
$label_DeploymentName_Value.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_DeploymentName_Value.ForeColor = 'DarkGreen'
#$label_DeploymentName_Value.TextAlign = 'MiddleRight'
$label_DeploymentName_Value.Location = '140,45'
$label_DeploymentName_Value.Name = 'Deployment_Name_Value'
$label_DeploymentName_Value.Size = '41, 13'
#$label_DeploymentName_Value.TabIndex = 6
$label_DeploymentName_Value.Text = '_'
#$label_DeploymentName_Value.add_Click($label_DeploymentName_Value_Click)
#############
$label_DeploymentTime.AutoSize = $True
$label_DeploymentTime.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_DeploymentTime.ForeColor = 'DarkGreen'
#$label_DeploymentTime.TextAlign = 'MiddleRight'
$label_DeploymentTime.Location = '20,65'
$label_DeploymentTime.Name = 'Deployment_Time'
$label_DeploymentTime.Size = '41, 13'
#$label_DeploymentTime.TabIndex = 6
$label_DeploymentTime.Text = 'Deployment Time:'
#$label_DeploymentTime.add_Click($label_CollectionName_Click)
############ Value ############
$label_DeploymentTime_Value.AutoSize = $True
$label_DeploymentTime_Value.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_DeploymentTime_Value.ForeColor = 'DarkGreen'
#$label_DeploymentTime_Value.TextAlign = 'MiddleRight'
$label_DeploymentTime_Value.Location = '140,65'
$label_DeploymentTime_Value.Name = 'Deployment_Time_Value'
$label_DeploymentTime_Value.Size = '41, 13'
#$label_DeploymentTime_Value.TabIndex = 6
$label_DeploymentTime_Value.Text = '_'
#$label_DeploymentTime_Value.add_Click($label_DeploymentTime_Value_Click)
###########
$label_DeviceCount.AutoSize = $True
$label_DeviceCount.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_DeviceCount.ForeColor = 'DarkGreen'
#$label_DeviceCount.TextAlign = 'MiddleRight'
$label_DeviceCount.Location = '20,85'
$label_DeviceCount.Name = 'Device_Count'
$label_DeviceCount.Size = '41, 13'
#$label_DeviceCount.TabIndex = 6
$label_DeviceCount.Text = 'Device Count'
#$label_DeviceCount.add_Click($label_DeviceCount_Click)
############ Value ############
$label_DeviceCount_Value.AutoSize = $True
$label_DeviceCount_Value.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_DeviceCount_Value.ForeColor = 'DarkGreen'
#$label_DeviceCount_Value.TextAlign = 'MiddleRight'
$label_DeviceCount_Value.Location = '140,85'
$label_DeviceCount_Value.Name = 'Device_Count_Value'
$label_DeviceCount_Value.Size = '41, 13'
#$label_DeviceCount_Value.TabIndex = 6
$label_DeviceCount_Value.Text = '_'
#$label_DeviceCount_Value.add_Click($label_DeviceCount_Value_Click)
############
$Script:RadioButton_Window.Location = new-object System.Drawing.Point(15,15)
$Script:RadioButton_Window.size = New-Object System.Drawing.Size(130,20)
$Script:RadioButton_Window.Checked = $true
$Script:RadioButton_Window.Text = "Window"
#$Script:RadioButton_Window.
#
$Script:RadioButton_GridView.Location = new-object System.Drawing.Point(15,35)
$Script:RadioButton_GridView.size = New-Object System.Drawing.Size(80,20)
$Script:RadioButton_GridView.Checked = $False
$Script:RadioButton_GridView.Text = "GridView"
#
$Script:RadioButton_CSV.Location = new-object System.Drawing.Point(15,55)
$Script:RadioButton_CSV.size = New-Object System.Drawing.Size(80,20)
$Script:RadioButton_CSV.Checked = $False
$Script:RadioButton_CSV.Text = "CSV"
#
$Button_Go.Location = New-Object System.Drawing.Size(450,75)
$Button_Go.Size = New-Object System.Drawing.Size(110,80)
$Button_Go.Text = "Go"
#$Button_Go.Add_Click({temp})
$Button_Go.Add_Click($Button_Go_Click)
#
$Script:TextBox_CollectionName.Left = 20;
$Script:TextBox_CollectionName.Top = 130;
$Script:TextBox_CollectionName.width = 200;
$Script:TextBox_CollectionName.Text = "Nabil - Test Collection"
#
############################################################################
Update-Dropdown1
ConnectTo-SCCM
Deployment-List -Deployment_History 10
$Script:Output.Text = "helloooooooo"
#cd c:
############################################################################
#Save the initial state of the form
$InitialFormWindowState = $form1.WindowState
#Init the OnLoad event to correct the initial state of the form
$form1.add_Load($Form_StateCorrection_Load)
#Clean up the control events
$form1.add_FormClosed($Form_Cleanup_FormClosed)
#Show the Form
return $form1.ShowDialog()
} #End Function
#Call the form
Show-Form-Template_psf | Out-Null

View File

@@ -0,0 +1,847 @@
#------------------------------------------------------------------------
# Source File Information (DO NOT MODIFY)
# Source ID: 676f8db7-35c7-452d-b353-a4b40f26243a
# Source File: Form-Template.psf
#------------------------------------------------------------------------
#region File Recovery Data (DO NOT MODIFY)
<#RecoveryData:
RAUAAB+LCAAAAAAABAC9VNtKwzAYvhd8h5Dr2oPd3AZtYXTuxtNwQ72TrP07o2lSknSzPr3p2g1x
QkHGKJSk+Q7/KQ0eIRFrkNWEaILMQlHBQ3xpezg6P0MoeJB0RTlhU8rgnuQQTYXMLxaQF4xosAuV
Bc4BpmEu3yHRSFcFhHheKQ25/Ux5KjbKrkWat4X+OrLQUxtKz3brx0JxyXQpIeRQakmYhWblktHk
BqqF+AAeLgcD0k/6V97I74E7HGHETSghzoyeh1HyRlkqDQ7HgmspmGoSNIHOpChA6qoljEst5glh
MKE58DoIA72ykOcHzg7aRb0TKWBTKq47OTGjwPWcfhnCwDU+/nDYSaqrjKNtap3YBXxqvG3bIfR6
bbxb3K0gaav5Wq8DZ3vaNNNputlsxkpBbooPaqfTfqmiXCVCMro8QgMDZ6/626UZmVN4HH0sux3r
m3gaI0k2lK/+4+X6WT8bZJ6X9l3ik26vl5ydJKdYSDi+0X7bjHzg/PxrRt9OzyrdRAUAAA==#>
#endregion
<#
.NOTES
--------------------------------------------------------------------------------
Code generated by: SAPIEN Technologies, Inc., PowerShell Studio 2017 v5.4.141
Generated on: 8/29/2017 11:53 AM
Generated by: Haidey2
--------------------------------------------------------------------------------
.DESCRIPTION
GUI script generated by PowerShell Studio 2017
#>
#----------------------------------------------
#region Application Functions
#----------------------------------------------
#endregion Application Functions
#----------------------------------------------
# Generated Form Function
#----------------------------------------------
function Show-Form-Template_psf {
#----------------------------------------------
#region Import the Assemblies
#----------------------------------------------
[void][reflection.assembly]::Load('System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
[void][reflection.assembly]::Load('System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
[void][reflection.assembly]::Load('System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a')
#endregion Import Assemblies
#----------------------------------------------
#region Generated Form Objects
#----------------------------------------------
[System.Windows.Forms.Application]::EnableVisualStyles()
$form1 = New-Object 'System.Windows.Forms.Form'
$InitialFormWindowState = New-Object 'System.Windows.Forms.FormWindowState'
$Script:Output = New-Object System.Windows.Forms.TextBox
$Script:Output_Left = New-Object System.Windows.Forms.TextBox
$Script:Output_Right = New-Object System.Windows.Forms.TextBox
$Script:Collection_DropDownBox = New-Object System.Windows.Forms.ComboBox
$Script:Deployment_DropDownBox = New-Object System.Windows.Forms.ComboBox
$Script:Combobox_Tools = New-Object System.Windows.Forms.ComboBox
$GroupBox = New-Object System.Windows.Forms.GroupBox
$GroupBox_Info = New-Object System.Windows.Forms.GroupBox
$Script:RadioButton_Window = New-Object System.Windows.Forms.RadioButton
$Script:RadioButton_GridView = New-Object System.Windows.Forms.RadioButton
$Script:RadioButton_CSV = New-Object System.Windows.Forms.RadioButton
$Button_Go = New-Object System.Windows.Forms.Button
$Script:TextBox_CollectionName = New-Object System.Windows.Forms.TextBox
#$PanelEventLogs_Events = New-Object 'System.Windows.Forms.Panel'
#$PanelEventLogs_Filter = New-Object 'System.Windows.Forms.Panel'
#$Text_ELogs_ServerName = New-Object 'System.Windows.Forms.TextBox'
#$Text_ELogs_EventID = New-Object 'System.Windows.Forms.TextBox'
#$Text_Elogs_DaysBack = New-Object 'System.Windows.Forms.TextBox'
$label_CollectionName = New-Object 'System.Windows.Forms.Label'
$label_CollectionName_Value = New-Object 'System.Windows.Forms.Label'
$label_DeploymentName = New-Object 'System.Windows.Forms.Label'
$label_DeploymentName_Value = New-Object 'System.Windows.Forms.Label'
$label_DeploymentTime = New-Object 'System.Windows.Forms.Label'
$label_DeploymentTime_Value = New-Object 'System.Windows.Forms.Label'
$label_DeviceCount = New-Object 'System.Windows.Forms.Label'
$label_DeviceCount_Value = New-Object 'System.Windows.Forms.Label'
$Button_ELogs_Connect = New-Object 'System.Windows.Forms.Button'
# $Location = Split-Path $MyInvocation.MyCommand.Path -Parent
$Script:ALL_Patch_Servers = @()
$Script:Responding = @()
$Script:NotResponding = @()
$Global:DeviceCollection_ServerNames1 = ""
$Global:Collection_Name = ""
$Global:Select_Tool
$Global:Output_Type = ""
$Global:Deployments = ""
#endregion Generated Form Objects
#----------------------------------------------
# User Generated Script
#----------------------------------------------
$form1_Load={
#TODO: Initialize Form Controls here
}
$Script:Collection_DropDownBox_SelectedIndexChanged={
$Script:Output.Text = $Script:Collection_DropDownBox.Text
$T = Get-CMDeviceCollection -Name $Script:Collection_DropDownBox.text | select Name,MemberCount
$label_DeviceCount_Value.Text = $T.MemberCount
}
$Script:Deployment_DropDownBox_SelectedIndexChanged={
Reset-Forms -Form_Selection 1
Deployed-to-Collections
$Script:Output.Text = $Script:Deployment_DropDownBox.Text
}
$Script:Combobox_Tools_SelectedIndexChanged= {
$Script:Output.Text = $Script:Combobox_Tools.Text
}
$Button_Go_Click = {
temp
#SCCM-Module
# $Global:Collection_Name = $Script:TextBox_CollectionName.Text #$Script:TextBox_CollectionName.Text
# $Global:Select_Tool = $Script:Combobox_Tools.Text
#$Output.Text = "$Global:Collection_Name --- $Global:Select_Tool " | Out-String
#$Output.Text = | Out-String
}
##################################################################################################################
Function ConnectTo-SCCM {
If(!(Get-PSDrive).Name -ne "CCX") {
#
# Press 'F5' to run this script. Running this script will load the ConfigurationManager
# module for Windows PowerShell and will connect to the site.
#
# This script was auto-generated at '2/18/2021 10:12:39 AM'.
# Uncomment the line below if running in an environment where script signing is
# required.
#Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process
# Site configuration
$SiteCode = "CCX" # Site code
$ProviderMachineName = "PNCRASCCM001.ccx.carecentrix.com" # SMS Provider machine name
# Customizations
$initParams = @{}
#$initParams.Add("Verbose", $true) # Uncomment this line to enable verbose logging
#$initParams.Add("ErrorAction", "Stop") # Uncomment this line to stop the script on any errors
# Do not change anything below this line
# Import the ConfigurationManager.psd1 module
if((Get-Module ConfigurationManager) -eq $null) {
Import-Module "$($ENV:SMS_ADMIN_UI_PATH)\..\ConfigurationManager.psd1" @initParams
}
# Connect to the site's drive if it is not already present
if((Get-PSDrive -Name $SiteCode -PSProvider CMSite -ErrorAction SilentlyContinue) -eq $null) {
New-PSDrive -Name $SiteCode -PSProvider CMSite -Root $ProviderMachineName @initParams
}
# Set the current location to be the site code.
Set-Location "$($SiteCode):\" @initParams
#$Script:Output.Text = "inside connectoSCCM function"
}#endIf
}#endFunction
##################################################################################################################
Function SCCM-Module {
Write-Host "Inside SCCM function" -ForegroundColor Cyan
If(!(Get-PSDrive).Name -eq "sccm-drive") {
Import-Module 'C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1'
New-PSDrive -Name SCCM-Drive -PSProvider "AdminUI.PS.Provider\CMSite" -Root "PNCRASCCM001.ccx.carecentrix.com" -Description "SCCM Site"
}#endIf
$Script:Output.Text | Get-PSDrive | ft -AutoSize | Out-String
CD sccm-drive:
}#endFunction
##################################################################################################################
Function Update-Dropdown1 {
# $Collections += $Script:Collection_DropDownBox.text
$Collections = @("Collection-Servers","Ping-Collection","Check_Uptime","Test-Service","Remotely Update Policy","Software Update Status","Test-Sccm")
$Collections | % { $Script:Combobox_Tools.Items.Add($_) }
}
##################################################################################################################
Function Reset-Forms {
Param($Form_Selection)
Switch ($Form_Selection) {
1 { $Collection_DropDownBox.Items.Clear(); $Collection_DropDownBox.Text = "--Deployed to Collections--" }
2 {}
}
}
##################################################################################################################
Function temp {
$Script:Output.Clear()
$Script:Output_Left.Clear()
$Script:Output_Right.Clear()
#$Script:Script:Output.text = $Script:Collection_DropDownBox.text | Out-String
#$Global:Collection_Name = $Script:TextBox_CollectionName.Text #$Script:TextBox_CollectionName.Text
$Global:Collection_Name = $Script:Collection_DropDownBox.Text
$Global:Select_Tool = $Script:Combobox_Tools.Text
If ($Script:RadioButton_Window.Checked -eq $true) { $Global:Output_Type = "Window" <#; $Script:Output.Text = "Window_Radio1 Checked: $($Script:RadioButton_Window.Checked)" | Out-String #> }
ElseIf ($Script:RadioButton_GridView.Checked -eq $true) { $Global:Output_Type = "Gridview" <#; $Script:Output.Text = "Gridview_Radio2 Checked: $($Script:RadioButton_GridView.Checked)" | Out-String #> }
ElseIf ($Script:RadioButton_CSV.Checked -eq $true) { $Global:Output_Type = "Export" <#; $Script:Output.Text = "CSV_Radio3 Checked: $($Script:RadioButton_CSV.Checked)" | Out-String #> }
If($Global:Collection_Name -and $Global:Select_Tool) {
# If($Script:Collection_DropDownBox.text = "Tool1"){gcc}
Run-Tool
#$Script:TextBox_CollectionName.clear()
$Script:Collection_DropDownBox.text = "----Select Collection----"
#Clear-Variables
}#endIf
Else { #$T = { Write-Host "You must enter Collection Name ............!!" -ForegroundColor Red }
$Script:Output.SelectionColor = 'red'
$Script:Output.Text = "You must select 'Tool' and enter Collection Name............!!"
}
Run-Defaults
}#endFunction
##################################################################################################################
Function Run-Tool {
Switch($Global:Select_Tool) {
Collection-Servers { Collection-Servers; Write-Host "Tool Selected: $Global:Select_Tool" }
Ping-Collection { Ping_Collection }
Check_Uptime { Check_Uptime }
Test-Service { Test-Service }
Test-SCCM { SCCM-Module }
#"Remotely Update Policy" { $Script:Output.Text = Invoke-Expression $Location\Tool-Remotely-Restart-SCCMSyncCycle.ps1 | ft -AutoSize | Out-String }
"Remotely Update Policy" { $Script:Output.Text = Invoke-Expression $Location\Tool-Remotely-Restart-SCCMSyncCycle.ps1 | ft -AutoSize | Out-String }
"Software Update Status" { $Script:Output.Text = & "$Location\Tool-Get-SCCMSoftwareUpdateStatus.ps1" -Dep_ID 16778048 | ft -AutoSize | Out-String}
}#endSwitch
#Clear-Variables
}#endFunction
##################################################################################################################
Function Run-Defaults {
#$Script:TextBox_CollectionName.Text = "Nabil - Test Collection"
$Script:RadioButton_Window.Checked = $true
<#
If(!$Location) {
$Location = Split-Path $MyInvocation.MyCommand.Path -Parent
}
#>
}
##################################################################################################################
Function xClear-Variables {
$Global:Collection_Name = ""
$Global:Select_Tool = ""
$Global:Output_Type = ""
$Script:ALL_Patch_Servers = @()
}
##################################################################################################################
Function Display-Results {
#Param($Global:Output_Type,$Final_Result)
Write-Host "DisplayType: $($Global:Output_Type)"
Switch ($Global:Output_Type){
Window { $Script:Output.Text = $Script:ALL_Patch_Servers | Out-String}
Gridview { $Script:ALL_Patch_Servers | Out-GridView }
Export { $Script:ALL_Patch_Servers | Export-Csv -Path $Location\Results.csv -NoTypeInformation; ii $Location\Results.csv }
}#endSwitch
}
#############################################################################################################################################################
Function Collection-Servers {
#Param($Coll_Name)
Write-Host "Collection:$Global:Collection_Name"
$Script:ALL_Patch_Servers = @()
ConnectTo-SCCM
NA-Set-Stage -Select_Stage OutputStage2
#SCCM-Module
#CD sccm-drive:
$Script:DeviceCollection_MemberCount = Get-CMDeviceCollection -Name $Global:Collection_Name | select Name,MemberCount
$Script:DeviceCollection_ServerNames = Collection-Members #Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name,IsClient #| Export-Csv "E:\SCCM-Files\SCCM-Scripts\Files\$Global:Collection_Name.csv" -NoTypeInformation
#$ServerName = $DeviceCollection_ServerNames.Name
#Set-Location c:
#$Script:Temp = Get-CMCollectionMember -CollectionName $Global:Collection_Name #| select Name,IsClient
$Script:DeviceCollection_ServerNames | % {
$Obj = New-Object -TypeName PSObject
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $_.Name
$Obj | Add-Member -MemberType NoteProperty -Name ClientInstalled -Value $_.IsClient
$Obj | Add-Member -MemberType NoteProperty -Name CollectionName -Value $Global:Collection_Name
#$Obj | Add-Member -MemberType NoteProperty -Name CollectionMemberCount -Value {(Get-CMCollectionMember -Name $Global:Collection_Name).MemberCount}
$Obj
$Script:ALL_Patch_Servers += $Obj
}#end%
# $Script:Output.Text = $Script:ALL_Patch_Servers | Out-String
Display-Results #-Final_Result $Script:ALL_Patch_Servers
Write-Host "$Script:ALL_Patch_Servers"
# $Script:ALL_Patch_Servers | Export-Csv $Location\Current-Collection-Servers.csv -NoTypeInformation
}#endFunction
#############################################################################################################################################################
Function Collection-Members {
Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name,IsClient
}
#############################################################################################################################################################
Function NA-Set-Stage {
Param($Select_Stage)
Switch($Select_Stage) {
OutputStage1 { $Script:Output.Visible = $false
$Script:Output_Left.Visible = $True
$Script:Output_Right.Visible = $True
Write-Host "output-stage1" -ForegroundColor Yellow
}
OutputStage2 { $Script:Output.Visible = $True
$Script:Output_Left.Visible = $false
$Script:Output_Right.Visible = $false
}
test { $Script:Output.Text = "inside na set stage function"}
}#endSwitch
$Script:Output.Text = "outside switch inside na set stage function - param: $Select_Stage"
}#endFunction
#############################################################################################################################################################
Function Ping_Collection {
$Ping_Result = @()
$NotResponding = @()
$Responding = @()
ConnectTo-SCCM
NA-Set-Stage -Select_Stage OutputStage1
#$Script:Output.Visible = $false
#$Script:Output_Left.Visible = $True
#$Script:Output_Right.Visible = $True
$Global:DeviceCollection_ServerNames1 = Collection-Members #Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name
#Set-Location c:
Write-Host "Total Server Count: $($Global:DeviceCollection_ServerNames1.count)" -ForegroundColor Green
Write-Host ""
############
# $Script:Output.Text = "CollectionName: $($Global:Collection_Name) ------ hello "
############
$Global:DeviceCollection_ServerNames1.Name | % {
$Server = $_
$Obj = New-Object -TypeName PSObject
$Count = $Global:DeviceCollection_ServerNames1.count
#$Script:Output.Text = "Checking: $Server ----- Servers left: $($Count--) Please Wait !!!" | Out-String
If (Test-Connection $Server -Count 1 -ErrorAction SilentlyContinue ) {
#Write-Host "Responding:---- $_ " -ForegroundColor Green
#$Script:Output.AppendText("Responding: $_")
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $Server
$Obj | Add-Member -MemberType NoteProperty -Name Responding -Value "Yes"
$Ping_Result += $Obj
#$Responding += $Server
$Responding += $Obj
# $Script:Output.text += $Obj | Out-String
}#endIf
Else {
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $Server
$Obj | Add-Member -MemberType NoteProperty -Name Responding -Value "No!"
$Ping_Result += $Obj
#$NotResponding += $Server
$NotResponding += $Obj
# $Script:Output.text += $Obj | Out-String
}
}#end%
#$Script:Output.Text = $Ping_Result | ft -AutoSize | Out-String
$Script:Output_Left.Text = $Responding | Out-String
$Script:Output_Right.Text = $NotResponding | Out-String
write-host "-------------------------------------------------------"
Write-host "$($Responding.count) / $($DeviceCollection_ServerNames1.count) -- Responding" -foregroundcolor Green
Write-host "$($NotResponding.count) / $($DeviceCollection_ServerNames1.count) -- NOT Responding" -foregroundcolor Red
#Write-Host "Servers NOT Responding: $NotResponding " -ForegroundColor Red
}#endFunction
#############################################################################################################################################################
Function Check_Uptime {
ConnectTo-SCCM
$Global:DeviceCollection_ServerNames1 = Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name
$Script:Output.Text = $Global:DeviceCollection_ServerNames1.name | % { gwmi win32_operatingsystem -ComputerName $_ -ErrorAction SilentlyContinue | select @{n="Server";e={$_.PSComputername}},@{n="LastReboot";e={$_.Converttodatetime($_.LastBootUpTime)}}} | sort LastBootup -descending | Out-String
}
#############################################################################################################################################################
Function Deployment-List {
Param($Deployment_History)
# SCCM-Module
$Global:Deployments = Get-CMDeployment | ? { $_.deploymenttime -gt ((Get-Date).AddDays(-"$Deployment_History")) }
#$T | select ApplicationName,CollectionName,DeploymentTime,AssignmentID,SoftwareName | % { $Deployment_DropDownBox.Items.Add($_) }
$i = 0
$Q = "" #@()
$Global:Deployments.ApplicationName | % { $Script:Deployment_DropDownBox.Items.Add($_)}
<#
foreach ($D in $Deployments) {
$Q = $D.ApplicationName + "-------------------------------------------------------" + $D.CollectionName
$Deployment_DropDownBox.Items.Add($Q)
$i++
}
#>
#$T.ApplicationName | % { $Deployment_DropDownBox.Items.Add($_) }
}#endFunction
#############################################################################################################################################################
Function Deployed-to-Collections {
$T = $Global:Deployments | ? { $_.ApplicationName -eq "$($Script:Deployment_DropDownBox.text)" } | Select -ExpandProperty CollectionName
$Script:Collection_DropDownBox.Items.Clear()
$T | % { $Script:Collection_DropDownBox.Items.Add("$_")}
}
#############################################################################################################################################################
Function Test-Service {
$Script:Output.Text = "test-service function"
#$T = Get-Service
#$Script:Output.Text = $T | ft -AutoSize | Out-String
}
##################################################################################################################
##################################################################################################################
# --End User Generated Script--
#----------------------------------------------
#region Generated Events
#----------------------------------------------
$Form_StateCorrection_Load=
{
#Correct the initial state of the form to prevent the .Net maximized form issue
$form1.WindowState = $InitialFormWindowState
}
$Form_Cleanup_FormClosed=
{
#Remove all event handlers from the controls
try
{
$form1.remove_Load($form1_Load)
$form1.remove_Load($Form_StateCorrection_Load)
$form1.remove_FormClosed($Form_Cleanup_FormClosed)
#$PanelEventLogs_Events.remove_Paint($PanelEventLogs_Events_Paint)
#$PanelEventLogs_Filter.remove_Paint($PanelEventLogs_Filter_Paint)
$Text_Elogs_DaysBack.remove_TextChanged($Text_Elogs_DaysBack_TextChanged)
$Text_ELogs_ServerName.remove_TextChanged($Text_ELogs_ServerName_TextChanged)
$Text_ELogs_EventID.remove_TextChanged($Text_ELogs_EventID_TextChanged)
$Script:Output.remove_TextChanged($Output_TextChanged)
$Script:Output_Left.remove_TextChanged($Script:Output_Left_TextChanged)
$Script:Output_Right.remove_TextChanged($Script:Output_Right_TextChanged)
$Script:Collection_DropDownBox.remove_SelectedIndexChanged($Script:Collection_DropDownBox_SelectedIndexChanged)
$Script:Deployment_DropDownBox.remove_SelectedIndexChanged($Script:Deployment_DropDownBox_SelectedIndexChanged)
$Script:Combobox_Tools.remove_SelectedIndexChanged($Script:Combobox_Tools_SelectedIndexChanged)
$Script:RadioButton_Window.remove_SelectedIndexChanged($Script:RadioButton_Window_SelectedIndexChanged)
$Script:RadioButton_GridView.remove_SelectedIndexChanged($Script:RadioButton_GridView_SelectedIndexChanged)
$Script:RadioButton_CSV.remove_SelectedIndexChanged($Script:RadioButton_CSV_SelectedIndexChanged)
$Button_Go.remove_Click($Button_Go_Click)
}
catch { Out-Null <# Prevent PSScriptAnalyzer warning #> }
}
#$PanelEventLogs_Events_Paint=[System.Windows.Forms.PaintEventHandler]{ <#Event Argument: $_ = [System.Windows.Forms.PaintEventArgs]#> }
#$PanelEventLogs_Filter_Paint=[System.Windows.Forms.PaintEventHandler]{ }
$Text_ELogs_ServerName_TextChanged={}
$Text_Elogs_DaysBack_TextChanged={}
#endregion Generated Events
#----------------------------------------------
#region Generated Form Code
#----------------------------------------------
#
# form1
#
#$form1.Controls.Add($PanelEventLogs_Events)
#$form1.Controls.Add($PanelEventLogs_Filter)
$form1.Controls.Add($Script:Output)
$form1.Controls.Add($Script:Output_Left)
$form1.Controls.Add($Script:Output_Right)
$form1.Controls.Add($Script:Collection_DropDownBox)
$form1.Controls.Add($Script:Deployment_DropDownBox)
$form1.Controls.Add($Script:Combobox_Tools)
$form1.Controls.Add($GroupBox)
$form1.Controls.Add($GroupBox_Info)
$form1.controls.Add($Script:RadioButton_Window)
$form1.controls.Add($Script:RadioButton_GridView)
$form1.Controls.Add($Script:RadioButton_CSV)
$form1.Controls.Add($Button_Go)
$form1.Controls.Add($Script:TextBox_CollectionName)
$form1.Controls.Add($label_CollectionName)
$form1.Controls.Add($label_CollectionName_Value)
$form1.Controls.Add($label_DeploymentName)
$form1.controls.Add($label_DeploymentName_Value)
$form1.Controls.Add($label_DeploymentTime)
$form1.Controls.Add($label_DeploymentTime_Value)
$form1.Controls.Add($label_DeviceCount)
$form1.Controls.Add($label_DeviceCount_Value)
$form1.AutoScaleDimensions = '6, 13'
$form1.AutoScaleMode = 'Font'
$form1.ClientSize = '1000, 800'
$form1.Name = 'form1'
$form1.Text = 'Form'
$form1.add_Load($form1_Load)
#endregion Generated Form Code
#----------------------------------------------
<#
$PanelEventLogs_Events.Controls.Add($Text_ELogs_ServerName)
$PanelEventLogs_Events.Controls.Add($Button_ELogs_Connect)
$PanelEventLogs_Events.Controls.Add($Button_ELogs_View)
$PanelEventLogs_Events.Controls.Add($Combobox_EventLogs_LogsList)
$PanelEventLogs_Events.Controls.Add($VCenterUserPassword)
$PanelEventLogs_Events.Controls.Add($CheckBoxUseWindowsLogin)
$PanelEventLogs_Events.Controls.Add($labelVCenterUserName)
$PanelEventLogs_Events.Controls.Add($labelVCenterPassword)
$PanelEventLogs_Events.Controls.Add($Script:Collection_DropDownBox)
$PanelEventLogs_Events.BackColor = '153,153,153'
$PanelEventLogs_Events.Location = '6, 6'
$PanelEventLogs_Events.Name = 'panelEventLogs_Events'
$PanelEventLogs_Events.Size = '598, 56'
$PanelEventLogs_Events.TabIndex = 0
$PanelEventLogs_Events.add_Paint($PanelEventLogs_Events_Paint)
$PanelEventLogs_Filter.Controls.Add($Combobox_ELogsFilter_Level)
$PanelEventLogs_Filter.Controls.Add($Text_ELogs_EventID)
$PanelEventLogs_Filter.Controls.Add($Text_Elogs_DaysBack)
$PanelEventLogs_Filter.Controls.Add($label_ELogs_Level)
$PanelEventLogs_Filter.Controls.Add($label_ELogs_EventID)
$PanelEventLogs_Filter.Controls.Add($label_ELogs_DaysBack)
$PanelEventLogs_Filter.BackColor = '255,255,212'
$PanelEventLogs_Filter.Location = '6, 62'
$PanelEventLogs_Filter.Name = 'PanelEventLogs_Filter'
$PanelEventLogs_Filter.Size = '598, 56'
$PanelEventLogs_Filter.BorderStyle = 'FixedSingle'
$PanelEventLogs_Filter.TabIndex = 0
$PanelEventLogs_Filter.add_Paint($PanelEventLogs_Filter_Paint)
#>
#
# $Text_ELogs_ServerName
<#
$Text_ELogs_ServerName.Location = '8, 26'
$Text_ELogs_ServerName.Name = '$Text_ELogs_ServerName'
$Text_ELogs_ServerName.Size = '100, 20'
$Text_ELogs_ServerName.text = "l2012"
$Text_ELogs_ServerName.TabIndex = 6
$Text_ELogs_ServerName.add_TextChanged($Text_ELogs_ServerName_TextChanged)
#
#
# Text_ELogs_EventID
#
$Text_ELogs_EventID.Location = '115, 26'
$Text_ELogs_EventID.Name = 'Text_ELogs_EventID'
$Text_ELogs_EventID.Size = '40, 20'
$Text_ELogs_EventID.TabIndex = 7
$Text_ELogs_EventID.add_TextChanged($Text_ELogs_EventID_TextChanged)
#
# Text_Elogs_DaysBack
#
$Text_Elogs_DaysBack.Location = '175, 26'
$Text_Elogs_DaysBack.Name = 'Text_Elogs_DaysBack'
$Text_Elogs_DaysBack.Size = '40, 20'
$Text_Elogs_DaysBack.TabIndex = 7
$Text_Elogs_DaysBack.add_TextChanged($Text_Elogs_DaysBack_TextChanged)
#>
# Output
#
$Script:Output.Location = '10, 250'
$Script:Output.Multiline = $True
$Script:Output.Name = 'Output'
$Script:Output.ScrollBars = 'both'
$Script:Output.Size = '965, 500'
$Script:Output.Font = 'Consolas, 8.25pt'
$Script:Output.WordWrap = $False
$Script:Output.TabIndex = 5
$Script:Output.add_TextChanged($Output_TextChanged)
$Script:Output.Visible = $True
#
$Script:Output_Left.Location = '20, 250'
$Script:Output_Left.Multiline = $True
$Script:Output_Left.Name = 'Output_Left'
$Script:Output_Left.ScrollBars = 'both'
$Script:Output_Left.Size = '470, 500'
$Script:Output_Left.Font = 'Consolas, 8.25pt'
$Script:Output_Left.WordWrap = $False
#$Script:Output_Left.TabIndex = 5
$Script:Output_Left.add_TextChanged($Output_Left_TextChanged)
#
$Script:Output_Right.Location = '510, 250'
$Script:Output_Right.Multiline = $True
$Script:Output_Right.Name = 'Output_Right'
$Script:Output_Right.ScrollBars = 'both'
$Script:Output_Right.Size = '470, 500'
$Script:Output_Right.Font = 'Consolas, 8.25pt'
$Script:Output_Right.WordWrap = $False
#$Script:Output_Right.TabIndex = 5
$Script:Output_Right.add_TextChanged($Output_Right_TextChanged)
#
# ComboboxServiceStartMode
#
$Script:Collection_DropDownBox.FormattingEnabled = $True
$Script:Collection_DropDownBox.Location = '20, 80'
$Script:Collection_DropDownBox.Name = 'Script:Collection_DropDownBox'
$Script:Collection_DropDownBox.Size = '180, 20'
$Script:Collection_DropDownBox.TabIndex = 2
$Script:Collection_DropDownBox.Text = '--Deployed to Collections--'
$Script:Collection_DropDownBox.add_SelectedIndexChanged($Script:Collection_DropDownBox_SelectedIndexChanged)
#
$Script:Deployment_DropDownBox.Location = '20,30'
#$Script:Deployment_DropDownBox.Size = New-Object System.Drawing.Size(580,50)
$Script:Deployment_DropDownBox.Size = '580,50'
#$Script:Deployment_DropDownBox.DropDownHeight = 200
$Script:Deployment_DropDownBox.text = "----Select Deployment----"
#$Script:Deployment_DropDownBox.Visible = $false
$Script:Deployment_DropDownBox.add_SelectedIndexChanged($Script:Deployment_DropDownBox_SelectedIndexChanged)
#
#$Script:Combobox_Tools.Size = New-Object System.Drawing.Size(180,20)
#$Script:Combobox_Tools.DropDownHeight = 200
$Script:Combobox_Tools.text = "----Select Tool----!"
$Script:Combobox_Tools.Location = '20,170'
$Script:Combobox_Tools.Size = '180,10'
$Script:Combobox_Tools.add_SelectedIndexChanged($Script:Combobox_Tools_SelectedIndexChanged)
#
$groupBox.Location = '270,70'
$groupBox.size = New-Object System.Drawing.Size(150,90)
$groupBox.text = "Select Output:"
$GroupBox.Controls.Add($Script:RadioButton_Window)
$GroupBox.Controls.Add($Script:RadioButton_GridView)
$GroupBox.Controls.Add($Script:RadioButton_CSV)
#
$GroupBox_Info.Location = '670,25'
$GroupBox_Info.Size = '300,200'
$GroupBox_Info.Text = "Deployment Info"
############
$GroupBox_Info.Controls.Add($label_CollectionName)
$GroupBox_Info.Controls.Add($label_CollectionName_Value)
$GroupBox_Info.Controls.Add($label_DeploymentName)
$GroupBox_Info.Controls.Add($label_DeploymentName_Value)
$GroupBox_Info.Controls.Add($label_DeploymentTime)
$GroupBox_Info.Controls.Add($label_DeploymentTime_Value)
$GroupBox_Info.Controls.Add($label_DeviceCount)
$GroupBox_Info.Controls.Add($label_DeviceCount_Value)
############
$label_CollectionName.AutoSize = $True
$label_CollectionName.Font = 'Microsoft Sans Serif, 9.0pt' #, style=Bold'
#$label_CollectionName.ForeColor = 'DarkGreen'
#$label_CollectionName.TextAlign = 'MiddleRight'
$label_CollectionName.Location = '20,25'
$label_CollectionName.Name = 'Collection_Name'
$label_CollectionName.Size = '41, 13'
#$label_CollectionName.TabIndex = 6
$label_CollectionName.Text = 'Collection Name:'
#$label_CollectionName.add_Click($label_CollectionName_Click)
############ Value ###############
$label_CollectionName_Value.AutoSize = $True
$label_CollectionName_Value.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_CollectionName_Value.ForeColor = 'DarkGreen'
#$label_CollectionName_Value.TextAlign = 'MiddleRight'
$label_CollectionName_Value.Location = '140,25'
$label_CollectionName_Value.Name = 'Collection_Name_Value'
$label_CollectionName_Value.Size = '41, 13'
#$label_CollectionName_Value.TabIndex = 6
$label_CollectionName_Value.Text = '_'
#$label_CollectionName_Value.add_Click($label_CollectionName_Value_Click)
############
$label_DeploymentName.AutoSize = $True
$label_DeploymentName.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_DeploymentName.ForeColor = 'DarkGreen'
#$label_DeploymentName.TextAlign = 'MiddleRight'
$label_DeploymentName.Location = '20,45'
$label_DeploymentName.Name = 'Deployment_Name'
$label_DeploymentName.Size = '41, 13'
#$label_DeploymentName.TabIndex = 6
$label_DeploymentName.Text = 'Deployment Name:'
#$label_DeploymentName.add_Click($label_DeploymentName_Click)
############ Value ############
$label_DeploymentName_Value.AutoSize = $True
$label_DeploymentName_Value.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_DeploymentName_Value.ForeColor = 'DarkGreen'
#$label_DeploymentName_Value.TextAlign = 'MiddleRight'
$label_DeploymentName_Value.Location = '140,45'
$label_DeploymentName_Value.Name = 'Deployment_Name_Value'
$label_DeploymentName_Value.Size = '41, 13'
#$label_DeploymentName_Value.TabIndex = 6
$label_DeploymentName_Value.Text = '_'
#$label_DeploymentName_Value.add_Click($label_DeploymentName_Value_Click)
#############
$label_DeploymentTime.AutoSize = $True
$label_DeploymentTime.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_DeploymentTime.ForeColor = 'DarkGreen'
#$label_DeploymentTime.TextAlign = 'MiddleRight'
$label_DeploymentTime.Location = '20,65'
$label_DeploymentTime.Name = 'Deployment_Time'
$label_DeploymentTime.Size = '41, 13'
#$label_DeploymentTime.TabIndex = 6
$label_DeploymentTime.Text = 'Deployment Time:'
#$label_DeploymentTime.add_Click($label_CollectionName_Click)
############ Value ############
$label_DeploymentTime_Value.AutoSize = $True
$label_DeploymentTime_Value.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_DeploymentTime_Value.ForeColor = 'DarkGreen'
#$label_DeploymentTime_Value.TextAlign = 'MiddleRight'
$label_DeploymentTime_Value.Location = '140,65'
$label_DeploymentTime_Value.Name = 'Deployment_Time_Value'
$label_DeploymentTime_Value.Size = '41, 13'
#$label_DeploymentTime_Value.TabIndex = 6
$label_DeploymentTime_Value.Text = '_'
#$label_DeploymentTime_Value.add_Click($label_DeploymentTime_Value_Click)
###########
$label_DeviceCount.AutoSize = $True
$label_DeviceCount.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_DeviceCount.ForeColor = 'DarkGreen'
#$label_DeviceCount.TextAlign = 'MiddleRight'
$label_DeviceCount.Location = '20,85'
$label_DeviceCount.Name = 'Device_Count'
$label_DeviceCount.Size = '41, 13'
#$label_DeviceCount.TabIndex = 6
$label_DeviceCount.Text = 'Device Count'
#$label_DeviceCount.add_Click($label_DeviceCount_Click)
############ Value ############
$label_DeviceCount_Value.AutoSize = $True
$label_DeviceCount_Value.Font = 'Microsoft Sans Serif, 8.50pt, style=Bold'
$label_DeviceCount_Value.ForeColor = 'DarkGreen'
#$label_DeviceCount_Value.TextAlign = 'MiddleRight'
$label_DeviceCount_Value.Location = '140,85'
$label_DeviceCount_Value.Name = 'Device_Count_Value'
$label_DeviceCount_Value.Size = '41, 13'
#$label_DeviceCount_Value.TabIndex = 6
$label_DeviceCount_Value.Text = '_'
#$label_DeviceCount_Value.add_Click($label_DeviceCount_Value_Click)
############
$Script:RadioButton_Window.Location = new-object System.Drawing.Point(15,15)
$Script:RadioButton_Window.size = New-Object System.Drawing.Size(130,20)
$Script:RadioButton_Window.Checked = $true
$Script:RadioButton_Window.Text = "Window"
#$Script:RadioButton_Window.
#
$Script:RadioButton_GridView.Location = new-object System.Drawing.Point(15,35)
$Script:RadioButton_GridView.size = New-Object System.Drawing.Size(80,20)
$Script:RadioButton_GridView.Checked = $False
$Script:RadioButton_GridView.Text = "GridView"
#
$Script:RadioButton_CSV.Location = new-object System.Drawing.Point(15,55)
$Script:RadioButton_CSV.size = New-Object System.Drawing.Size(80,20)
$Script:RadioButton_CSV.Checked = $False
$Script:RadioButton_CSV.Text = "CSV"
#
$Button_Go.Location = New-Object System.Drawing.Size(450,75)
$Button_Go.Size = New-Object System.Drawing.Size(110,80)
$Button_Go.Text = "Go"
#$Button_Go.Add_Click({temp})
$Button_Go.Add_Click($Button_Go_Click)
#
$Script:TextBox_CollectionName.Left = 20;
$Script:TextBox_CollectionName.Top = 130;
$Script:TextBox_CollectionName.width = 200;
$Script:TextBox_CollectionName.Text = "Nabil - Test Collection"
#
############################################################################
Update-Dropdown1
ConnectTo-SCCM
Deployment-List -Deployment_History 10
$Script:Output.Text = "helloooooooo"
#cd c:
############################################################################
#Save the initial state of the form
$InitialFormWindowState = $form1.WindowState
#Init the OnLoad event to correct the initial state of the form
$form1.add_Load($Form_StateCorrection_Load)
#Clean up the control events
$form1.add_FormClosed($Form_Cleanup_FormClosed)
#Show the Form
return $form1.ShowDialog()
} #End Function
#Call the form
Show-Form-Template_psf | Out-Null

View File

@@ -0,0 +1,293 @@
$Location = Split-Path $MyInvocation.MyCommand.Path -Parent
$Script:ALL_Patch_Servers = @()
$Script:Responding = @()
$Script:NotResponding = @()
$Global:Collection_Name = ""
$Global:Select_Tool
$Global:Output_Type = ""
If(!(Get-PSDrive -Name SCCM-Drive -ErrorAction SilentlyContinue)) {
Import-Module 'C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1'
New-PSDrive -Name SCCM-Drive -PSProvider "AdminUI.PS.Provider\CMSite" -Root "PNCRASCCM001.ccx.carecentrix.com" -Description "SCCM Site"
}
#########################################################################################################################################################
Function Start-Form {
#$Global:Collection_Name = ""
#$Global:Select_Tool = ""
#$Global:Output_Type = ""
$Temp = ""
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
$Form = New-Object System.Windows.Forms.Form
$Form.Size = New-Object System.Drawing.Size(900,500)
##############################################
#$Form_Load={ $Script:outputBox.text = "Welcome" }
############################################## Start functions
<# function pingInfo {
if ($RadioButton1.Checked -eq $true) {$nrOfPings=1}
if ($RadioButton2.Checked -eq $true) {$nrOfPings=2}
if ($RadioButton3.Checked -eq $true) {$nrOfPings=3}
$computer=$DropDownBox.SelectedItem.ToString() #populate the var with the value you selected
$pingResult=ping $wks -n $nrOfPings | fl | out-string;
$Script:outputBox.text=$pingResult
} #end pingInfo
#>
############################################## end functions
Function SCCM-Module {
If(!(Get-PSDrive).Name -eq "sccm-drive") {
Import-Module 'C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1'
New-PSDrive -Name SCCM-Drive -PSProvider "AdminUI.PS.Provider\CMSite" -Root "PNCRASCCM001.ccx.carecentrix.com" -Description "SCCM Site"
}#endIf
CD sccm-drive:
}#endFunction
##############################################
Function Run-Defaults {
$Script:textBox1.Text = "Nabil - Test Collection"
$Script:RadioButton1.Checked = $true
}
##############################################
Function temp {
$outputBox.Clear()
#$Script:outputBox.text = $textBox1.text | Out-String
$Global:Collection_Name = $textBox1.Text
#$Global:Select_Tool = $RadioButton1.Checked
$Global:Select_Tool = $DropDownBox.text
#$Global:Output_Type =
If ($RadioButton1.Checked -eq $true) { $Global:Output_Type = "Window"; $outputBox.Text = "Radio1 Checked: $($RadioButton1.Checked)" | Out-String }
ElseIf ($RadioButton2.Checked -eq $true) { $Global:Output_Type = "Gridview"; $outputBox.Text = "Radio2 Checked: $RadioButton2.Checked" | Out-String }
ElseIf ($RadioButton3.Checked -eq $true) { $Global:Output_Type = "Export"; $outputBox.Text = "Radio3 Checked: $RadioButton2.Checked" | Out-String }
If($Global:Collection_Name -and $Global:Select_Tool) {
# If($DropDownBox.text = "Tool1"){gcc}
Run-Tool
$textBox1.clear()
$DropDownBox.text = "----Select Tool----"
Clear-Variables
}#endIf
Else { #$T = { Write-Host "You must enter Collection Name ............!!" -ForegroundColor Red }
$Script:outputBox.SelectionColor = 'red'
$Script:outputBox.Text = "You must select 'Tool' and enter Collection Name............!!"
}
Run-Defaults
}#endFunction
##############################################
Function Update-Dropdown1 {
# $Collections += $textBox1.text
$Collections = @("Collection-Servers","Ping-Collection","Check_Uptime","Tool4","Tool5","Tool6","Tool7")
$Collections | % { $DropDownBox.Items.Add($_) }
}
##############################################
Function gcc {
$Script:outputBox.text = Get-Service | Out-String
}
##############################################
Function Clear-Variables {
$Global:Collection_Name = ""
$Global:Select_Tool = ""
$Global:Output_Type = ""
$Script:ALL_Patch_Servers = @()
}
#region Controls
############################################## Start group boxes
$groupBox = New-Object System.Windows.Forms.GroupBox
$groupBox.Location = New-Object System.Drawing.Size(270,20)
$groupBox.size = New-Object System.Drawing.Size(150,110)
$groupBox.text = "Select Output:"
$Form.Controls.Add($groupBox)
############################################## end group boxes
############################################## Start radio buttons
$Script:RadioButton1 = New-Object System.Windows.Forms.RadioButton
$Script:RadioButton1.Location = new-object System.Drawing.Point(15,15)
$Script:RadioButton1.size = New-Object System.Drawing.Size(130,20)
$Script:RadioButton1.Checked = $true
$Script:RadioButton1.Text = "Window"
$groupBox.Controls.Add($RadioButton1)
$Script:RadioButton2 = New-Object System.Windows.Forms.RadioButton
$Script:RadioButton2.Location = new-object System.Drawing.Point(15,35)
$Script:RadioButton2.size = New-Object System.Drawing.Size(80,20)
$Script:RadioButton2.Text = "Gridview"
$groupBox.Controls.Add($RadioButton2)
$Script:RadioButton3 = New-Object System.Windows.Forms.RadioButton
$Script:RadioButton3.Location = new-object System.Drawing.Point(15,55)
$Script:RadioButton3.size = New-Object System.Drawing.Size(80,20)
$Script:RadioButton3.Text = "Export csv"
$groupBox.Controls.Add($RadioButton3)
############################################## end radio buttons
########### Text Box ###########
############Define text box1 for input
$Script:textBox1 = New-Object System.Windows.Forms.TextBox;
$Script:textBox1.Left = 20;
$Script:textBox1.Top = 30;
$Script:textBox1.width = 200;
$Script:textBox1.Text = "Nabil - Test Collection"
$Form.Controls.Add($textBox1)
############################################## Start drop down boxes
$Script:DropDownBox = New-Object System.Windows.Forms.ComboBox
$Script:DropDownBox.Location = New-Object System.Drawing.Size(20,80)
$Script:DropDownBox.Size = New-Object System.Drawing.Size(180,20)
$Script:DropDownBox.DropDownHeight = 200
$Script:DropDownBox.text = "----Select Tool----"
$Form.Controls.Add($DropDownBox)
############################################## end drop down boxes
<############################################## Start text fields
$Script:outputBox = New-Object System.Windows.Forms.TextBox
$Script:outputBox.Location = New-Object System.Drawing.Size(10,150)
$Script:outputBox.Size = New-Object System.Drawing.Size(865,300)
$Script:outputBox.MultiLine = $True
$Script:outputBox.ScrollBars = "Vertical"
$Form.Controls.Add($Script:outputBox)
###########>
$SCRIPT:outputBox=New-Object System.Windows.Forms.RichTextBox
$outputBox.Location=New-Object System.Drawing.Size(10,150)
$outputBox.Size=New-Object System.Drawing.Size(865,300)
$outputBox.Multiline=$True
$outputBox.ReadOnly = $True
$outputBox.BackColor = [Drawing.Color]::White
$outputBox.ScrollBars = "Vertical"
$form.Controls.Add($Script:outputBox)
############################################## end text fields
############################################## Start buttons
$Button = New-Object System.Windows.Forms.Button
$Button.Location = New-Object System.Drawing.Size(450,30)
$Button.Size = New-Object System.Drawing.Size(110,80)
$Button.Text = "Go"
$Button.Add_Click({temp})
$Form.Controls.Add($Button)
#endregion Controls
############################################## end buttons
Update-Dropdown1
$Form.Add_Shown({$Form.Activate()})
[void] $Form.ShowDialog()
}
#########################################################################################################################################################
<# Function Input-Box {
[void][System.Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic')
$Global:Collection_Name = [Microsoft.VisualBasic.Interaction]::InputBox("Enter your name", "Name", "Enter Collection Name")
}
#>
#############################################################################################################################################################
Function Display-Results {
#Param($Global:Output_Type,$Final_Result)
Write-Host "DisplayType: $($Global:Output_Type)"
Switch ($Global:Output_Type){
Window { $Script:outputBox.Text = $Script:ALL_Patch_Servers | Out-String}
Gridview { $Script:ALL_Patch_Servers | Out-GridView }
Export { $Script:ALL_Patch_Servers | Export-Csv -Path $Location\Results.csv -NoTypeInformation; ii $Location\Results.csv }
}#endSwitch
}
#############################################################################################################################################################
Function Collection-Servers {
#Param($Coll_Name)
Write-Host "Collection:$Global:Collection_Name"
SCCM-Module
#CD sccm-drive:
$Script:DeviceCollection_MemberCount = Get-CMDeviceCollection -Name $Global:Collection_Name | select Name,MemberCount
$Script:DeviceCollection_ServerNames = Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name,IsClient #| Export-Csv "E:\SCCM-Files\SCCM-Scripts\Files\$Global:Collection_Name.csv" -NoTypeInformation
#$ServerName = $DeviceCollection_ServerNames.Name
Set-Location c:
#$Script:Temp = Get-CMCollectionMember -CollectionName $Global:Collection_Name #| select Name,IsClient
$Script:DeviceCollection_ServerNames | % {
$Obj = New-Object -TypeName PSObject
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $_.Name
$Obj | Add-Member -MemberType NoteProperty -Name ClientInstalled -Value $_.IsClient
$Obj | Add-Member -MemberType NoteProperty -Name CollectionName -Value $Global:Collection_Name
#$Obj | Add-Member -MemberType NoteProperty -Name CollectionMemberCount -Value {(Get-CMCollectionMember -Name $Global:Collection_Name).MemberCount}
$Obj
$Script:ALL_Patch_Servers += $Obj
}#end%
# $Script:outputBox.Text = $Script:ALL_Patch_Servers | Out-String
Display-Results #-Final_Result $Script:ALL_Patch_Servers
Write-Host "$Script:ALL_Patch_Servers"
}#endFunction
#############################################################################################################################################################
Function Ping_Collection {
Write-Host "Total Server Count: $($Script:ALL_Patch_Servers.count)" -ForegroundColor Green
Write-Host ""
SCCM-Module
#CD sccm-drive:
$Script:DeviceCollection_ServerNames1 = Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name
Set-Location c:
$Script:DeviceCollection_ServerNames1.Name | % {
If (Test-Connection $_ -Count 1 -ErrorAction SilentlyContinue ) {
#Write-Host "Responding:---- $_ " -ForegroundColor Green
$Script:outputBox.AppendText("Responding: $_")
$Responding += $_
}#endIf
Else {
$Script:outputBox.AppendText("NOT Responding: $_")
$NotResponding += $_ }
}#end%
write-host "-------------------------------------------------------"
Write-host "$($Responding.count) / $($DeviceCollection_ServerNames1.count) -- Responding" -foregroundcolor Green
Write-host "$($NotResponding.count) / $($DeviceCollection_ServerNames1.count) -- NOT Responding" -foregroundcolor Red
Write-Host "Servers NOT Responding: $NotResponding " -ForegroundColor Red
}#endFunction
#############################################################################################################################################################
Function Check_Uptime {
SCCM-Module
$Script:DeviceCollection_ServerNames1 = Get-CMCollectionMember -CollectionName $Global:Collection_Name | select Name
$Script:outputBox.Text = $Script:DeviceCollection_ServerNames1.name | % { gwmi win32_operatingsystem -ComputerName $_ -ErrorAction SilentlyContinue | select @{n="Server";e={$_.PSComputername}},@{n="LastBootup";e={$_.Converttodatetime($_.LastBootUpTime)}}} | sort LastBootup -descending | Out-String
}
#############################################################################################################################################################
Function Run-Tool {
Switch($Global:Select_Tool) {
Collection-Servers { Collection-Servers; Write-Host "Tool Selected: $Global:Select_Tool" }
Ping-Collection { Ping_Collection }
Check_Uptime { Check_Uptime }
}#endSwitch
#Clear-Variables
}#endFunction
#############################################################################################################################################################
Start-Form

View File

@@ -0,0 +1,130 @@
Function Restart-SCCMSyncCycle {
<#
.Synopsis
Remotely restarts sccm service cycles.
.DESCRIPTION
This function restarts all sccm policies on a remote client so that the client can immediately get any pending software updates or inventory.
.NOTES
Name: Restart-SCCMSyncCycle
Author: theSysadminChannel
Version: 1
DateCreated: 2017-02-09
.LINK
https://thesysadminchannel.com/remotely-restart-sccmsynccycle-using-powershell -
.PARAMETER ComputerName
The computer to which connectivity will be checked
.EXAMPLE
Restart-SCCMSyncCycle -Computername Pactest-1
Description:
Will restart all sccm services on a remote machine.
.EXAMPLE
Restart-SCCMSyncCycle -ComputerName pactest-1, pactest-2, pactest-3
Description:
Will generate a list of installed programs on pactest-1, pactest-2 and pactest-3
#>
[CmdletBinding()]
param(
[Parameter(
ValueFromPipeline=$true,
ValueFromPipelineByPropertyName=$true,
Position=0)]
[string[]] $ComputerName = $env:COMPUTERNAME
)
Foreach ($Computer in $ComputerName ) {
try {
Write-Host "====================================================================="
Write-Output "$Computer : Machine Policy Evaluation Cycle"
Invoke-WMIMethod -ComputerName $Computer -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000022}" -ErrorAction Stop | select -ExpandProperty PSComputerName | Out-Null
Write-Output "$Computer : Application Deployment Evaluation Cycle"
Invoke-WMIMethod -ComputerName $Computer -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000121}" | select -ExpandProperty PSComputerName | Out-Null
# Write-Output "$Computer : Discovery Data Collection Cycle"
# Invoke-WMIMethod -ComputerName $Computer -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000003}" | select -ExpandProperty PSComputerName | Out-Null
# Write-Output "$Computer : File Collection Cycle"
# Invoke-WMIMethod -ComputerName $Computer -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000010}" | select -ExpandProperty PSComputerName | Out-Null
# Write-Output "$Computer : Hardware Inventory Cycle"
# Invoke-WMIMethod -ComputerName $Computer -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000001}" | select -ExpandProperty PSComputerName | Out-Null
Write-Output "$Computer : Machine Policy Retrieval Cycle"
Invoke-WMIMethod -ComputerName $Computer -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000021}" | select -ExpandProperty PSComputerName | Out-Null
Write-Output "$Computer : Software Inventory Cycle"
Invoke-WMIMethod -ComputerName $Computer -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000002}" | select -ExpandProperty PSComputerName | Out-Null
# Write-Output "$Computer : Software Metering Usage Report Cycle"
# Invoke-WMIMethod -ComputerName $Computer -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000031}" | select -ExpandProperty PSComputerName | Out-Null
Write-Output "$Computer : Software Update Deployment Evaluation Cycle"
Invoke-WMIMethod -ComputerName $Computer -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000114}" | select -ExpandProperty PSComputerName | Out-Null
#Write-Output "$Computer : Software Update Scan Cycle"
#Invoke-WMIMethod -ComputerName $Computer -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000113}" | select -ExpandProperty PSComputerName | Out-Null
# Write-Output "$Computer : State Message Refresh"
# Invoke-WMIMethod -ComputerName $Computer -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000111}" | select -ExpandProperty PSComputerName | Out-Null
#Write-Output "$Computer : User Policy Retrieval Cycle"
#Invoke-WMIMethod -ComputerName $Computer -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000026}" | select -ExpandProperty PSComputerName | Out-Null
#Write-Output "$Computer : User Policy Evaluation Cycle"
#Invoke-WMIMethod -ComputerName $Computer -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000027}" | select -ExpandProperty PSComputerName | Out-Null
# Write-Output "$Computer : Windows Installers Source List Update Cycle"
# Invoke-WMIMethod -ComputerName $Computer -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000032}" | select -ExpandProperty PSComputerName | Out-Null
sleep 1
}
catch {
Write-Host $Computer.toUpper() "is not online or Account is locked out" -ForegroundColor:Red
Write-Host
Write-Host
}
}
}
# Restart-SCCMSyncCycle pver001
# Restart-SCCMSyncCycle
# Restart-SCCMSyncCycle $DeviceCollection_ServerNames.name
Restart-SCCMSyncCycle w2012a,w2012b

View File

@@ -0,0 +1,3 @@
"Server","ClientInstalled","CollectionName"
"W2012A","True","Nabil - Test Collection"
"W2012B","True","Nabil - Test Collection"
1 Server ClientInstalled CollectionName
2 W2012A True Nabil - Test Collection
3 W2012B True Nabil - Test Collection

View File

@@ -0,0 +1,5 @@
 $T = Get-CMDeployment | ? { $_.deploymenttime -gt ((Get-Date).AddDays(-30)) }

View File

@@ -0,0 +1,149 @@
param($Dep_ID)
Get-SCCMSoftwareUpdateStatus -DeploymentID $Dep_ID
function Get-SCCMSoftwareUpdateStatus {
<#
.Synopsis
This will output the device status for the Software Update Deployments within SCCM.
For updated help and examples refer to -Online version.
.DESCRIPTION
This will output the device status for the Software Update Deployments within SCCM.
For updated help and examples refer to -Online version.
.NOTES
Name: Get-SCCMSoftwareUpdateStatus
Author: The Sysadmin Channel
Version: 1.0
DateCreated: 2018-Nov-10
DateUpdated: 2018-Nov-10
.LINK
<a class="vglnk" href="https://thesysadminchannel.com/get-sccm-software-update-status-powershell" rel="nofollow"><span>https</span><span>://</span><span>thesysadminchannel</span><span>.</span><span>com</span><span>/</span><span>get</span><span>-</span><span>sccm</span><span>-</span><span>software</span><span>-</span><span>update</span><span>-</span><span>status</span><span>-</span><span>powershell</span></a> -
.EXAMPLE
For updated help and examples refer to -Online version.
#>
[CmdletBinding()]
param(
[Parameter()]
[switch] $DeploymentIDFromGUI,
[Parameter(Mandatory = $false)]
[Alias('ID', 'AssignmentID')]
[string] $DeploymentID,
[Parameter(Mandatory = $false)]
[ValidateSet('Success', 'InProgress', 'Error', 'Unknown')]
[Alias('Filter')]
[string] $Status
)
BEGIN {
$Site_Code = 'CCX'
$Site_Server = 'PNCRASCCM001'
$HasErrors = $False
if ($Status -eq 'Success') {
$StatusType = 1
}
if ($Status -eq 'InProgress') {
$StatusType = 2
}
if ($Status -eq 'Unknown') {
$StatusType = 4
}
if ($Status -eq 'Error') {
$StatusType = 5
}
}
PROCESS {
try {
if ($DeploymentID -and $DeploymentIDFromGUI) {
Write-Error "Select the DeploymentIDFromGUI or DeploymentID Parameter. Not Both"
$HasErrors = $True
throw
}
if ($DeploymentIDFromGUI) {
$ShellLocation = Get-Location
Import-Module (Join-Path $(Split-Path $env:SMS_ADMIN_UI_PATH) ConfigurationManager.psd1)
#Checking to see if module has been imported. If not abort.
if (Get-Module ConfigurationManager) {
Set-Location "$($Site_Code):\"
$DeploymentID = Get-CMSoftwareUpdateDeployment | select AssignmentID, AssignmentName | Out-GridView -OutputMode Single -Title "Select a Deployment and Click OK" | Select -ExpandProperty AssignmentID
Set-Location $ShellLocation
} else {
Write-Error "The SCCM Module wasn't imported successfully. Aborting."
$HasErrors = $True
throw
}
}
if ($DeploymentID) {
$DeploymentNameWithID = Get-WMIObject -ComputerName $Site_Server -Namespace root\sms\site_$Site_Code -class SMS_SUMDeploymentAssetDetails -Filter "AssignmentID = $DeploymentID" | select AssignmentID, AssignmentName
$DeploymentName = $DeploymentNameWithID.AssignmentName | select -Unique
} else {
Write-Error "A Deployment ID was not specified. Aborting."
$HasErrors = $True
throw
}
if ($Status) {
$Output = Get-WMIObject -ComputerName $Site_Server -Namespace root\sms\site_$Site_Code -class SMS_SUMDeploymentAssetDetails -Filter "AssignmentID = $DeploymentID and StatusType = $StatusType" | `
select DeviceName, CollectionName, @{Name = 'StatusTime'; Expression = {$_.ConvertToDateTime($_.StatusTime) }}, @{Name = 'Status' ; Expression = {if ($_.StatusType -eq 1) {'Success'} elseif ($_.StatusType -eq 2) {'InProgress'} elseif ($_.StatusType -eq 5) {'Error'} elseif ($_.StatusType -eq 4) {'Unknown'} }}
} else {
$Output = Get-WMIObject -ComputerName $Site_Server -Namespace root\sms\site_$Site_Code -class SMS_SUMDeploymentAssetDetails -Filter "AssignmentID = $DeploymentID" | `
select DeviceName, CollectionName, @{Name = 'StatusTime'; Expression = {$_.ConvertToDateTime($_.StatusTime) }}, @{Name = 'Status' ; Expression = {if ($_.StatusType -eq 1) {'Success'} elseif ($_.StatusType -eq 2) {'InProgress'} elseif ($_.StatusType -eq 5) {'Error'} elseif ($_.StatusType -eq 4) {'Unknown'} }}
}
if (-not $Output) {
Write-Error "A Deployment with ID: $($DeploymentID) is not valid. Aborting"
$HasErrors = $True
throw
}
} catch {
} finally {
if (($HasErrors -eq $false) -and ($Output)) {
Write-Output ""
Write-Output "Deployment Name: $DeploymentName"
Write-Output "Deployment ID: $DeploymentID"
Write-Output ""
Write-Output $Output | Sort-Object Status
}
}
}
END {}
}
# $T = Get-SCCMSoftwareUpdateStatus -DeploymentID 16778048
# Get-SCCMSoftwareUpdateStatus -DeploymentIDFromGUI | ? { $_.Assignmentname -like "dsfsdfsd" }
# Get-SCCMSoftwareUpdateStatus -DeploymentIDFromGUI

View File

@@ -0,0 +1,132 @@
$Location1 = Split-Path $MyInvocation.MyCommand.Path -Parent
Function Restart-SCCMSyncCycle {
<#
.Synopsis
Remotely restarts sccm service cycles.
.DESCRIPTION
This function restarts all sccm policies on a remote client so that the client can immediately get any pending software updates or inventory.
.NOTES
Name: Restart-SCCMSyncCycle
Author: theSysadminChannel
Version: 1
DateCreated: 2017-02-09
.LINK
https://thesysadminchannel.com/remotely-restart-sccmsynccycle-using-powershell -
.PARAMETER ComputerName
The computer to which connectivity will be checked
.EXAMPLE
Restart-SCCMSyncCycle -Computername Pactest-1
Description:
Will restart all sccm services on a remote machine.
.EXAMPLE
Restart-SCCMSyncCycle -ComputerName pactest-1, pactest-2, pactest-3
Description:
Will generate a list of installed programs on pactest-1, pactest-2 and pactest-3
#>
[CmdletBinding()]
param(
[Parameter(
ValueFromPipeline=$true,
ValueFromPipelineByPropertyName=$true,
Position=0)]
[string[]] $ComputerName = $env:COMPUTERNAME
)
Foreach ($Computer in $ComputerName ) {
try {
Write-Host "====================================================================="
Write-Output "$Computer : Machine Policy Evaluation Cycle"
Invoke-WMIMethod -ComputerName $Computer -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000022}" -ErrorAction Stop | select -ExpandProperty PSComputerName | Out-Null
Write-Output "$Computer : Application Deployment Evaluation Cycle"
Invoke-WMIMethod -ComputerName $Computer -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000121}" | select -ExpandProperty PSComputerName | Out-Null
# Write-Output "$Computer : Discovery Data Collection Cycle"
# Invoke-WMIMethod -ComputerName $Computer -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000003}" | select -ExpandProperty PSComputerName | Out-Null
# Write-Output "$Computer : File Collection Cycle"
# Invoke-WMIMethod -ComputerName $Computer -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000010}" | select -ExpandProperty PSComputerName | Out-Null
# Write-Output "$Computer : Hardware Inventory Cycle"
# Invoke-WMIMethod -ComputerName $Computer -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000001}" | select -ExpandProperty PSComputerName | Out-Null
Write-Output "$Computer : Machine Policy Retrieval Cycle"
Invoke-WMIMethod -ComputerName $Computer -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000021}" | select -ExpandProperty PSComputerName | Out-Null
Write-Output "$Computer : Software Inventory Cycle"
Invoke-WMIMethod -ComputerName $Computer -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000002}" | select -ExpandProperty PSComputerName | Out-Null
# Write-Output "$Computer : Software Metering Usage Report Cycle"
# Invoke-WMIMethod -ComputerName $Computer -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000031}" | select -ExpandProperty PSComputerName | Out-Null
Write-Output "$Computer : Software Update Deployment Evaluation Cycle"
Invoke-WMIMethod -ComputerName $Computer -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000114}" | select -ExpandProperty PSComputerName | Out-Null
#Write-Output "$Computer : Software Update Scan Cycle"
#Invoke-WMIMethod -ComputerName $Computer -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000113}" | select -ExpandProperty PSComputerName | Out-Null
# Write-Output "$Computer : State Message Refresh"
# Invoke-WMIMethod -ComputerName $Computer -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000111}" | select -ExpandProperty PSComputerName | Out-Null
#Write-Output "$Computer : User Policy Retrieval Cycle"
#Invoke-WMIMethod -ComputerName $Computer -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000026}" | select -ExpandProperty PSComputerName | Out-Null
#Write-Output "$Computer : User Policy Evaluation Cycle"
#Invoke-WMIMethod -ComputerName $Computer -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000027}" | select -ExpandProperty PSComputerName | Out-Null
# Write-Output "$Computer : Windows Installers Source List Update Cycle"
# Invoke-WMIMethod -ComputerName $Computer -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000032}" | select -ExpandProperty PSComputerName | Out-Null
sleep 1
}
catch {
Write-Host $Computer.toUpper() "is not online or Account is locked out" -ForegroundColor:Red
Write-Host
Write-Host
}
}
}
# Restart-SCCMSyncCycle pver001
# Restart-SCCMSyncCycle
# Restart-SCCMSyncCycle $DeviceCollection_ServerNames.name
$Collection_Servers = Import-Csv $Location1\Current-Collection-Servers.csv
Restart-SCCMSyncCycle w2012a,w2012b $Collection_Servers.Server

26
dump/SCCM-Tool/test1.ps1 Normal file
View File

@@ -0,0 +1,26 @@
$NotResponding = @()
$Ping_Result = @()
$Script:DeviceCollection_ServerNames1.Name | % {
$Server = $_
$Obj = New-Object -TypeName PSObject
If (Test-Connection $Server -Count 1 -ErrorAction SilentlyContinue ) {
#Write-Host "Responding:---- $_ " -ForegroundColor Green
#$Script:Output.AppendText("Responding: $_")
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $Server
$Obj | Add-Member -MemberType NoteProperty -Name Responding -Value "Yes"
$Ping_Result += $Obj
}#endIf
Else {
$NotResponding += $Server
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $Server
$Obj | Add-Member -MemberType NoteProperty -Name Responding -Value "No!"
$Ping_Result += $Obj
}
}#end%
$Ping_Result
$NotResponding

View File

@@ -0,0 +1,19 @@
https://www.windows-noob.com/forums/topic/7522-wsus-sync-sccm-error/
deselecting all classifications in SUP (SCCM: Administration/Site/Primary Site/ (Configure Site Components/Softwar Update Point/Classifications/))
Manual Sync in SUP
1) unselect all Classifications in SUP
2) Perform wsusutil reset
3) Perform sync
4) Re add the Classifications.
"wsusutil reset" in WSUS (C:\Program Files\Update Services\Tools)
selecting classification in SUP
Manual Sync in SUP
log: c:\Program Files\Microsoft Configuration Manager\LOgs\wsyncmgr.log

View File

@@ -0,0 +1,127 @@
/******************************************************************************
This sample T-SQL script performs basic maintenance tasks on SUSDB
1. Identifies indexes that are fragmented and defragments them. For certain
tables, a fill-factor is set in order to improve insert performance.
Based on MSDN sample at http://msdn2.microsoft.com/en-us/library/ms188917.aspx
and tailored for SUSDB requirements
2. Updates potentially out-of-date table statistics.
******************************************************************************/
USE SUSDB;
GO
SET NOCOUNT ON;
-- Rebuild or reorganize indexes based on their fragmentation levels
DECLARE @work_to_do TABLE (
objectid int
, indexid int
, pagedensity float
, fragmentation float
, numrows int
)
DECLARE @objectid int;
DECLARE @indexid int;
DECLARE @schemaname nvarchar(130);
DECLARE @objectname nvarchar(130);
DECLARE @indexname nvarchar(130);
DECLARE @numrows int
DECLARE @density float;
DECLARE @fragmentation float;
DECLARE @command nvarchar(4000);
DECLARE @fillfactorset bit
DECLARE @numpages int
-- Select indexes that need to be defragmented based on the following
-- * Page density is low
-- * External fragmentation is high in relation to index size
PRINT 'Estimating fragmentation: Begin. ' + convert(nvarchar, getdate(), 121)
INSERT @work_to_do
SELECT
f.object_id
, index_id
, avg_page_space_used_in_percent
, avg_fragmentation_in_percent
, record_count
FROM
sys.dm_db_index_physical_stats (DB_ID(), NULL, NULL , NULL, 'SAMPLED') AS f
WHERE
(f.avg_page_space_used_in_percent < 85.0 and f.avg_page_space_used_in_percent/100.0 * page_count < page_count - 1)
or (f.page_count > 50 and f.avg_fragmentation_in_percent > 15.0)
or (f.page_count > 10 and f.avg_fragmentation_in_percent > 80.0)
PRINT 'Number of indexes to rebuild: ' + cast(@@ROWCOUNT as nvarchar(20))
PRINT 'Estimating fragmentation: End. ' + convert(nvarchar, getdate(), 121)
SELECT @numpages = sum(ps.used_page_count)
FROM
@work_to_do AS fi
INNER JOIN sys.indexes AS i ON fi.objectid = i.object_id and fi.indexid = i.index_id
INNER JOIN sys.dm_db_partition_stats AS ps on i.object_id = ps.object_id and i.index_id = ps.index_id
-- Declare the cursor for the list of indexes to be processed.
DECLARE curIndexes CURSOR FOR SELECT * FROM @work_to_do
-- Open the cursor.
OPEN curIndexes
-- Loop through the indexes
WHILE (1=1)
BEGIN
FETCH NEXT FROM curIndexes
INTO @objectid, @indexid, @density, @fragmentation, @numrows;
IF @@FETCH_STATUS < 0 BREAK;
SELECT
@objectname = QUOTENAME(o.name)
, @schemaname = QUOTENAME(s.name)
FROM
sys.objects AS o
INNER JOIN sys.schemas as s ON s.schema_id = o.schema_id
WHERE
o.object_id = @objectid;
SELECT
@indexname = QUOTENAME(name)
, @fillfactorset = CASE fill_factor WHEN 0 THEN 0 ELSE 1 END
FROM
sys.indexes
WHERE
object_id = @objectid AND index_id = @indexid;
IF ((@density BETWEEN 75.0 AND 85.0) AND @fillfactorset = 1) OR (@fragmentation < 30.0)
SET @command = N'ALTER INDEX ' + @indexname + N' ON ' + @schemaname + N'.' + @objectname + N' REORGANIZE';
ELSE IF @numrows >= 5000 AND @fillfactorset = 0
SET @command = N'ALTER INDEX ' + @indexname + N' ON ' + @schemaname + N'.' + @objectname + N' REBUILD WITH (FILLFACTOR = 90)';
ELSE
SET @command = N'ALTER INDEX ' + @indexname + N' ON ' + @schemaname + N'.' + @objectname + N' REBUILD';
PRINT convert(nvarchar, getdate(), 121) + N' Executing: ' + @command;
EXEC (@command);
PRINT convert(nvarchar, getdate(), 121) + N' Done.';
END
-- Close and deallocate the cursor.
CLOSE curIndexes;
DEALLOCATE curIndexes;
IF EXISTS (SELECT * FROM @work_to_do)
BEGIN
PRINT 'Estimated number of pages in fragmented indexes: ' + cast(@numpages as nvarchar(20))
SELECT @numpages = @numpages - sum(ps.used_page_count)
FROM
@work_to_do AS fi
INNER JOIN sys.indexes AS i ON fi.objectid = i.object_id and fi.indexid = i.index_id
INNER JOIN sys.dm_db_partition_stats AS ps on i.object_id = ps.object_id and i.index_id = ps.index_id
PRINT 'Estimated number of pages freed: ' + cast(@numpages as nvarchar(20))
END
GO
--Update all statistics
PRINT 'Updating all statistics.' + convert(nvarchar, getdate(), 121)
EXEC sp_updatestats
PRINT 'Done updating statistics.' + convert(nvarchar, getdate(), 121)
GO

24
dump/SCCM-WID-to-SQL.txt Normal file
View File

@@ -0,0 +1,24 @@
Total Updates in WID: 7280
1. Stop-Service WsusService (Validate in Services)
2. Stop Website: WSUS Administration
3. Stop WsusPool
4. Open WID in SSMS(open as Administrator) - Connect to WID Instance: \\.\pipe\MICROSOFT\tsql\query\
5. Detach 'SUSDB' - Choose 'Drop Connections'
6. Copy (SUSDB.mdf & SUSDB_log.ldf ) from the following location to a location in SQL Server (E:\):
- C:\Windows\WID\Data
***********************************************************************
** Done by SQL Team - CAB **
7. From SQL Server - Attach SUSDB.mdf
***********************************************************************
***********************************************************************
8. Run the ReIndex Script on SUSDB on SQL Server
https://gallery.technet.microsoft.com/scriptcenter/6f8cde49-5c52-4abd-9820-f1d270ddea61
9. Goto IIS: Start WsusPool / 'WSUS Administration' Website0
10. Start-Service WsusService
11. Remove-WindowsFeature -name UpdateServices-WidDB
12. Add-WindowsFeature -name UpdateServices-DB
13. Run WsusUtil.exe to point to SQL database: CD "C:\Program Files\Update Services\Tools"
14. .\WsusUtil.exe postinstall SQL_INSTANCE_NAME="PSQL027.ccx.carecentrix.com" CONTENT_DIR="E:\WSUS"

Some files were not shown because too many files have changed in this diff Show More