Skip to content

Instantly share code, notes, and snippets.

View dfranciscus's full-sized avatar

Dan Franciscus dfranciscus

View GitHub Profile
Invoke-WUInstall -ComputerName (Get-ADComputer -Filter 'Operatingsystem -like "*Windows Server*"' | Select-Object -ExpandProperty Name) -Script {ipmo PSWindowsUpdate; Get-WUInstall -AcceptAll -AutoReboot | Out-File C:\PSWindowsUpdate.log } -Confirm:$false -Verbose
Add-PSSnapin Microsoft.BDD.PSSnapIn
New-PSDrive -Name "MDT" -PSProvider "MDTProvider" -Root "E:\MDT"
$NuGetServer = 'nugetserver'
$NuGetPackages = choco list --source=$NuGetServer -r
ForEach ($NugetPkg in $NuGetPackages)
{
$PackageName = $NugetPkg.Split('|')[0]
$Version = $NugetPkg.Split('|')[1]
Import-MDTApplication -Path 'MDT:\Applications\test' -Name $PackageName -NoSource -Commandline "choco install $PackageName --source=$NuGetServer -y" -Shortname $PackageName -Version $Version -Enable "True"
Add-PSSnapin Microsoft.BDD.PSSnapIn
New-PSDrive -Name "MDT" -PSProvider "MDTProvider" -Root "E:\MDT"
$NuGetPackages = choco list --source=nugetserver.domain.com
ForEach ($NugetPkg in $NuGetPackages)
{
$PackageName = $NugetPkg.Split('|')[0]
$Version = $NugetPkg.Split('|')[1]
Import-MDTApplication -Path 'MDT:\Applications\test' -Name $PackageName -NoSource -Commandline "choco install $PackageName -y" -Shortname $PackageName -Version $Version -Enable "True"
}
#requires -Modules PSReleaseTools
<#
.SYNOPSIS
Compares local PowerShell version to Github latest release, installs using installpkg
#>
function Install-PowerShellonMac {
[CmdletBinding()]
param(
requires -Modules PSReleaseTools
<#
.SYNOPSIS
Compares local PowerShell version to Github latest release, installs using installpkg
#>
function Install-PowerShellonMac {
[CmdletBinding()]
param(
C:\ > Get-WmiObject -Class Win32_Service | where {$_.startmode -eq 'Auto'} | select Name -ExpandProperty Name | % {Get-Service -Name $_ | Where {$_.Status -eq 'Stopped'}}