This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # 5. Create the client MOFs | |
| # https://github.com/PowerShell/AuditPolicyDsc | |
| Configuration AuditPolicyCsv { | |
| param ( | |
| [String] $NodeName = 'SVR' | |
| ) | |
| Import-DscResource -ModuleName AuditPolicyDsc | |
| Node $NodeName { | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # 4. Configure the Pull Server | |
| Configuration DscPullServer { | |
| param ( | |
| [string[]]$NodeName = 'localhost', | |
| [ValidateNotNullOrEmpty()] | |
| [string] $certificateThumbPrint, | |
| [Parameter(Mandatory)] | |
| [ValidateNotNullOrEmpty()] | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # Code Source: http://duffney.io/Configure-HTTPS-DSC-PullServerPSv5 | |
| $inf = @" | |
| [Version] | |
| Signature="`$Windows NT`$" | |
| [NewRequest] | |
| Subject = "CN=DC, OU=IT, O=Signalwarrant, L=Augusta, S=SE, C=US" | |
| KeySpec = 1 | |
| KeyLength = 2048 | |
| Exportable = TRUE | |
| FriendlyName = PSDSCPullServerCert | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # Selecting | |
| #Default | |
| Get-Process | |
| # All Properties | |
| Get-Process | Select-Object -Property * | Out-GridView | |
| # Sorting | |
| # Changes the default sorting order for Get-Process | |
| Get-Process | Sort-Object CPU | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # Example No Hash table or Calculated Properties | |
| Get-WmiObject -Class WIN32_volume -ComputerName localhost -Filter 'drivetype = 3' | | |
| Select-Object -Property PScomputerName, | |
| DriveLetter, | |
| Label, | |
| FreeSpace | |
| # Example using a Hash table | |
| Get-WmiObject -Class WIN32_volume -ComputerName localhost -Filter 'drivetype = 3' | | |
| Select-Object -Property PScomputerName, | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # NoGo | |
| Get-Command -Module xPSDesiredStateConfiguration | |
| # NoGo | |
| xService | Get-Member | |
| # Shows all DSC Resources currently installed in PS ModulePath | |
| # Access PSModulepath | |
| # cd env: | |
| # dir | Where-Object Name -eq PSModulePath | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <# | |
| DESCRIPTION | |
| 1. Search an OU for computer accounts that have not authenticated in x number of days ($days) | |
| 2. Disable those accounts | |
| 3. Move those disabled computer accounts to another OU ($disabledOU) | |
| 4. Also creates a logfile of all the computers that were disabled ($logpath) | |
| #> | |
| ####### Edit these Variables | |
| # Gets todays Date | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <# | |
| PARAMETER ComputerName | |
| See the examples below, the computername can be one or | |
| many computer names | |
| EXAMPLE | |
| .\force-WSUScheckin.ps1 -ComputerName CL1 | |
| .\force-WSUScheckin.ps1 -ComputerName CL1 -verbose | |
| .\force-WSUScheckin.ps1 -ComputerName CL1, CL2 -verbose | |
| .\force-WSUScheckin.ps1 -ComputerName (Get-Content -Path "C:\computers.txt") -verbose | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <# | |
| PARAMETER ComputerName | |
| See the examples below, the computername can be one or | |
| many computer names | |
| EXAMPLE | |
| .\force-WSUScheckin.ps1 -ComputerName CL1 | |
| .\force-WSUScheckin.ps1 -ComputerName CL1 -verbose | |
| .\force-WSUScheckin.ps1 -ComputerName CL1, CL2 -verbose | |
| .\force-WSUScheckin.ps1 -ComputerName (Get-Content -Path "C:\computers.txt") -verbose | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # Get all Modules, Functions, Alias' ...etc | |
| # available on your computer | |
| Get-Command -all | |
| # Search for all cmdlets that contain Service | |
| # in the noun portion. | |
| Get-command –noun Service | |
| # Search for all cmdlets that contain Stop | |
| # in the verb portion |