Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block PixelRobots

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
View Hyper-V_New_VM.ps1
$VMName = "PIXEL-SRV01"
[int64]$VMMem = 1MB*1024 #chnage to 1gb* the number of gb if you need.
$VMGen = "2"
$VHDPath = "V:\Hyper-V\$VMname\Virtual Hard Disks\$VMName.VHDX"
$VMPath = "V:\Hyper-V\"
[int64]$VMSize = 1GB*40
$ISOPath = "C:\ISO\en_windows_server_2016_x64_dvd_9327751.iso"
PixelRobots / Nano_IIS.ps1
Last active Apr 21, 2017
easy create iis site on nano server
View Nano_IIS.ps1
Enter-PSSession -ComputerName PIXEL-NANO10
Import-Module iis*
New-IISSite -Name "TestPixels" -BindingInformation "*:80:" -physicalPath "c:\inetpub\wwwroot\TestPixels"
View Time_Based_group_membership.ps1
Enable-ADOptionalFeature "Privileged Access Management Feature" -Scope ForestOrConfigurationSet -Target
Get-ADGroupMember "Domain Admins"
Add-ADGroupMember -Identity "Domain Admins" -Members "Ian" -MemberTimeToLive (New-TimeSpan -Minutes 30)
Get-ADGroup "Domain Admins" -Property member -ShowMemberTimeToLive
View Fore_AD_Sync.ps1
#changing PIXEL-DC01 to a name of the domain controller you want to push replication from.
Repadmin /syncall PIXEL-DC01 /APed
View Nano_SMB.ps1
Enter-PSSession -ComputerName PIXEL-NANO10
Install-NanoServerPackage Microsoft-NanoServer-Storage-Package -Culture en-us
shutdown /r /t 10
Enter-PSSession -ComputerName PIXEL-NANO10
New-Item -Name Share -Path c:\ -Type directory
New-SmbShare -Name share -Path c:\Share
Get-SMBShareAccess share
Grant-SmbShareAccess -Name share -AccountName\richard.hooper -AccessRight change
revoke-SmbShareAccess -Name share -AccountName everyone
View Enable_AD-Recycle_bin.ps1
Import-Module ActiveDirectory
Enable-ADOptionalFeature -Identity `
'CN=Recycle Bin Feature,CN=Optional Features,CN=Directory Service,CN=Windows NT,CN=Services,CN=Configuration,DC=pixelrobots,DC=co,DC=uk' `
-Scope ForestOrConfigurationSet -Target ''
View Demote_DC.ps1
Test-ADDSDomainControllerUninstallation -DemoteOperationMasterRole -RemoveApplicationpartitions
Uninstall-ADDSDomainController -DemoteOperationMasterRole -RemoveApplicationpartitions
View Demote_DC.ps1
Test-ADDSDomainControllerUninstallation -DemoteOperationMasterRole -RemoveApplicationpartitions
Uninstall-ADDSDomainController -DemoteOperationMasterRole -RemoveApplicationpartitions
View Migrate_FSMO_Roles.ps1
#Find who has the FSMO Roles
netdom query fsmo
#Move FSMO Roles
Move-ADDirectoryServerOperationMasterRole -Identity PIXEL-DC03 -OperationMasterRole SchemaMaster, DomainNamingMaster, PDCEmulator, RIDMaster, InfrastructureMaster
#Check that the move went well
Netdom query fsmo
View Install_ADDS.ps1
# Install ADDS and all management tools
Write-Host "Installing ADDS"
Add-WindowsFeature -Name “ad-domain-services” -IncludeAllSubFeature -IncludeManagementTools -verbose
You can’t perform that action at this time.