Last active
March 21, 2024 11:18
-
-
Save gsmitheidw/858deedc10c035be35d2a44efcdaa66e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Send Keypresses | |
$wshell = new-object -com wscript.shell | |
$wshell.SendKeys("{CAPSLOCK}") | |
# Graphical input | |
$data = [Microsoft.VisualBasic.Interaction]::InputBox('hi user give me your data', 'inputboxtitle') | |
# Graphical output | |
[Microsoft.VisualBasic.Interaction]::MsgBox("tada", "OKOnly,SystemModal,Information", "msgboxtitle") | |
# BIOS info: | |
Get-CimInstance -ClassName Win32_ComputerSystemProduct # gives make and model & service tag of dell | |
Get-CimInstance win32_SystemEnclosure | |
Get-CimInstance Win32_BaseBoard | |
# Delete profiles older than 30 days | |
Get-CimInstance Win32_UserProfile | where {$_.LastUseTime -lt (Get-Date).AddDays(-30) -and $_.Special -eq $false} | Remove-CimInstance |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment