Skip to content

Instantly share code, notes, and snippets.

Stian Myhre Olsen vannmangel

Block or report user

Report or block vannmangel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@vannmangel
vannmangel / DisableAndMoveComputerObjects.ps1
Last active Feb 3, 2016
Disable and move Active Directory computer objects to a specified OU.
View DisableAndMoveComputerObjects.ps1
<#
.NOTES
===========================================================================
Created with: SAPIEN Technologies, Inc., PowerShell Studio 2015 v4.2.99
Created on: 03.02.2016 13.58
Created by: Stian Myhre
Organization: Amedia Teknologi AS
Filename: DisableAndMoveComputerObjects.ps1
===========================================================================
.Synopsis
@vannmangel
vannmangel / Add-AllPackageIDsToDistributionPointGroup.ps1
Last active Jan 27, 2016
SCCM 2012 R2 - Fetches the PackageID from all applications, packages, boot images, OS images and driver packages and puts them in a DP group.
View Add-AllPackageIDsToDistributionPointGroup.ps1
#Requires -version 3
<#
.NOTES
===========================================================================
Created with: SAPIEN Technologies, Inc., PowerShell Studio 2015 v4.2.95
Created on: 28.10.2015 16.18
Created by: Stian Myhre (including some "stealing with pride" from Kaido Järvemets, CoreTech)
Organization: Amedia Teknologi
Filename: Add-AllPackageIDsToDistributionPointGroup.ps1
===========================================================================
@vannmangel
vannmangel / Get-VMwareServers.ps1
Last active Oct 17, 2016
Fetches all servers in AD, filters only VMware nodes and writes the computer names to a text file.
View Get-VMwareServers.ps1
Get-ADComputer -Filter {OperatingSystem -like "*Server*"} -properties * -OutVariable nodes
foreach ($node in $nodes.Name)
{
if (Test-Connection -Quiet -Count 1 -ComputerName $node)
{
if ((gwmi Win32_BIOS -ComputerName $node).serialnumber -match "VMware")
{
Add-Content "\\path-to-txt\txt.txt" "`r$node is running VMmware" -PassThru
}
@vannmangel
vannmangel / Remove-SkypeAds.ps1
Last active Jan 12, 2017
Remove ads in skype
View Remove-SkypeAds.ps1
# start as admin!
# prompt for username
$SkypeUserName = Read-Host -Prompt "What is your Skype username?"
# stop skype-process
try{
if(Get-Process | ? {$_.Name -like 'skype'}) {Stop-Process -Name skype}
# commit changes to hosts file
$hostfile = "C:\Windows\System32\Drivers\etc\hosts"
You can’t perform that action at this time.