Code Snippets

StartLayout_RDS.xml

StartLayout_RDS.xml

<LayoutModificationTemplate Version="1" xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification"> <LayoutOptions StartTileGroupCellWidth="6" /> <DefaultLayoutOverride LayoutCustomizationRestrictionType="OnlySpecifiedGroups"> <StartLayoutCollection> <defaultlayout:StartLayout GroupCellWidth="6" xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout"> <start:Group Name="Programme" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout"> <start:DesktopApplicationTile Size="2×2" Column="2" Row="0" DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Word.lnk" /> <start:DesktopApplicationTile Size="2×2" Column="2" Row="2" DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\PowerPoint.lnk" /> <start:DesktopApplicationTile Size="2×2" Column="0" Row="2" DesktopApplicationLinkPath="%APPDATA%\Microsoft\Windows\Start Menu\Programs\Microsoft Teams.lnk" /> <start:DesktopApplicationTile Size="2×2" Column="0" Row="0" DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Outlook.lnk" /> <start:DesktopApplicationTile Size="2×2" Column="4" Row="0" DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Excel.lnk" /> <start:DesktopApplicationTile Size="2×2" Column="4" Row="2"...

RemoveMicrosoftTeams.ps1

RemoveMicrosoftTeams.ps1

<# .SYNOPSIS This script allows you to uninstall the Microsoft Teams app and remove Teams directory for a user. .DESCRIPTION Use this script to clear the installed Microsoft Teams application. Run this PowerShell script for each user profile for which the Teams App was installed on a machine. After the PowerShell has executed on all...

VMWare_Shrink-Disk

VMWare_Shrink-Disk

# Disk DescriptorFile version=3 encoding="UTF-8" CID=8e8083a2 parentCID=ffffffff isNativeSnapshot="no" createType="vmfs" # Extent description RW 398458880 VMFS "testvm-flat.vmdk" # Change Tracking File changeTrackPath="testvm-ctk.vmdk" # The Disk Data Base #DDB ddb.adapterType = "lsilogic" ddb.deletable = "true" ddb.geometry.cylinders = "24802" ddb.geometry.heads = "255" ddb.geometry.sectors = "63" ddb.longContentID = "c8e4f11aaccfe8f5b9b2854a8e8083a2" ddb.thinProvisioned = "1" ddb.toolsInstallType = "1" ddb.toolsVersion = "10249" ddb.uuid...

RDS01_ExcludeFolders

RDS01_ExcludeFolders

PS C:\Windows\system32> Get-RDSessionCollectionConfiguration "TEST" -UserProfileDisk | fl CollectionName : TEST IncludeFolderPath : ExcludeFolderPath : {Desktop, Documents, Contacts} IncludeFilePath : ExcludeFilePath : DiskPath : \\test.local\RDSUserProfileDisks EnableUserProfileDisk : True MaxUserProfileDiskSizeGB : 20

RDS01_qwinsta

RDS01_qwinsta

C:\Users\administrator>qwinsta /server:server_name SESSIONNAME USERNAME ID STATE TYPE DEVICE services 0 Disc console 1 Conn rdp-tcp#98 user01 23 Active rdp-tcp#91 user02 39 Active rdp-tcp#75 user03 40 Active rdp-tcp#19 user04 41 Active rdp-tcp#26 user05 42 Active rdp-tcp#84 user06 43 Active rdp-tcp#93 user07 44 Active

DualScan01

DualScan01

PS C:\Users\anxadmin> $MUSM = New-Object -ComObject "Microsoft.Update.ServiceManager" PS C:\Users\anxadmin> $MUSM.Services | select Name, IsDefaultAUService Name IsDefaultAUService —- —————— Windows Server Update Service False Windows Update True

openHAB jdbc.persist

openHAB jdbc.persist

Strategies { everyMinute : "0 * * * * ?" every15Minutes : "0 */15 * ? * *" everyHour : "0 0 * * * ?" everyDay : "0 0 0 * * ?" default = everyChange } Items { Socket01_power : strategy = every15Minutes, restoreOnStartup }

OpenHAB jdbc.cfg

OpenHAB jdbc.cfg

############################ JDBC Persistence Service ################################## # D A T A B A S E C O N F I G url=jdbc:mariadb://192.168.1.10:3307/openhab # url=jdbc:mysql://192.168.0.1:3306/testMysql # url=jdbc:postgresql://192.168.0.1:5432/testPostgresql # required database user user=openhab # required database password password=SUPERSAFEPA$$WORD #######################################################################################

iSCSI Target-Server

iSCSI Target-Server

#Create a new iSCSI Target New-IscsiServerTarget -TargetName mssql_target01 #Check the current configuration of the iSCSI Target Get-IscsiTargetServerSetting #Remove the LAN NIC – only the iSCSI network should be available for iSCSI traffic Set-IscsiTargetServerSetting -IP 192.168.50.10 -Enable $false #Create three fixed-size iSCSI LUNs (Quorum, Database and Logs) New-IscsiVirtualDisk -Path D:\iSCSI\mssql_quorum.vhdx -Size 500MB -Fixed New-IscsiVirtualDisk -Path D:\iSCSI\mssql_db.vhdx...

HS110_02

HS110_02

Switch Socket01_Switch "Socket01_Switch" { channel="tplinksmarthome:hs110:socket01:switch" } Number Socket01_energyUsage "Socket01_energyUsage" { channel="tplinksmarthome:hs110:socket01:energyUsage" } Number Socket01_power "Socket01_power" { channel="tplinksmarthome:hs110:socket01:power" }