wmic logicaldisk get size,freespace,caption
Monday, February 27, 2017
Saturday, February 25, 2017
Change msRTCSIP-GroupingID for multiple users
If you want In your organization to separate several Organizations from seeing each other.
You must set OU GUID to msRTCSIP-GroupingID attribute.
After getting the OU ObjectGUID we set this GUID as the msRTCSIP-GroupingID option for all users in that OU.
to do this using powershell for multiple users:
copy OU ObjectGUID.
for example: 2DCF9FC8-CB7C-4382-AA97-EF9B890B9B6A
copy this GUID and convert this GUID to Hexadecimal
use this site:
http://www.windowstricks.in/online-windows-guid-converter
after converting we'll have C89FCF2D7CCB8243AA97EF9B890B9B6A
change this format to xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
C89FCF2D-7CCB-8243-AA97-EF9B890B9B6A
first import the AD PowerShell Module:
Import-Module ActiveDirectory
$Users = Get-Content c:\tmp\atribute.txt
ForEach ($User in $Users) {
Set-ADUser -Server test.local -Identity "$user" -replace @{'msRTCSIP-GroupingID'=[GUID]("C89FCF2D-7CCB-8243-AA97-EF9B890B9B6A")}
}
Friday, February 24, 2017
Add extensionAttribute for multiple users
To Add extensionAttribute :
Import-Module ActiveDirectory
$Users = Get-Content c:\tmp\atribute.txt
ForEach ($User in $Users) {
Set-ADUser -Server test.local -Identity "$user" -Add @{extensionAttribute1="test"}
}
To Remove extensionAttribute :
$Users = Get-Content c:\tmp\atribute.txt
ForEach ($User in $Users) {
Set-ADUser -Server test.local -Identity "$user" -Clear "extensionattribute1"
}
Tuesday, February 21, 2017
Wednesday, February 15, 2017
Office Web Application Server Prerequisites
Windows 2012 Prerequisites:
Add-WindowsFeature Web-Server,Web-Mgmt-Tools,Web-Mgmt-Console,Web-WebServer,Web-Common-Http,Web-Default-Doc,Web-Static-Content,Web-Performance,Web-Stat-Compression,Web-Dyn-Compression,Web-Security,Web-Filtering,Web-Windows-Auth,Web-App-Dev,Web-Net-Ext45,Web-Asp-Net45,Web-ISAPI-Ext,Web-ISAPI-Filter,Web-Includes,InkandHandwritingServices
Windows 2008 R2 Prerequisites:
install .Net Framework 4.5, Windows Management Framework 3.0
Import-Module ServerManager
Add-WindowsFeature Web-Server,Web-WebServer,Web-Common-Http,Web-Static-Content,Web-App-Dev,Web-Asp-Net,Web-Net-Ext,Web-ISAPI-Ext,Web-ISAPI-Filter,Web-Includes,Web-Security,Web-Windows-Auth,Web-Filtering,Web-Stat-Compression,Web-Dyn-Compression,Web-Mgmt-Console,Ink-Handwriting,IH-Ink-Support
Add-WindowsFeature Web-Server,Web-WebServer,Web-Common-Http,Web-Static-Content,Web-App-Dev,Web-Asp-Net,Web-Net-Ext,Web-ISAPI-Ext,Web-ISAPI-Filter,Web-Includes,Web-Security,Web-Windows-Auth,Web-Filtering,Web-Stat-Compression,Web-Dyn-Compression,Web-Mgmt-Console,Ink-Handwriting,IH-Ink-Support
1.Run Office Webb apps Server installation file.
2.Generate Certificate on local PKI or use public Certificate.
(Certificate must have Friendly name)
Configure Office Web Apps Server
Rum PowerShell as administrator:
Import-Module OfficeWebApps
New-OfficeWebAppsFarm -InternalURL <a href="https://<FQDN" title="https://<FQDN">https://<FQDN</a> OWAS Server> -ExternalURL <a href="https://<URL" title="https://<URL">https://<URL</a> OWAS public name> –CertificateName “Certificate Friendly Name” -AllowHTTP
New-OfficeWebAppsHost "Domain Name"
to Check Offece Web Server open this link :
https://FQDN OWAS Server/hosting/discovery
Import-Module OfficeWebApps
New-OfficeWebAppsFarm -InternalURL <a href="https://<FQDN" title="https://<FQDN">https://<FQDN</a> OWAS Server> -ExternalURL <a href="https://<URL" title="https://<URL">https://<URL</a> OWAS public name> –CertificateName “Certificate Friendly Name” -AllowHTTP
New-OfficeWebAppsHost "Domain Name"
to Check Offece Web Server open this link :
https://FQDN OWAS Server/hosting/discovery
Permission to read private key IIS Server
You need the permission to read private key for IIS Server.
1.Go to this path: C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys[File Name]
1.Go to this path: C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys[File Name]
- Go to that path and open file properties
- Go to security tab
- Click on "Edit" then "Add"
- Add users "Network Service" and "IIS_IUSRS" and give Full controll Permitions.
or add IIS AppPool\[your application pool name]
Stop a hung service
If service is hung on stoping or starting :
open CMD as administrator
sc queryex "servicename"
taskkill /f /pid [PID]
Source
open CMD as administrator
sc queryex "servicename"
taskkill /f /pid [PID]
Source
Thursday, February 9, 2017
View logged on user on Remote computer
View logged on user on Remote computer.
Download PStools. Use PSexec utill. I have pstools on my C drive.
cd c:\
cd pstolls
psexec.exe \\"compname or ip" cmd.exe
query user
Download PStools. Use PSexec utill. I have pstools on my C drive.
cd c:\
cd pstolls
psexec.exe \\"compname or ip" cmd.exe
query user
Subscribe to:
Posts (Atom)