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
| cd "C:\Program Files\Trend Micro\Deep Security Agent" | |
| dsa_control -r | |
| sc stop ds_agent | |
| sc config ds_agent start= disabled |
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
| $t = import-csv -Delimiter "," -Path ".\attributes.csv" | |
| foreach ($u in $t) | |
| { | |
| if ($u.Class -ne "") | |
| { | |
| New-CustomAttribute -Name $u.Attribute -Verbose -TargetType $u.Class | |
| } | |
| else |
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
| $groups = "Remote Desktop Users","Local Administrators" | |
| $foreach ($newGroup in $groups) | |
| { | |
| Get-ADComputer -Filter {(OperatingSystem -like "*Server*") -and (PrimaryGroupID -ne 516)} -Properties * | % {$_.name} | % {New-ADGroup -Name "$_ - $newGroup" -DisplayName "$_ - $newGroup" -GroupCategory Security -GroupScope DomainLocal -Path "OU=Server Groups,OU=ANDE_Groups,$((Get-ADDomain).distinguishedName)" -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
| $secretvalue = ConvertTo-SecureString 'mysecret-value' -AsPlainText -Force | |
| $secret = Set-AzKeyVaultSecret -VaultName "my-vault-nonprod-001" -Name "mysecret-name" -SecretValue $secretValue |
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-adobject -searchbase (get-adrootdse).schemanamingcontext -filter * |
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
| esxcli software vib list | egrep '(fnic|nenic)' |
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
| Move-ADDirectoryServerOperationMasterRole -Identity "domaincontroller1.domain.tld.com" –OperationMasterRole 0,1,3,4 | |
| Move-ADDirectoryServerOperationMasterRole -Identity "domaincontroller2.domain.tld.com" –OperationMasterRole 2 | |
| w32tm.exe /config /syncfromflags:manual /manualpeerlist:10.0.0.1,0x8 /reliable:yes /update | |
| w32tm.exe /config /update | |
| restart-service W32Time | |
| w32tm.exe /resync |
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
| dfsrdiag backlog /receivingmember:server1.corp.com /sendingmember:server2.corp.com /RGname:"Your Relationship Name" /RFName:ShareName |
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
| wmic /namespace:\\root\microsoftdfs path DfsrReplicatedFolderInfo get replicatedFolderName, State, replicationgroupname |
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-View -ViewType VirtualMachine | ?{ $_.Guest.IPAddress -eq "10.1.2.3"} |