dsquery * -filter "&(objectclass=User)(objectcategory=Person)" -limit 0 -attr name mail
Showing posts with label Windows. Show all posts
Showing posts with label Windows. Show all posts
Friday, February 21, 2020
Wednesday, May 16, 2018
Quick script to count number of groups a user has in Active Directory.
I had the issue of users with too many groups to login so I needed a fast way to get a group count.
The number of groups is 215.
You need the WC unix utility. I always keep WC and GREP on hand.
groups.bat
dsquery user -samid %1| dsget user -memberof | wc
C:\>groups testuserC:\>dsquery user -samid testuser | dsget user -memberof | wc 215 635 16530C:\>
The number of groups is 215.
You need the WC unix utility. I always keep WC and GREP on hand.
Thursday, January 25, 2018
WPA2 enterprise setup on Windows with no domain.
Non-domain windows computers will not connect to enterprise WiFi without manual configuration. This has been a pain for years. Apple products all work. Cell phones work. But Windows requires all these clicks.
Click on Wireless Networks
Network and Sharing Center
Manage wireless networks
Add
Manually create a network profile
Network name: xxxx
Security type: WPA2-Enterprise
Next
Change connection settings
Security tab
Settings
Uncheck Validate server
Configure
Uncheck box
OK
OK
Advanced settings
Specify authentication: change to User authentication
OK
OK
Monday, January 8, 2018
How to disable a network interface from the Windows command line.
I found out I have computers connected to the same network with ethernet and wireless. Windows appears to have strange performance issues with this setup. These are desktops so they do not need wifi enabled.
psexec \\remotepc cmd
netsh interface show interface
netsh interface set interface "Wireless Network Connection" admin=disable
Quick and fast fix.
Tuesday, July 25, 2017
How to copy file association from an individual to all users on a server.
I dont know why this application install will not do this automatically but I found a way.
reg copy HKEY_CURRENT_USER\Software\Classes\.upop HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.upop /s
reg copy HKEY_CURRENT_USER\Software\Classes\upopfile HKEY_LOCAL_MACHINE\SOFTWARE\Classes\upopfile /s
Of course it will be different for your app.
Wednesday, May 24, 2017
Citrix users cannot remove old shortcuts from the Start Menu
Users are not allowed to right click and remove shortcuts. I found the location in the registry but it is encrypted. If I remove all of UserAssist, the Start Menu is empty.
HKEY_CURRENT_USER\Software\Microsoft\ Windows\CurrentVersion\Explorer\UserAssist\
After a day of searching I found this this tool that worked for my setup.
http://www.nirsoft.net/utils/userassist_view.html
Now I am able to remove one outdated shortcut and leave the rest.
Thursday, April 27, 2017
How to view all the hidden fields in Active Directory Users and Computers.
Active Directory Users and Computers
View / advanced Features
Find User
Member Of / Open group
Close User
Open User again
Attribute Editor tab
More than 500 fields are now available in the GUI. Why are there so many Microsoft?
Friday, May 8, 2015
How to delete files older than 30 days with one command line.
cleanup.bat
forfiles /p e:\camfiles /d -30 /m *.* /s /c "cmd /C del /q @FILE"
IP cameras do an ftp upload every five minutes. A schedules task will clean up the old files nightly.
Tuesday, July 8, 2014
How to get a quick list from AD with samid and company name.
dsquery user -limit 1000 | dsget user -samid -company
I doubt anyone else would ever need this info.
Subscribe to:
Posts (Atom)