full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/system/c-sys-02-windows-license.ps1
c-sys-02-windows-license.ps1
<# DESCRIPTION: Check windows is licensed. REQUIRED-INPUTS: None DEFAULT-VALUES: None DEFAULT-STATE: Enabled RESULTS: PASS: Windows is licenced, Port 1688 open to KMS Server {server} WARNING: FAIL: ...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/system/c-sys-16-remote-desktop.ps1
c-sys-16-remote-desktop.ps1
<# DESCRIPTION: Check that remote desktop is enabled and that Network Level Authentication (NLA) is set. REQUIRED-INPUTS: None DEFAULT-VALUES: None DEFAULT-STATE: Enabled RESULTS: PASS: Secure remote desktop and NLA enabled ...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/system/c-sys-10-print-spooler.ps1
c-sys-10-print-spooler.ps1
<# DESCRIPTION: Check to see if any printers exist on the server. If printers exist, ensure the spooler directory is not stored on the system drive. REQUIRED-INPUTS: IgnoreThesePrinterNames - List of known printer names to ignore DEFAULT-VALUES: IgnoreThesePrinterNames = (...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/system/c-sys-07-devices-status.ps1
c-sys-07-devices-status.ps1
<# DESCRIPTION: Checks Device Manager to ensure there are no unknown devices, conflicts or errors. REQUIRED-INPUTS: IgnoreTheseDeviceNames - List of known devices that can be ignored DEFAULT-VALUES: IgnoreTheseDeviceNames = ('') DEFAULT-STATE: Enabl...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/system/c-sys-15-hibernation.ps1
c-sys-15-hibernation.ps1
<# DESCRIPTION: Check hibernation is turned off. REQUIRED-INPUTS: None DEFAULT-VALUES: None DEFAULT-STATE: Enabled RESULTS: PASS: Hibernation is currently disabled WARNING: FAIL: Hibernation is cur...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/hyper-v-host/c-hvh-05-jumbo-frames.ps1
c-hvh-05-jumbo-frames.ps1
<# DESCRIPTION: Check the network adapter jumbo frame setting. Should be set to 9000 or more. REQUIRED-INPUTS: IgnoreTheseAdapters - List of adapters to ignore this setting for DEFAULT-VALUES: IgnoreTheseAdapters = ('') DEFAULT-STATE: Enabled RESULT...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/hyper-v-host/c-hvh-06-generation-type.ps1
c-hvh-06-generation-type.ps1
<# DESCRIPTION: Check that all Windows 2012+ VMs are built as generation 2 VMs REQUIRED-INPUTS: None DEFAULT-VALUES: None DEFAULT-STATE: Enabled RESULTS: PASS: All VMs are the correct generation type WARNING: ...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/hyper-v-host/c-hvh-03-vm-location.ps1
c-hvh-03-vm-location.ps1
<# DESCRIPTION: Check all VMs are running from a non-system drive. REQUIRED-INPUTS: None DEFAULT-VALUES: None DEFAULT-STATE: Enabled RESULTS: PASS: No virtual machines are using the system drive WARNING: FAIL: ...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/hyper-v-host/c-hvh-02-no-other-server-roles.ps1
c-hvh-02-no-other-server-roles.ps1
<# DESCRIPTION: Check Hyper-V is the only one installed. See this list for IDs: https://msdn.microsoft.com/en-us/library/cc280268(v=vs.85).aspx REQUIRED-INPUTS: IgnoreTheseRoleIDs - List of IDs that can be ignored|Integer DEFAULT-VALUES: IgnoreTheseRoleIDs = ('20', '33', ...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/hyper-v-host/c-hvh-01-server-core.ps1
c-hvh-01-server-core.ps1
<# DESCRIPTION: Check Hyper-V is installed on Windows Server Core. REQUIRED-INPUTS: None DEFAULT-VALUES: None DEFAULT-STATE: Enabled RESULTS: PASS: Hyper-V is using Windows Server Core WARNING: FAIL: ...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/hyper-v-host/c-hvh-04-integration-services.ps1
c-hvh-04-integration-services.ps1
<# DESCRIPTION: Check the version of the Integration Services installed on all VMs REQUIRED-INPUTS: None DEFAULT-VALUES: None DEFAULT-STATE: Enabled RESULTS: PASS: All VMs are up to date WARNING: FAIL: ...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/regional/c-reg-03-location.ps1
c-reg-03-location.ps1
<# DESCRIPTION: Ensure the Region and Language > Location is set correctly. Default setting is "United Kingdom". REQUIRED-INPUTS: DefaultLocation - Regional string name DEFAULT-VALUES: DefaultLocation = 'United Kingdom' DEFAULT-STATE: Enabled RESULT...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/regional/c-reg-04-language.ps1
c-reg-04-language.ps1
<# DESCRIPTION: Ensure the Region and Language > keyboard and Languages is set correctly. Default setting is "English (United Kingdom)". REQUIRED-INPUTS: DefaultLanguage - Numerical value of the correct keyboard to use DEFAULT-VALUES: DefaultLanguage = '00000809' D...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/regional/c-reg-01-local-time.ps1
c-reg-01-local-time.ps1
<# DESCRIPTION: Check that the server time is correct. If a valid source is used, the time is also checked against that source. Maximum time difference allowed is 10 seconds, any longer and the check fails. REQUIRED-INPUTS: None DEFAULT-VALUES: None DEFAUL...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/regional/c-reg-02-timezone.ps1
c-reg-02-timezone.ps1
<# DESCRIPTION: Check that the server timezone is correct. Default setting is "(GMT) Greenwich Mean Time : Dublin, Edinburgh, Lisbon, London" For Windows 2003, check is "(UTC) Dublin, Edinburgh, Lisbon, London" REQUIRED-INPUTS: TimeZoneNames - List of time zone strings to check ...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/drives/c-drv-04-cd-dvd-drive.ps1
c-drv-04-cd-dvd-drive.ps1
<# DESCRIPTION: If a CD/DVD drive is present on the server confirm it is configured as "R:". REQUIRED-INPUTS: DVDDriveLetter - Drive letter of the CD/DVD drive DEFAULT-VALUES: DVDDriveLetter = 'R:' DEFAULT-STATE: Enabled RESULTS: PASS: ...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/drives/c-drv-07-disk-management-agent.ps1
c-drv-07-disk-management-agent.ps1
<# DESCRIPTION: Check local disk array management agent is installed on the server. This only checks that known software is installed. A manual check must be done to ensure it is configured correctly. REQUIRED-INPUTS: ProductNames - List of sofware to check if installed D...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/drives/c-drv-08-drive-ntfs-format.ps1
c-drv-08-drive-ntfs-format.ps1
<# DESCRIPTION: Ensure all drives are formatted as NTFS. REQUIRED-INPUTS: None DEFAULT-VALUES: None DEFAULT-STATE: Enabled RESULTS: PASS: All drives are formatted as NTFS WARNING: FAIL: One or more...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/drives/c-drv-01-system-drive-size.ps1
c-drv-01-system-drive-size.ps1
<# DESCRIPTION: Check the system drive is a minimum size of 50gb for Windows 2008+ servers (some are reporting 49gb). REQUIRED-INPUTS: MinimumSystemDriveSize - Minimum size of the system drive|Integer DEFAULT-VALUES: MinimumSystemDriveSize = '49' DEFAULT-STA...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/drives/c-drv-06-san-storage.ps1
c-drv-06-san-storage.ps1
<# DESCRIPTION: Where SAN storage is used, ensure multipathing software is installed and Dual Paths are present and functioning. This only checks that known software is installed. A manual check must be done to ensure it is configured correctly. REQUIRED-INPUTS: ProductNames - L...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/drives/c-drv-03-pagefile-size-location.ps1
c-drv-03-pagefile-size-location.ps1
<# DESCRIPTION: Check the page file is located on the system drive and is a fixed size. The default setting is 4096MB (4GB). If the page file is larger a document detailing the tuning process used must exist and should follow Microsoft best tuning practices (http://support.microsoft.com/kb/2021...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/drives/c-drv-09-partition-type.ps1
c-drv-09-partition-type.ps1
<# DESCRIPTION: Ensure all drives types are set to BASIC and with a partition style of MBR. REQUIRED-INPUTS: IgnoreOffline - "True|False" - Ignore any drives that are marked as offline DEFAULT-VALUES: IgnoreOffline = 'True' DEFAULT-STATE: Enabled RESULTS: ...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/drives/c-drv-05-shared-folders.ps1
c-drv-05-shared-folders.ps1
<# DESCRIPTION: Check shared folders to ensure no additional shares are present. Shared folders should be documented with a designated team specified as the owner. REQUIRED-INPUTS: IgnoreTheseShares - List of share names that can be ignored DEFAULT-VALUES: IgnoreTheseShar...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/drives/c-drv-02-min-drive-freespace.ps1
c-drv-02-min-drive-freespace.ps1
<# DESCRIPTION: Ensure all drives have a minimum amount of free space. Measured as a percentage. REQUIRED-INPUTS: IgnoreTheseDrives - List of drive letters to ignore MinimumDrivePercentFree - Minimum free space available on each drive as a percentage|Integer DEFAULT...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/accounts/c-acc-01-local-users.ps1
c-acc-01-local-users.ps1
<# DESCRIPTION: Check all local users to ensure that no non-standard accounts exist. Unless the server is not in a domain, there should be no additional user accounts. Example standard accounts include "ASPNET", "__VMware" REQUIRED-INPUTS: IgnoreTheseUsers - List of know user or...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/accounts/c-acc-07-builtin-group-members-1.ps1
c-acc-07-builtin-group-members-1.ps1
<# DESCRIPTION: Checks the builtin group memberships to make sure specific users or groups are members. If there is only one entry in "GroupMembers", then "AllMustExist" will be set to "TRUE". !nThis is check 1 of 3 that can be used to check different groups. REQUIRED-INPUTS: Al...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/accounts/c-acc-04-local-groups.ps1
c-acc-04-local-groups.ps1
<# DESCRIPTION: Check all local groups and ensure no additional groups exist. If there is a specific application requirement for local groups then these need to be documented with a designated team specified as the owner. If you use specific role groups, make sure they are excluded in the settin...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/accounts/c-acc-02-local-account-names.ps1
c-acc-02-local-account-names.ps1
<# DESCRIPTION: Checks to see if the default local "Administrator" and "Guest" accounts have been renamed. REQUIRED-INPUTS: InvalidAdminNames - List of names that should not be used DEFAULT-VALUES: InvalidAdminNames = ('Administrator', 'Admin', 'Guest', 'Guest1') DE...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/accounts/c-acc-03-local-admins.ps1
c-acc-03-local-admins.ps1
<# DESCRIPTION: Check the local administrators group to ensure no non-standard accounts exist. If there is a specific application requirement for local administration access then these need to be well documented. REQUIRED-INPUTS: IgnoreTheseUsers - List of know user or groups acc...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/accounts/c-acc-08-builtin-group-members-2.ps1
c-acc-08-builtin-group-members-2.ps1
<# DESCRIPTION: Checks the builtin group memberships to make sure specific users or groups are members. If there is only one entry in "GroupMembers", then "AllMustExist" will be set to "TRUE". !nThis is check 2 of 3 that can be used to check different groups. REQUIRED-INPUTS: Al...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/accounts/c-acc-05-service-logon-accounts.ps1
c-acc-05-service-logon-accounts.ps1
<# DESCRIPTION: Checks all services to ensure no user accounts are assigned. If specific application service accounts are required then they should be domain level accounts (not local) and restricted from interactice access by policy. REQUIRED-INPUTS: IgnoreTheseUsers - List of k...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/accounts/c-acc-09-builtin-group-members-3.ps1
c-acc-09-builtin-group-members-3.ps1
<# DESCRIPTION: Checks the builtin group memberships to make sure specific users or groups are members. If there is only one entry in "GroupMembers", then "AllMustExist" will be set to "TRUE". !nThis is check 3 of 3 that can be used to check different groups. REQUIRED-INPUTS: Al...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/accounts/c-acc-06-guest-account.ps1
c-acc-06-guest-account.ps1
<# DESCRIPTION: Checks to make sure that the guest user account has been disabled. The guest account is located via the well known SID. REQUIRED-INPUTS: None DEFAULT-VALUES: None DEFAULT-STATE: Enabled RESULTS: PASS: Guest acco...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/virtual-hyv/c-vhv-01-tools-version.ps1
c-vhv-01-tools-version.ps1
<# DESCRIPTION: Check that the latest HyperV integration services are installed. REQUIRED-INPUTS: None DEFAULT-VALUES: None DEFAULT-STATE: Enabled RESULTS: PASS: WARNING: FAIL: Integration services not inst...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/security/c-sec-12-smb-signing-on.ps1
c-sec-12-smb-signing-on.ps1
<# DESCRIPTION: Ensure SMB signing is turned on. REQUIRED-INPUTS: None DEFAULT-VALUES: None DEFAULT-STATE: Enabled RESULTS: PASS: SMB Signing configured correctly WARNING: FAIL: SMB Signing not co...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/security/c-sec-03-schannel-p3-keyexchangealgorithms.ps1
c-sec-03-schannel-p3-keyexchangealgorithms.ps1
<# DESCRIPTION: Ensure key exchange algorithms are set correctly. Settings taken from https://www.nartac.com/Products/IISCrypto/Default.aspx using "Best Practices/FIPS 140-2" settings. REQUIRED-INPUTS: KeyExchangeAlgorithms - List of Key Exchange Algorithms that should be used DEFA...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/security/c-sec-16-open-ports.ps1
c-sec-16-open-ports.ps1
<# DESCRIPTION: Returns a list of ports that are open, excluding anything lower than 1024 and within the dynamic port range. Will also exclude other well known ports. !nIMPORTANT: THIS WORKS FOR LOCAL SERVERS ONLY REQUIRED-INPUTS: IgnoreThesePorts - List of port numbers to ignor...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/security/c-sec-14-firewall-rules.ps1
c-sec-14-firewall-rules.ps1
<# DESCRIPTION: Checks to see if there are any addional firewall rules, and warns if there are any. This ignores all default pre-configured rules, and netbackup ports rules (1556, 13724). REQUIRED-INPUTS: IgnoreTheseFirewallAppRules - List of known firewall rules to ignore DEFAULT...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/security/c-sec-07-reject-enumerate-shares.ps1
c-sec-07-reject-enumerate-shares.ps1
<# DESCRIPTION: Ensure the system is set to reject attempts to enumerate shares in the SAM by anonymous users. REQUIRED-INPUTS: None DEFAULT-VALUES: None DEFAULT-STATE: Enabled RESULTS: PASS: Reject annonymous share enumeration...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/security/c-sec-15-firewall-state.ps1
c-sec-15-firewall-state.ps1
<# DESCRIPTION: Check if Windows firewall is enabled or disabled for each of the three profiles. Set to "0" for off, and "1" for on REQUIRED-INPUTS: DomainProfile - "0|1" - Domain firewall state (enabled / disabled) PublicProfile - "0|1" - Public firewall state (enabled / di...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/security/c-sec-17-smb1-disabled.ps1
c-sec-17-smb1-disabled.ps1
<# DESCRIPTION: Ensure SMBv1 is disabled. REQUIRED-INPUTS: None DEFAULT-VALUES: None DEFAULT-STATE: Enabled RESULTS: PASS: SMBv1 is disabled WARNING: FAIL: SMBv1 is enabled Registry s...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/security/c-sec-01-schannel-p1-ciphers.ps1
c-sec-01-schannel-p1-ciphers.ps1
<# DESCRIPTION: Ensure security ciphers are set correctly. Settings taken from https://www.nartac.com/Products/IISCrypto/Default.aspx using "Best Practices/FIPS 140-2" settings. REQUIRED-INPUTS: EnabledCiphers - List of Ciphers that should be enabled DisabledCiphers - List of C...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/security/c-sec-08-domain-credential-caching.ps1
c-sec-08-domain-credential-caching.ps1
<# DESCRIPTION: Check system is not caching domain credentials. REQUIRED-INPUTS: None DEFAULT-VALUES: None DEFAULT-STATE: Enabled RESULTS: PASS: Domain credential caching is disabled WARNING: FAIL: ...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/security/c-sec-09-request-admin-elevated.ps1
c-sec-09-request-admin-elevated.ps1
<# DESCRIPTION: Ensure the system is set to request administrative credentials before granting an application elevated privileges. Default setting is either "(1):Prompt for credentials on the secure desktop" or "(3):Prompt for credentials" Values and meanings can be seen here - https:/...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/security/c-sec-02-schannel-p2-hashes.ps1
c-sec-02-schannel-p2-hashes.ps1
<# DESCRIPTION: Ensure hashes are set correctly. Settings taken from https://www.nartac.com/Products/IISCrypto/Default.aspx using "Best Practices/FIPS 140-2" settings. REQUIRED-INPUTS: EnabledHashes - List of hashes that should be enabled DisabledHashes - List of hashes that sh...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/security/c-sec-06-reject-enumerate-accounts.ps1
c-sec-06-reject-enumerate-accounts.ps1
<# DESCRIPTION: Ensure the system is set to reject attempts to enumerate accounts in the SAM by anonymous users. REQUIRED-INPUTS: None DEFAULT-VALUES: None DEFAULT-STATE: Enabled RESULTS: PASS: Reject annonymous account enumerat...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/security/c-sec-10-anonymous-pipe-share-access.ps1
c-sec-10-anonymous-pipe-share-access.ps1
<# DESCRIPTION: Ensure the system is set to restrict anonymous access to named pipes REQUIRED-INPUTS: None DEFAULT-VALUES: None DEFAULT-STATE: Enabled RESULTS: PASS: Restrict annonymous pipe/share access is enabled WARN...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/security/c-sec-11-iis-default-page.ps1
c-sec-11-iis-default-page.ps1
<# DESCRIPTION: Checks to see if the default webpage is present in IIS, it should be removed. REQUIRED-INPUTS: None DEFAULT-VALUES: None DEFAULT-STATE: Enabled RESULTS: PASS: IIS Installed, "iisstart.htm" not listed in default d...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/security/c-sec-05-schannel-p5-cipher-order.ps1
c-sec-05-schannel-p5-cipher-order.ps1
<# DESCRIPTION: Ensure the security cipher order is set correctly. Settings taken from https://www.nartac.com/Products/IISCrypto/Default.aspx using "Best Practices/FIPS 140-2" settings. REQUIRED-INPUTS: CipherSuiteOrder - "LARGE" - Single comma seperated string list of cipher suites in t...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/security/c-sec-13-rsa-authentication.ps1
c-sec-13-rsa-authentication.ps1
<# DESCRIPTION: If server is Domain Controller or a Terminal Server ensure RSA authentication manager is installed and PIN is required to access server. REQUIRED-INPUTS: ProductNames - List of product names to search for DEFAULT-VALUES: ProductNames = ('RSA Authentication ...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/security/c-sec-04-schannel-p4-protocols.ps1
c-sec-04-schannel-p4-protocols.ps1
<# DESCRIPTION: Ensure protocols are set correctly. Settings taken from https://www.nartac.com/Products/IISCrypto/Default.aspx using "Best Practices/FIPS 140-2" settings. REQUIRED-INPUTS: DisabledProtocols - List of protocols that should be disabled DEFAULT-VALUES: Disabl...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/network/c-net-06-network-agent.ps1
c-net-06-network-agent.ps1
<# DESCRIPTION: Check local network management agent is installed on the server. This only checks that known software is installed. REQUIRED-INPUTS: ProductNames - List of software to check if installed DEFAULT-VALUES: ProductNames = ('HP Network Config Utility', 'Broadcom...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/network/c-net-08-management-adapter.ps1
c-net-08-management-adapter.ps1
<# DESCRIPTION: Check that a management network adapter exists. This must always be present on a server and labelled correctly. REQUIRED-INPUTS: ManagementAdapterNames - List of names or partial names of Management network adapters DEFAULT-VALUES: ManagementAdapterNames =...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/network/c-net-12-fileprint-services.ps1
c-net-12-fileprint-services.ps1
<# DESCRIPTION: Check that File And Print Services has been disabled on all adapters, except for those specified. REQUIRED-INPUTS: IgnoreTheseAdapters - List of names or partial names of network adapters to ignore DEFAULT-VALUES: IgnoreTheseAdapters = ('Production', 'PROD'...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/network/c-net-02-unused-network-interfaces.ps1
c-net-02-unused-network-interfaces.ps1
<# DESCRIPTION: Check there are no unused Network interfaces on the server. We define "not in use" by showing any ENABLED NICs that are set to DHCP. All NICs should have a statically assigned IP address. REQUIRED-INPUTS: None DEFAULT-VALUES: None DEFAULT-S...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/network/c-net-09-static-routes.ps1
c-net-09-static-routes.ps1
<# DESCRIPTION: Checks to make sure the specified static routes have been added. Add routes to check as: StaticRoute01 = ("source", "mask", "gateway"). To check for no extra persistent routes, use: StaticRoute01 = ("None", "", ""). Up to 99 routes can be checked. You must edit the sett...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/network/c-net-10-power-management.ps1
c-net-10-power-management.ps1
<# DESCRIPTION: Check network interfaces have their power management switch disabled. REQUIRED-INPUTS: None DEFAULT-VALUES: None DEFAULT-STATE: Enabled RESULTS: PASS: All adapters have power saving disabled WARN...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/network/c-net-11-dns-settings.ps1
c-net-11-dns-settings.ps1
<# DESCRIPTION: Checks that all DNS servers are configured, and if required, in the right order. REQUIRED-INPUTS: DNSServers - List of DNS IP addresses that you want to check|IPv4 OrderSpecific - "True|False" - Should the DNS order match exactly for a Pass.? If the number of ...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/network/c-net-07-network-teaming.ps1
c-net-07-network-teaming.ps1
<# DESCRIPTION: Check network interfaces for known teaming names, manually check they are configured correctly. Fail if no teams found or if server is a virtual. Checked configuration is: Teaming Mode: "Static Independent"; Load Balancing Mode: "Address Hash"; Standby Adapter: (set). ...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/network/c-net-01-ipv6-status.ps1
c-net-01-ipv6-status.ps1
<# DESCRIPTION: Check the global IPv6 setting and of status of each NIC. REQUIRED-INPUTS: IPv6State - "Enabled|Disabled" - State of the IPv6 protocol for each network adapter DEFAULT-VALUES: IPv6State = 'Disabled' DEFAULT-STATE: Enabled RESULTS: ...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/network/c-net-05-network-speed-duplex.ps1
c-net-05-network-speed-duplex.ps1
<# DESCRIPTION: Check the network adapter speed and duplex settings. Should be set to "Full Duplex" and "Auto". REQUIRED-INPUTS: None DEFAULT-VALUES: None DEFAULT-STATE: Enabled RESULTS: PASS: All network adapters configured co...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/network/c-net-04-binding-order.ps1
c-net-04-binding-order.ps1
<# DESCRIPTION: Check binding order is set correctly for "Production" as the primary network adapter then as applicable for other interfaces. If no "Production" adapter is found, then "Management" should be first. REQUIRED-INPUTS: ManagementAdapterNames - List of names or partial...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/network/c-net-03-network-adapter-labels.ps1
c-net-03-network-adapter-labels.ps1
<# DESCRIPTION: Check network interfaces are labelled so their purpose is easily identifiable. FAIL if any adapter names are "Local Area Connection x" or "Ethernet x". REQUIRED-INPUTS: None DEFAULT-VALUES: None DEFAULT-STATE: Enabled RESULTS: ...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/virtual-vmw/c-vmw-01-tools-version.ps1
c-vmw-01-tools-version.ps1
<# DESCRIPTION: Check that the latest vmware tools are installed. REQUIRED-INPUTS: None DEFAULT-VALUES: None DEFAULT-STATE: Enabled RESULTS: PASS: VMware tools are up to date WARNING: FAIL: VMware ...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/virtual-vmw/c-vmw-06-total-vm-size.ps1
c-vmw-06-total-vm-size.ps1
<# DESCRIPTION: Checks to see if the total VM size is less than 1TB. REQUIRED-INPUTS: None DEFAULT-VALUES: None DEFAULT-STATE: Enabled RESULTS: PASS: VM is smaller than 1TB WARNING: VM is larger than 1TB. ...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/virtual-vmw/c-vmw-09-check-vosot-services-tasks.ps1
c-vmw-09-check-vosot-services-tasks.ps1
<# DESCRIPTION: Checks against a specified VMware OS Optimisation Template. Services and scheduled task setting specific checks only. !nNote: This is an experimental check REQUIRED-INPUTS: vosotXmlFile - Local path to the confoguration XML file for VMware OSOT|File DEFAUL...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/virtual-vmw/c-vmw-08-check-vosot-registry.ps1
c-vmw-08-check-vosot-registry.ps1
<# DESCRIPTION: Checks against a specified VMware OS Optimisation Template. Registry setting specific checks only. !nNote: This is an experimental check REQUIRED-INPUTS: vosotXmlFile - Local path to the confoguration XML file for VMware OSOT|File DEFAULT-VALUES: ...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/virtual-vmw/c-vmw-05-scsi-drive-count.ps1
c-vmw-05-scsi-drive-count.ps1
<# DESCRIPTION: Checks to see if there are are more than 8 drives attached to the same SCSI adapter. REQUIRED-INPUTS: None DEFAULT-VALUES: None DEFAULT-STATE: Enabled RESULTS: PASS: More than 7 drives exist, but on diffe...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/virtual-vmw/c-vmw-07-cd-dvd-floppy-mounted.ps1
c-vmw-07-cd-dvd-floppy-mounted.ps1
<# DESCRIPTION: Checks for any mounted CD/DVD or floppy drives. REQUIRED-INPUTS: None DEFAULT-VALUES: None DEFAULT-STATE: Enabled RESULTS: PASS: No CD/ROM or floppy drives are mounted WARNING: FAIL: ...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/virtual-vmw/c-vmw-03-nic-type.ps1
c-vmw-03-nic-type.ps1
<# DESCRIPTION: Check all virtual servers have network cards that are configured as VMXNET3. REQUIRED-INPUTS: None DEFAULT-VALUES: None DEFAULT-STATE: Enabled RESULTS: PASS: All active NICS configured correctly WARNING:...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/virtual-vmw/c-vmw-02-time-sync.ps1
c-vmw-02-time-sync.ps1
<# DESCRIPTION: Check that VMware Host Time Sync is disabled. REQUIRED-INPUTS: None DEFAULT-VALUES: None DEFAULT-STATE: Enabled RESULTS: PASS: VMware tools time sync is disabled WARNING: FAIL: VMwa...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/virtual-vmw/c-vmw-04-lsi-sas-controller.ps1
c-vmw-04-lsi-sas-controller.ps1
<# DESCRIPTION: Check Windows disk controller is set correctly. Default setting is "LSI logic SAS". REQUIRED-INPUTS: DiskControllerDeviceType - VMware ESX default disk controller name IgnoreTheseControllerTypes - List of controller types to ignore DEFAULT-VALUES: ...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/compliance/c-com-03-sccm-installed.ps1
c-com-03-sccm-installed.ps1
<# DESCRIPTION: Check relevant SCCM agent process is running, and that the correct port is open to the management server. REQUIRED-INPUTS: None DEFAULT-VALUES: None DEFAULT-STATE: Enabled RESULTS: PASS: SCCM agent found, port {p...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/compliance/c-com-05-last-patch-date.ps1
c-com-05-last-patch-date.ps1
<# DESCRIPTION: Check server is compliant with patch policy (must be patched to latest released patch level for this customer). Check date of last patch and return WARNING if not within specified number of days, and FAIL if not within number of days *2. REQUIRED-INPUTS: MaximumLa...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/compliance/c-com-08-bladelogic-agent-installed.ps1
c-com-08-bladelogic-agent-installed.ps1
<# DESCRIPTION: Check BladeLogic monitoring agent is installed, and that the correct port is listening. Also check that the USERS.LOCAL file is configured correctly. REQUIRED-INPUTS: ListeningPort - Port number that the agent listens on|Integer CustomerCode - Customer n...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/compliance/c-com-07-sentinel-agent-installed.ps1
c-com-07-sentinel-agent-installed.ps1
<# DESCRIPTION: Check sentinel monitoring agent is installed, and that the correct port is open to the management server. REQUIRED-INPUTS: None DEFAULT-VALUES: None DEFAULT-STATE: Skip RESULTS: PASS: Sentinel agent found, port {...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/compliance/c-com-04-netbackup-agent-installed.ps1
c-com-04-netbackup-agent-installed.ps1
<# DESCRIPTION: Check NetBackup agent is installed and that the correct port is open to the management server. Only applies to physical servers, or virtual servers with a list of known software installed. REQUIRED-INPUTS: ProductName - Full name of the product to look for...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/compliance/c-com-01-mcafee-antivirus-installed.ps1
c-com-01-mcafee-antivirus-installed.ps1
<# DESCRIPTION: Check that McAfee anti-virus is installed and virus definitions are up to date. REQUIRED-INPUTS: MaximumDATAgeAllowed - Maximum number of days that DATs are allowed to be out of date|Integer ProductName - Full name of the McAfee product ProductVe...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/compliance/c-com-06-wsus-server.ps1
c-com-06-wsus-server.ps1
<# DESCRIPTION: Check that a WSUS server has been specified and that the correct port is open to the management server. REQUIRED-INPUTS: None DEFAULT-VALUES: None DEFAULT-STATE: Enabled RESULTS: PASS: WSUS server configured, por...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/compliance/c-com-02-scom-monitoring-installed.ps1
c-com-02-scom-monitoring-installed.ps1
<# DESCRIPTION: Check relevant monitoring tool agent is installed and that the correct port is open to the management server. REQUIRED-INPUTS: ProductNames - List of SCOM agent product names to search for DEFAULT-VALUES: ProductNames = ('Microsoft Monitoring Agent', 'Syste...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/checks/compliance/c-com-09-trend-antivirus-installed.ps1
c-com-09-trend-antivirus-installed.ps1
<# DESCRIPTION: Check that Trend anti-virus is installed and virus definitions are up to date. REQUIRED-INPUTS: MaximumDATAgeAllowed - Maximum number of days that DATs are allowed to be out of date|Integer ProductName - Full name of the Trend product ProductVers...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/engine/Main-EngineRS.ps1
Main-EngineRS.ps1
Function Show-HelpScreen { Clear-Host Write-Header -Message $($script:lang['Help_01']) -Width $script:screenwidth Write-Host ' '$($script:lang['Help_02']) -ForegroundColor Cyan Write-Colr ' QA.ps1 [-ComputerName] ','server01','[, server02, server03, ...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/engine/Check-VMware.ps1
Check-VMware.ps1
Function Check-VMware { Param ([string]$ServerName) $wmiBIOS = Get-WmiObject -ComputerName $ServerName -Class Win32_BIOS -Namespace ROOT\Cimv2 -ErrorAction Stop | Select-Object SerialNumber If ($wmiBIOS.SerialNumber -like '*VMware*') { Return $true } Else { Return $false } }
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/engine/Check-TerminalServer.ps1
Check-TerminalServer.ps1
Function Check-TerminalServer { Param ([string]$ServerName) Try { If ((Check-NameSpace -serverName $ServerName -namespace 'ROOT\Cimv2\TerminalServices' -ErrorAction Stop) -eq $true) { If ((Get-WmiObject -ComputerName $ServerName -Namespace ROOT\Cimv2\TerminalServices -List 'Win32_Termin...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/engine/Check-HyperV.ps1
Check-HyperV.ps1
Function Check-HyperV { Param ([string]$ServerName) $wmiBIOS = Get-WmiObject -ComputerName $ServerName -Class Win32_BaseBoard -Namespace ROOT\Cimv2 -ErrorAction Stop | Select-Object Product If ($wmiBIOS.Product -eq 'Virtual Machine') { Return $true } Else { Return $false } }
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/engine/Check-Port.ps1
Check-Port.ps1
Function Check-Port { Param ([string]$ServerName, [string]$Port) Try { $tcp = New-Object System.Net.Sockets.TcpClient $con = $tcp.BeginConnect($ServerName, $port, $null, $null) $wait = $con.AsyncWaitHandle.WaitOne(3000, $false) If (-not $wait) { $tcp.Close(); Return $f...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/engine/Check-DomainController.ps1
Check-DomainController.ps1
Function Check-DomainController { Param ([string]$ServerName) Try { $query = "SELECT DomainRole FROM Win32_ComputerSystem" $check = Get-WmiObject -ComputerName $ServerName -Query $query -Namespace ROOT\Cimv2 -ErrorAction Stop | Select-Object DomainRole If ($check.DomainRole -eq 4 -...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/engine/Check-NameSpace.ps1
Check-NameSpace.ps1
Function Check-NameSpace { Param ([string]$ServerName, [string]$NameSpace) $NameSpace = $NameSpace.Trim('\') ForEach ($leaf In $NameSpace.Split('\')) { [string]$path += $leaf + '\' Try { [string]$wmio = Get-WmiObject -ComputerName $ServerName -Namespace $path.TrimEnd('\') -Class '__Nam...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/engine/Check-Software.ps1
Check-Software.ps1
$script:appSettings['Win32_Product'] = 'Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall' Function Check-Software { Param ([string]$ServerName, [string]$DisplayName) Try { $reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine', $serverName) $regKey = $reg.Ope...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/engine/Process-Start.ps1
Process-Start.ps1
Function Process-Start ([string]$FilePath, [string]$Arguments) { Try { $Info = New-Object System.Diagnostics.ProcessStartInfo $Process = New-Object System.Diagnostics.Process $Info.FileName = $FilePath $Info.RedirectStandardError = $true $Info....
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/engine/Main-Engine.ps1
Main-Engine.ps1
Function Show-HelpScreen { Clear-Host Write-Header -Message $($script:lang['Help_01']) -Width $script:screenwidth Write-Host ' '$($script:lang['Help_02']) -ForegroundColor Cyan Write-Colr ' QA.ps1 [-ComputerName] ','server01','[, server02, server03, ...
PowerShellCorpus/Github/My-Random-Thoughts_Server-QA-Checks/i18n/en-gb_help.ps1
en-gb_help.ps1
$script:qahelp['acc01']='<xml><description>Check all local users to ensure that no non-standard accounts exist. Unless the server is not in a domain, there should be no additional user accounts.Example standard accounts include "ASPNET", "__VMware"</description><requiredinputs>IgnoreTheseUsers - List of know user or g...
PowerShellCorpus/Github/ChrisBirmele_LabArtifacts/Artifacts/CreateFileStructure/createFolder.ps1
createFolder.ps1
# parameters $path = 'c:\PowerShell Scripts' $file = 'newFile.txt' $value = "Hi there, this is an autogenerated artifact!" # create path and file $null = New-Item -Path $path -ItemType Directory -force New-Item -Path $path -Name $file -ItemType File -force -value $value
PowerShellCorpus/Github/rajivharris_WindowsPowershell/Microsoft.PowerShell_profile.ps1
Microsoft.PowerShell_profile.ps1
<# .SYNOPSIS Microsoft.PowerShell_profile.ps1 - My PowerShell profile .DESCRIPTION Microsoft.PowerShell_profile - Customizes the PowerShell console .NOTES File Name : Microsoft.PowerShell_profile.ps1 Author : Rajivkumar Ashokan #> # ahh yes... this would be so nice if it was a built ...
PowerShellCorpus/Github/rajivharris_WindowsPowershell/functions/Tail.ps1
Tail.ps1
function Tail ($file) { Get-Content $file -Wait }
PowerShellCorpus/Github/rajivharris_WindowsPowershell/functions/Get-EnvPath.ps1
Get-EnvPath.ps1
function Get-EnvPath{ $env:Path -split ';'; }
PowerShellCorpus/Github/rajivharris_WindowsPowershell/functions/ll.ps1
ll.ps1
function ll { param ($dir = ".", $all = $false) $origFg = $Host.UI.RawUI.ForegroundColor if ( $all ) { $toList = Get-ChildItem -force $dir } else { $toList = Get-ChildItem $dir } foreach ($Item in $toList) { Switch ($Item.Extension) { ".exe" {$Host.UI....
PowerShellCorpus/Github/rajivharris_WindowsPowershell/functions/Test-Port.ps1
Test-Port.ps1
function Test-Port { [cmdletbinding()] param( [parameter(mandatory=$true)] [string]$Target, [parameter(mandatory=$true)] [int32]$Port, [int32]$Timeout=2000 ) $outputobj=New-Object -TypeName PSobject $outputobj | Add-Member -MemberType NoteProperty -N...
PowerShellCorpus/Github/rajivharris_WindowsPowershell/functions/Edit-HostsFile.ps1
Edit-HostsFile.ps1
function Edit-HostsFile { Start-Process -FilePath code -ArgumentList "$env:windir\system32\drivers\etc\hosts" }
PowerShellCorpus/Github/rajivharris_WindowsPowershell/functions/prompt.ps1
prompt.ps1
# prompt customization #helper function function Get-Time { return $(Get-Date | ForEach-Object {$_.ToLongTimeString()}) } # This is function is called by convention in PowerShell function prompt { Write-Host $(Get-Time) -n -f Green Write-Host " " -n #write-host (" "+[net.dns]::GetHostName() +" ") -...