About Me
- Vaddi Venkat
- SharePoint Architect with over 17 years of IT Experience in various roles as SharePoint Architect, Administrator, Technical Architect, IT Analyst, Application Developer, CRM Consultant, BI Developer, Microsoft Solution Architect in Client/Server, Web and Enterprise CRM Applications in E-Commerce, Financial, Healthcare, Insurance, Telecom, Outsourcing and Technology Services.
MCITP (Pro): Microsoft Certified IT Professional: SharePoint 2010 Administrator.
MCTS: Microsoft Certified Technology Specialist, SharePoint 2010 Configuration.
Wednesday, January 4, 2012
Sunday, October 30, 2011
Powershell Remoting IIS
Get IIS Settings$q = "Select * from IIsSetting"
$y = [WmiSearcher] $q
$y.Scope.Path = "file://server/root/microsoftiisv2"
$y.Scope.Options.Authentication = 6
# works like objWMIService.Security_.authenticationLevel = WbemAuthenticationLevelPktPrivacy
$a = $y.Get()
foreach ( $b in $a ) {
write-host $b.LogFileDirectory " + " $b.Name
}
Get Application Pools$objWMI = [WmiSearcher] "Select * From IIsApplicationPool"
$objWMI.Scope.Path = "\\" + $strServerName + "\root\microsoftiisv2"
$objWMI.Scope.Options.Authentication = 6
$pools = $objWMI.Get()
foreach ($pool in $pools)
{
$pool.Name
}
$y = [WmiSearcher] $q
$y.Scope.Path = "file://server/root/microsoftiisv2"
$y.Scope.Options.Authentication = 6
# works like objWMIService.Security_.authenticationLevel = WbemAuthenticationLevelPktPrivacy
$a = $y.Get()
foreach ( $b in $a ) {
write-host $b.LogFileDirectory " + " $b.Name
}
Get Application Pools$objWMI = [WmiSearcher] "Select * From IIsApplicationPool"
$objWMI.Scope.Path = "\\" + $strServerName + "\root\microsoftiisv2"
$objWMI.Scope.Options.Authentication = 6
$pools = $objWMI.Get()
foreach ($pool in $pools)
{
$pool.Name
}
Net User - Commands
Find Full Name of the User Account:
NET USER vaddiv /DOMAIN | FIND /I " name "
What permissions does a user have on this directory? SHOWACLS /U:domain\userid
When did someone last change his password? NET USER loginname /DOMAIN | FIND /I "Password last set"
When did someone last change his password? NET USER loginname /DOMAIN | FIND /I "Password last set"
Saturday, October 29, 2011
Run Powershell commands on remote computer.
Before you do any of this, you must run the following command in an admin PowerShell command prompt on the machine where you would like to run the remote command:
winrm quickconfig
need to open up the client connection permissions.
You may not want to open it up to anywhere though.
Something like this should also work:
C:\Windows\System32>winrm set winrm/config/client @{TrustedHosts="Server811"}
gacutil, assembly, Check dll
Assembly Location:
get-pssnapin | select assemblyName | export-csv test.csv
check the GAC using something like gacutil /l "System.Management.Automation"
Finding an assembly:
Here's a trick to find it from within PowerShell:
Finding an assembly:
Here's a trick to find it from within PowerShell:
$ref=[psobject].assembly.locationWednesday, October 26, 2011
PowerShell Script to query/enumerate Scheduled Jobs on a Server
PS Code to query/enumerate Scheduled Jobs on Server:
$servername = "ServerName"
$schedule = new-object -com Schedule.Service
$schedule.connect($servername)
$tasks = $schedule.getfolder("\").gettasks(0)
$tasks |select name, path, lasttaskresult, lastruntime
Tuesday, October 25, 2011
Get Application Pool Properties even Passwords using AppCmd
APPCMD list apppool "ApplicationPoolName" /text:*
If run at the path
C:\Windows\System32\inetsrv>
Will list all Pool Properties with Account/Password
If run at the path
C:\Windows\System32\inetsrv>
Will list all Pool Properties with Account/Password
Subscribe to:
Posts (Atom)