$Res_Path="d:\temp\" $Time=Get-Date-UFormat"%Y%m%d%H%M" $ComputerName=$env:computername $IP=((gwmiwin32_networkadapterconfiguration|?{$_.DefaultIPGateway-ne$null}).IPAddress)[0] $Res_File_Path=$Res_Path+$ComputerName+"_"+$Time+".csv" $Users=Get-LocalUser "计算机名称,IP,用户名,用户状态,密码过期时间,用户所属组"|Out...

  LZgegZagYcYq   2023年11月24日   26   0   0 IPUserTimeIPTimeUser

  子目录按年月日命令,对每个月的子目录进行打包 y='2023'定义年份 formin{01..12};do定义01到12月 ym="$y$m" echo$ym ifls$ym&>/dev/null;then检查月份文件夹是否存在 echo"$ymexists,starttotar..." tar-cf$ym.tar$ym else echo"$ymnotexists." fi done   目录格式如下:  

  LZgegZagYcYq   2023年11月24日   27   0   0 子目录子目录

  参考:https://social.technet.microsoft.com/Forums/tr-TR/451171bf-574e-4436-992c-dc814c041da1/exchange-2016-getmessagetracklog?forum=exchangeserverzhchs EventID含义: https://learn.microsoft.com/zh-cn/exchange/mail-flow/transport-logs/message-tracking?view=exchserver-2019event-types-in-the-message-t...

  LZgegZagYcYq   2023年11月24日   29   0   0 microsoftmicrosoft

  !/bin/bash 脚本用来将vmware虚机通过ovftool导出到pve宿主机,然后再将其导入pve,可以设置pve虚机名称、OS类型、添加网卡配置mac地址,修改磁盘scsi改为ide,如果虚机之前在vmware中是开机状态,则将其开机 vms_path='/data1/scripts/vms.txt'vmcsv vms_ovf_path='/mnt/pve/dir-116/tmp_ovfbak/'vmovfpath vc_username='la%40yx.dd' vc_password='password' pve_storage='dir-116'pvesto...

  LZgegZagYcYq   2023年11月19日   29   0   0 idesedsedcentosidecentos

下载并安装ovftool sudo/bin/shVMware-ovftool-4.3.0-7948156-lin.x86_64.bundle ovftool-v查看ovftool版本   查看vcenter下的所有虚机信息ovftool--noSSLVerifyvi://username:password@10.10.2.2/SH/vm/ 如果账号密码中包含@¥等特殊字符,需要先将其进行转码,比如zhangsan@vc.com,需要写为zhangsan%40vc.com 从esxi导出虚机到/ovfbak/ovftool--noSSLVerifyvi://root:pass...

  LZgegZagYcYq   2023年11月19日   46   0   0 TestbundleVMwarebundleTestvmware

安装好Centos虚机系统,进行标准化配置,最后安装cloud-init,如下: yum-yinstallqemu-guest-agent yum-yinstallcloud-init systemctlenablecloud-init-local.service systemctlstartcloud-init-local.service systemctlenablecloud-init.service systemctlstartcloud-init.service systemctlenablecloud-config.service systemctlstartcloud-co...

  LZgegZagYcYq   2023年11月19日   38   0   0 ciideIPIPciide

  $exguid_byetarray=(Get-ADUseryunchi02-PropertiesmsExchMailboxGuid).msExchMailboxGuid此时为byteArray格式 new-objectSystem.Guid-ArgumentList@(,$exguid_byetarray)将其转换为guid  

  LZgegZagYcYq   2023年11月18日   30   0   0 SystemSystem

  $array=New-ObjectSystem.Collections.ArrayList($null) $array.add("a")|Out-Null  

  LZgegZagYcYq   2023年11月18日   33   0   0 SystemSystem

  vms_path='/data1/scripts/vms_batch.txt'vmcsv IFS=$'\n' forlinein$(awk'NR>1'$vms_path)跳过第一行 do echo$line host=`echo$line|awk-F,'{print$1}'` done  

  LZgegZagYcYq   2023年11月18日   27   0   0 系统系统

  授予用户srv-exaccmb-user对其他所有邮箱的完全控制权限(除去自身) $usermailbox="srv-exaccmb-user@yun.cn" $usermailbox_alias=$usermailbox.split("@")[0] Get-Mailbox-ResultSizeunlimited-Filter"(RecipientTypeDetails-eq'UserMailbox')-and(Alias-ne'$($usermailbox_alias)')"|Add-MailboxPermission-User$usermailbox-AccessRight...

  LZgegZagYcYq   2023年11月17日   34   0   0 UserUser

  新建IIS站点,设置主机头,设置应用程序池$domainname="domainname"$site_owa="OWA"$site_owa_dir="d:\$site_owa"$url_owa=($site_owa+"."+$domainname).ToLower()New-WebAppPool-Name$site_owaNew-Website-Name$site_owa-Port80-HostHeader$url_owa-PhysicalPath$site_owa_dir-ApplicationPool$site_owaNew-WebBinding-Name$site_o...

  LZgegZagYcYq   2023年11月12日   36   0   0 应用程序应用程序ideipadipadide

查看文件编码格式:filefishmails.csv.old 修改文件编码格式: iconv-fiso-8859-1-tUTF-8fishmails.csv.oldt-o fishmails.csv  

1.升级openssl到1.1.1n cd/data/softwares cdopenssl-1.1.1n ./config make&&makeinstall ln-s/usr/local/lib64/libssl.so.1.1/usr/lib64/libssl.so.1.1 ln-s/usr/local/lib64/libcrypto.so.1.1/usr/lib64/libcrypto.so.1.1 mv/usr/bin/openssl/usr/bin/openssl.old ln-sv/usr/local/bin/openssl/usr/bin/openssl reb...

  LZgegZagYcYq   2023年11月05日   58   0   0 python升级pythonbcbcpython升级Python

遍历目录下文件并上传到ftp !/bin/sh 定义ftp上传函数,一次只上传一个文件 ftp_put_file(){ ftp-v-n$ftp_server<<EOF user$ftp_user$ftp_password binary cd$remote_path_ftp lcd$local_path_for_put prompt put$1 bye EOF echo"committoftpsuccessfully" } PUTFILE='taryear_0712.sh' ftp_put_file$PUTFILE ftp_server='10.1.1.7' ftp_user=...

 LVS+Keepalived配置: LVS使用两个网卡,网卡一对外提供服务(VIP也位于该网卡),网卡二连接后端RealServer(网卡二和RealServer位于同一网段) RealServer需要配置回环网卡,如下: CentOS: ifconfiglo:010.10.20.21netmask255.255.255.255up  10.10.20.21为VIP Windows: 添加硬件回环网卡,取消IPv6运行如下命令: netshinterfaceipv4setinterface"Loopback"weakhostreceive=enablednets...

  LZgegZagYcYq   2023年11月02日   47   0   0 ednipadLVScentosLVScentosipadedn
关注 更多

空空如也 ~ ~

粉丝 更多

空空如也 ~ ~