How to determine if an account is disabled by examining useraccountcontrol?
Reference: https://knowledge.zomers.eu/PowerShell/Pages/How-to-control-UserAccountControl-Active-Directory-flags-with-PowerShell.aspx For example to check if the user account is disabled...
View ArticleHow to access the disks mapped through RDP?
Windows XP/2003/2012 and greater support drive mapping back to the client workstation during a Terminal Services (Remote Desktop) session. This means you can copy files from the server to the client...
View ArticleHow to display changes (change history) on Quest ARS in Powershell?
Quest Software\ActiveRoles Server\v6.9\Solutions\Free Tools\Management Shell for Active Directory\ Copy the ArPowershell.chm on your desktop and open it, Get-QARSLastOperation cmdlet:...
View ArticleEvent Logging policy settings in Windows Server/Computer
http://blogs.technet.com/b/askds/archive/2008/08/12/event-logging-policy-settings-in-windows-server-2008-and-vista.aspx
View ArticlePowershell: how to freeing up memory
Add in your powershell script (if you want to free memory) to call the garbade collector: # Freeing up memory [System.GC]::Collect()
View ArticleWAP 2012 R2 highly available?
How do I configure WAP in Windows Server 2012 R2 highly available? Web Application Proxy (WAP) in Windows Server 2012 R2 provides a reverse proxy service enabling services hosted internally on-premises...
View ArticlePKI – Certificates – Certutil -restrict or how to dump CA database
Certutil view restrict description: http://blogs.technet.com/b/pki/archive/2008/10/03/disposition-values-for-certutil-view-restrict-and-some-creative-samples.aspx Disposition values for requests in the...
View ArticleHow to detect and remove foreign security principals?
How to resolve Foreign security principals with Quest cmdlets for AD? Get-QADObject -ResolveForeignSecurityPrincipals -Type foreignSecurityPrincipal | select Samaccoutname,Type,DN...
View ArticlePowershell: how to convert files in a folder from upper case to lower case?
From Upper to Lower: powershell -command “Get-ChildItem | Rename-Item -NewName { $_.Basename.ToLower() + $_.Extension }” From Lower to Upper: powershell -command “Get-ChildItem | Rename-Item -NewName {...
View ArticleADFS 3.0: How to renew SSL certificate?
RDP to your ADFS internal primary server Import the new certificate to the Machine’s Personal Store Make sure you have a private key that corresponds to this certificate. If not, go to the PC you...
View ArticlePKI – how to delete certificate issued by a specific CA in PowerShell?
To display certificates on local computer store: C:\Windows\system32>powershell -command “get-item cert:\\LocalMachine\\My\\* | foreach { echo $_.issuer }” CN=ISSUINGCASERVER, O=company IT Group SA...
View ArticlePowerShell 5.0 delayed
Download: http://blogs.msdn.com/b/powershell/archive/2015/12/23/windows-management-framework-wmf-5-0-currently-removed-from-download-center.aspx PowerShell Gallery: http://www.powershellgallery.com/...
View ArticlePowershell – how to check if a user if member of a group
$user = “mydomain\user1” if ((Get-QADUser $User -Properties memberof).memberof -like “CN=finance-group*”) { write-host “User found” $true } Else { write-host “User found” $false }
View ArticlePowerShell – How to add all users in an OU to a Security Group
Import-module ActiveDirectory $rootOU = “OU=Special Users,OU=Users,DC=MyDomain,DC=com” $group = “mydomain\group1” Get-ADUser -SearchBase $rootOu -Filter * | ForEach-Object {Add-ADGroupMember -Identity...
View ArticleWhat if PSRemoting and Unrestricted Execution are disabled?
Remotely enable PSRemoting and Unrestricted PowerShell Execution using PsExec and PSSession, then run PSRecon Option 1 — WMI: PS C:\> wmic /node:”10.10.10.10″ process call create “powershell...
View ArticleMonitoring ADFS and AAD Connect using Azure AD connect health
Monitoring ADFS and the AAD Connect Sync Engine using AAD connect health:...
View ArticleDetecting hackers (or intrusions) using Windows event log monitoring
The NSA released a PDF entitled “Spotting the Adversary with Windows Event Log Monitoring” earlier this year. The good news is it’s probably one of the most detailed documents I’ve seen in a long time....
View ArticlePowerShell – Adding/Removing group members ?
https://blogs.msdn.microsoft.com/adpowershell/wp-content/themes/microsoft/js/html5.js Adding/removing members from another forest or domain to groups in Active Directory:...
View ArticleAzure AD Scripting
Prerequisites: The modifications are limited using the Azure management portal, you must use the Powershell module for Azure AD: Manage Azure AD with Powershell:...
View Article