Comandos Power Shell Utiles May 27, 2012
Posted by juanpablo1manrique in SharePoint.trackback
- Consultar todas las templates instaladas
- $web.webtemplate | format-list
- to file
- $list.items | Out-File C:\filename.txt
- Reduce WSS_Logging
- $defs = Get-SPUsageDefinition
Foreach($def in $defs)
{
Set-SPUsageDefinition –Identity $def.Name –DaysRetained 1
}
- $defs = Get-SPUsageDefinition
- Query with Row Line number
- SELECT TOP 10 ROW_NUMBER() OVER (Order by [col1]) AS RowNumber,[col1]
FROM [dbo].[Table]
- SELECT TOP 10 ROW_NUMBER() OVER (Order by [col1]) AS RowNumber,[col1]
- excel arrow moves sheet not cell
- Windows
- On-Screen Keyboard
- When the on-screen keyboard appears, click the ScrLk or Slk button
- WSDL.exe
- WSDL.exe /language:CS /namespace:FourCalc /out:c:\Captures\FourCalc.cs http:\\localhost/FourFunctionCalc/Service1.asmx?sdl
- psconfig -cmd upgrade -inplace b2b
- read PublicKeyToken> en power shell
- ([system.reflection.assembly]::loadfile(“c:\MyVerificationDLL.dll”)).FullName
- PrerequisiteInstaller.exe /?
- Muestra los prerequisitos de esa versión
- Broacast skype 365 URL
- Borrar usuarios
- Get-SPUser -web http://www.misite.com -Limit ALL | Where-Object {$_.UserLogin -like “*fuckuser*”} | select UserLogin
- $user = Get-SPUser -web http://www.misite.com -identity “i:0#.f|sql_membership|fuckuser”
- Remove-SPUser -identity $user.ID -web http://www.misite.com
- Connect SharePoint Online
- Connect-SPOService -Url https://tenantname-admin.sharepoint.com -credential admin@contoso.com
- Allow MimeType
- $webApp = Get-SPWebApplication http://sharepoint.contoso.co
- # current allowed mimetypes
- $webApp.AllowedInlineDownloadedMimeTypes
- # add the text/html mime type
- $webApp.AllowedInlineDownloadedMimeTypes.Add(‘text/html’)
- $webApp.Update()
- Set Office 365 never expires
- Set-MsolUser -UserPrincipalName “userprincipalname” –PasswordNeverExpires $true
- MicrosoftEasyFix20150
- fix sync issues with OneDrive for Business automatically
- Get all assembly
- gacutil -l >yourassemblies.txt
- CamlQuery query = CamlQuery.CreateAllItemsQuery()
- CamlQuery query = CamlQuery.CreateAllItemsQuery(100)
- URL view all users
- …/_layouts/15/people.aspx?MembershipGroupId=0
- Otorgar permisos a la base de datos de configuración
-
- Add-SPShellAdmin aaa\bbbb
-
- Manage property bags
- $web = GEt-spweb “http://www.misite.com/subsite/”
- $web.Properties[“prop1”] = “88888”
- $web.Properties[“prop2”] = “0010”
- $web.Properties.Update();
- $web.Update();
- Shutdown . Apagar por comandos
- shutdown /r /t 0
- Copy Paste error
- rdpclip.exe
- Obtener el listado de listas de un sitio
- $web = GET-SPWeb “http://site/subsite/subsite/
- $web.lists | Format-Table title,id -AutoSize
- PowerShell
- add-PSSnapIn “Microsoft.SharePoint.Powershell”
- Crear sitio de Educacion
- New-SPEduClass –ClassId SPEU101 –ClassName “ElectronicaI” –site http://education.contoso.com
- Upgrade several sitecollections
- get-spsite -limit all | Upgrade-SPSite -VersionUpgrade -Unthrott
- Computer Management
- compmgmt.msc
- Sincronizar el reloj HORA
- w32tm /resync
- Usage Logs
- _layouts/usagedetails.aspx
- Activar Features en el web
- Get-SPSite http://misitio/ | Get-SPWeb -Limit ALL |%{ Get-SPFeature -Web $_ } | Select DisplayName,ID -Unique
- Enable-SPFeature -identity “9a447926-5937-44cb-857a-d3829301c73b” -URL http://misitio/
- Activar Features en el site
- Get-SPFeature -Limit ALL | Where-Object {$_.Scope -eq “SITE”}
- Enable-SPFeature -identity “9a447926-5937-44cb-857a-d3829301c73b” -URL http://misitio/
- Administrar Tipos de Contenido Huerfanos
- SELECT [SiteId],[Class],[Scope],sys.fn_varbintohexstr([ContentTypeId]) as CT,[Version],[NextChildByte],[Size],[Definition],[ResourceDir],[IsFromFeature]FROM [dbo].[ContentTypes]where (sys.fn_varbintohexstr(ContentTypeId) LIKE ‘0x010010bd6c5%’)
- Update [dbo].[ContentTypes]set [IsFromFeature] = 0where (sys.fn_varbintohexstr(ContentTypeId) LIKE ‘0x010010bd6c5%’)
- delete [dbo].[ContentTypes]where (sys.fn_varbintohexstr(ContentTypeId) LIKE ‘0x010010bd6c5%’)
- Elevarse permisos en SQL SERVER
- SQLCMD –E -S ‘Domain\Account’
- exec sp_addsrvrolemember @loginame=’Domain\Account’,@rolename=’sysadmin’
- Reiniciar servico SQL SERVER
- Comando para un copiar-pegar inteligente
- xcopy “E:\Source\MyProject\styles\*.*” “E:\Destine\MyProject\styles\*.*” /EXCLUDE:C:\FileList.txt /d/e/y/i
- Obtener el listado de archivos de un folder con subfolders
- dir /s /b>FileList.txt
- Borrar una lista corrupta
- $web = get-spweb -Identity http://sp2010
- $web.lists | select Title
- $list = $web.lists[“corrupted list name”]
- $list.AllowDeletion = $true
- $list.Update()
- $list.Delete()
- — reset the logging thresholds loggin SharePoint
- stsadm -o setlogginglevel -category IRM -default
- Get-SPLogLevel | Clear-SPLogLevel
- to windows config hour sinchronize whit DC
- w32tm /query /status
- w32tm /resync
- w32tm /config /syncfromflags:manual /manualpeerlist: [lista] , donde [lista] son los nombres DNS o IP de los servidores con los que se debe sincronizar, separados por comas
- Get AD usuarios con un dato especifico
- Get-ADUser -filter {employeeID -like “*” }| Get-ADObject -properties employeeid | Format-List name,employeeid
- Actualizar un parametro con un CSV usuarios de AD
- Import-CSV C:\test.csv | foreach { Set-ADUser $_.username -EmployeeID $_.id }
- SQL Commands
- NOT LIKE ‘%[^0-9]%’ isnumeric dont work for e or d
- http://www.sqlservercentral.com/articles/IsNumeric/71512/
- IIS Commands enable Rastreo de procesos del Pool
- cd C:\Windows\System32\inetsrv
- appcmd list wp
- appcmd list wps /apppool.name:DefaultAppPool
- IIS 7.0 -> Root -> Worker Process “Procesos de Trabajo” -> Select -> ver solicitudes actuales
- IIS 6.0 cscript iisapp.vbs
[…] Comandos Power Shell Utiles […]
When I initially commented I clicked the “Notify me when new comments are added” checkbox and now each
time a comment is added I get four emails with the same comment.
Is there any way you can remove people from that service?
Cheers!
Howdy! This is my first visit to your blog! We
are a
group of volunteers and starting a new project in
a community in the same niche. Your blog
provided us valuable information to work on. You have done a
wonderful job!
Just want to say your article is as surprising. The clarity in
your post is simply great and i could assume you’re an expert on this subject. Well with your permission allow me to grab your feed to keep up to date with forthcoming post. Thanks a million and please continue the rewarding work.