Free tools for exploring the Windows Management Instrumentation (WMI). Free registration is required. They also have many free e-book and script examples.
http://www.sapien.com/downloads
Showing posts with label Powershell. Show all posts
Showing posts with label Powershell. Show all posts
12.23.2015
4.10.2014
SharePoint 2010 - Enabling the Developer Dashboard
Enabling via powershell:
http://msdn.microsoft.com/en-us/library/office/gg512103(v=office.14).aspx
http://msdn.microsoft.com/en-us/library/office/ff512745(v=office.14).aspx
$contentService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService $dashboardSetting = $contentService.DeveloperDashboardSettings $dashboardSetting.DisplayLevel = [Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::On $dashboardSetting.Update()
http://msdn.microsoft.com/en-us/library/office/gg512103(v=office.14).aspx
http://msdn.microsoft.com/en-us/library/office/ff512745(v=office.14).aspx
Labels:
Debugging,
Powershell,
SharePoint
2.03.2014
Powershell - File Renaming
Here is a quick powershell script to tidy files that are not properly formatted for the web.
Get-ChildItem C:\Temp\rename\* -Recurse | Rename-Item -NewName {$_.name -creplace '[^A-Za-z1234567890.]','_' }
Get-ChildItem C:\Temp\rename\* -Recurse | Rename-Item -NewName {$_.name -replace '___','_' }
Get-ChildItem C:\Temp\rename\* -Recurse | Rename-Item -NewName {$_.name -replace '__','_' }
Labels:
Powershell
1.10.2014
Powershell - Transferring Files from Server to Server
This is a nice little trick to get powershell to transfer files from one server directly without using domain admin credentials, or setting up an intermediary share directory. The credentials here are for the destination server. This creates a temporary network shared drive on the source server, transfers the file, then removes the shared directory.
$DriveUsername = "SERVER\USERNAME" $DrivePassword = "PASSWORD" $LocalFile = "C:\DIRECTORY\FILENAME.csv" $Drive = "T:" $RemoteFile = "$Drive\FILENAME.csv" $UNC = "\\10.10.10.10\C$\DIRECTORY" $net = new-object -ComObject WScript.Network $net.MapNetworkDrive($Drive, $UNC, $false, $DriveUsername, $DrivePassword) Copy-Item $LocalFile $RemoteFile $net.removenetworkdrive($Drive)
Labels:
Powershell
7.31.2013
AD Computer Object Auditing
http://social.technet.microsoft.com/Forums/windowsserver/en-US/6a1abda4-0628-43b5-8e08-492220cbae7b/how-best-to-return-an-active-directory-computers-ip-address
http://technet.microsoft.com/en-us/library/hh849958.aspx
http://technet.microsoft.com/en-us/library/ee617195.aspx
http://technet.microsoft.com/en-us/library/dd378937(WS.10).aspx
http://technet.microsoft.com/en-us/library/ee449475(WS.10).aspx
http://blogs.technet.com/b/askds/archive/2009/08/27/the-ad-recycle-bin-understanding-implementing-best-practices-and-troubleshooting.aspx
http://technet.microsoft.com/en-us/library/dd378937(v=ws.10).aspx
http://community.spiceworks.com/topic/269471-how-to-enable-active-directory-module-for-windows-powershell-via-script
http://technet.microsoft.com/en-us/library/ee617192.aspx
http://blogs.technet.com/b/askds/archive/2010/02/04/inventorying-computers-with-ad-powershell.aspx
=====================
Get-ADComputer -Filter * -Property * | Select-Object Name,OperatingSystem,OperatingSystemServicePack,OperatingSystemVersion,IPv4Address | Export-CSV c:\AllComputerObjects.csv -NoTypeInformation -Encoding UTF8
Get-ADComputer -Filter * -Property * | Select-Object * | Export-CSV c:\AllComputerObjects.csv -NoTypeInformation -Encoding UTF8
http://technet.microsoft.com/en-us/library/hh849958.aspx
http://technet.microsoft.com/en-us/library/ee617195.aspx
http://technet.microsoft.com/en-us/library/dd378937(WS.10).aspx
http://technet.microsoft.com/en-us/library/ee449475(WS.10).aspx
http://blogs.technet.com/b/askds/archive/2009/08/27/the-ad-recycle-bin-understanding-implementing-best-practices-and-troubleshooting.aspx
http://technet.microsoft.com/en-us/library/dd378937(v=ws.10).aspx
http://community.spiceworks.com/topic/269471-how-to-enable-active-directory-module-for-windows-powershell-via-script
http://technet.microsoft.com/en-us/library/ee617192.aspx
http://blogs.technet.com/b/askds/archive/2010/02/04/inventorying-computers-with-ad-powershell.aspx
=====================
Get-ADComputer -Filter * -Property * | Select-Object Name,OperatingSystem,OperatingSystemServicePack,OperatingSystemVersion,IPv4Address | Export-CSV c:\AllComputerObjects.csv -NoTypeInformation -Encoding UTF8
Get-ADComputer -Filter * -Property * | Select-Object * | Export-CSV c:\AllComputerObjects.csv -NoTypeInformation -Encoding UTF8
Labels:
Active Directory,
Powershell
Subscribe to:
Posts (Atom)