我需要在PowerShell中使用$variables和某种比较 欢迎作为新用户使用SO。请带上这本书,同时阅读。请使用{}按钮或标记或CTRL+k正确格式化代码。我也没看到问题。不知道你在找什么。需要更多信息。哦,对不起,所以我希望程序以这种方式工作,但
我需要在PowerShell中使用$variables和某种比较我需要在PowerShell中使用$variables和某种比较 欢迎作为新用户使用SO。请带上这本书,同时阅读。请使用{}按钮或标记或CTRL+k正确格式化代码。我也没看到问题。不知道你在找什么。需要更多信息。哦,对不起,所以我希望程序以这种方式工作,但,powershell,Powershell,我需要在PowerShell中使用$variables和某种比较 欢迎作为新用户使用SO。请带上这本书,同时阅读。请使用{}按钮或标记或CTRL+k正确格式化代码。我也没看到问题。不知道你在找什么。需要更多信息。哦,对不起,所以我希望程序以这种方式工作,但它不能对变量进行验证。它没有说明第一个术语可以是3种类型的字符串等等。 $Filial = "^(SPP\.|SSL\.)$" $PC = "^(N\.|V\.|D\.)$" $Serve = "^(SRV\.)$ $ServerLis
欢迎作为新用户使用SO。请带上这本书,同时阅读。请使用
{}
按钮或标记或CTRL+k正确格式化代码。我也没看到问题。不知道你在找什么。需要更多信息。哦,对不起,所以我希望程序以这种方式工作,但它不能对变量进行验证。它没有说明第一个术语可以是3种类型的字符串等等。
$Filial = "^(SPP\.|SSL\.)$"
$PC = "^(N\.|V\.|D\.)$"
$Serve = "^(SRV\.)$
$ServerList = Get-DhcpServerInDC | select IPADdress, DNSName
foreach ($server in $serverlist)
{
Get-DHCPServerv4Scope -ComputerName $server.IPAddress |
select ScopeId |
ForEach-Object {
Get-DHCPServerv4Lease -ScopeId $_.ScopeID -ComputerName $Server.DNSName -AllLeases |
Where {
$_.Hostname -isnot "$Filial-$Server-$PC" -and -and
$_.Hostname -notlike "$_NULL"
}
| Select-Object ScopeId,IPAddress,HostName,ClientID,AddressState |
Export-Csv -Delimiter ";" -Path C:\Scripts\teste\tste.csv -NoTypeInformation
-Encoding UTF8 -Force
I tried isnot, nothing, not like, anything fucking anything works out, I wish the name not to be pulled out is any of those.
$Filial = "^(SPP\.|SSL\.)$"
$PC = "^(N\.|V\.|D\.)$"
$Serve = "^(SRV\.)$
$ServerList = Get-DhcpServerInDC | select IPADdress, DNSName
foreach ($server in $serverlist)
{
Get-DHCPServerv4Scope -ComputerName $server.IPAddress |
select ScopeId |
ForEach-Object {
Get-DHCPServerv4Lease -ScopeId $_.ScopeID -ComputerName $Server.DNSName -AllLeases |
Where {
$_.Hostname -isnot "$Filial-$Server-$PC" -and -and
$_.Hostname -notlike "$_NULL"
}
| Select-Object ScopeId,IPAddress,HostName,ClientID,AddressState |
Export-Csv -Delimiter ";" -Path C:\Scripts\teste\tste.csv -NoTypeInformation
-Encoding UTF8 -Force
I tried isnot, nothing, not like, anything fucking anything works out, I wish the name not to be pulled out is any of those.