原创 Powershell監控操作系統用戶賬號事件並預警

#   # 操作系統賬號事件(登錄、註銷、新增、刪除、軟件安裝)   # 主函數 Main   # @param string $str not null   # @param string $code not null   #    # 

原创 Powershell 之批量獲取文件大小

$startFolder = "D:\" $colItems = (Get-ChildItem $startFolder  | Where-Object {$_.PSIsContainer -eq $True} | Sort-Object)

原创 Powershell 之POP3郵件管理

################################################################################ #配置信息 $config=New-Object psobject $con

原创 Django model字段類型清單

Django 通過 models 實現數據庫的創建、修改、刪除等操作,本文爲模型中一般常用的類型的清單,便於查詢和使用:AutoField:一個自動遞增的整型字段,添加記錄時它會自動增長。你通常不需要直接使用這個字段;如果你不指定主鍵的話,

原创 Powershell 之加解密

#################  # Powershell Allows The Loading of .NET Assemblies  # Load the Security assembly to use with this scr

原创 Office 365 遠程登錄命令

以前管理Office365的時候,需要經常登錄後臺查看用戶郵件信息,配置用戶郵箱屬性等等,下面的腳本可以讓管理員快速登錄後臺。方法一: #region Online-Session function Online-Session(){  

原创 Python 學習筆記

rs=Person.objects.all() all返回的是QuerySet對象,程序並沒有真的在數據庫中執行SQL語句查詢數據,但支持迭代,使用for循環可以獲取數據。 print rs.query 會打印出原生sql語句 rs=Pe

原创 Office 365 在郵件組中查詢用戶是否存在

#region IsIn 判斷某個用戶是否在郵件組中 Function IsIn([string]$User,[string] $GroupName){     if($User -eq "" -or $GroupName -eq ""){

原创 Powershell 之多線程監控網頁狀態

#設置線程數量 $throttleLimit = 10 $SessionState = [system.management.automation.runspaces.initialsessionstate]::CreateDefault

原创 Powershell 之監控文件系統變化

#region Import Assemblies #---------------------------------------------- [void][Reflection.Assembly]::Load("System, Ver

原创 我的友情鏈接

51CTO博客開發

原创 Python 多進程使用之監控

下面簡單寫下實現方式,具體代碼不會全部貼出來。需要使用的py庫有下面幾個import urllib2 import socket from multiprocessing import Poolurllib2用於請求網頁socket用於限制

原创 Office 365 License自動分配

function Connect-MSService(){       Import-Module MsOnline       $cred=Get-Credential -Credential [email protected]       Con